mirror of
https://github.com/helblazer811/ManimML.git
synced 2025-05-20 20:16:32 +08:00
Removed Conv2D because it can be done using just Conv3D and renamed Conv3D to Conv2D to correspond to the spatial conv dimenson not the scene dimension, which is more inline with convention.
This commit is contained in:
@ -9,7 +9,6 @@ from sklearn import datasets
|
||||
import sklearn
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def learn_iris_decision_tree(iris):
|
||||
decision_tree = DecisionTreeClassifier(
|
||||
random_state=1, max_depth=3, max_leaf_nodes=6
|
||||
@ -18,13 +17,11 @@ def learn_iris_decision_tree(iris):
|
||||
# output the decisioin tree in some format
|
||||
return decision_tree
|
||||
|
||||
|
||||
def make_sklearn_tree(dataset, max_tree_depth=3):
|
||||
tree = learn_iris_decision_tree(dataset)
|
||||
feature_names = dataset.feature_names[0:2]
|
||||
return tree, tree.tree_
|
||||
|
||||
|
||||
class DecisionTreeScene(Scene):
|
||||
def construct(self):
|
||||
"""Makes a decision tree object"""
|
||||
@ -32,7 +29,6 @@ class DecisionTreeScene(Scene):
|
||||
clf, sklearn_tree = make_sklearn_tree(iris_dataset)
|
||||
# sklearn.tree.plot_tree(clf, node_ids=True)
|
||||
# plt.show()
|
||||
|
||||
decision_tree = DecisionTreeDiagram(
|
||||
sklearn_tree,
|
||||
class_images_paths=[
|
||||
@ -48,7 +44,6 @@ class DecisionTreeScene(Scene):
|
||||
self.play(create_decision_tree)
|
||||
# self.play(create_decision_tree)
|
||||
|
||||
|
||||
class SurfacePlot(Scene):
|
||||
def construct(self):
|
||||
iris_dataset = datasets.load_iris()
|
||||
|
Reference in New Issue
Block a user