intial commit (forked from private repo)

This commit is contained in:
2025-04-11 11:08:28 +02:00
commit 3bdd37f46c
154 changed files with 45901 additions and 0 deletions

12
extracted_cells/cell13.py Normal file
View File

@ -0,0 +1,12 @@
# Visualisierung eines einzelnen Entscheidungsbaums aus dem Random Forest
plt.figure(figsize=(25, 12))
tree_to_plot = rf_model.estimators_[0] # Ersten Baum aus dem Forest auswählen
plot_tree(tree_to_plot,
feature_names=X_train.columns,
class_names=['<=50K', '>50K'],
filled=True,
rounded=True,
fontsize=10,
max_depth=3)
plt.savefig('output/Random_Forest_Tree_Example.png', dpi=300)
plt.show()