Classification leaner does not recognize the request variable(var4 )as response data.

I use classification learner, i create new session from file .....and i want as response data the variable var4......but when i try to select var4 as response data there isnt as selection.
Any idea?

回答 (1 件)

Image Analyst
Image Analyst 2023 年 4 月 15 日

0 投票

If you have any more questions, then attach your data (your training table of predictors) and code to read it in with the paperclip icon after you read this:
You could try to have your response be a single double vector, or cell array of strings if that is allowed.

2 件のコメント

Asterios Kouliousis
Asterios Kouliousis 2023 年 4 月 25 日
THANKS...MY PROBLEM WAS THAT I HAD MORE THAN 500 DIFFERENT VALUES AS RESPONSE
That should be no problem as long as you have one response for each of the 500+ sets of data. If the response variable is in var4 of a table, and the data is in columns after that you can do (t is your table):
% Extract response (ground truth) from column called var4
responseVector = t.var4;
% Get measurement data from columns 5 and to the right.
tPredictors = t(:, 5:end); % This is a subtable gotten from table "t".

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeText Data Preparation についてさらに検索

質問済み:

2023 年 4 月 15 日

コメント済み:

2023 年 4 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by