Answers.Body: <p>Data pre-processing and feature extraction are by far the most important part of any machine learning algorithm. It's even more important that the model you choose to do the classification. </p>
  
  <p>Unfortunately, pre-processing and feature extraction are completely different for each type of data. You need to play around with the data yourself to find out what works best with the nature of your data. With experience you start noticing some patterns with different data types. For example, as you are doing, building a word vector is an effective means of feature extraction with text based data. </p>
  
  <p>"I could just add tweet location at the end of the vector I suppose, but that would give it a very small weighting."</p>
  
  <p>This is entirely untrue for any machine learning algorithm I would choose. Your model should not associate weights to the inputs based on their array location. They should be associated based on the explained variance (information gain) it provides. </p>
  
  <hr>
  
  <p>After you do your pre-processing and feature extraction you can then further refine your feature set with some common methods which can be found in libraries such as: principle component analysis (PCA) and linear discriminant analysis (LDA). </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-12T06:10:25.717Z
Answers.Text: Thanks, Jah, much appreciated. Wrt 'Your model should not associate weights to the inputs based on their array location.' I wasn't meaning because it was last in the array, but because, say, it is in a 5,000-word array, it would be only one factor of 5,001. This is what I am looking for an example of: combining a big array and e.g. location.
Answers.UserDisplayName: schoon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-12T13:11:16.610Z
Answers.Text: It should still be fine. If that variable explains the most of the variance then it will be attributed more weight. Of course, if your featurespace is too high dimensional for the limited amount of data you have. Then you will have problems. But, you should use some feature reduction techniques to get rid of features which are not pertinent in your decision boundary.
Answers.UserDisplayName: JahKnows
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-11T18:42:37.540Z
Answers.LastActivityDate: 2017-07-11T18:42:37.540Z
Answers.UserDisplayName: JahKnows
Body: <p>I am trying to perform a binary classification of tweets using machine learning. </p>
  
  <p>The usual way of doing this seems to be putting a hand-classified tweet's words into a big vector, then use that vector as input to an algorithm, which then predicts new tweets based on this data.</p>
  
  <p>Is there a standard method, or algorithm, that can include other input, such as the location of a tweet, in this process? </p>
  
  <p>I could just add tweet location at the end of the vector, I suppose, but that would give it a very small weighting. </p>
  
  <p>Any pointers are much appreciated.</p>
  
Tags: <machine-learning><classification><features>
Title: How to add more features to the input of a machine learning algorithm?
UserDisplayName: schoon
ThreadText: # How to add more features to the input of a machine learning algorithm?
  
  (Asked by: username_0 on 2017-07-11)
  
  I am trying to perform a binary classification of tweets using machine learning.
  
  The usual way of doing this seems to be putting a hand-classified tweet's words into a big vector, then use that vector as input to an algorithm, which then predicts new tweets based on this data.
  
  Is there a standard method, or algorithm, that can include other input, such as the location of a tweet, in this process?
  
  I could just add tweet location at the end of the vector, I suppose, but that would give it a very small weighting.
  
  Any pointers are much appreciated.
  
  **Tags:** machine-learning, classification, features
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-07-11. Score: 3 | Accepted answer
  
  Data pre-processing and feature extraction are by far the most important part of any machine learning algorithm. It's even more important that the model you choose to do the classification.
  
  Unfortunately, pre-processing and feature extraction are completely different for each type of data. You need to play around with the data yourself to find out what works best with the nature of your data. With experience you start noticing some patterns with different data types. For example, as you are doing, building a word vector is an effective means of feature extraction with text based data.
  
  "I could just add tweet location at the end of the vector I suppose, but that would give it a very small weighting."
  
  This is entirely untrue for any machine learning algorithm I would choose. Your model should not associate weights to the inputs based on their array location. They should be associated based on the explained variance (information gain) it provides.
  
  ---
  
  After you do your pre-processing and feature extraction you can then further refine your feature set with some common methods which can be found in libraries such as: principle component analysis (PCA) and linear discriminant analysis (LDA).
  
  > **Comments:**
  > **username_0**: Thanks, Jah, much appreciated. Wrt 'Your model should not associate weights to the inputs based on their array location.' I wasn't meaning because it was last in the array, but because, say, it is in a 5,000-word array, it would be only one factor of 5,001. This is what I am looking for an example of: combining a big array and e.g. location.  
  > **username_1**: It should still be fine. If that variable explains the most of the variance then it will be attributed more weight. Of course, if your featurespace is too high dimensional for the limited amount of data you have. Then you will have problems. But, you should use some feature reduction techniques to get rid of features which are not pertinent in your decision boundary.  
  
  ---
  
  