Answers.Body: <p>In most cases, classification at the final decision point is attempting to linearly separate classes.  Complex data is rarely linearly separable so it is common to perform transformations on the data until it is.</p>
  <p>The training algorithm must find any important transformations.  If some expert knowledge exists that a transformation is important, it’s often good to do it in pre-processing so it doesn’t need to be recreated by the model.</p>
  <p>However, a transformation might also hide information or make the data harder to linearly separate.  So the best answer is pre-processing is sometimes trial and error.</p>
  <p>There is a clear pro to your specific example:
  Unless a datapoint contains both current and previous odometers reading, speed could never be derived.  Any prediction dependent on speed could not be made.  The same could be said of any point to point derivation.</p>
  <p>Similar arguments can be made in regression where the goal is to find a simple polynomial for best generalization.  It may take some transformations to get to a representation where the polynomial is simple.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-12T17:44:39.023Z
Answers.LastActivityDate: 2024-09-12T17:44:39.023Z
Answers.UserDisplayName: foreverska
Body: <p>I'm working on a dataset that contains several <em>cumulative variables</em>, which are values that always increase and depend on their previous values (such as an odometer reading in a vehicle). My aim is to train ML or DL models to perform regression and classification tasks in supervised learning from the variables in my dataset.</p>
  <p>I wonder whether it makes sense to create <em>differential variables</em> from these cumulative variables to train ML or DL models. For example, calculating the difference between consecutive records to obtain a rate of change between them (and even dividing by the time interval between samples to create the <em>time derivatives</em>). Could this approach provide any advantages for machine learning models? Is it a standard practice?</p>
  
Tags: <machine-learning><datasets><data-preprocessing><feature-engineering>
Title: Is it useful for ML or DL algorithms to create differential variables from cumulative variables in a dataset?
UserDisplayName: user386164
ThreadText: # Is it useful for ML or DL algorithms to create differential variables from cumulative variables in a dataset?
  
  (Asked by: username_0 on 2024-09-12)
  
  I'm working on a dataset that contains several *cumulative variables*, which are values that always increase and depend on their previous values (such as an odometer reading in a vehicle). My aim is to train ML or DL models to perform regression and classification tasks in supervised learning from the variables in my dataset.
  
  I wonder whether it makes sense to create *differential variables* from these cumulative variables to train ML or DL models. For example, calculating the difference between consecutive records to obtain a rate of change between them (and even dividing by the time interval between samples to create the *time derivatives*). Could this approach provide any advantages for machine learning models? Is it a standard practice?
  
  **Tags:** machine-learning, datasets, data-preprocessing, feature-engineering
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-09-12. Score: 1
  
  In most cases, classification at the final decision point is attempting to linearly separate classes. Complex data is rarely linearly separable so it is common to perform transformations on the data until it is.
  
  The training algorithm must find any important transformations. If some expert knowledge exists that a transformation is important, it’s often good to do it in pre-processing so it doesn’t need to be recreated by the model.
  
  However, a transformation might also hide information or make the data harder to linearly separate. So the best answer is pre-processing is sometimes trial and error.
  
  There is a clear pro to your specific example:
  Unless a datapoint contains both current and previous odometers reading, speed could never be derived. Any prediction dependent on speed could not be made. The same could be said of any point to point derivation.
  
  Similar arguments can be made in regression where the goal is to find a simple polynomial for best generalization. It may take some transformations to get to a representation where the polynomial is simple.
  
  
  ---
  
  