Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Any idea why there is a duplication in the exported model generated code for the Classification Learner App R2015b?

2 ビュー (過去 30 日間)
Neil Caithness
Neil Caithness 2015 年 9 月 16 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I've just been looking at the new generated code for exported models in the Classification Learner App for R2015b.
There is a curious duplication of lines 44-50, repeated again starting on line 67 (or thereabouts depending on the model).
inputTable = trainingData;
% Extract predictors and response
% This code processes the data into the right shape for training the
% classifier.
predictorNames = {'SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'};
predictors = inputTable(:, predictorNames);
response = inputTable.Species;
As far as I can see this is just a mistake.
Also, the last line is just taking up time unless you want to modify the code to use the results.
% Compute validation predictions and scores
[validationPredictions, validationScores] = kfoldPredict(partitionedModel);

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by