title: Fitting a curve to a set of data points for time series prediction
body: <p>I currently have a set of data points (hit counts), which are structured as a time series. The data is something like:</p>
  
  <pre><code>time   hits
  20     200
  32     439
  57     512
  </code></pre>
  
  <p>How can I fit a curve to this data or find a formula so that I can predict points in the future? Ideally, I can answer a question like "How many views will there be when the time is 100?"</p>
  
  <p>Thanks for your help!</p>
  
  <p>EDIT: What I've tried so far:</p>
  
  <p>I've tried a variety of methods, including:</p>
  
  <ol>
  <li><p>Creating a Logistic Regression using sklearn (however, there are no features for the data)</p></li>
  <li><p>Creating a curve fit using optimize.curve_fit from scipy (however, I don't have a function for the data)</p></li>
  <li>Creating a function from a UnivariateSpline to pass into curve_fit (something went wrong, I can't pin it down)</li>
  </ol>
  
  <p>I'm trying to model when content goes viral, so I assume that a polynomial or exponential curve is ideal.</p>
  
  <p>I tried the links from @Bill previously, but I have no function for the data. Do you know how I can find one?</p>
  
  <p>EDIT 2:</p>
  
  <p>Here's a sample of about two days of data:
  <img src="https://i.stack.imgur.com/s3G8G.png" alt="The Fox Data"></p>
  
  <p><a href="https://www.google.com/trends/explore#q=/m/0nbn3sj&amp;cmpt=q" rel="nofollow noreferrer">Here</a> is what is expected over time.</p>