Skip to content

Commit 5921033

Browse files
author
minjk-bl
committed
Machine Learning applications form added
1 parent dab1992 commit 5921033

File tree

6 files changed

+252
-5
lines changed

6 files changed

+252
-5
lines changed

css/boardFrame.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,13 @@
237237
.vp-block.apps.vp-focus-child .vp-block-header {
238238
background-color: rgb(253, 177, 133);
239239
}
240+
.vp-block.machine_learning .vp-block-header {
241+
background-color: rgb(249, 227, 214);
242+
}
243+
.vp-block.machine_learning.vp-focus .vp-block-header,
244+
.vp-block.machine_learning.vp-focus-child .vp-block-header {
245+
background-color: rgb(253, 177, 133);
246+
}
240247
.vp-block.logic-define .vp-block-header {
241248
background-color: rgb(213, 231, 222);
242249
}

data/libraries.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,7 +3096,7 @@
30963096
"type" : "package",
30973097
"level": 0,
30983098
"name" : "Machine Learning",
3099-
"path" : "visualpython - machine learning",
3099+
"path" : "visualpython - machine_learning",
31003100
"desc" : "Machine learning modules",
31013101
"open" : true,
31023102
"grid" : true,
@@ -3107,7 +3107,7 @@
31073107
"level": 1,
31083108
"name" : "Data Split",
31093109
"tag" : "DATA SPLIT,MACHINE LEARNING,ML",
3110-
"path" : "visualpython - machine learning - data split",
3110+
"path" : "visualpython - machine_learning - data split",
31113111
"desc" : "Data split for machine learning",
31123112
"file" : "m_ml/dataSplit",
31133113
"apps" : {
@@ -3121,7 +3121,7 @@
31213121
"level": 1,
31223122
"name" : "Model Creating & Fitting",
31233123
"tag" : "MODEL CREATE,FIT,MACHINE LEARNING,ML",
3124-
"path" : "visualpython - machine learning - model selection",
3124+
"path" : "visualpython - machine_learning - model selection",
31253125
"desc" : "Model creating & fitting for machine learning",
31263126
"file" : "m_ml/modelSelection",
31273127
"apps" : {
@@ -3135,7 +3135,7 @@
31353135
"level": 1,
31363136
"name" : "Prediction",
31373137
"tag" : "PREDICTION,MACHINE LEARNING,ML",
3138-
"path" : "visualpython - machine learning - prediction",
3138+
"path" : "visualpython - machine_learning - prediction",
31393139
"desc" : "Prediction for machine learning",
31403140
"file" : "m_ml/prediction",
31413141
"apps" : {
@@ -3149,7 +3149,7 @@
31493149
"level": 1,
31503150
"name" : "Evaluation",
31513151
"tag" : "PERFORMANCE EVALUATION,MACHINE LEARNING,ML",
3152-
"path" : "visualpython - machine learning - evaluation",
3152+
"path" : "visualpython - machine_learning - evaluation",
31533153
"desc" : "Performance evaluation for machine learning",
31543154
"file" : "m_ml/evaluation",
31553155
"apps" : {

js/m_ml/dataSplit.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Project Name : Visual Python
3+
* Description : GUI-based Python code generator
4+
* File Name : dataSplit.js
5+
* Author : Black Logic
6+
* Note : Data split
7+
* License : GNU GPLv3 with Visual Python special exception
8+
* Date : 2022. 02. 07
9+
* Change Date :
10+
*/
11+
12+
//============================================================================
13+
// [CLASS] Data split
14+
//============================================================================
15+
define([
16+
'vp_base/js/com/com_util',
17+
'vp_base/js/com/com_Const',
18+
'vp_base/js/com/com_String',
19+
'vp_base/js/com/component/PopupComponent'
20+
], function(com_util, com_Const, com_String, PopupComponent) {
21+
22+
/**
23+
* Data split
24+
*/
25+
class DataSplit extends PopupComponent {
26+
_init() {
27+
super._init();
28+
/** Write codes executed before rendering */
29+
}
30+
31+
_bindEvent() {
32+
super._bindEvent();
33+
/** Implement binding events */
34+
var that = this;
35+
this.$target.on('click', function(evt) {
36+
var target = evt.target;
37+
if ($(that.wrapSelector()).find(target).length > 0) {
38+
// Sample : getDataList from Kernel
39+
vpKernel.getDataList().then(function(resultObj) {
40+
vpLog.display(VP_LOG_TYPE.DEVELOP, resultObj);
41+
}).catch(function(err) {
42+
vpLog.display(VP_LOG_TYPE.DEVELOP, err);
43+
});
44+
}
45+
});
46+
}
47+
48+
templateForBody() {
49+
/** Implement generating template */
50+
return 'This is sample.';
51+
}
52+
53+
generateCode() {
54+
return "print('sample code')";
55+
}
56+
57+
}
58+
59+
return DataSplit;
60+
});

js/m_ml/evaluation.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Project Name : Visual Python
3+
* Description : GUI-based Python code generator
4+
* File Name : evaluation.js
5+
* Author : Black Logic
6+
* Note : Evaluation
7+
* License : GNU GPLv3 with Visual Python special exception
8+
* Date : 2022. 02. 07
9+
* Change Date :
10+
*/
11+
12+
//============================================================================
13+
// [CLASS] Evaluation
14+
//============================================================================
15+
define([
16+
'vp_base/js/com/com_util',
17+
'vp_base/js/com/com_Const',
18+
'vp_base/js/com/com_String',
19+
'vp_base/js/com/component/PopupComponent'
20+
], function(com_util, com_Const, com_String, PopupComponent) {
21+
22+
/**
23+
* Evaluation
24+
*/
25+
class Evaluation extends PopupComponent {
26+
_init() {
27+
super._init();
28+
/** Write codes executed before rendering */
29+
}
30+
31+
_bindEvent() {
32+
super._bindEvent();
33+
/** Implement binding events */
34+
var that = this;
35+
this.$target.on('click', function(evt) {
36+
var target = evt.target;
37+
if ($(that.wrapSelector()).find(target).length > 0) {
38+
// Sample : getDataList from Kernel
39+
vpKernel.getDataList().then(function(resultObj) {
40+
vpLog.display(VP_LOG_TYPE.DEVELOP, resultObj);
41+
}).catch(function(err) {
42+
vpLog.display(VP_LOG_TYPE.DEVELOP, err);
43+
});
44+
}
45+
});
46+
}
47+
48+
templateForBody() {
49+
/** Implement generating template */
50+
return 'This is sample.';
51+
}
52+
53+
generateCode() {
54+
return "print('sample code')";
55+
}
56+
57+
}
58+
59+
return Evaluation;
60+
});

js/m_ml/modelSelection.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Project Name : Visual Python
3+
* Description : GUI-based Python code generator
4+
* File Name : modelSelection.js
5+
* Author : Black Logic
6+
* Note : Model selection and fitting
7+
* License : GNU GPLv3 with Visual Python special exception
8+
* Date : 2022. 02. 07
9+
* Change Date :
10+
*/
11+
12+
//============================================================================
13+
// [CLASS] Model selection
14+
//============================================================================
15+
define([
16+
'vp_base/js/com/com_util',
17+
'vp_base/js/com/com_Const',
18+
'vp_base/js/com/com_String',
19+
'vp_base/js/com/component/PopupComponent'
20+
], function(com_util, com_Const, com_String, PopupComponent) {
21+
22+
/**
23+
* Model selection
24+
*/
25+
class ModelSelection extends PopupComponent {
26+
_init() {
27+
super._init();
28+
/** Write codes executed before rendering */
29+
}
30+
31+
_bindEvent() {
32+
super._bindEvent();
33+
/** Implement binding events */
34+
var that = this;
35+
this.$target.on('click', function(evt) {
36+
var target = evt.target;
37+
if ($(that.wrapSelector()).find(target).length > 0) {
38+
// Sample : getDataList from Kernel
39+
vpKernel.getDataList().then(function(resultObj) {
40+
vpLog.display(VP_LOG_TYPE.DEVELOP, resultObj);
41+
}).catch(function(err) {
42+
vpLog.display(VP_LOG_TYPE.DEVELOP, err);
43+
});
44+
}
45+
});
46+
}
47+
48+
templateForBody() {
49+
/** Implement generating template */
50+
return 'This is sample.';
51+
}
52+
53+
generateCode() {
54+
return "print('sample code')";
55+
}
56+
57+
}
58+
59+
return ModelSelection;
60+
});

js/m_ml/prediction.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Project Name : Visual Python
3+
* Description : GUI-based Python code generator
4+
* File Name : prediction.js
5+
* Author : Black Logic
6+
* Note : Prediction
7+
* License : GNU GPLv3 with Visual Python special exception
8+
* Date : 2022. 02. 07
9+
* Change Date :
10+
*/
11+
12+
//============================================================================
13+
// [CLASS] Prediction
14+
//============================================================================
15+
define([
16+
'vp_base/js/com/com_util',
17+
'vp_base/js/com/com_Const',
18+
'vp_base/js/com/com_String',
19+
'vp_base/js/com/component/PopupComponent'
20+
], function(com_util, com_Const, com_String, PopupComponent) {
21+
22+
/**
23+
* Prediction
24+
*/
25+
class Prediction extends PopupComponent {
26+
_init() {
27+
super._init();
28+
/** Write codes executed before rendering */
29+
}
30+
31+
_bindEvent() {
32+
super._bindEvent();
33+
/** Implement binding events */
34+
var that = this;
35+
this.$target.on('click', function(evt) {
36+
var target = evt.target;
37+
if ($(that.wrapSelector()).find(target).length > 0) {
38+
// Sample : getDataList from Kernel
39+
vpKernel.getDataList().then(function(resultObj) {
40+
vpLog.display(VP_LOG_TYPE.DEVELOP, resultObj);
41+
}).catch(function(err) {
42+
vpLog.display(VP_LOG_TYPE.DEVELOP, err);
43+
});
44+
}
45+
});
46+
}
47+
48+
templateForBody() {
49+
/** Implement generating template */
50+
return 'This is sample.';
51+
}
52+
53+
generateCode() {
54+
return "print('sample code')";
55+
}
56+
57+
}
58+
59+
return Prediction;
60+
});

0 commit comments

Comments
 (0)