why do i get undeined function during multisvm(Train_Feat,train_Label,test) for the train _Label
3 views (last 30 days)
Show older comments
FATHIMA C S
on 20 Mar 2018
Commented: Nitigya Joshi
on 3 Apr 2023
while doing plant leaf disease classification using multiclass support vector machine train_label is not defined in the multisvm(Train_Feat,train_Label,test). How to define this variable?
Accepted Answer
Walter Roberson
on 20 Mar 2018
To use that routine, you need to have an array of training data, in which each row is a different sample, and each column is a feature. train_Label should be a vector of categorical or numeric values, with each entry indicating the group that the corresponding row of the training data belongs to. You would need to know what group each row of the training data belongs to in advance -- the point of training data is that you already know the "right" answer for each training sample and you use it to "train" the program to predict answers.
3 Comments
NAVNISH GOEL
on 27 Mar 2020
hi.
i run main.m and i change the file train location and i choose testing there's an error ::
Error using imread>get_full_filename (line 516)
File "C:/Users/Manya/Desktop/Final File(mohim)/Train/Train (2).jpg" does not exist.
Error in imread (line 340)
fullname = get_full_filename(filename);
Error in Main (line 14)
I = imread(sprintf('C:/Users/Manya/Desktop/Final File(mohim)/Train/Train (%d).jpg', k));
Undefined function or variable 'Train_Feat'.
Error in Main (line 120)
result = multisvm(Train_Feat,Train_Label,feat_disease);
Help me to resolve this issue....
Walter Roberson
on 27 Mar 2020
What main.m are you looking at? The File Exchange contribution linked to does not have a main.m
What do you see if you use
ls('C:/Users/Manya/Desktop/Final File(mohim)/Train/*.jpg')
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!