Training and testing dataset using Linear Model of machine learning

1 次查看(过去 30 天)
In the example and the functions provided for the Linear Model in Matlab for example
mdl = LinearModel.fit(X,Y)
mdl contains functions such as MSE which would calculate the error of the "training"set. Is there any similar function for a suitable"testing" set. I am asking this because I am aware of the predict function, and I just would have to write extra amount of code to find the MSE of a testing set. Moreover the residuals of a testing set would not be available in the workspace, when I use predict function. Is there any way which would enable to write less amount of code and find testing error i.e MSE of the Linear Model. Thanks.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Hypothesis Tests 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by