Skip to content

Commit

Permalink
Merge pull request #290 from intellica-tech/fix-dataProcess
Browse files Browse the repository at this point in the history
fix: dataAnalysis
  • Loading branch information
omerfbolat committed May 17, 2024
2 parents f801427 + 5fdd309 commit 6b39239
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
19 changes: 19 additions & 0 deletions superset-frontend/src/components/DvtSidebar/dvtSidebarData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,25 @@ const DvtSidebarData: SidebarDataProps[] = [
label: t('TİME COLUMN NAME'),
active: 'lstm',
},
{
placeholder: t('TARGET COLUMN'),
name: 'targetColumnName',
label: t('TARGET COLUMN NAME'),
active: 'lstm_forecast',
},
{
placeholder: t('TİME COLUMN'),
name: 'timeColumnName',
label: t('TİME COLUMN NAME'),
active: 'lstm_forecast',
},
{
placeholder: t('Prediction Number'),
name: 'predictionNumber',
label: t('Prediction Number'),
active: 'lstm_forecast',
status: 'input',
},
{
placeholder: t('PERCENTILE'),
name: 'percentile',
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/src/components/DvtSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ const DvtSidebar: React.FC<DvtSidebarProps> = ({ pathName, minWidth }) => {
'algorithm',
'targetColumnName',
'timeColumnName',
'predictionNumber',
'featureColumn',
'groupColumn',
'labelColumn',
Expand Down
5 changes: 5 additions & 0 deletions superset-frontend/src/dvt-redux/dvt-sidebarReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ interface DvtSidebarState {
algorithm: any;
targetColumnName: any;
timeColumnName: any;
predictionNumber: any;
featureColumn: any;
groupColumn: any;
labelColumn: any;
Expand Down Expand Up @@ -217,6 +218,7 @@ interface DvtSidebarState {
algorithm: any[];
targetColumnName: any[];
timeColumnName: any[];
predictionNumber: any[];
featureColumn: any[];
groupColumn: any[];
labelColumn: any[];
Expand Down Expand Up @@ -300,6 +302,7 @@ const INITIAL_STATE = {
algorithm: '',
targetColumnName: '',
timeColumnName: '',
predictionNumber: '',
featureColumn: '',
groupColumn: '',
labelColumn: '',
Expand Down Expand Up @@ -460,6 +463,7 @@ const initialState: DvtSidebarState = {
algorithm: [],
targetColumnName: [],
timeColumnName: [],
predictionNumber: [],
featureColumn: [],
groupColumn: [],
labelColumn: [],
Expand Down Expand Up @@ -574,6 +578,7 @@ const dvtSidebarSlice = createSlice({
algorithm: [],
targetColumnName: [],
timeColumnName: [],
predictionNumber: [],
featureColumn: [],
groupColumn: [],
labelColumn: [],
Expand Down
17 changes: 16 additions & 1 deletion superset-frontend/src/pages/DvtNewTrainedTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ function DvtNewTainedTable() {
newTainedTableAddSelector.targetColumnName?.value,
time_column_name: newTainedTableAddSelector.timeColumnName?.value,
}
: newTainedTableAddSelector.algorithm?.value === 'lstm_forecast'
? {
source_table_name: newTainedTableAddSelector.selectDatabase?.value,
target_column_name:
newTainedTableAddSelector.targetColumnName?.value,
time_column_name: newTainedTableAddSelector.timeColumnName?.value,
predictionNumber: newTainedTableAddSelector.predictionNumber
? newTainedTableAddSelector.predictionNumber
: undefined,
}
: newTainedTableAddSelector.category?.value === 'statistical'
? {
algorithm_name: newTainedTableAddSelector.algorithm?.value,
Expand Down Expand Up @@ -243,6 +253,8 @@ function DvtNewTainedTable() {
setPostSegmentationDataSetUrl('algorithms/run-ml-algorithm');
} else if (newTainedTableAddSelector.algorithm?.value === 'lstm') {
setPostDataSetUrl('lstm');
} else if (newTainedTableAddSelector.algorithm?.value === 'lstm_forecast') {
setPostDataSetUrl('lstm_forecast');
} else {
setPostDataSetUrl('ml_and_insert/');
}
Expand All @@ -261,7 +273,10 @@ function DvtNewTainedTable() {
dvtSidebarSetDataProperty({
pageKey: 'newTrainedTable',
key: 'algorithm',
value: [{ value: 'lstm', label: 'LSTM' }],
value: [
{ value: 'lstm', label: 'LSTM' },
{ value: 'lstm_forecast', label: 'LSTM Forecast' },
],
}),
);
} else if (newTainedTableAddSelector.category?.value === 'statistical') {
Expand Down

0 comments on commit 6b39239

Please sign in to comment.