Skip to content

Commit 94baf25

Browse files
author
minjk-bl
committed
fix small bugs
1 parent bb53651 commit 94baf25

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

data/m_ml/mlLibrary.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ define([
499499
/** Auto ML */
500500
'auto-sklearn-rgs': {
501501
name: 'AutoSklearnRegressor (Linux only)',
502-
install: 'pip install auto-sklearn',
503-
import: 'from autosklearn import AutoSklearnRegressor',
502+
install: '!pip install auto-sklearn',
503+
import: 'from autosklearn.regression import AutoSklearnRegressor',
504504
link: 'https://automl.github.io/auto-sklearn/master/api.html#regression',
505505
code: 'AutoSklearnRegressor(${etc})',
506506
options: [
@@ -509,7 +509,7 @@ define([
509509
},
510510
'tpot-rgs': {
511511
name: 'TPOTRegressor',
512-
install: 'pip install tpot',
512+
install: '!pip install tpot',
513513
import: 'from tpot import TPOTRegressor',
514514
code: 'TPOTRegressor(${generation}${population_size}${cv}${random_state}${etc})',
515515
options: [
@@ -521,8 +521,8 @@ define([
521521
},
522522
'auto-sklearn-clf': {
523523
name: 'AutoSklearnClassifier (Linux only)',
524-
install: 'pip install auto-sklearn',
525-
import: 'from autosklearn import AutoSklearnClassifier',
524+
install: '!pip install auto-sklearn',
525+
import: 'from autosklearn.classification import AutoSklearnClassifier',
526526
link: 'https://automl.github.io/auto-sklearn/master/api.html#classification',
527527
code: 'AutoSklearnClassifier(${etc})',
528528
options: [
@@ -531,7 +531,7 @@ define([
531531
},
532532
'tpot-clf': {
533533
name: 'TPOTClassifier',
534-
install: 'pip install tpot',
534+
install: '!pip install tpot',
535535
import: 'from tpot import TPOTClassifier',
536536
code: 'TPOTClassifier(${generation}${population_size}${cv}${random_state}${etc})',
537537
options: [

js/com/com_util.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ define([
230230
return String(text).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
231231
}
232232

233+
var optionToLabel = function(label) {
234+
label = label.replaceAll('_', ' ');
235+
label = label.charAt(0).toUpperCase() + label.slice(1);
236+
return label;
237+
}
238+
233239
return {
234240
getUUID: getUUID,
235241
loadCss: loadCss,
@@ -238,6 +244,7 @@ define([
238244
addVariable: addVariable,
239245
formatString: formatString,
240246
convertToStr: convertToStr,
247+
optionToLabel: optionToLabel,
241248

242249
removeHeadScript: removeHeadScript,
243250
renderModal: renderModal,

js/com/component/ModelEditor.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ define([
551551
if (opt.label != undefined) {
552552
label = opt.label;
553553
}
554+
// fix label
555+
label = com_util.optionToLabel(label);
554556
optBox.appendFormatLine('<label for="{0}" title="{1}">{2}</label>'
555557
, opt.name, opt.name, label);
556558
let content = com_generator.renderContent(this, opt.component[0], opt, this.pageThis.state);

0 commit comments

Comments
 (0)