How can I train data in Classification Learner App by using function

1 次查看(过去 30 天)
Hello
I want to train different data sets with the Classification Learner function.
Say i have the lables : [ 1,2,3,4,5] in the first data set and in the other data set : [6,7,8,9,10].
I want to create a generated function to include the proper lables.
When i use the generated function from the first Train ( lables [1,2,3,4,5]) i notice that the possible lables in the generated function are obviously [1,2,3,4,5].
I want to know if there is a way to create a function that use Classification Learner APP - weighted KNN that recive data sets + lables as an input and train by the proper lables giving a trained Model as an ouput.

回答(1 个)

Itamar Malageac
Itamar Malageac 2022-4-4
编辑:Itamar Malageac 2022-4-4
I want to use a function that does exactly what the app does. Because I want it to be automatically:
1.Create a data set
2.Create labels
3.Train them with a function like : Model=TRAIN_WeightedKNN_fromApp(dataSet,labels)
4. Use the model from (3) on a different dataSet to predict the labels like: NewLabels=Model_predict(New_dataSet)
So I wouldn’t have to enter the APP manually and choose the dataSet and labels from the workspace or the classification type.

类别

Help CenterFile Exchange 中查找有关 Predictive Maintenance Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by