Decidex v0.0.2 Decidex.LearningAlgorithms.ID3 View Source

An implementation of ID3 decision tree learning algorithm.

Link to this section Summary

Functions

Calculates entropy of training_data.

Calculates information gain for feature on training_data.

Learns a decision tree from training_data.

Link to this section Functions

Link to this function

entropy(training_data) View Source
entropy(training_data :: Decidex.training_data()) :: number()

Calculates entropy of training_data.

See Wikipedia article for in-depth explanation.

Link to this function

information_gain(feature, training_data) View Source
information_gain(
  feature :: Decidex.feature(),
  training_data :: Decidex.training_data()
) :: number()

Calculates information gain for feature on training_data.

Link to this function

learn(training_data) View Source
learn(training_data :: Decidex.training_data()) :: Decidex.t()

Learns a decision tree from training_data.

Returns the learned decision tree.