Difference between revisions of "Orange: Tree"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Sumber: https://docs.biolab.si//3/visual-programming/widgets/model/tree.html A tree algorithm with forward pruning. Inputs Data: input dataset Preprocessor: prep...")
 
 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
  
A tree algorithm with forward pruning.
+
Widget Tree menggunakan algoritma Tree dengan kemampuan untuk melakukan forward pruning (pemangkasan ke depan).
  
Inputs
+
==Input==
  
    Data: input dataset
+
Data: input dataset
 +
Preprocessor: preprocessing method(s)
  
    Preprocessor: preprocessing method(s)
+
==Output==
  
Outputs
+
Learner: decision tree learning algorithm
 +
Model: trained model
  
    Learner: decision tree learning algorithm
+
Algoritma Tree adalah algoritma sederhana yang dapat memisahkan data menjadi node berdasarkan class purity (kemurnian kategori / class). Algoritma Tree adalah pendahulu Algoritma Random Forest. Widget Tree dalam Orange dirancang secara in-house dan dapat menangani dataset diskrit dan kontinyu.
  
    Model: trained model
+
Widget Tree dapat digunakan untuk task classification dan task regression.
  
Tree is a simple algorithm that splits the data into nodes by class purity. It is a precursor to Random Forest. Tree in Orange is designed in-house and can handle both discrete and continuous datasets.
+
[[File:Tree-stamped.png|center|200px|thumb]]
  
It can also be used for both classification and regression tasks.
+
* The learner can be given a name under which it will appear in other widgets. The default name is “Tree”.
 +
* Tree parameters:
 +
** Induce binary tree: build a binary tree (split into two child nodes)
 +
** Min. number of instances in leaves: if checked, the algorithm will never construct a split which would put less than the specified number of training examples into any of the branches.
 +
** Do not split subsets smaller than: forbids the algorithm to split the nodes with less than the given number of instances.
 +
** Limit the maximal tree depth: limits the depth of the classification tree to the specified number of node levels.
  
../../_images/Tree-stamped.png
+
* Stop when majority reaches [%]: stop splitting the nodes after a specified majority threshold is reached
 +
* Produce a report. After changing the settings, you need to click Apply, which will put the new learner on the output and, if the training examples are given, construct a new classifier and output it as well. * Alternatively, tick the box on the left and changes will be communicated automatically.
  
    The learner can be given a name under which it will appear in other widgets. The default name is “Tree”.
+
==Contoh==
  
    Tree parameters:
+
Ada dua penggunaan yang biasanya digunakan pada widget Tree. Pertama, kita dapat meng-induksi sebuah model dan cek menggunakan tampilan yang seperti widget Tree Viewer.
  
        Induce binary tree: build a binary tree (split into two child nodes)
+
[[File:Tree-classification-visualize.png|center|200px|thumb]]
  
        Min. number of instances in leaves: if checked, the algorithm will never construct a split which would put less than the specified number of training examples into any of the branches.
+
Skema ke dua di workflow di bawah ini, widget Tree akan men-train sebuah model dan mengevaluasinya terhadap Logistic Regression. Perbandingan keakuratan widget Tree dan widget Logistic Regression di lakukan melalui widget Test & Score. Hasil widget Test & Score dapat dilihat melalui widget Confusion Matrix untuk membandingkan kesalahan klasifikasi yang terjadi.
  
        Do not split subsets smaller than: forbids the algorithm to split the nodes with less than the given number of instances.
+
[[File:Tree-classification-model.png|center|200px|thumb]]
  
        Limit the maximal tree depth: limits the depth of the classification tree to the specified number of node levels.
