Loading...

Trees

Tree

tree.Tree()

Base Class for tree representation.

Methods:

Tree.get_attributes()

Returns the model attributes.

Tree.plot_tree([pic_path])

Draws the input tree.

Tree.predict(X)

Predicts using the BinaryTree model.

Tree.predict_proba(X)

Returns the model probabilities.

Tree.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

Tree.predict_sql(X)

Returns the SQL code needed to deploy the model.

Tree.set_attributes(**kwargs)

Sets the model attributes.

Tree.to_graphviz([feature_names, ...])

Returns the code for a Graphviz tree.

Attributes:

Tree.object_type

Must be overridden in child class


Binary Tree Regressor

tree.BinaryTreeRegressor(children_left, ...)

InMemoryModel implementation of binary trees for regression.

Methods:

BinaryTreeRegressor.get_attributes()

Returns the model attributes.

BinaryTreeRegressor.plot_tree([pic_path])

Draws the input tree.

BinaryTreeRegressor.predict(X)

Predicts using the BinaryTree model.

BinaryTreeRegressor.predict_proba(X)

Returns the model probabilities.

BinaryTreeRegressor.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

BinaryTreeRegressor.predict_sql(X)

Returns the SQL code needed to deploy the model.

BinaryTreeRegressor.set_attributes(**kwargs)

Sets the model attributes.

BinaryTreeRegressor.to_graphviz([...])

Returns the code for a Graphviz tree.

Attributes:

BinaryTreeRegressor.object_type

Must be overridden in child class


Binary Tree Classifier

tree.BinaryTreeClassifier(children_left, ...)

InMemoryModel implementation of binary trees for classification.

Methods:

BinaryTreeClassifier.get_attributes()

Returns the model attributes.

BinaryTreeClassifier.plot_tree([pic_path])

Draws the input tree.

BinaryTreeClassifier.predict(X)

Predicts using the BinaryTree model.

BinaryTreeClassifier.predict_proba(X)

Returns the model probabilities.

BinaryTreeClassifier.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

BinaryTreeClassifier.predict_sql(X)

Returns the SQL code needed to deploy the model.

BinaryTreeClassifier.set_attributes(**kwargs)

Sets the model attributes.

BinaryTreeClassifier.to_graphviz([...])

Returns the code for a Graphviz tree.

Attributes:

BinaryTreeClassifier.object_type

Must be overridden in child class


Binary Tree Anomaly

tree.BinaryTreeAnomaly(children_left, ...[, psy])

InMemoryModel implementation of binary trees for anomaly detection.

Methods:

BinaryTreeAnomaly.get_attributes()

Returns the model attributes.

BinaryTreeAnomaly.plot_tree([pic_path])

Draws the input tree.

BinaryTreeAnomaly.predict(X)

Predicts using the BinaryTree model.

BinaryTreeAnomaly.predict_proba(X)

Returns the model probabilities.

BinaryTreeAnomaly.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

BinaryTreeAnomaly.predict_sql(X)

Returns the SQL code needed to deploy the model.

BinaryTreeAnomaly.set_attributes(**kwargs)

Sets the model attributes.

BinaryTreeAnomaly.to_graphviz([...])

Returns the code for a Graphviz tree.

Attributes:

BinaryTreeAnomaly.object_type

Must be overridden in child class


Non-Binary Tree

tree.NonBinaryTree(tree[, classes])

InMemoryModel implementation of non-binary trees.

Methods:

NonBinaryTree.get_attributes()

Returns the model attributes.

NonBinaryTree.plot_tree([pic_path])

Draws the input tree.

NonBinaryTree.predict(X)

Predicts using the CHAID model.

NonBinaryTree.predict_proba(X)

Returns probabilities using the CHAID model.

NonBinaryTree.predict_proba_sql(X)

Returns the SQL code needed to deploy the model probabilities.

NonBinaryTree.predict_sql(X)

Returns the SQL code needed to deploy the model using its attributes.

NonBinaryTree.set_attributes(**kwargs)

Sets the model attributes.

NonBinaryTree.to_graphviz([classes_color, ...])

Returns the code for a Graphviz tree.

Attributes:

NonBinaryTree.object_type

Must be overridden in child class