Skip to content

Commit 722b2db

Browse files
author
minjk-bl
committed
Edit code and comment on evaluation app
1 parent 0c87e71 commit 722b2db

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

visualpython/js/m_ml/evaluation.js

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ define([
3333
this.config.checkModules = ['metrics'];
3434

3535
this.state = {
36-
modelType: 'rgs',
36+
modelType: 'rgs', // rgs / clf / cls
3737
predictData: 'pred',
3838
targetData: 'y_test',
3939
// regression
@@ -156,35 +156,6 @@ define([
156156
});
157157
$(page).find('#targetData2').replaceWith(targetData2Selector.toTagString());
158158

159-
// load state
160-
let that = this;
161-
Object.keys(this.state).forEach(key => {
162-
let tag = $(page).find('#' + key);
163-
let tagName = $(tag).prop('tagName'); // returns with UpperCase
164-
let value = that.state[key];
165-
if (value == undefined) {
166-
return;
167-
}
168-
switch(tagName) {
169-
case 'INPUT':
170-
let inputType = $(tag).prop('type');
171-
if (inputType == 'text' || inputType == 'number' || inputType == 'hidden') {
172-
$(tag).val(value);
173-
break;
174-
}
175-
if (inputType == 'checkbox') {
176-
$(tag).prop('checked', value);
177-
break;
178-
}
179-
break;
180-
case 'TEXTAREA':
181-
case 'SELECT':
182-
default:
183-
$(tag).val(value);
184-
break;
185-
}
186-
});
187-
188159
$(page).find('.vp-upper-box').hide();
189160
$(page).find('.vp-upper-box.' + this.state.modelType).show();
190161

0 commit comments

Comments
 (0)