How to test using Matlab IDE?
Mostrar comentarios más antiguos
Hi,
I have got a training data. I have used the 'train' option to tain the SVM kernel. Now I have a test data also. How i can test SVM kernel using test data. Please guide me.
Is there a test option or not in Matlab IDE?
Please guide me how to test using the test data through Matlab IDE using SVM Kernel (Guassian).
Zulfi.
4 comentarios
madhan ravi
el 1 de Dic. de 2018
Hi,
I found a link on Matlab which says:
Export the trained model into a net/ weights. Use this on the test data and get regression
Can some body please guide me What is meant by net/weights & how to use it on test data & how to get regression?
Zulfi.MathWorks
madhan ravi
el 1 de Dic. de 2018
Hi,
I found a link:
which says:
"Make Predictions for New Data
After you export a model to the workspace from Classification Learner, or run the code generated from the app, you get a trainedModel structure that you can use to make predictions using new data. The structure contains a classification object and a function for prediction. The structure allows you to make predictions for models that include principal component analysis (PCA).
- To use the exported classifier to make predictions for new data, T, use the form:
yfit = C.predictFcn(T)
"
But when I am exporting the model (without generating the code) my workspace still contains the confusion matrix (i.e the positive predict values).
Please guide me how to clean the workspace and do the prediction using the new data.
Zulfi.
madhan ravi
el 1 de Dic. de 2018
Please don't use the answer section for commenting use comment section instead. Thank you for understanding.
Zulfiqar Khan
el 1 de Dic. de 2018
Respuestas (1)
Alok Nimrani
el 7 de Dic. de 2018
0 votos
Hi Zulfiqar,
If you want to train a SVM kernel and use it later for testing, please have a look at the following link which describes the use of a Gaussian kernel for training a classificaiton model and then using 'predict' function to test the kernel: Gaussian Kernel Classification Model
However, if your goal is to perform regression, the following link might be helpful which describes the use of Gaussian kernel training for a regression model and then testing this model using 'predict' function: Gaussian Kernel Regression Model
Kindly go through the examples in these links. Hope this helps.
Regards,
Alok
2 comentarios
Zulfiqar Khan
el 11 de Dic. de 2018
Alok Nimrani
el 2 de En. de 2019
Hi,
Sorry for the delayed response. Please note that the predict function can be used with either a RegressionKernel model object or a ClassificationKernel model object as specified in the input arguments of the links shared in the above answer. So, the error that you are getting is probably because your model is not belonging to one of these types.
Try creating a RegressionKernel or a ClassificationKernel model object and then use the predict function. If this does not resolve the issue, please share a sample code so that I can reproduce the issue.
Regards,
Alok
Categorías
Más información sobre Generalized Additive Model en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!