You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main/static/main/js/input.js
+42Lines changed: 42 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -253,6 +253,7 @@ function populateTargetDropdown(columns) {
253
253
254
254
// Ensure the select dropdown is styled correctly for Bootstrap 5
255
255
targetSelect.classList.add('form-select');// Updated class for Bootstrap 5
256
+
tour3();
256
257
}
257
258
258
259
functionclearFile(event){
@@ -538,3 +539,44 @@ function activateBuildButton() {
538
539
$('#build-btn-div1').removeClass('d-none');
539
540
$('#build-btn-div2').addClass('d-none');
540
541
}
542
+
543
+
// Tour 3: Started after uploading a dataset in KNN, if the user is on the tour
544
+
functiontour3(){
545
+
if(localStorage.getItem('knn_tour3')==='start'){
546
+
localStorage.setItem('knn_tour3','end');
547
+
introJs().setOptions({
548
+
steps: [
549
+
{
550
+
intro: "Great! Now you need to select the features and target variable. For the Iris dataset, we have 4 features and 1 target variable.",
551
+
},
552
+
{
553
+
element: document.querySelector('#features-div'),
554
+
intro: "Select the features of the Iris flower you want to use to predict the species. Let's predict the species based on the sepal length (SepalLengthCm) and sepal width (SepalWidthCm).",
555
+
},
556
+
{
557
+
element: document.querySelector('#target-div'),
558
+
intro: "For the Iris dataset, it's the 'Species' column that you want to predict. Select 'Species' as the target variable.",
559
+
},
560
+
{
561
+
element: document.querySelector('#n_neighbors'),
562
+
intro: "A hyperparameter is a parameter whose value is set before the learning process begins. KNN has a hyperparameter called 'n_neighbors', which is the number of neighbors to consider when classifying a data point. Let's set it as 5.",
563
+
},
564
+
{
565
+
element: document.querySelector('#canvas-1'),
566
+
intro: "This is a heatmap of the Iris dataset. It shows the correlation between each pair of features. The darker the color, the higher the correlation.",
567
+
},
568
+
{
569
+
element: document.querySelector('#canvas-2'),
570
+
intro: "This is a scatter plot of the Iris dataset. It shows the relationship between a pair of features. You can select the features you want to plot on the X and Y axes to visualize the data.",
571
+
},
572
+
{
573
+
element: document.querySelector('#build-btn'),
574
+
intro: "Finally, click 'Build' to train the KNN model.",
intro: "Great job! The model has generated the predicted values based on the input features you provided. This is the class in which the data point you entered belongs to.",
intro: "The table below shows the actual and predicted values for some test data. You can compare the predicted values with the actual values to understand the model's performance.",
intro: "You can download the trained model (as a .pkl file) by clicking the button below. This saved model can be used to make predictions anytime, and it can be deployed in production systems.",
intro: "Here, you can view a sample Python code snippet that demonstrates how to train a KNN model using the scikit-learn library. You can replace the example dataset with your own data to train a custom model.",
321
+
},
322
+
{
323
+
intro: "That's it! You have completed the tour of the platform. 12 more algorithms are waiting for you to explore. Don't forget to check out the preprocessing and visualization tools as well. Happy learning!",
intro: "Great! Now you need to select the features and target variable. For the Iris dataset, we have 4 features and 1 target variable.",
250
-
},
251
-
{
252
-
element: document.querySelector('#features-div'),
253
-
intro: "Select the features of the Iris flower you want to use to predict the species. Let's predict the species based on the sepal length (SepalLengthCm) and sepal width (SepalWidthCm).",
254
-
},
255
-
{
256
-
element: document.querySelector('#target-div'),
257
-
intro: "For the Iris dataset, it's the 'Species' column that you want to predict. Select 'Species' as the target variable.",
intro: "Go for the 'Iris' dataset. It contains 150 samples of Iris flowers with 4 features: sepal length, sepal width, petal length, and petal width.",
258
244
},
259
245
{
260
-
element: document.querySelector('#n_neighbors'),
261
-
intro: "A hyperparameter is a parameter whose value is set before the learning process begins. KNN has a hyperparameter called 'n_neighbors', which is the number of neighbors to consider when classifying a data point. Let's set it as 5.",
262
-
},
263
-
{
264
-
element: document.querySelector('#canvas-1'),
265
-
intro: "This is a heatmap of the Iris dataset. It shows the correlation between each pair of features. The darker the color, the higher the correlation.",
266
-
},
267
-
{
268
-
element: document.querySelector('#canvas-2'),
269
-
intro: "This is a scatter plot of the Iris dataset. It shows the relationship between a pair of features. You can select the features you want to plot on the X and Y axes to visualize the data.",
270
-
},
271
-
{
272
-
element: document.querySelector('#build-btn'),
273
-
intro: "Finally, click 'Build' to train the KNN model.",
intro: "You can use this trained model to generate predictions based on the input features you provide. Enter some values for each feature and click 'Predict'.",
148
+
intro: "You can use this trained model to generate predictions based on the input features you provide. Enter some values for each feature (e.g. SepalLengthCm = 4, SepalWidthCm = 2) and click 'Predict'.",
intro: "Great job! The model has generated the predicted values based on the input features you provided. This is the class in which the data point you entered belongs to.",
intro: "The table below shows the actual and predicted values for some test data. You can compare the predicted values with the actual values to understand the model's performance.",
intro: "You can download the trained model (as a .pkl file) by clicking the button below. This saved model can be used to make predictions anytime, and it can be deployed in production systems.",
intro: "Here, you can view a sample Python code snippet that demonstrates how to train a KNN model using the scikit-learn library. You can replace the example dataset with your own data to train a custom model.",
175
-
},
176
-
{
177
-
intro: "That's it! You have completed the tour of the platform. 12 more algorithms are waiting for you to explore. Don't forget to check out the preprocessing and visualization tools as well. Happy learning!",
0 commit comments