Adding description and reference to sklearn docs
Browse files
app.py
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
import matplotlib.pyplot as plt
|
3 |
from sklearn.tree import DecisionTreeRegressor
|
@@ -54,7 +58,13 @@ def plot_multi_tree(d1,d2,d3):
|
|
54 |
|
55 |
title = " Illustration of multi-output regression with decision tree.🌲 "
|
56 |
with gr.Blocks(title=title) as demo:
|
57 |
-
gr.Markdown(f"
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
with gr.Row():
|
60 |
d1 = gr.Slider(minimum=0, maximum=20, step=1, value = 2,
|
|
|
1 |
+
"""
|
2 |
+
Demo is Derived from https://scikit-learn.org/stable/auto_examples/tree/plot_tree_regression_multioutput.html
|
3 |
+
"""
|
4 |
+
|
5 |
import numpy as np
|
6 |
import matplotlib.pyplot as plt
|
7 |
from sklearn.tree import DecisionTreeRegressor
|
|
|
58 |
|
59 |
title = " Illustration of multi-output regression with decision tree.🌲 "
|
60 |
with gr.Blocks(title=title) as demo:
|
61 |
+
gr.Markdown(f"# {title}")
|
62 |
+
gr.Markdown(" This example shows how different max_depth of decision tree affect the predictions <br>"
|
63 |
+
" Larger max_depth makes model learn the finner details resulting in **overfitting** <br>"
|
64 |
+
" Play with the Depth parameter to see how it fits a noisy circle dataset.<br>")
|
65 |
+
|
66 |
+
gr.Markdown(" **[Demo is based on sklearn docs](https://scikit-learn.org/stable/auto_examples/tree/plot_tree_regression_multioutput.html)**")
|
67 |
+
|
68 |
|
69 |
with gr.Row():
|
70 |
d1 = gr.Slider(minimum=0, maximum=20, step=1, value = 2,
|