Files
ManimML/manim_ml/decision_tree/decision_tree.py
Alec Helbling 245ce9424b Made a workaround to make sure the filters in the CNN 2 CNN layers
don't appear at the beggining of a forward pass animation. I think
this has to do with a bug in Succession in the core ManimCommunity
library.
2022-12-29 15:11:09 -05:00

39 lines
1.0 KiB
Python

"""
Module for visualizing decision trees in Manim.
It parses a decision tree classifier from sklearn.
"""
from manim import *
from manim_ml.one_to_one_sync import OneToOneSync
class LeafNode(VGroup):
pass
class NonLeafNode(VGroup):
pass
class DecisionTreeDiagram(Graph):
"""Decision Tree Digram Class for Manim"""
pass
class DecisionTreeEmbedding():
"""Embedding for the decision tree"""
pass
class DecisionTreeContainer(OneToOneSync):
"""Connects the DecisionTreeDiagram to the DecisionTreeEmbedding"""
def __init__(self, sklearn_tree, points, classes):
self.sklearn_tree = sklearn_tree
self.points = points
self.classes = classes
def make_unfold_tree_animation(self):
"""Unfolds the tree through an in order traversal
This animations unfolds the tree diagram as well as showing the splitting
of a shaded region in the Decision Tree embedding.
"""
# Draw points in the embedding
# Start the tree splitting animation
pass