tree = fitctree(m​eas,specie​s(50,:)) not working

3 ビュー (過去 30 日間)
Kunal Roy
Kunal Roy 2016 年 9 月 19 日
回答済み: Fei Deng 2016 年 9 月 22 日
I want to classify only setosa. Also, how do I determine the best categorical predictor for the split using the best_split_Attribute = fitctree(_,Name,Value) function to see which of petal length, petal width, sepal length and sepal width are the best attributes in meas to perform the split on?
Then, can I do this:
tree = fitctree(best_split_attribute,setosa)?

回答 (1 件)

Fei Deng
Fei Deng 2016 年 9 月 22 日
Hi Kunal,
Function 'fitctree' returns fitted binary classification tree, which based on the best categorical predictor.
tree = fitctree(_,Name,Value) fits a tree with additional options specified by one or more name-value pair arguments, using any of the previous syntaxes. For example, you can specify the algorithm used to find the best split on a categorical predictor, grow a cross-validated tree, or hold out a fraction of the input data for validation.
If you don't select an algorithm, 'fitctree' automatically selects the optimal subset of algorithms for each split using the known number of classes and levels of a categorical predictor.
Find more information via the link:

カテゴリ

Help Center および File ExchangeClassification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by