Answers.Body: <p>From the world of Algorithms, we can borrow the &quot;Complexity&quot; estimation science to find out the required time (<code>time complexity</code>) and the memory (<code>space complexity</code>) to execute.  Given most of the problems &amp; algorithms in the ML world are from the <code>NP</code> family, it does not make sense to use complexity as is.  Instead, we may use complexity estimation alongside heuristics to get close to the correct value of time and space complexities.</p>
  <p>An empirical approach is to downsize your experiment to a small sample experiment and measure the wall time.  When you plug in the parameters related to CPU, GPU speeds and memory consumed, you may guestimate the time and memory required for the scaled-up version of your experiment.  This approach is gross approximation of the original problem, but a practical way to get the ballpark numbers.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-29T05:53:42.537Z
Answers.LastActivityDate: 2024-02-29T05:53:42.537Z
Answers.UserDisplayName: sudar
Body: <p>It is often the case when the time vs memory trade-off is underestimated prior to using ML/DL for solving a particular task. Taking into account the type, size and format of the available data and also the available CPUs, GPUs and RAM as well, I wonder is there a general way to estimate prior to modelling:</p>
  <p><em>1) How much computational time will be needed?</em></p>
  <p><em>2) What will be the maximum amount of memory needed?</em></p>
  <p>I assume a correct estimation of the aforementioned issues will be quite useful prior to modelling, taking into account also the time complexity of the algorithms to use as well.</p>
  
Tags: <optimization><data-science><computational-complexity><time-complexity><memory>
Title: How to estimate Time vs Memory trade-off prior to modelling
UserDisplayName: Deyan
ThreadText: # How to estimate Time vs Memory trade-off prior to modelling
  
  (Asked by: username_0 on 2024-02-27)
  
  It is often the case when the time vs memory trade-off is underestimated prior to using ML/DL for solving a particular task. Taking into account the type, size and format of the available data and also the available CPUs, GPUs and RAM as well, I wonder is there a general way to estimate prior to modelling:
  
  *1) How much computational time will be needed?*
  
  *2) What will be the maximum amount of memory needed?*
  
  I assume a correct estimation of the aforementioned issues will be quite useful prior to modelling, taking into account also the time complexity of the algorithms to use as well.
  
  **Tags:** optimization, data-science, computational-complexity, time-complexity, memory
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-02-29. Score: 0
  
  From the world of Algorithms, we can borrow the "Complexity" estimation science to find out the required time (`time complexity`) and the memory (`space complexity`) to execute. Given most of the problems & algorithms in the ML world are from the `NP` family, it does not make sense to use complexity as is. Instead, we may use complexity estimation alongside heuristics to get close to the correct value of time and space complexities.
  
  An empirical approach is to downsize your experiment to a small sample experiment and measure the wall time. When you plug in the parameters related to CPU, GPU speeds and memory consumed, you may guestimate the time and memory required for the scaled-up version of your experiment. This approach is gross approximation of the original problem, but a practical way to get the ballpark numbers.
  
  
  ---
  
  