Answers.Body: <p>Are you sure, that there is a need for ML? If there is a set of rules that allows to solve this problem without ML, it gives already 100% accuracy, whereas ML/DL will do it up to a certain accuracy, and this task may be even tough for supervised algorithm. Sorting problem is very difficult for neural networks.</p>
  <p>Anyway, check whether your algorithm can express these if-else statements. For example such branch, given that the output is of the same size for both conditional branches, can be approximated by the following:</p>
  <pre><code>sigmoid(beta * condition) * output_1 + sigmoid(-beta * condition) * output_2
  </code></pre>
  <p>Here <code>beta</code> controls the slope of the sigmoid, <code>condition</code> is the conditional statement of the form <span class="math-container">$f(x) &gt;(\geqslant) 0$</span>, and <code>output_1</code> and <code>output_2</code> are the outcomes of both options.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-13T04:41:18.083Z
Answers.LastActivityDate: 2021-08-13T04:41:18.083Z
Answers.UserDisplayName: spiridon_the_sun_rotator
Body: <p>I have a time series classification problem that uses a series of if-else statements to arrive at a particular label. I am attempting to use ML/DL to make the system simpler.</p>
  <p>So far, I have tried using a tabular data approach where I take a snapshot of information up to a particular point. For example, this will be the rolling sum of certain columns and so on. I have also tried LSTM and CNN. All these approaches have failed to give me F1 scores significantly above 50 %.</p>
  <p>Are there other ML/DL approaches that I should try before giving up? The models were built using AutoKeras and PyCaret.</p>
  
Tags: <time-series><rule-based-systems>
Title: Transforming a complex if-else decision-making to ML
UserDisplayName: nakida
ThreadText: # Transforming a complex if-else decision-making to ML
  
  (Asked by: username_0 on 2021-08-12)
  
  I have a time series classification problem that uses a series of if-else statements to arrive at a particular label. I am attempting to use ML/DL to make the system simpler.
  
  So far, I have tried using a tabular data approach where I take a snapshot of information up to a particular point. For example, this will be the rolling sum of certain columns and so on. I have also tried LSTM and CNN. All these approaches have failed to give me F1 scores significantly above 50 %.
  
  Are there other ML/DL approaches that I should try before giving up? The models were built using AutoKeras and PyCaret.
  
  **Tags:** time-series, rule-based-systems
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-13. Score: 1
  
  Are you sure, that there is a need for ML? If there is a set of rules that allows to solve this problem without ML, it gives already 100% accuracy, whereas ML/DL will do it up to a certain accuracy, and this task may be even tough for supervised algorithm. Sorting problem is very difficult for neural networks.
  Anyway, check whether your algorithm can express these if-else statements. For example such branch, given that the output is of the same size for both conditional branches, can be approximated by the following:
  sigmoid(beta * condition) * output_1 + sigmoid(-beta * condition) * output_2
  
  Here beta controls the slope of the sigmoid, condition is the conditional statement of the form $f(x) >(\geqslant) 0$, and output_1 and output_2 are the outcomes of both options.
  
  
  ---
  
  