Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Devops for 2.5.0#244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
minjk-bl merged 26 commits intovisualpython:devopsfromminjk-bl:devops
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
26 commits
Select commitHold shift + click to select a range
1bd07bd
Move SMOTE position to ETC
Sep 13, 2023
cf2e0d6
Edit to display output on Instance
Sep 13, 2023
7416969
Set default user method's input to non-text
Sep 13, 2023
616ddb9
Add option to SMOTE
Sep 13, 2023
1e5a67b
Fix MultiSelector bug on variable mode
Sep 13, 2023
e46aa1e
Edit SMOTE actions
Sep 13, 2023
ffec38c
Add SMOTE model info
Sep 13, 2023
8001e7c
Fix feature importances code
Sep 18, 2023
112792c
Edit permutation importances and add plot
Sep 18, 2023
97457ff
Edit to consider SMOTE
Sep 18, 2023
36c75a8
Edit FileNavigation to get use multi-extensions
Sep 18, 2023
20ba6f3
Edit File to use multi-extensions
Sep 18, 2023
1b8cc36
Add orient option to barplot on Seaborn
Sep 18, 2023
c16cb89
Edit style to show scrollbar on Seaborn option page
Sep 18, 2023
bd5595b
Edit to save last action as a default run type
Sep 18, 2023
17ab970
Edit to show horizontal scrollbar on DataView
Sep 18, 2023
4368367
Edit mechanism for selecting runtype
Sep 18, 2023
b2a0cc6
Fix typo
Sep 21, 2023
d86539c
Edit to remove dist plot on multinomial
Sep 21, 2023
d8cfbf2
small changes
Sep 21, 2023
36f0e8e
Add esc shortcut to FileNavigation
Sep 21, 2023
a4ae360
Edit to remove dist plot on multinomial
Sep 21, 2023
6d79f5a
Add hover title on multiselector columns
Sep 21, 2023
795c2f5
Add txt extension
Sep 21, 2023
5a23518
Edit PopupComponent to focus on limited tags
Sep 21, 2023
a7e7328
Add to_datetime to Frame app
Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionvisualpython/css/component/popupComponent.css
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -525,7 +525,7 @@
height: 25px;
}
.vp-popup-frame .vp-accordian-box {
padding: 0px 15px15px 0px;
padding: 0px 15px0px 0px;
}

/* resizable handler */
Expand Down
17 changes: 17 additions & 0 deletionsvisualpython/css/m_apps/frame.css
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -145,6 +145,7 @@
top: 0;
background-color: var(--vp-background-color);
border-bottom: 1px solid var(--vp-border-gray-color);
border-right: 1px solid var(--vp-border-gray-color);

text-align: right;
text-overflow: ellipsis;
Expand All@@ -168,6 +169,10 @@
/* background: var(--vp-light-gray-color); */
/* background: rgba(66, 165, 245, 0.2); */
}
.vp-fe-table-column-isnumeric {
float: left;
margin-right: 5px;
}

/* Row Hover */
.vp-fe-table tbody tr:hover {
Expand DownExpand Up@@ -302,6 +307,18 @@
float: right;
display: inline-block;
}
/* to datetime */
.vp-inner-popup-todt-addcol-content {
display: grid;
row-gap: 5px;
max-height: 105px;
}
.vp-inner-popup-todt-addcol-head,
.vp-inner-popup-todt-addcol-item {
display: grid;
grid-template-columns: 160px 160px auto;
column-gap: 5px;
}

