Prediction based on best fit linear regression model
Show older comments
Hi,
I have the below data(train_data, test_data), and I want to do following:
- In train set some of point or outliears, and I want evaluate best fit model based on mean squared error
- Prediction based on best fit model.
Train_data:
x y
1 1
2 3
6 6
8 2
11 15
15 9
21 11
25 14
Test set:
x
5
12
21
23
my desired output(i.e, y:)
4
7
12
13
Answers (1)
the cyclist
on 11 Aug 2017
0 votes
2 Comments
Mekala balaji
on 11 Aug 2017
the cyclist
on 11 Aug 2017
You can do "robust" fitting (with fitlm, or other MATLAB functions). This is a common way of handling outliers. The documentation page I linked has the details on how to do this.
This Wikipedia page discusses robust methods.
Categories
Find more on Linear Predictive Coding in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!