Skip to content

Commit 9c752dd

Browse files
author
minjk-bl
committed
Fixed pipeline > gridsearch to apply evaluation model type
1 parent 1215bdd commit 9c752dd

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

visualpython/js/m_ml/Pipeline.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ define([
210210
$(that.wrapSelector(`.vp-pp-step-page:not([data-name="${name}"])`)).hide();
211211
$(that.wrapSelector(`.vp-pp-step-page[data-name="${name}"]`)).show();
212212
if (ppObj.useApp === true) {
213+
ppObj.app && that.handleAppView(name, ppObj.app);
213214
ppObj.app && ppObj.app.open($(that.wrapSelector(`.vp-pp-step-page[data-name="${name}"]`)));
214215
} else {
215216
that.renderApp(name);
@@ -372,7 +373,7 @@ define([
372373
// click next button
373374
$(this.wrapSelector('.vp-pp-step-next:not(.disabled)')).on('click', function() {
374375
let selectedTag = $(that.wrapSelector('.vp-pp-item.selected'));
375-
let nextTagList = $(selectedTag).nextAll('.vp-pp-item[data-flag="enabled"]:visible')
376+
let nextTagList = $(selectedTag).nextAll('.vp-pp-item[data-flag="enabled"]:visible');
376377
$(nextTagList[0]).trigger('click');
377378
});
378379
}
@@ -562,6 +563,32 @@ define([
562563
case 'ml_dataSplit':
563564
$(mlApp.wrapSelector('#inputData')).parent().hide();
564565
break;
566+
case 'ml_evaluation':
567+
// for pipeline
568+
$(mlApp.wrapSelector('.vp-upper-box')).hide();
569+
$(mlApp.wrapSelector('.vp-upper-box.' + mlApp.state.modelType)).show();
570+
571+
$(mlApp.wrapSelector('.vp-eval-box')).hide();
572+
$(mlApp.wrapSelector('.vp-eval-' + mlApp.state.modelType)).show();
573+
574+
if (mlApp.state.modelType == 'rgs') {
575+
// Regression
576+
577+
} else if (mlApp.state.modelType == 'clf') {
578+
// Classification
579+
// if (this.state.roc_curve == false && this.state.auc == false) {
580+
// $(page).find('.vp-ev-model.roc-auc').prop('disabled', true);
581+
// }
582+
} else {
583+
// Clustering
584+
if (mlApp.state.silhouetteScore == false) {
585+
$(mlApp.wrapSelector('.vp-ev-model.silhouette')).prop('disabled', true);
586+
}
587+
if (mlApp.state.ari == false && mlApp.state.nmi == false) {
588+
$(mlApp.wrapSelector('.vp-ev-model.ari-nmi')).prop('disabled', true);
589+
}
590+
}
591+
break;
565592
}
566593
}
567594

visualpython/js/m_ml/evaluation.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ define([
158158

159159
$(page).find('.vp-upper-box').hide();
160160
$(page).find('.vp-upper-box.' + this.state.modelType).show();
161+
162+
$(page).find('.vp-eval-box').hide();
163+
$(page).find('.vp-eval-' + this.state.modelType).show();
161164

162165
if (this.state.modelType == 'rgs') {
163166
// Regression

0 commit comments

Comments
 (0)