How to train a classifier and test it separately?

3 ビュー (過去 30 日間)
Preetham Manjunatha
Preetham Manjunatha 2014 年 7 月 5 日
回答済み: Greg Heath 2014 年 7 月 6 日
Good day,
I have a beginner experience in using the Matlab, Neural Network Toolbox. My question is: I have some N x 22 feature matrix for training data. Where N is very large. In addition, there are three class labels (targets) corresponding to each of the N samples. I am wondering whether I can train a neural network (in general a classifier) using the training data only. So that I can use this trained classifier to test my test samples one-by-one during the testing phase.
To be precise, I want to save my trained classifier (neural network or SVM or k-NN). Later it should provide the predicted class label/target given a test sample (one-by-one in a for-loop). Also, I came across dividing the data (<http://www.mathworks.com/help/nnet/ug/divide-data-for-optimal-neural-network-training.html>) and similar community Q/A but I am still skeptical in order to use this for a single test sample.
Thank you for your time and any help is much appreciated.

採用された回答

Greg Heath
Greg Heath 2014 年 7 月 6 日
You can control the data division via net.divideFcn and net.divideParam
help dividetrain
doc dividetrain
Hope this helps
Thank you for formally accepting my answer
Greg

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by