How to import KNN-model structure from matlab into simulink
All,
The problem I am facing is a move of KNN-model data structure from matlab to simulink in a loop:
In matlab TrainingData is used as input to create an KNN based-model. In simulink, at some point, I want to use this model to predict the outcome of a certain decision based on certain parameters that evolve during simulation. If the simulation ends, the outcome of the decsion is used in matlab to adjust the TrainingData and to update the KNN-model. The updated KNN-model will be used for the next simutlation.
Note that before the loop starts, the feature table exists.
Note that in matlab, the knn-model data is the outcome of the command: knnmodel = fitcknn(TrainingData, ‘feature’). So i need to import this knnmodel structure into simulink.
My problem is that I do not see how to successfully import such KNN-model into the simulink model for decision making (prediction).
Is there any method to get this done?All,
The problem I am facing is a move of KNN-model data structure from matlab to simulink in a loop:
In matlab TrainingData is used as input to create an KNN based-model. In simulink, at some point, I want to use this model to predict the outcome of a certain decision based on certain parameters that evolve during simulation. If the simulation ends, the outcome of the decsion is used in matlab to adjust the TrainingData and to update the KNN-model. The updated KNN-model will be used for the next simutlation.
Note that before the loop starts, the feature table exists.
Note that in matlab, the knn-model data is the outcome of the command: knnmodel = fitcknn(TrainingData, ‘feature’). So i need to import this knnmodel structure into simulink.
My problem is that I do not see how to successfully import such KNN-model into the simulink model for decision making (prediction).
Is there any method to get this done? All,
The problem I am facing is a move of KNN-model data structure from matlab to simulink in a loop:
In matlab TrainingData is used as input to create an KNN based-model. In simulink, at some point, I want to use this model to predict the outcome of a certain decision based on certain parameters that evolve during simulation. If the simulation ends, the outcome of the decsion is used in matlab to adjust the TrainingData and to update the KNN-model. The updated KNN-model will be used for the next simutlation.
Note that before the loop starts, the feature table exists.
Note that in matlab, the knn-model data is the outcome of the command: knnmodel = fitcknn(TrainingData, ‘feature’). So i need to import this knnmodel structure into simulink.
My problem is that I do not see how to successfully import such KNN-model into the simulink model for decision making (prediction).
Is there any method to get this done? machine learning, matlab, simulink MATLAB Answers — New Questions