MuskanMjn commited on
Commit
3f36f69
·
1 Parent(s): 9092978

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -46,14 +46,16 @@ def getColorMap(kernel, gamma):
46
  with gr.Blocks() as demo:
47
  gr.Markdown("## Learning the XOR function: An application of Binary Classification using Non-linear SVM")
48
  gr.Markdown("This demo is based on this [scikit-learn example](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_nonlinear.html#sphx-glr-auto-examples-svm-plot-svm-nonlinear-py).")
49
- gr.Markdown("In this demo, we find the XOR of the inputs by learning the XOR function using Non-linear SVM.")
50
 
51
  xor_image = Image.open("xor.png")
52
- gr.Image(xor_image, label="Table explaining the 'XOR' operator")
53
 
54
  gr.HTML("<hr>")
55
 
56
- gr.Markdown("Furthermore, we observe that we get different decision function plots by varying the Kernel and Gamma hyperparameters the Non-Linear SVC.")
 
 
57
 
58
  inp1 = gr.Radio(['poly', 'rbf', 'sigmoid'], label="Kernel", info="Choose a kernel")
59
  inp2 = gr.Radio(['scale', 'auto'], label="Gamma", info="Choose a gamma value")
 
46
  with gr.Blocks() as demo:
47
  gr.Markdown("## Learning the XOR function: An application of Binary Classification using Non-linear SVM")
48
  gr.Markdown("This demo is based on this [scikit-learn example](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_nonlinear.html#sphx-glr-auto-examples-svm-plot-svm-nonlinear-py).")
49
+ gr.Markdown("In this demo, we use a non-linear SVC (Support Vector Classifier) to learn the decision function of the XOR operator.")
50
 
51
  xor_image = Image.open("xor.png")
52
+ gr.Image(xor_image, label="Table explaining the 'XOR' operator", shape = (208.5, 250))
53
 
54
  gr.HTML("<hr>")
55
 
56
+ gr.Markdown("Furthermore, we observe that we get different decision function plots by varying the Kernel and Gamma hyperparameters of the non-linear SVC.")
57
+
58
+ gr.Markdown("Feel free to experiment with kernel and gamma values below to see how the quality of the decision function changes with the hyperparameters.")
59
 
60
  inp1 = gr.Radio(['poly', 'rbf', 'sigmoid'], label="Kernel", info="Choose a kernel")
61
  inp2 = gr.Radio(['scale', 'auto'], label="Gamma", info="Choose a gamma value")