Answers.Body: <p>What you should do as part of your exploration is to learn various models of increasing complexity. Start from a simple linear model, ending in multi-layer neural networks (with non-linear activations of course). If the nonlinear models are better then that implies that your data do not follow a linear hyperplane.</p>
  <p>Also check this out for recent trends: <a href="https://machinelearningmastery.com/auto-sklearn-for-automated-machine-learning-in-python/" rel="nofollow noreferrer">https://machinelearningmastery.com/auto-sklearn-for-automated-machine-learning-in-python/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-02T17:15:52.420Z
Answers.LastActivityDate: 2021-01-02T17:15:52.420Z
Answers.UserDisplayName: LuckyLuke
Answers.Body: <p>There is a special <em>model selection technique</em> that is called <code>K-Fold Cross Validation</code> just for this situation. It is basically dividing your dataset into separate pieces, training and evaluating on each of them iteratively. Check the example image below:</p>
  <p><a href="https://i.sstatic.net/O1Gkv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/O1Gkv.png" alt="enter image description here" /></a></p>
  <p>Each of these <code>e</code> values represents the exclusive error on that fold of data. Applying summation to them and dividing into fold count would give you the <strong>model error</strong>.</p>
  <p><a href="https://i.sstatic.net/LzNTx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LzNTx.png" alt="enter image description here" /></a></p>
  <p><strong>Model error</strong> represents the model's performance on that specific given dataset. If you want to see which model would suit your data better, I suggest you to comparing their model errors.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-23T02:22:23.687Z
Answers.LastActivityDate: 2023-01-23T02:22:23.687Z
Answers.UserDisplayName: murat.sahin.dev
Answers.Body: <p>Regression Model will definitely work on That problem.</p>
  <p>You only need to change shape of predicting variables like(Day, Weather, people arrived) into 1D array if you got error..
  Otherwise you can simply apply Linear Regression, SVM etc to get your output with good accuracy.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-05T15:42:07.440Z
Answers.LastActivityDate: 2020-08-05T15:42:07.440Z
Answers.UserDisplayName: Muhammad Rizwan Munawar
Body: <p>What if I have some data, let's say I'm trying to answer if education level and IQ affect earnings, and I want to analyze this data and put in a regression model to predict earnings based on the IQ and education level. My confusion is, what if the data is not linear or polynomial? What if it's a mess but there are still patterns that the linear plane algorithm can't capture? How do I figure out if plotting all of the independent variables will form a line or a polynomial curve like here?</p>
  <p><a href="https://i.sstatic.net/LZ5Bd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LZ5Bd.png" alt="enter image description here" /></a></p>
  <p>I mean, with one dependent and one independent variable it's easy because you can plot it and see, but in a situation with multiple independent variables... how do I figure out if the relationship is linear or something like this? How do I figure out if I should use a regression model?</p>
  <p>Let's say I want to predict a store's daily revenue based on the day of the week, weather and the number of people arrived in the city. My data would look something like this:</p>
  <pre><code>+-----------+---------+----------------+---------+
  | DAY       | WEATHER | PEOPLE ARRIVED | REVENUE |
  +-----------+---------+----------------+---------+
  | Monday    | Sunny   | 1115           | <span class="math-container">$500    |
  +-----------+---------+----------------+---------+
  | Tuesday   | Cloudy  | 808            | $</span>250    |
  +-----------+---------+----------------+---------+
  | Wednesday | Sunny   | 450            | $300    |
  +-----------+---------+----------------+---------+
  </code></pre>
  <p>I'm a bit confused about what ML algorithm I should use in such a scenario. I can represent the days of the week as (Monday - 1, Tuesday - 2, Wednesday - 3, etc.) and the weather as (Sunny - 1, Cloudy - 2, Normal - 3, etc.) but would a regression model work? I'm skeptical because I'm not sure if there's a linear relationship between the variables and I'm not sure if a hyperplane can create accurate representation of what's going on.</p>
  
Tags: <prediction><regression><linear-regression><non-linear-regression>
Title: What ML algorithm should I use that suits this data?
UserDisplayName: JingleBells
ThreadText: # What ML algorithm should I use that suits this data?
  
  (Asked by: username_0 on 2020-08-04)
  
  What if I have some data, let's say I'm trying to answer if education level and IQ affect earnings, and I want to analyze this data and put in a regression model to predict earnings based on the IQ and education level. My confusion is, what if the data is not linear or polynomial? What if it's a mess but there are still patterns that the linear plane algorithm can't capture? How do I figure out if plotting all of the independent variables will form a line or a polynomial curve like here?
  
  I mean, with one dependent and one independent variable it's easy because you can plot it and see, but in a situation with multiple independent variables... how do I figure out if the relationship is linear or something like this? How do I figure out if I should use a regression model?
  Let's say I want to predict a store's daily revenue based on the day of the week, weather and the number of people arrived in the city. My data would look something like this:
  +-----------+---------+----------------+---------+
  | DAY       | WEATHER | PEOPLE ARRIVED | REVENUE |
  +-----------+---------+----------------+---------+
  | Monday    | Sunny   | 1115           | $500    |
  +-----------+---------+----------------+---------+
  | Tuesday   | Cloudy  | 808            | $250    |
  +-----------+---------+----------------+---------+
  | Wednesday | Sunny   | 450            | $300    |
  +-----------+---------+----------------+---------+
  
  I'm a bit confused about what ML algorithm I should use in such a scenario. I can represent the days of the week as (Monday - 1, Tuesday - 2, Wednesday - 3, etc.) and the weather as (Sunny - 1, Cloudy - 2, Normal - 3, etc.) but would a regression model work? I'm skeptical because I'm not sure if there's a linear relationship between the variables and I'm not sure if a hyperplane can create accurate representation of what's going on.
  
  **Tags:** prediction, regression, linear-regression, non-linear-regression
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2021-01-02. Score: 1 | Accepted answer
  
  What you should do as part of your exploration is to learn various models of increasing complexity. Start from a simple linear model, ending in multi-layer neural networks (with non-linear activations of course). If the nonlinear models are better then that implies that your data do not follow a linear hyperplane.
  
  Also check this out for recent trends: <https://machinelearningmastery.com/auto-sklearn-for-automated-machine-learning-in-python/>
  
  
  ---
  
  ### Answer by username_2 on 2023-01-23. Score: 1
  
  There is a special *model selection technique* that is called `K-Fold Cross Validation` just for this situation. It is basically dividing your dataset into separate pieces, training and evaluating on each of them iteratively. Check the example image below:
  
  [![enter image description here](https://i.sstatic.net/O1Gkv.png)](https://i.sstatic.net/O1Gkv.png)
  
  Each of these `e` values represents the exclusive error on that fold of data. Applying summation to them and dividing into fold count would give you the **model error**.
  
  [![enter image description here](https://i.sstatic.net/LzNTx.png)](https://i.sstatic.net/LzNTx.png)
  
  **Model error** represents the model's performance on that specific given dataset. If you want to see which model would suit your data better, I suggest you to comparing their model errors.
  
  
  ---
  
  ### Answer by username_3 on 2020-08-05. Score: 0
  
  Regression Model will definitely work on That problem.
  
  You only need to change shape of predicting variables like(Day, Weather, people arrived) into 1D array if you got error..
  Otherwise you can simply apply Linear Regression, SVM etc to get your output with good accuracy.
  
  
  ---
  
  