RapidMiner 9.7 is Now Available
Lots of amazing new improvements including true version control! Learn more about what's new here.
"Linear Regression, Trend Analysis and Prediction"
I'd like to develop a model that predicts future sales quantities based on historic values.
Let's say for Article A I know the weekly sales quantities:
Week 1: 10 pcs.
Week 2: 20 pcs.
Week 3: 30 pcs.
Week 4: 40 pcs.
Week 20: 200 pcs.
I would like to calculate the trend line and predict the consumption for the next 4 weeks, which in this simple example would be:
Prediction week 21: 210 pcs.
Prediction week 24: 240 pcs.
In Excel, one would create a chart and insert a trend line, showing also the formula for the trendline. Based on the formula one can calculate the predicted values along the trend line.
I know how I could calculate it manually (as shown here:
http://www.wired.com/wiredscience/2011/01/linear-regression-by-hand/ in a "Generate Attribute" operator), but it looks cumbersome and I believe there has to be a simpler way.
I checked out the "Linear Regression" operator, but it does not seem to be what I'm looking for.
Simply put, I'm trying to calculate m and b in the famous formula "y = mx + b"
I'd be very thankful for any advice.