how do I get the names of the attributes?

1 回表示 (過去 30 日間)
Kunal Roy
Kunal Roy 2016 年 9 月 17 日
編集済み: Walter Roberson 2016 年 9 月 18 日
load iris.dat
iris(1,1)
gives me the first value of the first column
how do I access the name of the attribute?

採用された回答

mizuki
mizuki 2016 年 9 月 18 日
iris.dat in Fuzzy Logic Toolbox does not have class information (name of the attribute). So, you need to add class information by yourself like:
setosa = iris((iris(:,5)==1),:); % data for setosa
versicolor = iris((iris(:,5)==2),:); % data for versicolor
virginica = iris((iris(:,5)==3),:); % data for virginica
If you have Statistics and Machine Learning Toolbox, use fisheriris instead.
load fisheriris
A variable meas contains features and Species is class information.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by