Answers.Body: <p>I don't think there's a hard rule here, just do what makes sense.</p>
  <ol>
  <li>Do a standard binary classification task.</li>
  <li>Assuming the label itself actually contains information (and it's not just there to indicate &gt; 1 or not), then you can try keeping the full labels (maybe they are indeed useful to the model), and train a regression task.</li>
  </ol>
  <p>For your internal metrics you can keep using MSE as a statistic to look at to help differentiate various models (since it's more sensitive than precision/recall) but keep precision/recall of the resulting binary classification as your main metric.</p>
  <p>At the end of the day it does not matter how the model was trained, so report whatever the most useful metric is (on your test data of course)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-05T20:36:39.443Z
Answers.LastActivityDate: 2022-04-05T20:36:39.443Z
Answers.UserDisplayName: Ant
Body: <p>The independent variables are <code>date</code>, <code>count</code>, <code>atmp</code>, and <code>clouds</code>, and the dependent variable is <code>amount</code>. It's only important if <code>amount &gt; 1.0</code>, so it can be a binary task.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>date</th>
  <th>count</th>
  <th>amount</th>
  <th>atmp</th>
  <th>clouds</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2014-01-21 00:00:00</td>
  <td>87</td>
  <td>0.169158634145595</td>
  <td>14.6</td>
  <td>NaN</td>
  </tr>
  <tr>
  <td>2014-01-27 00:00:00</td>
  <td>87</td>
  <td>2.931856805839958</td>
  <td>14.6</td>
  <td>NaN</td>
  </tr>
  <tr>
  <td>2014-02-03 00:00:00</td>
  <td>87</td>
  <td>0.4570096329822</td>
  <td>12.4</td>
  <td>1.0</td>
  </tr>
  <tr>
  <td>2014-02-10 00:00:00</td>
  <td>90</td>
  <td>0.422058948094016</td>
  <td>15.2</td>
  <td>NaN</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>However, converting amount to <code>0</code> or <code>1</code>, doesn't the model lose information that would be helpful in training? And vice versa, if leaving amount as continuous and performing regression, is it possible or common to show the model's accuracy based on being above or below 1.0 rather than using a statistic such as MSE?</p>
  <p>What is a good way to model this using machine learning?</p>
  
Tags: <machine-learning><python><regression><binary-classification>
Title: Prediction of continuous variable based on threshold
UserDisplayName: There
ThreadText: # Prediction of continuous variable based on threshold
  
  (Asked by: username_0 on 2022-04-02)
  
  The independent variables are `date`, `count`, `atmp`, and `clouds`, and the dependent variable is `amount`. It's only important if `amount > 1.0`, so it can be a binary task.
  
  | date | count | amount | atmp | clouds |
  | --- | --- | --- | --- | --- |
  | 2014-01-21 00:00:00 | 87 | 0.169158634145595 | 14.6 | NaN |
  | 2014-01-27 00:00:00 | 87 | 2.931856805839958 | 14.6 | NaN |
  | 2014-02-03 00:00:00 | 87 | 0.4570096329822 | 12.4 | 1.0 |
  | 2014-02-10 00:00:00 | 90 | 0.422058948094016 | 15.2 | NaN |
  
  However, converting amount to `0` or `1`, doesn't the model lose information that would be helpful in training? And vice versa, if leaving amount as continuous and performing regression, is it possible or common to show the model's accuracy based on being above or below 1.0 rather than using a statistic such as MSE?
  
  What is a good way to model this using machine learning?
  
  **Tags:** machine-learning, python, regression, binary-classification
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-04-05. Score: 1
  
  I don't think username_0's a hard rule here, just do what makes sense.
  
  1. Do a standard binary classification task.
  2. Assuming the label itself actually contains information (and it's not just username_0 to indicate > 1 or not), then you can try keeping the full labels (maybe they are indeed useful to the model), and train a regression task.
  
  For your internal metrics you can keep using MSE as a statistic to look at to help differentiate various models (since it's more sensitive than precision/recall) but keep precision/recall of the resulting binary classification as your main metric.
  
  At the end of the day it does not matter how the model was trained, so report whatever the most useful metric is (on your test data of course)
  
  
  ---
  
  