File Exchange

## Data Driven Fitting with MATLAB

version 1.0.0.1 (2.54 MB) by Richard Willey

### Richard Willey (view profile)

Demostration code and data sets for the "Data Driven Fitting with MATLAB" webinar.

Updated 01 Sep 2016

Data driven fitting allows you to generate a fit without specifying a parametric equation that describes the relationship between your variables.
Fitit.m is a simple function for data driven curve fitting.

FititDemo.m illustrates how to use fitit to generate a curve fit.

Load_Forecasting.m demonstrates building a short term electricity load (or price) forecasting system with MATLAB. Three non-linear regression models (Boosted Decision Trees, Bagged Decision Trees, and Neural Networks) are calibrated to forecast hourly day-ahead loads given temperature forecasts, holiday information and historical loads. The models are trained on hourly data from the NEPOOL region (courtesy ISO New England) from 2004 to 2007 and tested on out-of-sample data from 2008.

### Cite As

Richard Willey (2020). Data Driven Fitting with MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/31562-data-driven-fitting-with-matlab), MATLAB Central File Exchange. Retrieved .

renata delocco villa coutinho

### renata delocco villa coutinho (view profile)

Can I use the code without having the temperature forecast, just the other variables?

kalim Ullah

### kalim Ullah (view profile)

RandStream.setDefaultStream(s); there is an error here dont know whats the problem here kindly help us here..

Aashita Kawatra

### Aashita Kawatra (view profile)

I am getting error:

Error using crossval (line 259)
The 'N' property of 'PARTITION' must be equal the number of rows in X.

Error in fitit (line 21)
sse(j) = sum(crossval(f,[X,Y],'partition',cp));

Akash

### Akash (view profile)

It does not generate partial dependence plots. Is there any in-built matlab tool for that?

Carlos

Jim O'Doherty

### Jim O'Doherty (view profile)

Anyone using this "out of the box" should change the line:

cp = cvpartition(100,'k',10);

to

cp = cvpartition(length(X),'k',10);

Benjamin

### Benjamin (view profile)

how to change the row of data to fit the number of partition in the function cross validation?

Gwen Weng

### Gwen Weng (view profile)

It requires the data to be dense and not have large gaps.

Boxiang

### Boxiang (view profile)

The author of this file failed to mention that the number of row of the data to be fit must equals to the number of partition 'N' in the function corss validation. The users have to change it themselves.