Update app.py
Browse files
app.py
CHANGED
@@ -97,20 +97,31 @@ title = "Plot multi-class SGD on the iris dataset"
|
|
97 |
|
98 |
model_card = f"""
|
99 |
## Description
|
100 |
-
|
101 |
-
The hyperplanes corresponding to the three one-versus-all (OVA) classifiers are represented by the dashed lines.
|
|
|
|
|
|
|
|
|
|
|
102 |
## Dataset
|
103 |
[Iris Dataset](https://en.wikipedia.org/wiki/Iris_flower_data_set)
|
|
|
|
|
|
|
|
|
|
|
104 |
"""
|
105 |
|
106 |
with gr.Blocks(title=title) as demo:
|
107 |
gr.Markdown('''
|
108 |
<div>
|
109 |
-
<h1 style='text-align: center'
|
110 |
</div>
|
111 |
''')
|
112 |
|
113 |
gr.Markdown(model_card)
|
|
|
114 |
d0 = gr.Slider(0.001,5,step=0.001,value=0.001,label='alpha')
|
115 |
d1 = gr.Slider(1,1001,step=10,value=100,label='max_iter')
|
116 |
d2 = gr.Checkbox(value=True,label='Standardize')
|
|
|
97 |
|
98 |
model_card = f"""
|
99 |
## Description
|
100 |
+
This interactive demo is based on the [Plot multi-class SGD on the iris dataset](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_iris.html#sphx-glr-auto-examples-linear-model-plot-sgd-iris-py) example from the popular [scikit-learn](https://scikit-learn.org/stable/) library, which is a widely-used library for machine learning in Python.
|
101 |
+
This demo plots the decision surface of multi-class SGD on the iris dataset. The hyperplanes corresponding to the three one-versus-all (OVA) classifiers are represented by the dashed lines.
|
102 |
+
You can play with the following hyperparameters:
|
103 |
+
`alpha` is a constant that multiplies the regularization term. The higher the value, the stronger the regularization.
|
104 |
+
`max_iter` is the maximum number of passes over the training data (aka epochs).
|
105 |
+
`Standardise` centers the dataset
|
106 |
+
|
107 |
## Dataset
|
108 |
[Iris Dataset](https://en.wikipedia.org/wiki/Iris_flower_data_set)
|
109 |
+
|
110 |
+
## Model
|
111 |
+
currentmodule: [sklearn.linear_model](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model)
|
112 |
+
class:`SGDClassifier` is the estimator used in this example.
|
113 |
+
|
114 |
"""
|
115 |
|
116 |
with gr.Blocks(title=title) as demo:
|
117 |
gr.Markdown('''
|
118 |
<div>
|
119 |
+
<h1 style='text-align: center'>Plot multi-class SGD on iris dataset</h1>
|
120 |
</div>
|
121 |
''')
|
122 |
|
123 |
gr.Markdown(model_card)
|
124 |
+
gr.Markdown("Author: <a href=\"https://huggingface.co/sulpha\">sulpha</a>")
|
125 |
d0 = gr.Slider(0.001,5,step=0.001,value=0.001,label='alpha')
|
126 |
d1 = gr.Slider(1,1001,step=10,value=100,label='max_iter')
|
127 |
d2 = gr.Checkbox(value=True,label='Standardize')
|