ヘルプ センターヘルプ センター
クラス: ClassificationTree
コンパクトなツリー
ctree = compact(tree)
ctree = compact(tree) は、コンパクトなバージョンの tree を作成します。
ctree
tree
fitctree を使用して作成された分類木。
fitctree
コンパクトな決定木。ctree のクラスは CompactClassificationTree です。tree を使用する場合と同じように、ctree を使用しても正確に分類を予測できます。ただし、ctree には学習データが含まれないため、交差検証などの一部の処理については実行できません。
CompactClassificationTree
すべて展開する
フィッシャーのアヤメのデータの分類木とコンパクトなバージョンのツリーのサイズを比較します。
load fisheriris fulltree = fitctree(meas,species); ctree = compact(fulltree); b = whos('fulltree'); % b.bytes = size of fulltree c = whos('ctree'); % c.bytes = size of ctree [b.bytes c.bytes] % shows ctree uses half the memory
ans = 1×2 11762 5097
この関数は、GPU 配列を完全にサポートします。詳細は、GPU での MATLAB 関数の実行 (Parallel Computing Toolbox)を参照してください。
CompactClassificationTree | ClassificationTree | fitctree | predict
ClassificationTree
predict
この例の変更されたバージョンがあります。編集された方の例を開きますか?
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office