开发者

Predictions in PHP using SQL Data

开发者 https://www.devze.com 2023-02-11 03:50 出处:网络
I have a SQL table with sales, it has data such as the time of sale, day etc. Is it possible to predict sales next month or next year or so and开发者_开发知识库 also seasonal sales.

I have a SQL table with sales, it has data such as the time of sale, day etc.

Is it possible to predict sales next month or next year or so and开发者_开发知识库 also seasonal sales.

What kind of algorithm would I use here?


You're talking about using predictive analytics. You could either roll your own and create Regression type algorithms, or you could use an API like Google's Prediction API, http://code.google.com/apis/predict/

One thing to keep in mind is that this is all predicated on past behavior really being indicative of future results. If you look at your sales over time, is there a statistical correlation between months or years of sales figures? If not, then you're not going to be successful with the predictions.


I am not aware of any functionality in MySQL to determine trends, but here is a good start and includes several algorithms you can make use of.

http://en.wikipedia.org/wiki/Trend_estimation

0

精彩评论

暂无评论...
验证码 换一张
取 消