To jest stara wersja strony!
Drzewa decyzyjne
Drzewo decyzyjne to graficzna metoda wspomagania procesu decyzyjnego, stosowana w teorii decyzji. Algorytm drzew decyzyjnych jest również stosowany w uczeniu maszynowym do pozyskiwania wiedzy na podstawie przykładów.
Przykład drzewa decyzyjnego
Algorytm ID3
Algorytm ID3 służący do budowania drzew decyzyjnych bazuja na dwóch parametrach, które można wyliczyć bezpośrednio ze zbioru uczącego:
Entropia
Gdzie
- Aktualny zbiór danych dla którego liczona jest entropia (dla każdego węzła drzewa będzie to inny - odpowiednio mniejszy zbiór danych)
- zbiór klas w zbiorze
- Stosunek liczby elementów z klasy
do liczby elementów w zbiorze
Gdzie,
Algorytm ID3
ID3 (Examples, Target_Attribute, Attributes)
Create a root node for the tree
If all examples are positive, Return the single-node tree Root, with label = +.
If all examples are negative, Return the single-node tree Root, with label = -.
If number of predicting attributes is empty, then Return the single node tree Root,
with label = most common value of the target attribute in the examples.
Otherwise Begin
A ← The Attribute that best classifies examples (highest Information Gain).
Decision Tree attribute for Root = A.
For each possible value, v_i, of A,
Add a new tree branch below Root, corresponding to the test A = v_i.
Let Examples(v_i) be the subset of examples that have the value v_i for A
If Examples(v_i) is empty
Then below this new branch add a leaf node with label = most common target value in the examples
Else below this new branch add the subtree ID3 (Examples(v_i), Target_Attribute, Attributes – {A})
End
Return Root
Zasady budowania drzewa - algorytm ID3
Policz entropię i informaiton gain - wyznacz korzeń drzewa.
Wprowadzenie do Weki
Wprowadzenie do weki:
Histotgramy
Nieprzydatne cechy
J48
Zbudowanie drzewa do przykladu z zajec i do innych
User clasifier
ZeroR