This project has moved. For the latest updates, please go here.

No Math expert - need a way to plot a non-linear trend

Oct 4, 2011 at 10:32 PM
Edited Oct 4, 2011 at 10:33 PM

I have a database that I need to add some forecasting capabilities for.

 

The data itself typically follow a trend where the closer I get to zero along X, Y increases towards 100 %.

In my software, I have implemented a basic linear forecast (in red below) method (similar to Excels FORECAST), but the linear forecast gives me inaccurate results

the closer i get to 0 along x

I tried playing with the Charts in Excel and found that If I use a Polynomial trendline (in green below), it's much closer in many cases, especially as x approaches 0

I am looking for some assistance in how I can use Math.NET functions to build the forecast. 

Any help would be much appreciated !

 

image

 

This chart was setup in excel like this

image



Oct 10, 2011 at 7:53 PM

I've posted some examples of using Math.net in c# for statistics and regression on my blog, http://sharpstatistics.co.uk/blog/which you might find useful. In particular the post on polynomial regression should answer your question http://sharpstatistics.co.uk/stats/linear-regression-in-c/.

Hopefully writing the blog will help me get my code updated as I have been using math.net since the 2008 iridium version, and get a library together of basic statistical methods all based on Math.Net