Nahrawy commited on
Commit
fa42d06
·
1 Parent(s): 8376e3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -48,7 +48,7 @@ def plot(classes, max_iterations, num_samples, n_iter_no_change, validation_frac
48
  num_samples = int(num_samples)
49
  n_iter_no_change = int(n_iter_no_change)
50
  validation_fraction = float(validation_fraction)
51
- tol = float(tol)
52
  # Define the estimators to compare
53
  estimator_dict = {
54
  "No stopping criterion": linear_model.SGDClassifier(n_iter_no_change=n_iter_no_change),
@@ -126,7 +126,7 @@ with gr.Blocks() as demo:
126
  num_samples = gr.Slider(label="Number of Samples", value="10000", minimum=1000, maximum=70000, step=100, info="Number of samples to include in the training")
127
  n_iter_no_change = gr.Slider(label="Number of Iterations with No Change", value="3", minimum=1, maximum=10, step=1, info="Maximum number of iterations with no score improvement by at leat tol, before stopping")
128
  validation_fraction = gr.Slider(label="Validation Fraction", value="0.2", minimum=0.05, maximum=0.9, step=0.01, info="Fraction of the training data to be used for validation")
129
- tol = gr.Textbox(label='Stopping Criterion', value="0.0001",info="The minimum improvement of score to be considered")
130
  btn = gr.Button("Plot")
131
  out1 = gr.Plot()
132
  out2 = gr.Plot()
 
48
  num_samples = int(num_samples)
49
  n_iter_no_change = int(n_iter_no_change)
50
  validation_fraction = float(validation_fraction)
51
+ #tol = float(tol)
52
  # Define the estimators to compare
53
  estimator_dict = {
54
  "No stopping criterion": linear_model.SGDClassifier(n_iter_no_change=n_iter_no_change),
 
126
  num_samples = gr.Slider(label="Number of Samples", value="10000", minimum=1000, maximum=70000, step=100, info="Number of samples to include in the training")
127
  n_iter_no_change = gr.Slider(label="Number of Iterations with No Change", value="3", minimum=1, maximum=10, step=1, info="Maximum number of iterations with no score improvement by at leat tol, before stopping")
128
  validation_fraction = gr.Slider(label="Validation Fraction", value="0.2", minimum=0.05, maximum=0.9, step=0.01, info="Fraction of the training data to be used for validation")
129
+ tol = gr.Slider(label='Stopping Criterion', value=0.0001,minimum=0.00001, maximum=0.01, step=0.00001,info="The minimum improvement of score to be considered")
130
  btn = gr.Button("Plot")
131
  out1 = gr.Plot()
132
  out2 = gr.Plot()