+
Kita menggunakan iris dataset dalam ke dua contoh. Widget Tree dapat bekerja untuk task regression. Pada workflow di bawah ini menggunakan housing dataset dan berikan dataset ke widget Tree. Tree node yang di pilih dalam Tree Viewer akan di tampilkan di Scatter Plot dan kita bisa melihat bahwa contoh yang di pilih memiliki feature yang sama.
 
 
    Stop when majority reaches [%]: stop splitting the nodes after a specified majority threshold is reached
 
 
 
    Produce a report. After changing the settings, you need to click Apply, which will put the new learner on the output and, if the training examples are given, construct a new classifier and output it as well. Alternatively, tick the box on the left and changes will be communicated automatically.
 
 
 
Examples
 
 
 
There are two typical uses for this widget. First, you may want to induce a model and check what it looks like in Tree Viewer.
 
 
 
../../_images/Tree-classification-visualize.png
 
 
 
The second schema trains a model and evaluates its performance against Logistic Regression.
 
 
 
../../_images/Tree-classification-model.png
 
 
 
We used the iris dataset in both examples. However, Tree works for regression tasks as well. Use housing dataset and pass it to Tree. The selected tree node from Tree Viewer is presented in the Scatter Plot and we can see that the selected examples exhibit the same features.
 
 
 
../../_images/Tree-regression-subset.png
 
  
  
  
 +
[[File:Tree-regression-subset.png|center|200px|thumb]]
  
 
==Referensi==
 
==Referensi==

Latest revision as of 11:26, 19 March 2020

Sumber: https://docs.biolab.si//3/visual-programming/widgets/model/tree.html


Widget Tree menggunakan algoritma Tree dengan kemampuan untuk melakukan forward pruning (pemangkasan ke depan).

Input

Data: input dataset
Preprocessor: preprocessing method(s)

Output

Learner: decision tree learning algorithm
Model: trained model

Algoritma Tree adalah algoritma sederhana yang dapat memisahkan data menjadi node berdasarkan class purity (kemurnian kategori / class). Algoritma Tree adalah pendahulu Algoritma Random Forest. Widget Tree dalam Orange dirancang secara in-house dan dapat menangani dataset diskrit dan kontinyu.

Widget Tree dapat digunakan untuk task classification dan task regression.

Tree-stamped.png
  • The learner can be given a name under which it will appear in other widgets. The default name is “Tree”.
  • Tree parameters:
    • Induce binary tree: build a binary tree (split into two child nodes)
    • Min. number of instances in leaves: if checked, the algorithm will never construct a split which would put less than the specified number of training examples into any of the branches.
    • Do not split subsets smaller than: forbids the algorithm to split the nodes with less than the given number of instances.
    • Limit the maximal tree depth: limits the depth of the classification tree to the specified number of node levels.
  • Stop when majority reaches [%]: stop splitting the nodes after a specified majority threshold is reached
  • Produce a report. After changing the settings, you need to click Apply, which will put the new learner on the output and, if the training examples are given, construct a new classifier and output it as well. * Alternatively, tick the box on the left and changes will be communicated automatically.

Contoh

Ada dua penggunaan yang biasanya digunakan pada widget Tree. Pertama, kita dapat meng-induksi sebuah model dan cek menggunakan tampilan yang seperti widget Tree Viewer.

Tree-classification-visualize.png

Skema ke dua di workflow di bawah ini, widget Tree akan men-train sebuah model dan mengevaluasinya terhadap Logistic Regression. Perbandingan keakuratan widget Tree dan widget Logistic Regression di lakukan melalui widget Test & Score. Hasil widget Test & Score dapat dilihat melalui widget Confusion Matrix untuk membandingkan kesalahan klasifikasi yang terjadi.

Tree-classification-model.png

Kita menggunakan iris dataset dalam ke dua contoh. Widget Tree dapat bekerja untuk task regression. Pada workflow di bawah ini menggunakan housing dataset dan berikan dataset ke widget Tree. Tree node yang di pilih dalam Tree Viewer akan di tampilkan di Scatter Plot dan kita bisa melihat bahwa contoh yang di pilih memiliki feature yang sama.


Tree-regression-subset.png

Referensi

Pranala Menarik