Question

I currently have a set of data points (hit counts), which are structured as a time series. The data is something like:

time   hits
20     200
32     439
57     512

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?"

Thanks for your help!

EDIT: What I've tried so far:

I've tried a variety of methods, including:

  1. Creating a Logistic Regression using sklearn (however, there are no features for the data)

  2. Creating a curve fit using optimize.curve_fit from scipy (however, I don't have a function for the data)

  3. Creating a function from a UnivariateSpline to pass into curve_fit (something went wrong, I can't pin it down)

I'm trying to model when content goes viral, so I assume that a polynomial or exponential curve is ideal.

I tried the links from @Bill previously, but I have no function for the data. Do you know how I can find one?

EDIT 2:

Here's a sample of about two days of data: The Fox Data

Here is what is expected over time.

Was it helpful?

Solution

As other people have said it is difficult to give an answer with so few information.

I suggest you to define some new variable like time, time*time, time*time*time and to fit a LinearRegression model using this as input variable.

I will start with these and then in case using something of more complex like neural network (not in sklearn) or SVR.

Hope this can help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top