Hi!
After building a non linear model, the example in the matlab statistics toolbox predicts new data. I dont understand
'Xnew = [200,200,200;100,200,100;500,50,5];'
– we have 3 columns with each 13 rows and our output rate. Why does this row has 9 values? And what does ypred?
Please see below the example:
This is our data (X):470 300 10285 80 10470 300 120470 80 120470 80 10100 190 10100 80 65470 190 65100 300 54100 300 120100 80 120285 300 10285 190 120Data output(Y):8.550000000000003.790000000000004.820000000000000.02000000000000002.7500000000000014.39000000000002.540000000000004.35000000000000138.500000000000000.050000000000000011.32000000000003.13000000000000
…. (Building model – Step 1-5)….
Step 6. Predict for new data
Create some new data and predict the response from both models.
Xnew = [200,200,200;100,200,100;500,50,5];[ypred yci] = predict(mdl,Xnew)ypred = 1.8762 6.2793 1.6718yci = 1.6283 2.1242 5.9789 6.5797 1.5589 1.7846 [ypred1 yci1] = predict(mdl1,Xnew) ypred1 = 1.8984 6.2555 1.6594yci1 = 1.6260 2.1708 5.9323 6.5787 1.5345 1.7843
Even though the model coefficients are dissimilar, the predictions are nearly identical.
Thank you!
Best Answer