/* UDF Editor - CodeMirror */
.vp-fr-subset-box {
Expand Down
28 changes: 24 additions & 4 deletionsvisualpython/css/m_visualize/seaborn.css
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,17 +47,28 @@
height: 100%;
}
.vp-tab-page-box.figure {
height:calc(100% - 30px);
height: 100%;
align-content: baseline;
grid-template-rows: 1fr;
overflow: hidden;
}
.vp-tab-page-box.figure > .vp-tab-page {
overflow: auto;
}
.vp-tab-page-box.plot {
height: calc(100% - 30px);
min-height: 352px;
/*height: calc(100% - 30px);
min-height: 352px; */
align-content: baseline;
height: 100%;
max-height: 100%;
overflow: scroll;
padding: 15px 15px 0px 15px;
}
.vp-chart-plot-box {
height: 100%;
display: grid;
grid-template-rows: 30px calc(100% - 30px);
overflow: auto;
}
.vp-chart-body {
display: grid;
Expand All@@ -75,6 +86,14 @@
.vp-chart-left-box,
.vp-chart-right-box {
height: 100%;
display: grid;
grid-template-rows: 30px calc(100% - 30px);
}
.vp-chart-left-box {
overflow: auto;
}
.vp-chart-right-box {
overflow: hidden;
}
.vp-chart-preview-title {
line-height: 30px;
Expand All@@ -86,7 +105,8 @@
.vp-chart-preview-box {
min-height: 352px;
width: 100%;
height: calc(100% - 30px);
/* height: calc(100% - 30px); */
height: 100%;
}
.vp-chart-preview-content:empty::after {
content: 'No preview image';
Expand Down
5 changes: 3 additions & 2 deletionsvisualpython/data/m_ml/mlLibrary.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,11 +175,12 @@ define([
name: 'SMOTE',
install: '!pip install imblearn',
import: 'from imblearn.over_sampling import SMOTE',
code: 'SMOTE(${random_state}${k_neighbors}${etc})',
code: 'SMOTE(${random_state}${k_neighbors}${sampling_strategy}${etc})',
returnType: 'SMOTE',
options: [
{ name: 'random_state', component: ['input_number'], placeholder: '123', usePair: true },
{ name: 'k_neighbors', component: ['input_number'], default: 5, usePair: true }
{ name: 'k_neighbors', component: ['input_number'], default: 5, usePair: true },
{ name: 'sampling_strategy', component: ['input'], placeholder: "'auto'", usePair: true }
]
},
/** Data Preparation - Scaling */
Expand Down
3 changes: 2 additions & 1 deletionvisualpython/data/m_visualize/seabornLibrary.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -148,13 +148,14 @@ define([
},
'barplot': {
name: 'Bar Plot',
code: '${allocateTo} = sns.barplot(${data}${x}${y}${hue}${etc})',
code: '${allocateTo} = sns.barplot(${data}${x}${y}${hue}${orient}${etc})',
description: 'Show point estimates and confidence intervals as rectangular bars.',
options: [
{ name: 'data', component: ['var_select'], var_type: ['DataFrame', 'Series', 'list'], usePair: true },
{ name: 'x', component: ['col_select'], usePair: true },
{ name: 'y', component: ['col_select'], usePair: true },
{ name: 'hue', component: ['col_select'], usePair: true },
{ name: 'orient', component: ['option_select'], usePair: true },
{ name: 'allocateTo', label: 'Allocate To', component: ['input'], usePair: true }
]
},
Expand Down
2 changes: 1 addition & 1 deletionvisualpython/html/component/fileNavigation.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@
-->
<!-- use body tag to strip comments out on requirejs/text plugin -->
<body>
<div id="vp_fileNavigation">
<div id="vp_fileNavigation" class="vp-filenavigation-base">
<div class='fileNavigationPage-container center-1rem-gray' >
<div class="fileNavigationPage-sidebar">
<!-- Jupyter Notebook -->
Expand Down
2 changes: 1 addition & 1 deletionvisualpython/html/m_ml/fitPredict.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@
</div>
<div class="vp-grid-border-box">
<div class="vp-multilang vp-ins-select-title">Options</div>
<div class="vp-ins-parameter-box vp-grid-col-95">
<div class="vp-ins-parameter-box vp-grid-col-130">

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletionvisualpython/html/m_ml/modelInfo.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@
</div>
<div class="vp-grid-border-box">
<div class="vp-multilang vp-ins-select-title">Options</div>
<div class="vp-ins-parameter-box vp-grid-col-95">
<div class="vp-ins-parameter-box vp-grid-col-130">

</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletionsvisualpython/html/m_stats/probDist.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,8 +20,8 @@
<div class="vp-grid-col-160">
<label for="action" class="vp-orange-text">Action</label>
<select id="action" class="vp-select l">
<option value="random-number">Generate random numbers</option>
<option value="distribution-plot">Show distribution plot</option>
<optionclass="vp-pd-display-option dist cont"value="random-number">Generate random numbers</option>
<optionclass="vp-pd-display-option dist cont dist-plot"value="distribution-plot">Show distribution plot</option>
<option class="vp-pd-display-option cont" value="stats-to-pvalue">Statistics to P-value</option>
<option class="vp-pd-display-option cont" value="pvalue-to-stats">P-value to Statistics</option>
</select>
Expand Down
8 changes: 8 additions & 0 deletionsvisualpython/html/m_visualize/seaborn.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,6 +100,14 @@
<label for="bins" class="vp-bold">Bins</label>
<input type="number" class="vp-input vp-state" id="bins" placeholder="Type bins" step="5" min="0" />
</div>
<div class="vp-grid-box sb-option">
<label for="orient" class="vp-bold">Orient</label>
<select id="orient" class="vp-select vp-state">
<option value="">Select option...</option>
<option value="'v'">Vertical</option>
<option value="'h'">Horizontal</option>
</select>
</div>
<div class="vp-grid-box sb-option">
<label for="kde" class="vp-bold">Kde</label>
<select id="kde" class="vp-select vp-state">
Expand Down
4 changes: 2 additions & 2 deletionsvisualpython/js/com/com_Config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1109,11 +1109,11 @@ define([
Config.ML_DATA_DICT = {
'Data Preparation': [
/** Encoding */
'OneHotEncoder', 'LabelEncoder', 'OrdinalEncoder', 'TargetEncoder', 'SMOTE',
'OneHotEncoder', 'LabelEncoder', 'OrdinalEncoder', 'TargetEncoder',
/** Scaling */
'StandardScaler', 'RobustScaler', 'MinMaxScaler', 'Normalizer', 'FunctionTransformer', 'PolynomialFeatures', 'KBinsDiscretizer',
/** ETC */
'SimpleImputer', 'ColumnTransformer'
'SimpleImputer', 'SMOTE', 'ColumnTransformer'
],
'Regression': [
'LinearRegression', 'Ridge', 'Lasso', 'ElasticNet', 'SVR', 'DecisionTreeRegressor', 'RandomForestRegressor', 'GradientBoostingRegressor', 'XGBRegressor', 'LGBMRegressor', 'CatBoostRegressor',
Expand Down
7 changes: 6 additions & 1 deletionvisualpython/js/com/com_Event.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,8 +207,13 @@ define([], function() {
that.keyManager.keyCheck.shiftKey = false;
}
if (evt.keyCode == that.keyManager.keyCode.escKey) {
// check if there is visible file navigation : FileNavigation
if ($('.vp-filenavigation-base:visible').length > 0) {
// close file navigation
$('.vp-filenavigation-base:visible').remove();
}
// check if there is visible data selector : DataSelector
if ($('.vp-dataselector-base:visible').length > 0) {
elseif ($('.vp-dataselector-base:visible').length > 0) {
// close data selector
$('.vp-dataselector-base:visible').remove();
}
Expand Down
103 changes: 58 additions & 45 deletionsvisualpython/js/com/component/FileNavigation.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,6 +84,10 @@ define([
this.pathStackPointer = -1;
this.pathStack = [];
this.currentFileList = [];
this.selectedExt = '';
if (this.state.extensions.length > 0) {
this.selectedExt = this.state.extensions[0];
}

this.pathState = {
parentPath: '',
Expand DownExpand Up@@ -280,6 +284,32 @@ define([
// clear body
$(this.wrapSelector('.fileNavigationPage-body')).html('');

/**
* Filter file/dir which included in this.state.extensions
*/
if (Array.isArray(this.state.extensions) && this.state.extensions.length > 0 && this.state.extensions.toString() !== '') {
fileList = fileList.filter((data, index) => {
if (index == 0) {
return true;
}

if (data.type && data.type == 'dir') {
// if directory, just show
return true;
} else if (data.name) {
var extension = data.name.substring(data.name.lastIndexOf('.') + 1);
// if (that.state.extensions.includes(extension)) {
if (that.selectedExt === '' || extension === that.selectedExt) {
return true;
} else {
return false;
}
} else {
return false;
}
});
}

// render file items
let dirArr = [];
let fileArr = [];
Expand DownExpand Up@@ -411,12 +441,12 @@ define([
page.appendFormatLine('<input id="{0}" type="text" class="vp-input" placeholder="{1}" value="{2}"/>'
, 'vp_fileNavigationInput', 'New File Name', this.state.fileName);
page.appendFormatLine('<select id="{0}" class="vp-select">', 'vp_fileNavigationExt');
page.appendLine('<option value="">All files(*.*)</option>');
if (this.state.extensions && this.state.extensions.length > 0) {
let selectedExt = this.selectedExt;
this.state.extensions.forEach(ext => {
page.appendFormatLine('<option value="{0}">*.{1}</option>', ext, ext);
page.appendFormatLine('<option value="{0}" {1}>*.{2}</option>', ext, (selectedExt === ext?'selected':''), ext);
});
} else {
page.appendLine('<option value="">All files(*.*)</option>');
}
page.appendLine('</select>');
page.appendFormatLine('<button class="{0} vp-button" data-menu="{1}">{2}</button>', 'vp-filenavi-btn', 'select', 'Select');
Expand All@@ -430,6 +460,13 @@ define([

that.handleSelectFile(filePath, fileName);
});
// bind file extension change event
$(this.wrapSelector('#vp_fileNavigationExt')).on('change', function() {
let ext = $(this).val();
that.selectedExt = ext;

that.renderFileList();
});
// bind save cancel event
$(this.wrapSelector('.vp-filenavi-btn')).on('click', function() {
let menu = $(this).data('menu');
Expand DownExpand Up@@ -477,10 +514,10 @@ define([
let that = this;
/** Implement after rendering */
// if save mode
if (this.state.type == 'save') {
// render saving box
this.renderSaveBox();
}
//if (this.state.type == 'save') {
// render saving box
this.renderSaveBox();
//}

// get current path
this.getCurrentDirectory().then(function(currentPath) {
Expand DownExpand Up@@ -527,20 +564,21 @@ define([
//============================================================================
// Set selection result
//============================================================================
if (this.state.type == 'save') {
// add as saving file
this.setSelectedFile(fileInput, pathInput);
} else {
// Manage result using finish function
let filesPath = [{ file: fileInput, path: pathInput }]; //FIXME: fix it if multiple selection implemented
let status = true;
let error = null;
vpLog.display(VP_LOG_TYPE.DEVELOP, 'fileNavigation finished', filesPath, status, error);
this.state.finish(filesPath, status, error);
this.setSelectedFile(fileInput, pathInput);
// if (this.state.type == 'save') {
// // add as saving file
// this.setSelectedFile(fileInput, pathInput);
// } else {
// // Manage result using finish function
// let filesPath = [{ file: fileInput, path: pathInput }]; //FIXME: fix it if multiple selection implemented
// let status = true;
// let error = null;
// vpLog.display(VP_LOG_TYPE.DEVELOP, 'fileNavigation finished', filesPath, status, error);
// this.state.finish(filesPath, status, error);

// remove and close file navigation
this.close();
}
// // remove and close file navigation
// this.close();
//}
}
getCurrentDirectory() {
return vpKernel.getCurrentDirectory();
Expand DownExpand Up@@ -588,31 +626,6 @@ define([
return a - b;
});

/**
* Filter file/dir which included in this.state.extensions
*/
if (Array.isArray(that.state.extensions) && that.state.extensions.length > 0 && that.state.extensions.toString() !== '') {
filtered_varList = filtered_varList.filter((data, index) => {
if (index == 0) {
return true;
}

if (data.type && data.type == 'dir') {
// if file, just show
return true;
} else if (data.name) {
var extension = data.name.substring(data.name.lastIndexOf('.') + 1);
if (that.state.extensions.includes(extension)) {
return true;
} else {
return false;
}
} else {
return false;
}
});
}

vpLog.display(VP_LOG_TYPE.DEVELOP, 'FileNavigation - getFileList: ', filtered_varList);

var { currentDirStr, currentRelativePathStr } = that.splitPathStrAndSetStack(dirObj, filtered_varList);
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp