Answers.Body: <p>Classification can be performed on structured or unstructured data. Classification is a technique where we categorize data into a given number of classes. </p>
  
  <p>Based on my project in price classification, when i compared into the 5 models, i got a higher score on a <strong>Random Forest Classifier</strong> compared to Decision Tree, SVM, Naive Bayes, Logistic Regression.</p>
  
  <p>my project: <a href="https://github.com/khaifagifari/Classification-and-Clustering-on-Used-Cars-Dataset" rel="nofollow noreferrer">https://github.com/khaifagifari/Classification-and-Clustering-on-Used-Cars-Dataset</a></p>
  
  <p>source : <a href="https://github.com/f2005636/Classification" rel="nofollow noreferrer">https://github.com/f2005636/Classification</a> 
  <a href="https://www.kaggle.com/vbmokin/used-cars-price-prediction-by-15-models" rel="nofollow noreferrer">https://www.kaggle.com/vbmokin/used-cars-price-prediction-by-15-models</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T08:54:43.023Z
Answers.LastActivityDate: 2020-04-21T08:54:43.023Z
Answers.UserDisplayName: Muhammad Khaifa Gifari
Answers.Body: <p>If your data is labeled, but you only have a limited amount, you should use a classifier with high bias (for example, Naive Bayes). I'm guessing this is because a higher-bias classifier will have lower variance, which is good because of the small amount of data</p>
  
  <p>Source : <a href="https://stackoverflow.com/questions/2595176/which-machine-learning-classifier-to-choose-in-general/15881662">https://stackoverflow.com/questions/2595176/which-machine-learning-classifier-to-choose-in-general/15881662</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T09:40:06.670Z
Answers.LastActivityDate: 2020-04-21T11:29:36.983Z
Answers.LastEditDate: 2020-04-21T11:29:36.983Z
Answers.UserDisplayName: Naqliya Arum Permata
Answers.Body: <p>I think no matter you use one or more feature for dataset. 
  You can compare the classification algorithms regarding the accuracy provided by the algorithm. Like compare naive bayes with svm method, it based on your problem set.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T11:21:08.730Z
Answers.LastActivityDate: 2020-04-21T11:21:08.730Z
Answers.UserDisplayName: salman r
Answers.Body: <p>if you use just one  feature for dataset, i'm recommend a Algorithm Naive Bayes Classifier because Naive Bayes is a method using probability and statistical methods. And we can also get the total data train and its accuracy value by using. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T11:01:19.923Z
Answers.LastActivityDate: 2020-04-21T11:07:04.337Z
Answers.LastEditDate: 2020-04-21T11:07:04.337Z
Answers.UserDisplayName: Aidearni Purba
Answers.Body: <p>It is not really a metter of what model, but if it is possible at all to predict what you're trying to predict. Let's take a similar dataset from kaggle: <a href="https://www.kaggle.com/camnugent/california-housing-prices" rel="nofollow noreferrer">California Housing Prices</a> </p>
  
  <p>This dataset contains house prices and other information among which the number of bedrooms per house. As suggested by Oliver in the comments we can compute the Person coefficient to estimate the correlation between the two variables. </p>
  
  <pre><code>import pandas as pd
  from scipy.stats import pearsonr
  
  df = pd.read_csv('housing.csv')
  df = df.apply(lambda row: row[df['total_bedrooms'] &lt;= 20]) # select subset of dataframe for sake of clarity
  df.dropna(inplace=True)
  
  x = df['median_house_value'] # our single feature  
  y = df['total_bedrooms'] # target labels
  
  print('Correlation: \n', pearsonr(x,y))
  </code></pre>
  
  <p>Out:</p>
  
  <pre><code>&gt;&gt;Correlation: 
  &gt;&gt;(-0.14015312664251944, 0.12362969210761204)
  </code></pre>
  
  <p>The correlation is pretty low, which means that the price and number of bedrooms are basically not related. We can also plot the points to check that indeed there is no correlation at all.</p>
  
  <pre><code>df.plot(x='total_bedrooms',y='median_house_value',kind='scatter')
  </code></pre>
  
  <p>Out:</p>
  
  <p><a href="https://i.sstatic.net/XEKAY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XEKAY.png" alt="enter image description here"></a></p>
  
  <p>Training a model to predict the number of bedrooms uniquely from the price would mean to find a function that can interpolate all those points, which is an impossible task since we have several different prices for houses with the same amount of bedrooms. </p>
  
  <p>The only way to tackle a problem like this would be to expand the dimensionality of the data, for example by using a Support Vector Machine with a non linear kernel. But even with non linear kernels you can't do miracles, so if you're dataset looks like this one, the only solution would be to expand your dataset to include extra features. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T07:22:36.097Z
Answers.Text: Thanks for your explanation, I think you're right.
Answers.UserDisplayName: Arashsyh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T01:31:09.387Z
Answers.LastActivityDate: 2020-04-14T01:31:09.387Z
Answers.UserDisplayName: Edoardo Guerriero
Body: <p>I have a labeled dataset composed of 3000 data. Its single feature is the price of the house and its label is the number of bedrooms. </p>
  
  <p>Which classifier would be a good choice to classify these data?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-12T12:06:20.657Z
Comments.Text: A simple correlation coefficient?
Comments.UserDisplayName: Oliver Mason
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-14T01:23:16.303Z
Comments.Text: Have you plotted and visualized your data already? A simple linear regresión might do
Comments.UserDisplayName: nsa
Tags: <machine-learning><ai-design><classification>
Title: Which classifier should I use for a dataset with one feature?
UserDisplayName: Arashsyh
ThreadText: # Which classifier should I use for a dataset with one feature?
  
  (Asked by: username_0 on 2020-04-12)
  
  I have a labeled dataset composed of 3000 data. Its single feature is the price of the house and its label is the number of bedrooms.
  
  Which classifier would be a good choice to classify these data?
  
  **Tags:** machine-learning, ai-design, classification
  
  > **Comments:**
  > **username_1**: A simple correlation coefficient?  
  > **username_2**: Have you plotted and visualized your data already? A simple linear regresión might do  
  
  ---
  
  ## 5 answers
  
  ### Answer by username_7 on 2020-04-14. Score: 3 | Accepted answer
  
  It is not really a metter of what model, but if it is possible at all to predict what you're trying to predict. Let's take a similar dataset from kaggle: [California Housing Prices](https://www.kaggle.com/camnugent/california-housing-prices)
  
  This dataset contains house prices and other information among which the number of bedrooms per house. As suggested by username_1 in the comments we can compute the Person coefficient to estimate the correlation between the two variables.
  
  ```
  import pandas as pd
  from scipy.stats import pearsonr
  
  df = pd.read_csv('housing.csv')
  df = df.apply(lambda row: row[df['total_bedrooms'] <= 20]) # select subset of dataframe for sake of clarity
  df.dropna(inplace=True)
  
  x = df['median_house_value'] # our single feature  
  y = df['total_bedrooms'] # target labels
  
  print('Correlation: \n', pearsonr(x,y))
  
  ```
  
  Out:
  
  ```
  >>Correlation: 
  >>(-0.14015312664251944, 0.12362969210761204)
  
  ```
  
  The correlation is pretty low, which means that the price and number of bedrooms are basically not related. We can also plot the points to check that indeed there is no correlation at all.
  
  ```
  df.plot(x='total_bedrooms',y='median_house_value',kind='scatter')
  
  ```
  
  Out:
  
  [![enter image description here](https://i.sstatic.net/XEKAY.png)](https://i.sstatic.net/XEKAY.png)
  
  Training a model to predict the number of bedrooms uniquely from the price would mean to find a function that can interpolate all those points, which is an impossible task since we have several different prices for houses with the same amount of bedrooms.
  
  The only way to tackle a problem like this would be to expand the dimensionality of the data, for example by using a Support Vector Machine with a non linear kernel. But even with non linear kernels you can't do miracles, so if you're dataset looks like this one, the only solution would be to expand your dataset to include extra features.
  
  > **Comments:**
  > **username_0**: Thanks for your explanation, I think you're right.  
  
  ---
  
  ### Answer by username_3 on 2020-04-21. Score: 1
  
  Classification can be performed on structured or unstructured data. Classification is a technique where we categorize data into a given number of classes.
  
  Based on my project in price classification, when i compared into the 5 models, i got a higher score on a **Random Forest Classifier** compared to Decision Tree, SVM, Naive Bayes, Logistic Regression.
  
  my project: <https://github.com/khaifagifari/Classification-and-Clustering-on-Used-Cars-Dataset>
  
  source : <https://github.com/f2005636/Classification>
  <https://www.kaggle.com/vbmokin/used-cars-price-prediction-by-15-models>
  
  
  ---
  
  ### Answer by username_4 on 2020-04-21. Score: 1
  
  If your data is labeled, but you only have a limited amount, you should use a classifier with high bias (for example, Naive Bayes). I'm guessing this is because a higher-bias classifier will have lower variance, which is good because of the small amount of data
  
  Source : <https://stackoverflow.com/questions/2595176/which-machine-learning-classifier-to-choose-in-general/15881662>
  
  
  ---
  
  ### Answer by username_5 on 2020-04-21. Score: 0
  
  I think no matter you use one or more feature for dataset.
  You can compare the classification algorithms regarding the accuracy provided by the algorithm. Like compare naive bayes with svm method, it based on your problem set.
  
  
  ---
  
  ### Answer by username_6 on 2020-04-21. Score: 0
  
  if you use just one feature for dataset, i'm recommend a Algorithm Naive Bayes Classifier because Naive Bayes is a method using probability and statistical methods. And we can also get the total data train and its accuracy value by using.
  
  
  ---
  
  