From dab4038431bdda82f0b029e319fe2aaba08678ee Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:06:55 +0100 Subject: [PATCH 01/10] Add files via upload --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 10e1adc..f8218d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "advanced-analytics-toolbox", - "version": "1.4.0", + "version": "1.4.2", "description": "", "main": "advanced-analytics-toolbox.js", "scripts": { From 0f5374a1a377a131b895b38c8c16a504418d461a Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:07:54 +0100 Subject: [PATCH 02/10] Add files via upload --- src/advanced-analytics-toolbox.qext | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/advanced-analytics-toolbox.qext b/src/advanced-analytics-toolbox.qext index fbd6246..8f66da7 100644 --- a/src/advanced-analytics-toolbox.qext +++ b/src/advanced-analytics-toolbox.qext @@ -4,7 +4,7 @@ "icon": "bar-chart-horizontal", "type": "visualization", "preview" : "./lib/images/icon.png", - "version": "1.4.1", + "version": "1.4.2", "author": "", "homepage": "", "keywords": "qlik-sense, visualization, advanced analytics, statistics", From 63d81514a195b6381be461d87657cf33f06c5619 Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:09:55 +0100 Subject: [PATCH 03/10] Add files via upload --- docs/analysis/analysis.md | 4 ++ docs/analysis/regression_model.md | 56 +++++++++++++++++++++++ docs/analysis/regression_predict.md | 31 +++++++++++++ docs/analysis/regression_predict_table.md | 31 +++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 docs/analysis/regression_model.md create mode 100644 docs/analysis/regression_predict.md create mode 100644 docs/analysis/regression_predict_table.md diff --git a/docs/analysis/analysis.md b/docs/analysis/analysis.md index 3d19992..e4959c9 100644 --- a/docs/analysis/analysis.md +++ b/docs/analysis/analysis.md @@ -4,11 +4,15 @@ * [Line chart with linear regression line](simple_linear_line.md) - Plots a simple linear regression line on a line chart. * [Scatter plot with linear regression line](simple_linear_bubble.md) - Plots a simple linear regression line on a scatter plot. + * Multiple linear regression Analysis * [Multiple regression analysis](regression_analysis.md) - Performs multiple regression analysis and fits linear models. * [Line chart with multiple regression line](regression_analysis_line_chart.md) - Plots a multiple linear regression line on a line chart. * [Plot regression coefficients](coefplot.md) - Plots the coefficients from a regression model. * [Correlation matrix heatmap](correlation_heatmap.md) - Displays correlation matrix heatmap. + * [Multiple regression model](regression_model.md) - Performs multiple regression analysis and fits linear models. + * [Multiple regression prediction](regression_predict.md) - Plots on a histogram a prediction of multiple linear regression model. + * [Multiple regression prediction table](regression_predict_table.md) - Plots on a table a prediction of multiple linear regression model. * Statistical hypothesis testing * [F-Test](f_test.md) - Performs an F-Test to compare the variances of two samples. diff --git a/docs/analysis/regression_model.md b/docs/analysis/regression_model.md new file mode 100644 index 0000000..bd29b98 --- /dev/null +++ b/docs/analysis/regression_model.md @@ -0,0 +1,56 @@ +# Multiple regression analysis +Performs multiple regression analysis and fits linear models. + +## Screenshot + ![regression analysis example1](./images/regression_analysis_example1.png) + +## Prerequisite R packages + * jsonlite + * caret + +## Used R command + * [lm](https://www.rdocumentation.org/packages/stats/versions/3.4.0/topics/lm) + * [coef](https://www.rdocumentation.org/packages/stats/versions/3.4.1/topics/coef) + * [preProcess](https://www.rdocumentation.org/packages/caret/versions/6.0-78/topics/preProcess) + * [cor](https://www.rdocumentation.org/packages/stats/versions/3.4.3/topics/cor) + +## Caution + * Number formatting settings on measure properties are ignored. + * Use only training set (where Response variable have some value). + * Data are normalized (exclude the Response variable). + * Model is based on Predictor variables with a certain degree of correlation (>= |0.3|). + +## Usage + 1. Place [Advanced Analytics Toolbox] extension on a sheet and select [Multiple linear regression Analysis] > [Multiple regression model] for [Analysis Type] + 2. Select dimensions and measures + * Dimension: A field uniquely identifies each record (ex: ID, Code) + * Measure 1: Response variable + * Measure 2-: Predictor variables + +## Options + * Confidence level - Tolerance/confidence level. + +## Example1 - The Boston Housing Dataset +The Boston housing dataset contains medv (median house value) for 506 neighborhoods around Boston. In this example, we seek to predict medev using predictors such as rm (average number of rooms per house), age (average age of house) and crim (per capita crime rate by town). + + 1. Download the following sample file. + * Boston ( [Download file](./data/Boston.xlsx) | [Description on the dataset](http://www.cs.toronto.edu/~delve/data/boston/bostonDetail.html) ) + 2. Load the downloaded file into a new Qlik Sense app. + 3. Place [Advanced Analytics Toolbox] extension on a sheet and select [Multiple linear regression Analysis] > [Multiple regression model] for [Analysis Type]. + 4. Select [id] for a dimension. + 5. Select Sum([mdev]) for the first measure as a response(dependent) variable. This is the values we seek to predict. + 6. We are adding 13 predictor(independent) variables. Press [+] button to add measure button, and select the following fields for these measures: + * crim - per capita crime rate by town + * zn - proportion of residential land zoned for lots over 25,000 sq.ft. + * indus - proportion of non-retail business acres per town + * chas - Charles River dummy variable (= 1 if tract bounds) + * nox - nitric oxides concentration (parts per 10 million) + * rm - average number of rooms per dwelling + * age - proportion of owner-occupied units built prior to 1940 + * dis - weighted distances to five Boston employment centres + * rad - index of accessibility to radial highways + * tax - full-value property-tax rate per $10,000 + * ptratio - pupil-teacher ratio by town + * black - 1000(Bk - 0.63)^2 where Bk is the proportion of blacks by town + * lstat ^ percentage of lower status of the population + diff --git a/docs/analysis/regression_predict.md b/docs/analysis/regression_predict.md new file mode 100644 index 0000000..c41d0f5 --- /dev/null +++ b/docs/analysis/regression_predict.md @@ -0,0 +1,31 @@ +# Regression Analysis with prediction +Plots on a histogram a prediction of multiple linear regression model. + +## Screenshot + ![regression analysis prediction](./images/m_reg_pred.png) + +## Prerequisite R packages + * caret + +## Used R command + * [lm](https://www.rdocumentation.org/packages/stats/versions/3.4.0/topics/lm) + * [predict](https://www.rdocumentation.org/packages/stats/versions/3.4.0/topics/predict) + * [preProcess](https://www.rdocumentation.org/packages/caret/versions/6.0-78/topics/preProcess) + * [cor](https://www.rdocumentation.org/packages/stats/versions/3.4.3/topics/cor) + +## Caution + * Histogram show only the prediction values on a Test Set elements. + * Use only Training Set (where Response variable have some value) to fit the model. + * Data are normalized (exclude the Response variable). + * Model is based on Predictor variables with a certain degree of correlation (>= |0.3|). + +## Usage + 1. Place [Advanced Analytics Toolbox] extension on a sheet and select [Multiple linear regression analysis] > [Multiple regression prediction] for [Analysis Type] + 2. Select dimensions and measures + * Dimension: A field uniquely identifies each record (ex: ID, Code) + * Measure 1: Response variable + * Measure 2-: Predictor variables + +## Options + * Confidence level - Tolerance/confidence level. + diff --git a/docs/analysis/regression_predict_table.md b/docs/analysis/regression_predict_table.md new file mode 100644 index 0000000..fed4668 --- /dev/null +++ b/docs/analysis/regression_predict_table.md @@ -0,0 +1,31 @@ +# Regression Analysis with prediction (table) +Plots on a table a prediction of multiple linear regression model. + +## Screenshot + ![regression analysis prediction table](./images/m_reg_pred_t.png) + +## Prerequisite R packages + * caret + +## Used R command + * [lm](https://www.rdocumentation.org/packages/stats/versions/3.4.0/topics/lm) + * [predict](https://www.rdocumentation.org/packages/stats/versions/3.4.0/topics/predict) + * [preProcess](https://www.rdocumentation.org/packages/caret/versions/6.0-78/topics/preProcess) + * [cor](https://www.rdocumentation.org/packages/stats/versions/3.4.3/topics/cor) + +## Caution + * Table show only the prediction values on a Test Set elements. + * Use only Training Set (where Response variable have some value) to fit the model. + * Data are normalized (exclude the Response variable). + * Model is based on Predictor variables with a certain degree of correlation (>= |0.3|). + +## Usage + 1. Place [Advanced Analytics Toolbox] extension on a sheet and select [Multiple linear regression analysis] > [Multiple regression prediction table] for [Analysis Type] + 2. Select dimensions and measures + * Dimension: A field uniquely identifies each record (ex: ID, Code) + * Measure 1: Response variable + * Measure 2-: Predictor variables + +## Options + * Confidence level - Tolerance/confidence level. + From eac7c812e17e684825c816ad803c67335a8734e9 Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:10:51 +0100 Subject: [PATCH 04/10] Add files via upload --- docs/analysis/images/m_reg_pred.PNG | Bin 0 -> 29385 bytes docs/analysis/images/m_reg_pred_t.PNG | Bin 0 -> 10717 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/analysis/images/m_reg_pred.PNG create mode 100644 docs/analysis/images/m_reg_pred_t.PNG diff --git a/docs/analysis/images/m_reg_pred.PNG b/docs/analysis/images/m_reg_pred.PNG new file mode 100644 index 0000000000000000000000000000000000000000..193509ae0217de966f538943c270e83d1846d69b GIT binary patch literal 29385 zcmeHw2Ut_-x-JeQj7qU=1tE~Fjyj_vq9O?`C?Yy4h=5c<3<`okVx$uyqC{m#ETc%r zN(bp6C1R9-l&Ex2AVxre01=4P^=C)k9OPlZx<3u zB`+AWnG60t53}10CnO|6h5nmEbBVPT5;|qIXXkb!4=YvyoxJ+J>-`Si6W%`OQ`Z-s zJG-nPeyK`kXOOp!hrzisBEMVybWA(i??tiw87+maCmuO1a@IO1dF+q(HsVBQvkg}c zUW<0{eIUE$H|_mFbBWBda%$n=VA$H`9Q@|ZD|`Bd6d$G+_P@>_esb}G_vUoxaT9GC z?_;m8&nThm_yYR14pU(bGf{e~h*z3KBwBpHR!*HJ^R86YgQWcYnrk8px%qkXs_DP# zgE>a8?P^8VYU$S&;S&8K6VXoeD}Ee##wTd+n)ab1U5Y@#8R2??Fq|5$4Q^uvQw+;PHKMc*A>S1(bYN2cUfTJu;aF&^E8TgB>B zVaA{c_=wSH4c)c8VHVFjZ2Wkqeu56e7Z-a9VDY1Z&;6Y1~$nd9a1ihda!Qh zmd9z_6|WB>a61T*$|vD_N7Y%m+ayuEr-YpGD(28&uuJmc${=bKua!pS4WaNSJ2p;i zk<@CTBlahBh>6UmR3)>X!Gqj}ShV(A7+~uQ>9ISQsj`BEm*I^G!-$-od z-&5%>cdVa480WFpwp48A|Fct)l6$lhc@Zsk{B(gh5f>Sz?VS(on8IS#u4hrMphs7E z_1@g4eYR^x8-LP#f}riEO7{! zWfNLX!tuH`i-B{#Xw#F7in`t6ZqhChM5G>B=qvd;XDiX^f|GX>I;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^M#gXc; zE+}I+g=zW@C-fq0j~fS%pA$2)?X9#v`YrcxdSPO?`Ge9!Jd#% z*g3xmcic8l@Mb*l#=gb>m+nK!M$l3n`NNy0m literal 0 HcmV?d00001 diff --git a/docs/analysis/images/m_reg_pred_t.PNG b/docs/analysis/images/m_reg_pred_t.PNG new file mode 100644 index 0000000000000000000000000000000000000000..1bdcfd8dc6987b4327364f0b13fe9c9a8e6b3eae GIT binary patch literal 10717 zcmd6NXIN9)y7f{KML`atD1w5B6af(k(gXxiBmtBTQl*3)X+kIhfmpUkM_Pc;6bXp* z-a$6aP&EPRASFS%B(zZP3j27TeZPCp{m$|Ge%v2eYt8w-V~lsaGw8myI?J(h z#{d9e(YULo3jhZ?!B_85M(~^Hk8kF{KL?Py>Z(9q7xxVKfx%uyO9cQ5BaUxBJPdwj zdVJRe2>>S=>8}H=F7IstK-f(~O-28S#X@p}!|d#4Sv^|nkkn_D^Es+)$8H}z4sDQr zAFavVqmnFZ%x-dY@%d4lm0-#}$c%U9#M zs;jh@l84r{+_upN!5=Ps133Ty)~X2bL(}gB1^@_T!Z88B-`Jt-0Kh8{BLDz5HHEYQ z;A#AQEI2{p?XOJW?cLs5s&_-9#rL+U5s*Z!y}7;J_4c@u;03UY) zue22;7TF=LmNpOAAW=q$tM%RG+d1GW-L&5S-^psoi_r&GaA$LwdZB_z<)VBV*$3f# z99+}K@oJ~-`n3k~Ac~B=x8Ir=AY(4-3-oT{xQ8(Paz;Kjv3Z+TH-*w6%r zoAoP;@?E`7Ms&LVQUAr~A`8wt<_PCnM`i%SPeAKpk$Ri7*q!4GkC#~-B3nh%!3Zc} zHvre(ZrTC6Xnmzp7i;m*+tCQ{dX>uow|srZG=QRGaeN~D4Z=N7utex|}?A0C*GqK8?9r*c6i?Mk|i$*-{yQQiCBEZZnxrC3(Oc@>!~7*H+_;zqV;Q-DiQ$ zy(6HuFSYKjXWboB=EHj79BS6$zAeWyWha@x+$Y`o6}RTtUjZ% z>xdoYfjiH4zp)66jO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ge?SFW>? z^qpa4F;yW6a9hNK@RG*4asV)W1CmY}l)Bt)@;E9TLTtH1JKMv*WM18oD09DE7gZNa zRW)x3SvRBfyEUyrqmL&71(!f=fq-#mo*y1oL1cvGs>jRF&H&WM!A#8C|GvUabrQ1hCexidk_NQi+VppP>?-lizyzOa_s_637D_}&!}W&e>+ zel~s?a{B-xklkt{9~u{tFZH7*`%~6jn>Z+;>os~o(XcYLM;)Qe|Fku+Ccpg&9!G0W zush|TPzlfK%yxv@N74nsa~a?qP;74G{po4OZjnSMK@;S3qU3{co3yal2yw}4+kRKh zBp;zlgHG?5y(Em9JQ`FeqynxUa4Q7Hpv|k}$gGlB(rx?9AHPk%khCCS4a8G^Pb6AAr-R3lu|Y)pfA+ z7LHV4Xi`j~psW4@8tt za5xrRgox> zk}20hCMNsh`(5dl_yn1Ib2u8|r z?<5LNjyj4DN75hBh$noP`= zFB**ij}xH;gG9Bw7oozIk^a|;S1|V7P;<~gl?Qt%piudSz9k7GUgIj)boJ>*4ASMB zE#kT~c&hMCEZ9lr=Ac^>6eIdMLSXcNKI_QAx5x8CyG3+0AbkuR4QSlfR?Abhdj211 CI!vkn literal 0 HcmV?d00001 From 981c4f1553968e3ad11a2ff8a799a5a53d2b3de1 Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:12:01 +0100 Subject: [PATCH 05/10] Add files via upload --- src/lib/js/analysis/analysis.js | 42 ++++ src/lib/js/analysis/regression_model.js | 222 ++++++++++++++++++ src/lib/js/analysis/regression_predict.js | 190 +++++++++++++++ .../js/analysis/regression_predict_table.js | 200 ++++++++++++++++ 4 files changed, 654 insertions(+) create mode 100644 src/lib/js/analysis/regression_model.js create mode 100644 src/lib/js/analysis/regression_predict.js create mode 100644 src/lib/js/analysis/regression_predict_table.js diff --git a/src/lib/js/analysis/analysis.js b/src/lib/js/analysis/analysis.js index dae31df..fc4b41c 100644 --- a/src/lib/js/analysis/analysis.js +++ b/src/lib/js/analysis/analysis.js @@ -437,6 +437,48 @@ define([], () => { minMeas: 1, sortId: 5, setCustomButtonLabel: false, + }, + { + id: 31, + category: 1, + name: 'Multiple regression prediction', + file: 'regression_predict', + minDims: 1, + minMeas: 2, + sortId: 2, + allowAddMea: true, + setCustomButtonLabel: true, + dimButtonLabel: ['Add dimension'], + meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'], + meaButtonLabelOthers: 'Add measure - Predictor variable', + }, + { + id: 32, + category: 1, + name: 'Multiple regression prediction table', + file: 'regression_predict_table', + minDims: 1, + minMeas: 2, + sortId: 2, + allowAddMea: true, + setCustomButtonLabel: true, + dimButtonLabel: ['Add dimension'], + meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'], + meaButtonLabelOthers: 'Add measure - Predictor variable', + }, + { + id: 33, + category: 1, + name: 'Multiple regression model', + file: 'regression_model', + minDims: 1, + minMeas: 2, + sortId: 1, + allowAddMea: true, + setCustomButtonLabel: true, + dimButtonLabel: ['Add dimension'], + meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'], + meaButtonLabelOthers: 'Add measure - Predictor variable', }, ].sort((a, b) => { return a.sortId - b.sortId; diff --git a/src/lib/js/analysis/regression_model.js b/src/lib/js/analysis/regression_model.js new file mode 100644 index 0000000..95443a0 --- /dev/null +++ b/src/lib/js/analysis/regression_model.js @@ -0,0 +1,222 @@ +define([ + '../util/utils', + 'ng!$q', +], (utils, $q) => { + return { + /** + * createCube - create HyperCubes + * + * @param {Object} app reference to app + * @param {Object} $scope angular $scope + * + * @return {Null} null + */ + createCube(app, $scope) { + const layout = $scope.layout; + + // Set definitions for dimensions and measures + const dimension = utils.validateDimension(layout.props.dimensions[0]); + const dimensions = [{ + qNullSuppression: true, + qDef: { + qFieldDefs: [dimension] + }, + }]; + + const meaLen = layout.props.measures.length; + $scope.rowsLabel = ['(Intercept)', (layout.props.measures[1].label != '') ? layout.props.measures[1].label : utils.validateMeasure(layout.props.measures[0]) ]; // Label for dimension values + let params = `${utils.validateMeasure(layout.props.measures[0])} as mea0, ${utils.validateMeasure(layout.props.measures[1])} as mea1`; + let meaList = 'q$mea0 ~ q$mea1'; + let dataType = 'NN'; + + for (let i = 2; i < meaLen; i++) { + const mea = utils.validateMeasure(layout.props.measures[i]); + if (mea.length > 0) { + const param = `,${mea} as mea${i}`; + params += param; + meaList += ` + q$mea${i}`; + dataType += 'N'; + + $scope.rowsLabel.push(utils.validateMeasure(layout.props.measures[i])); + } + } + // Normalize data - Find Correlation - Split condition - set training data for fit model using most correlated features. + const soglia = 0.3; + const split = `q$mea0 > 0.0`; + const norm = `library(caret);target <- q$mea0; preParams <- preProcess(q[,1:${meaLen}], method=c("range"));q <- predict(preParams, q[,1:${meaLen}]); q$mea0 <- target`; + const cor = `m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = "pearson"))`; + const fo = `f="";for(j in 2:${meaLen}) if(!is.na(m[j]) && m[j]>=${soglia}){l=paste("q$mea",j-1,sep=""); f=paste(f,l,sep=" + ")} ;f=paste("q$mea0 ~ ",substring(f,3));str(f)`; + + // Debug mode - set R dataset name to store the q data. + utils.displayDebugModeMessage(layout.props.debugMode); + const saveRDataset = utils.getDebugSaveDatasetScript(layout.props.debugMode, 'debug_regression_analysis.rda'); + + const defMea1 = `R.ScriptEvalExStr('${dataType}','${saveRDataset} library(jsonlite);${norm};${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});lm_summary <- summary(lm_result); + json <- toJSON(list(coef(lm_summary)[,"Estimate"], coef(lm_summary)[,"Std. Error"], coef(lm_summary)[,"t value"], coef(lm_summary)[,"Pr(>|t|)"], + as.double(summary(lm_result$residuals)), summary(lm_result)$sigma, summary(lm_result)$df, lm_summary$r.squared, lm_summary$adj.r.squared, + summary(lm_result)$fstatistic, extractAIC(lm_result)[2])); json;',${params})`; + + // Debug mode - display R Scripts to console + utils.displayRScriptsToConsole(layout.props.debugMode, [defMea1]); + + const measures = [ + { + qDef: { + qDef: defMea1, + }, + }, + { + qDef: { + qLabel: '-', + qDef: '', // Dummy + }, + }, + { + qDef: { + qLabel: '-', + qDef: '', // Dummy + }, + }, + { + qDef: { + qLabel: '-', + qDef: '', // Dummy + }, + }, + { + qDef: { + qLabel: '-', + qDef: '', // Dummy + }, + }, + ]; + + $scope.backendApi.applyPatches([ + { + qPath: '/qHyperCubeDef/qDimensions', + qOp: 'replace', + qValue: JSON.stringify(dimensions), + }, + { + qPath: '/qHyperCubeDef/qMeasures', + qOp: 'replace', + qValue: JSON.stringify(measures), + }, + ], false); + + $scope.patchApplied = true; + return null; + }, + /** + * drawChart - draw chart with updated data + * + * @param {Object} $scope angular $scope + * + * @return {Object} Promise object + */ + drawChart($scope) { + const defer = $q.defer(); + const layout = $scope.layout; + + const dimension = utils.validateDimension(layout.props.dimensions[0]); + const requestPage = [{ + qTop: 0, + qLeft: 0, + qWidth: 2, + qHeight: 1, + }]; + + $scope.backendApi.getData(requestPage).then((dataPages) => { + const measureInfo = $scope.layout.qHyperCube.qMeasureInfo; + + // Display error when all measures' grand total return NaN. + if (dataPages[0].qMatrix[0][1].qText.length === 0 || dataPages[0].qMatrix[0][1].qText == '-') { + utils.displayConnectionError($scope.extId); + } else { + // Debug mode - display returned dataset to console + utils.displayReturnedDatasetToConsole(layout.props.debugMode, dataPages[0]); + + const result = JSON.parse(dataPages[0].qMatrix[0][1].qText); + + const estimate = result[0]; + const stdError = result[1]; + const tValue = result[2]; + const pr = result[3]; + const minPr = Math.max.apply(null, pr); + + const residuals = result[4]; + + const sigma = result[5]; + const df = result[6]; + + const rSquared = result[7]; + const adjRSquared = result[8]; + + const fstatistic = result[9]; + const aic = result[10]; + + // Set table header + let html = ` +

Residuals:

+ + + + + + + + + + + +
Min1QMedian3QMax
${residuals[0]}${residuals[1]}${residuals[2]}${residuals[4]}${residuals[5]}
+ +

Coefficients:

+ + + + + + + + `; + + // Set regression analysis results to table + for (let i = 0; i < $scope.rowsLabel.length; i++) { + html += ` + + `; + } + + // Set table footer and other results + html += ` + +
EstimateStd.Errort valuePr(>|t|)Signif
${$scope.rowsLabel[i]}${estimate[i]}${stdError[i]}${tValue[i]}${pr[i]}${(pr[i] < 0.001) ? '' : (pr[i] < 0.01) ? '' : (pr[i] < 0.05) ? '' : (pr[i] < 0.1) ? '.' : ''}
+
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+ +

Others:

+ + + + + + + + + + + + + +
ItemValue
Residual standard error${sigma[0]} on ${df[1]} degrees of freedom
Multiple R-squared${rSquared[0]}
Adjusted R-squared${adjRSquared[0]}
F-statistic ${fstatistic[0]} on ${fstatistic[1]} and ${fstatistic[2]} DF, p-value: < ${minPr}
AIC${aic[0]}
+ `; + + // Set HTML element for chart + $(`.advanced-analytics-toolsets-${$scope.extId}`).html(html); + } + return defer.resolve(); + }); + return defer.promise; + }, + }; +}); diff --git a/src/lib/js/analysis/regression_predict.js b/src/lib/js/analysis/regression_predict.js new file mode 100644 index 0000000..b3e6d72 --- /dev/null +++ b/src/lib/js/analysis/regression_predict.js @@ -0,0 +1,190 @@ +define([ + '../chart/line_chart', + '../util/utils', + 'ng!$q', +], (lineChart, utils, $q) => { + return { + /** + * createCube - create HyperCubes + * + * @param {Object} app reference to app + * @param {Object} $scope angular $scope + * + * @return {Null} null + */ + createCube(app, $scope) { + const layout = $scope.layout; + const dimension = utils.validateDimension(layout.props.dimensions[0]); + const dimensions = [ + { + qNullSuppression: true, + qDef: { + qFieldDefs: [dimension], + qSortCriterias: [{ + qSortByExpression: layout.props.dimSort || !layout.props.dimSortByExpression ? 0 : layout.props.dimSortByExpressionAsc, + qSortByNumeric: (layout.props.dimSort) ? 1 : (!layout.props.dimSortByNum) ? 0 : layout.props.dimSortByNumAsc, + qSortByAscii: layout.props.dimSort || !layout.props.dimSortByAlph ? 0 : layout.props.dimSortByAlphAsc, + qExpression: { + qv: layout.props.dimSortByExpressionString, + }, + }], + }, + }, + ]; + + const meaLen = layout.props.measures.length; + $scope.rowsLabel = ['(Intercept)', utils.validateMeasure(layout.props.measures[1])]; // Label for dimension values + let params = `${utils.validateMeasure(layout.props.measures[0])} as mea0, ${utils.validateMeasure(layout.props.measures[1])} as mea1`; + let meaList = 'q$mea0 ~ q$mea1'; + + for (let i = 2; i < meaLen; i++) { + const mea = utils.validateMeasure(layout.props.measures[i]); + if (mea.length > 0) { + const param = `,${mea} as mea${i}`; + params += param; + meaList += ` + q$mea${i}`; + + $scope.rowsLabel.push(utils.validateMeasure(layout.props.measures[i])); + } + } + + // Normalize data - Find Correlation - Split condition - set training data for fit model and predict only NA values, using most correlated features. + const soglia = 0.3; + const norm = `library(caret);target <- q$mea0; preParams <- preProcess(q[,1:${meaLen}], method=c("range"));q <- predict(preParams, q[,1:${meaLen}]); q$mea0 <- target`; + const cor = `m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = "pearson"))`; + const fo = `f="";for(j in 2:${meaLen}) if(!is.na(m[j]) && m[j]>=${soglia}){l=paste("q$mea",j-1,sep=""); f=paste(f,l,sep=" + ")} ;f=paste("q$mea0 ~ ",substring(f,3));str(f)`; + const split = `q$mea0 > 0`; + const s = `q = subset(q,q$mea0 == 0); q$mea0[q$mea0 == 0] <- NA;`; + + // Debug mode - set R dataset name to store the q data. + utils.displayDebugModeMessage(layout.props.debugMode); + const saveRDataset = utils.getDebugSaveDatasetScript(layout.props.debugMode, 'debug_regression_analysis_line_chart.rda'); + + const defMea1 = `R.ScriptEval('${saveRDataset} ${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval="${layout.props.interval}", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval="${layout.props.interval}", level=${layout.props.confidenceLevel}); }[,1]',${params})`; + const defMea2 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval="${layout.props.interval}", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval="${layout.props.interval}", level=${layout.props.confidenceLevel}); }[,2]',${params})`; + const defMea3 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval="${layout.props.interval}", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval="${layout.props.interval}", level=${layout.props.confidenceLevel}); }[,3]',${params})`; + + // Debug mode - display R Scripts to console + utils.displayRScriptsToConsole(layout.props.debugMode, [defMea1, defMea2, defMea3]); + + const measure = utils.validateMeasure(layout.props.measures[0]); + const measures = [ + { + qDef: { + qDef: measure, + }, + }, + { + qDef: { + qDef: defMea1, + }, + }, + { + qDef: { + qDef: defMea2, + }, + }, + { + qDef: { + qDef: defMea3, + }, + }, + { + qDef: { + qLabel: '-', + qDef: '', // Dummy + }, + }, + ]; + + $scope.backendApi.applyPatches([ + { + qPath: '/qHyperCubeDef/qDimensions', + qOp: 'replace', + qValue: JSON.stringify(dimensions), + }, + { + qPath: '/qHyperCubeDef/qMeasures', + qOp: 'replace', + qValue: JSON.stringify(measures), + }, + ], false); + + $scope.patchApplied = true; + return null; + }, + /** + * drawChart - draw chart with updated data + * + * @param {Object} $scope angular $scope + * + * @return {Object} Promise object + */ + drawChart($scope, app) { + const defer = $q.defer(); + const layout = $scope.layout; + + const requestPage = [{ + qTop: 0, + qLeft: 0, + qWidth: 6, + qHeight: 1500, + }]; + + $scope.backendApi.getData(requestPage).then((dataPages) => { + const measureInfo = $scope.layout.qHyperCube.qMeasureInfo; + + // Display error when all measures' grand total return NaN. + if (isNaN(measureInfo[1].qMin) && isNaN(measureInfo[1].qMax) + && isNaN(measureInfo[2].qMin) && isNaN(measureInfo[2].qMax) + && isNaN(measureInfo[3].qMin) && isNaN(measureInfo[3].qMax) + ) { + utils.displayConnectionError($scope.extId); + } else { + // Debug mode - display returned dataset to console + utils.displayReturnedDatasetToConsole(layout.props.debugMode, dataPages[0]); + + const palette = utils.getDefaultPaletteColor(); + const elemNum = []; + const dim1 = []; // Dimension + const mea1 = []; + const mea2 = []; + const mea3 = []; + const mea4 = []; + + + $.each(dataPages[0].qMatrix, (key, value) => { + elemNum.push(value[0].qElemNumber); + if(value[1].qNum == 0) + dim1.push(value[0].qText); + mea1.push(value[1].qNum); + mea2.push(value[2].qNum); + mea3.push(value[3].qNum); + mea4.push(value[4].qNum); + }); + + const chartData = [ + { + x: dim1, + y: mea2, + name: 'Fit', + mode: 'none', + type: 'bar', + line: { + color: `rgba(${palette[layout.props.colorForSub]},1)`, + }, + }, + ]; + + // Set HTML element for chart + $(`.advanced-analytics-toolsets-${$scope.extId}`).html(`
`); + + const chart = lineChart.draw($scope, chartData, `aat-chart-${$scope.extId}`, null); + lineChart.setEvents(chart, $scope, app); + } + return defer.resolve(); + }); + return defer.promise; + }, + }; +}); diff --git a/src/lib/js/analysis/regression_predict_table.js b/src/lib/js/analysis/regression_predict_table.js new file mode 100644 index 0000000..e561f83 --- /dev/null +++ b/src/lib/js/analysis/regression_predict_table.js @@ -0,0 +1,200 @@ +define([ + '../chart/line_chart', + '../util/utils', + 'ng!$q', +], (lineChart, utils, $q) => { + return { + /** + * createCube - create HyperCubes + * + * @param {Object} app reference to app + * @param {Object} $scope angular $scope + * + * @return {Null} null + */ + createCube(app, $scope) { + const layout = $scope.layout; + const dimension = utils.validateDimension(layout.props.dimensions[0]); + const dimensions = [ + { + qNullSuppression: true, + qDef: { + qFieldDefs: [dimension], + qSortCriterias: [{ + qSortByExpression: layout.props.dimSort || !layout.props.dimSortByExpression ? 0 : layout.props.dimSortByExpressionAsc, + qSortByNumeric: (layout.props.dimSort) ? 1 : (!layout.props.dimSortByNum) ? 0 : layout.props.dimSortByNumAsc, + qSortByAscii: layout.props.dimSort || !layout.props.dimSortByAlph ? 0 : layout.props.dimSortByAlphAsc, + qExpression: { + qv: layout.props.dimSortByExpressionString, + }, + }], + }, + }, + ]; + + const meaLen = layout.props.measures.length; + $scope.rowsLabel = ['(Intercept)', utils.validateMeasure(layout.props.measures[1])]; // Label for dimension values + let params = `${utils.validateMeasure(layout.props.measures[0])} as mea0, ${utils.validateMeasure(layout.props.measures[1])} as mea1`; + let meaList = 'q$mea0 ~ q$mea1'; + + for (let i = 2; i < meaLen; i++) { + const mea = utils.validateMeasure(layout.props.measures[i]); + if (mea.length > 0) { + const param = `,${mea} as mea${i}`; + params += param; + meaList += ` + q$mea${i}`; + + $scope.rowsLabel.push(utils.validateMeasure(layout.props.measures[i])); + } + } + + // Normalize data - Find Correlation - Split condition - set training data for fit model and predict only NA values, using most correlated features. + const soglia = 0.3; + const norm = `library(caret);target <- q$mea0; preParams <- preProcess(q[,1:${meaLen}], method=c("range"));q <- predict(preParams, q[,1:${meaLen}]); q$mea0 <- target`; + const cor = `m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = "pearson"))`; + const fo = `f="";for(j in 2:${meaLen}) if(!is.na(m[j]) && m[j]>=${soglia}){l=paste("q$mea",j-1,sep=""); f=paste(f,l,sep=" + ")} ;f=paste("q$mea0 ~ ",substring(f,3));str(f)`; + const split = `q$mea0 > 0`; + const s = `q = subset(q,q$mea0 == 0); q$mea0[q$mea0 == 0] <- NA;`; + + // Debug mode - set R dataset name to store the q data. + utils.displayDebugModeMessage(layout.props.debugMode); + const saveRDataset = utils.getDebugSaveDatasetScript(layout.props.debugMode, 'debug_regression_analysis_line_chart.rda'); + + const defMea1 = `R.ScriptEval('${saveRDataset} ${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval="${layout.props.interval}", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval="${layout.props.interval}", level=${layout.props.confidenceLevel}); }[,1]',${params})`; + const defMea2 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval="${layout.props.interval}", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval="${layout.props.interval}", level=${layout.props.confidenceLevel}); }[,2]',${params})`; + const defMea3 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval="${layout.props.interval}", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval="${layout.props.interval}", level=${layout.props.confidenceLevel}); }[,3]',${params})`; + + // Debug mode - display R Scripts to console + utils.displayRScriptsToConsole(layout.props.debugMode, [defMea1, defMea2, defMea3]); + + const measure = utils.validateMeasure(layout.props.measures[0]); + const measures = [ + { + qDef: { + qDef: measure, + }, + }, + { + qDef: { + qDef: defMea1, + }, + }, + { + qDef: { + qDef: defMea2, + }, + }, + { + qDef: { + qDef: defMea3, + }, + }, + { + qDef: { + qLabel: '-', + qDef: '', // Dummy + }, + }, + ]; + + $scope.backendApi.applyPatches([ + { + qPath: '/qHyperCubeDef/qDimensions', + qOp: 'replace', + qValue: JSON.stringify(dimensions), + }, + { + qPath: '/qHyperCubeDef/qMeasures', + qOp: 'replace', + qValue: JSON.stringify(measures), + }, + ], false); + + $scope.patchApplied = true; + return null; + }, + /** + * drawChart - draw chart with updated data + * + * @param {Object} $scope angular $scope + * + * @return {Object} Promise object + */ + drawChart($scope, app) { + const defer = $q.defer(); + const layout = $scope.layout; + + const requestPage = [{ + qTop: 0, + qLeft: 0, + qWidth: 6, + qHeight: 1500, + }]; + + $scope.backendApi.getData(requestPage).then((dataPages) => { + const measureInfo = $scope.layout.qHyperCube.qMeasureInfo; + + // Display error when all measures' grand total return NaN. + if (isNaN(measureInfo[1].qMin) && isNaN(measureInfo[1].qMax) + && isNaN(measureInfo[2].qMin) && isNaN(measureInfo[2].qMax) + && isNaN(measureInfo[3].qMin) && isNaN(measureInfo[3].qMax) + ) { + utils.displayConnectionError($scope.extId); + } else { + // Debug mode - display returned dataset to console + utils.displayReturnedDatasetToConsole(layout.props.debugMode, dataPages[0]); + + const palette = utils.getDefaultPaletteColor(); + const elemNum = []; + const dim1 = []; // Dimension + const mea1 = []; + const mea2 = []; + const mea3 = []; + const mea4 = []; + + + $.each(dataPages[0].qMatrix, (key, value) => { + elemNum.push(value[0].qElemNumber); + if(value[1].qNum == 0) + dim1.push(value[0].qText); + mea1.push(value[1].qNum); + mea2.push(value[2].qNum); + mea3.push(value[3].qNum); + mea4.push(value[4].qNum); + }); + + + // Set table header + let html = ` +

Predicted:

+ + + + + + + + `; + + // Set regression analysis results to table + for (let i = 0; i < dim1.length; i++) { + html += ` + `; + } + + // Set table footer and other results + html += ` + +
CodeRemaining Life
${dim1[i]}${Math.ceil(mea2[i])}
+ `; + + // Set HTML element for chart + $(`.advanced-analytics-toolsets-${$scope.extId}`).html(html); + + } + return defer.resolve(); + }); + return defer.promise; + }, + }; +}); From 495d0709e9805872ddae228374707dbf4775b86f Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:13:44 +0100 Subject: [PATCH 06/10] Add files via upload From 03345ad81e2482b708d3ed8610b5842056f52e74 Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:21:38 +0100 Subject: [PATCH 07/10] Add files via upload From 8b02c372bc15162a353bc1f717caa7779f198cbd Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:23:28 +0100 Subject: [PATCH 08/10] Add files via upload --- build/dev/lib/maps/properties.js.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dev/lib/maps/properties.js.map b/build/dev/lib/maps/properties.js.map index fe337c5..527f43c 100644 --- a/build/dev/lib/maps/properties.js.map +++ b/build/dev/lib/maps/properties.js.map @@ -1 +1 @@ -{"version":3,"sources":["properties.js"],"names":["define","analysis","qlik","$q","enableDebugMode","getNumberFormatSimple","app","currApp","undefined","defer","getAppLayout","layout","thousandSep","qLocaleInfo","qThousandSep","decimalSep","qDecimalSep","resolve","value","label","promise","type","component","items","dims","Dimensions","ref","itemTitleRef","allowAdd","allowRemove","addTranslation","expression","maxlength","meas","Measures","numberFormatting","options","defaultValue","formatting","show","data","numberFormattingSimple","then","customCurrency","prefixSuffix","numberFormatPattern","moneyFormatPattern","customFormatPattern","sorting","indexOf","props","analysisTypeId","sortDim","dimSort","dimSortByExpression","dimSortByExpressionAsc","dimSortByExpressionString","dimSortByNum","dimSortByNumAsc","dimSortByAlph","dimSortByAlphAsc","addons","uses","dataHandling","ReferenceLine","fixlimit","fixlimitlabel","fixlimitstyle","fixlimitwidth","fixlimitcolor","analysisCategoryDropDown","analysisCategories","map","d","id","name","analysisTypeDropDown","res","analysisTypes","filter","category","analysisCategoryId","displayTable","displayFormula","extendLine","extendDurations","interval","confidenceLevel","frequency","numberOfClusters","optimizationMethod","clusterMax","bootstrap","scaleData","dividedBy","differencing","seasonalDifferences","firstDifferences","lagMax","lagMaxValue","lag","lagValue","decomposeInFourCharts","forecastingPeriods","displayARIMAParams","autoARIMA","AROrder","DegreeOfDifferencing","MAOrder","SeasonalAROrder","SeasonalDegreeOfDifferencing","SeasonalMAOrder","displayHoltWintersParams","autoHoltWinters","holtWintersAlpha","holtWintersBeta","holtWintersGamma","seasonal","numOfFrequentTerms","tolower","removeNumbers","stopwords","removePunctuation","stemming","rpartMethod","minSplit","minBucket","cp","maxDepth","defaultCollapseLevel","displayResultsOnAllNodes","calcOddsRatio","splitDataset","splitPercentage","min","max","debugMode","debugModeLink","url","settings","presentation","line","datapoints","borderWidth","step","pointRadius","bubbleSize","marginTop","marginBottom","marginRight","marginLeft","defineScreenSize","screenWidth","screenHeight","colorsAndLegend","colors","colorForMain","colorForSub","showLegend","xAxis","xLabelsAndTitle","xAxisPosition","xScale","xAxisType","yAxis","yLabelsAndTitle","yAxisPosition","yScale","zAxis","zLabelsAndTitle"],"mappings":"AAAA,YAAAA,SAAQ,6BAA8B,OAAQ,SAAU,SAACC,EAAUC,EAAMC,GAEvE,GAAMC,IAAkB,EAElBC,EAAwB,WAC5B,GAAMC,GAAMJ,EAAKK,QAALC,QACNC,EAAQN,EAAGM,OAiCjB,OA/BAH,GAAII,aAAa,SAACC,GAChB,GAAMC,GAAcD,EAAOE,YAAYC,aACjCC,EAAaJ,EAAOE,YAAYG,WACtC,OAAOP,GAAMQ,UAGPC,MAAO,EACPC,MAAAA,IAAWP,EAAX,QAGAM,MAAO,EACPC,MAAAA,IAAWP,EAAX,MAA4BG,EAA5B,MAGAG,MAAO,EACPC,MAAAA,IAAWP,EAAX,MAA4BG,EAA5B,OAGAG,MAAO,EACPC,MAAO,QAGPD,MAAO,EACPC,MAAAA,KAAYJ,EAAZ,OAGAG,MAAO,EACPC,MAAAA,KAAYJ,EAAZ,WAIDN,EAAMW,QAGf,QACEC,KAAM,QACNC,UAAW,YACXC,OASEC,MACEL,MAAO,aACPI,OACEE,YACEJ,KAAM,QACNK,IAAK,mBACLP,MAAO,aACPQ,aAAc,QACdC,UAAU,EACVC,aAAa,EACbC,eAAgB,gBAChBP,OACEQ,YACEZ,MAAO,QACPE,KAAM,SACNK,IAAK,aACLK,WAAY,YAEdZ,OACEA,MAAO,QACPE,KAAM,SACNW,UAAW,IACXN,IAAK,aAMfO,MACEd,MAAO,WACPI,OACEW,UACEb,KAAM,QACNK,IAAK,iBACLP,MAAO,WACPQ,aAAc,QACdC,UAAU,EACVC,aAAa,EACbC,eAAgB,cAChBP,OACEQ,YACEZ,MAAO,aACPE,KAAM,SACNK,IAAK,aACLK,WAAY,YAEdZ,OACEA,MAAO,QACPE,KAAM,SACNW,UAAW,IACXN,IAAK,SAEPS,kBACEd,KAAM,SACNC,UAAW,WACXH,MAAO,oBACPO,IAAK,mBACLU,UAEIlB,MAAO,EAC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ETkB,aAAc,OACdE,KAAM,SAACC,GACL,OAAQ,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,IAAIS,QAAQT,EAAKU,MAAMC,iBAAmB,IAGvFoH,QACElJ,KAAM,UACNC,UAAW,SACXH,MAAO,QACPO,IAAK,eACLU,UACElB,OAAO,EACPC,MAAO,OAEPD,OAAO,EACPC,MAAO,QAETkB,cAAc,EACdE,KAAM,SAACC,GACL,OAAQ,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,IAAIS,QAAQT,EAAKU,MAAMC,iBAAmB,MAKjGqH,OACEnJ,KAAM,QACNF,MAAO,SACPoB,KAAM,SAACC,GACL,OAAQ,IAAIS,QAAQT,EAAKU,MAAMC,iBAAmB,GAEpD5B,OACEkJ,iBACEpJ,KAAM,UACNF,MAAO,aACPG,UAAW,SACXI,IAAK,wBACLU,UACElB,OAAO,EACPC,MAAO,OAEPD,OAAO,EACPC,MAAO,QAETkB,cAAc,EACdE,KAAM,SAACC,GACL,OAAQ,IAAIS,QAAQT,EAAKU,MAAMC,iBAAmB","file":"../../properties.js","sourcesContent":["define(['./lib/js/analysis/analysis', 'qlik', 'ng!$q'], (analysis, qlik, $q) => {\r\n // Control on debug mode\r\n const enableDebugMode = true;\r\n\r\n const getNumberFormatSimple = () => {\r\n const app = qlik.currApp(this);\r\n const defer = $q.defer();\r\n\r\n app.getAppLayout((layout) => {\r\n const thousandSep = layout.qLocaleInfo.qThousandSep;\r\n const decimalSep = layout.qLocaleInfo.qDecimalSep;\r\n return defer.resolve(\r\n [\r\n {\r\n value: 0,\r\n label: `1${thousandSep}000`,\r\n },\r\n {\r\n value: 1,\r\n label: `1${thousandSep}000${decimalSep}1`,\r\n },\r\n {\r\n value: 2,\r\n label: `1${thousandSep}000${decimalSep}12`,\r\n },\r\n {\r\n value: 3,\r\n label: '12%',\r\n },\r\n {\r\n value: 4,\r\n label: `12${decimalSep}3%`,\r\n },\r\n {\r\n value: 5,\r\n label: `12${decimalSep}34%`,\r\n },\r\n ]);\r\n });\r\n return defer.promise;\r\n };\r\n\r\n return {\r\n type: 'items',\r\n component: 'accordion',\r\n items: {\r\n // dimensions: {\r\n // uses: \"dimensions\",\r\n // show: false,\r\n // },\r\n // measures: {\r\n // uses: \"measures\",\r\n // show: false,\r\n // },\r\n dims: {\r\n label: 'Dimensions',\r\n items: {\r\n Dimensions: {\r\n type: 'array',\r\n ref: 'props.dimensions',\r\n label: 'Dimensions',\r\n itemTitleRef: 'label',\r\n allowAdd: true,\r\n allowRemove: true,\r\n addTranslation: 'Add dimension',\r\n items: {\r\n expression: {\r\n label: 'Field',\r\n type: 'string',\r\n ref: 'expression',\r\n expression: 'optional',\r\n },\r\n label: {\r\n label: 'Label',\r\n type: 'string',\r\n maxlength: 100,\r\n ref: 'label',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n meas: {\r\n label: 'Measures',\r\n items: {\r\n Measures: {\r\n type: 'array',\r\n ref: 'props.measures',\r\n label: 'Measures',\r\n itemTitleRef: 'label',\r\n allowAdd: true,\r\n allowRemove: true,\r\n addTranslation: 'Add measure',\r\n items: {\r\n expression: {\r\n label: 'Expression',\r\n type: 'string',\r\n ref: 'expression',\r\n expression: 'optional',\r\n },\r\n label: {\r\n label: 'Label',\r\n type: 'string',\r\n maxlength: 100,\r\n ref: 'label',\r\n },\r\n numberFormatting: {\r\n type: 'string',\r\n component: 'dropdown',\r\n label: 'Number formatting',\r\n ref: 'numberFormatting',\r\n options: [\r\n {\r\n value: 0,\r\n label: 'Auto',\r\n },\r\n {\r\n value: 1,\r\n label: 'Number',\r\n },\r\n {\r\n value: 2,\r\n label: 'Money',\r\n },\r\n {\r\n value: 5,\r\n label: 'Custom',\r\n },\r\n ],\r\n defaultValue: 0,\r\n },\r\n formatting: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Formatting',\r\n ref: 'formatting',\r\n options: [{\r\n value: true,\r\n label: 'Simple',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return data.numberFormatting === 1;\r\n },\r\n },\r\n numberFormattingSimple: {\r\n type: 'string',\r\n component: 'dropdown',\r\n ref: 'numberFormattingSimple',\r\n options: getNumberFormatSimple().then((items) => {\r\n return items;\r\n }),\r\n defaultValue: 2,\r\n show: (data) => {\r\n return data.numberFormatting === 1 && (data.formatting === true || typeof data.formatting == 'undefined');\r\n },\r\n },\r\n customCurrency: {\r\n label: 'Currency',\r\n type: 'string',\r\n maxlength: 100,\r\n ref: 'customCurrency',\r\n defaultValue: '$',\r\n show: (data) => {\r\n return data.numberFormatting === 2;\r\n },\r\n },\r\n prefixSuffix: {\r\n type: 'string',\r\n component: 'dropdown',\r\n ref: 'prefixSuffix',\r\n options: [{\r\n value: 'prefix',\r\n label: 'Prefix',\r\n }, {\r\n value: 'suffix',\r\n label: 'Suffix',\r\n }],\r\n defaultValue: 'prefix',\r\n show: (data) => {\r\n return data.numberFormatting === 2;\r\n },\r\n },\r\n numberFormatPattern: {\r\n label: 'Format pattern',\r\n type: 'string',\r\n maxlength: 100,\r\n ref: 'numberFormatPattern',\r\n defaultValue: ',.2f',\r\n show: (data) => {\r\n return data.numberFormatting === 1 && data.formatting === false;\r\n },\r\n },\r\n moneyFormatPattern: {\r\n label: 'Format pattern',\r\n type: 'string',\r\n maxlength: 100,\r\n ref: 'moneyFormatPattern',\r\n defaultValue: ',.2f',\r\n show: (data) => {\r\n return data.numberFormatting === 2;\r\n },\r\n },\r\n customFormatPattern: {\r\n label: 'Format pattern',\r\n type: 'string',\r\n maxlength: 100,\r\n ref: 'customFormatPattern',\r\n defaultValue: ',.2f',\r\n show: (data) => {\r\n return data.numberFormatting === 5;\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n sorting: {\r\n type: 'items',\r\n label: 'Sorting',\r\n show: (data) => {\r\n return [0, 17].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n items: {\r\n sortDim: {\r\n type: 'items',\r\n label: 'Dimension',\r\n items: {\r\n dimSort: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Sorting',\r\n ref: 'props.dimSort',\r\n options: [{\r\n value: true,\r\n label: 'Auto',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n },\r\n dimSortByExpression: {\r\n type: 'boolean',\r\n label: 'Sort by expression',\r\n ref: 'props.dimSortByExpression',\r\n defaultValue: false,\r\n show: (data) => {\r\n return !data.props.dimSort;\r\n },\r\n },\r\n dimSortByExpressionAsc: {\r\n type: 'integer',\r\n component: 'dropdown',\r\n ref: 'props.dimSortByExpressionAsc',\r\n options: [{\r\n value: 1,\r\n label: 'Ascending',\r\n }, {\r\n value: -1,\r\n label: 'Descending',\r\n }],\r\n defaultValue: 1,\r\n show: (data) => {\r\n return !data.props.dimSort && data.props.dimSortByExpression;\r\n },\r\n },\r\n dimSortByExpressionString: {\r\n label: 'Expression',\r\n type: 'string',\r\n ref: 'props.dimSortByExpressionString',\r\n expression: 'optional',\r\n show: (data) => {\r\n return !data.props.dimSort && data.props.dimSortByExpression;\r\n },\r\n },\r\n dimSortByNum: {\r\n type: 'boolean',\r\n label: 'Sort numerically',\r\n ref: 'props.dimSortByNum',\r\n defaultValue: false,\r\n show: (data) => {\r\n return !data.props.dimSort;\r\n },\r\n },\r\n dimSortByNumAsc: {\r\n type: 'integer',\r\n component: 'dropdown',\r\n ref: 'props.dimSortByNumAsc',\r\n options: [{\r\n value: 1,\r\n label: 'Ascending',\r\n }, {\r\n value: -1,\r\n label: 'Descending',\r\n }],\r\n defaultValue: 1,\r\n show: (data) => {\r\n return !data.props.dimSort && data.props.dimSortByNum;\r\n },\r\n },\r\n dimSortByAlph: {\r\n type: 'boolean',\r\n label: 'Sort alphabetically',\r\n ref: 'props.dimSortByAlph',\r\n defaultValue: false,\r\n show: (data) => {\r\n return !data.props.dimSort;\r\n },\r\n },\r\n dimSortByAlphAsc: {\r\n type: 'integer',\r\n component: 'dropdown',\r\n ref: 'props.dimSortByAlphAsc',\r\n options: [{\r\n value: 1,\r\n label: 'Ascending',\r\n }, {\r\n value: -1,\r\n label: 'Descending',\r\n }],\r\n defaultValue: 1,\r\n show: (data) => {\r\n return !data.props.dimSort && data.props.dimSortByAlph;\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n addons: {\r\n uses: 'addons',\r\n items: {\r\n dataHandling: {\r\n uses: 'dataHandling',\r\n },\r\n // Section for Reference Line\r\n ReferenceLine: {\r\n label: 'Reference Line',\r\n items: {\r\n fixlimit: {\r\n ref: 'props.limit',\r\n label: 'Limit',\r\n type: 'integer',\r\n defaultValue: \"\",\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n fixlimitlabel:{\r\n type:'string',\r\n label:'Label',\r\n ref:'props.limitlabel',\r\n defaultValue:'Reference Line',\r\n show:(data)=>{\r\n return[9].indexOf(data.props.analysisTypeId)>=0;\r\n },\r\n },\r\n //line style\r\n fixlimitstyle: {\r\n type: 'string',\r\n label: 'Line style',\r\n component: 'dropdown',\r\n ref: 'props.limitstyle',\r\n options: [{\r\n value: 'lines',\r\n label: 'lines',\r\n }, {\r\n value: 'dashdot',\r\n label: 'dashdot',\r\n }, {\r\n value: 'solid',\r\n label: 'solid',\r\n }, {\r\n value: 'dot',\r\n label: 'dot',\r\n }],\r\n defaultValue: 'lines',\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n //line width\r\n fixlimitwidth: {\r\n type: 'string',\r\n label: 'Line Width',\r\n component: 'dropdown',\r\n ref: 'props.limitwidth',\r\n options: [{\r\n value: '1',\r\n label: 'tiny',\r\n }, {\r\n value: '2',\r\n label: 'mid',\r\n }, {\r\n value: '4',\r\n label: 'huge',\r\n }],\r\n defaultValue: '1',\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n // line color\r\n fixlimitcolor: {\r\n label: 'Color',\r\n component: 'color-picker',\r\n ref: 'props.limitcolor',\r\n type: 'integer',\r\n defaultValue: 11,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n },\r\n },\r\n //end of section for Reference line\r\n },\r\n },\r\n analysis: {\r\n label: 'Analysis Settings',\r\n items: {\r\n analysisCategoryDropDown: {\r\n type: 'integer',\r\n component: 'dropdown',\r\n label: 'Analysis Category',\r\n ref: 'props.analysisCategoryId',\r\n options: analysis.analysisCategories.map((d) => {\r\n return {\r\n value: d.id,\r\n label: d.name,\r\n };\r\n }),\r\n defaultValue: -1,\r\n },\r\n analysisTypeDropDown: {\r\n type: 'integer',\r\n component: 'dropdown',\r\n label: 'Analysis Type',\r\n ref: 'props.analysisTypeId',\r\n options: (data) => {\r\n const res = analysis.analysisTypes\r\n .filter((d) => {\r\n return d.category === data.props.analysisCategoryId;\r\n })\r\n .map((d) => {\r\n return {\r\n value: d.id,\r\n label: d.name,\r\n };\r\n });\r\n return res;\r\n },\r\n show: (data) => {\r\n return data.props.analysisCategoryId >= 0;\r\n },\r\n defaultValue: -1,\r\n },\r\n displayTable: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Table display mode',\r\n ref: 'props.displayTable',\r\n options: [{\r\n value: false,\r\n label: 'Off',\r\n }, {\r\n value: true,\r\n label: 'On',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [0, 9, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n // *****\r\n // Analysis Options\r\n // *****\r\n displayFormula: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Display formula',\r\n ref: 'props.displayFormula',\r\n options: [{\r\n value: false,\r\n label: 'Off',\r\n }, {\r\n value: true,\r\n label: 'On',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [0].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n extendLine: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Extend line',\r\n ref: 'props.extendLine',\r\n options: [{\r\n value: false,\r\n label: 'Off',\r\n }, {\r\n value: true,\r\n label: 'On',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [0].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n extendDurations: {\r\n ref: 'props.extendDurations',\r\n label: 'Extend durations',\r\n type: 'string',\r\n show: (data) => {\r\n return [0].indexOf(data.props.analysisTypeId) >= 0 && data.props.extendLine === true;\r\n },\r\n defaultValue: 12,\r\n },\r\n interval: {\r\n type: 'string',\r\n component: 'dropdown',\r\n label: 'Interval',\r\n ref: 'props.interval',\r\n options: [{\r\n value: 'confidence',\r\n label: 'confidence',\r\n }, {\r\n value: 'prediction',\r\n label: 'prediction',\r\n }],\r\n defaultValue: 'confidence',\r\n show: (data) => {\r\n return [0, 1, 17].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n confidenceLevel: {\r\n ref: 'props.confidenceLevel',\r\n label: 'Confidence level',\r\n type: 'string',\r\n show: (data) => {\r\n return [0, 1, 2, 3, 4, 5, 9, 17, 22, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n defaultValue: 0.95,\r\n },\r\n frequency: {\r\n ref: 'props.frequency',\r\n label: 'Frequency',\r\n type: 'integer',\r\n show: (data) => {\r\n return [8, 9, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n defaultValue: 12,\r\n },\r\n // k-means\r\n numberOfClusters: {\r\n ref: 'props.numberOfClusters',\r\n label: 'Number of clusters',\r\n type: 'integer',\r\n show: (data) => {\r\n return [10, 16, 24].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n defaultValue: 3,\r\n },\r\n optimizationMethod: {\r\n ref: 'props.optimizationMethod',\r\n label: 'Optimization method',\r\n component: 'dropdown',\r\n type: 'string',\r\n options: [{\r\n value: 'gap',\r\n label: 'Gap Statistic',\r\n }],\r\n defaultValue: 'gap',\r\n show: (data) => {\r\n return [23].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n clusterMax: {\r\n ref: 'props.clusterMax',\r\n label: 'Max number of clusters',\r\n type: 'integer',\r\n show: (data) => {\r\n return [23].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n defaultValue: 10,\r\n },\r\n bootstrap: {\r\n ref: 'props.bootstrap',\r\n label: 'Number of Monte Carlo samples',\r\n type: 'integer',\r\n show: (data) => {\r\n return [23].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n defaultValue: 10,\r\n },\r\n scaleData: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Scale data',\r\n ref: 'props.scaleData',\r\n options: [{\r\n value: false,\r\n label: 'Off',\r\n }, {\r\n value: true,\r\n label: 'On',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [10, 16, 23, 24].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n dividedBy: {\r\n type: 'string',\r\n component: 'dropdown',\r\n label: 'Grouped by',\r\n ref: 'props.dividedBy',\r\n options: [{\r\n value: 'variables',\r\n label: 'Variables',\r\n },\r\n {\r\n value: 'clusters',\r\n label: 'Clusters',\r\n }],\r\n defaultValue: 'clusters',\r\n show: (data) => {\r\n return [24].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n // Time series analysis\r\n differencing: {\r\n ref: 'props.differencing',\r\n label: 'Differencing',\r\n component: 'dropdown',\r\n type: 'integer',\r\n options: [{\r\n value: 0,\r\n label: 'Off',\r\n }, {\r\n value: 1,\r\n label: 'Seasonal differences',\r\n }, {\r\n value: 2,\r\n label: 'First and seasonal differences',\r\n }],\r\n defaultValue: 0,\r\n show: (data) => {\r\n return [6, 7, 12].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n seasonalDifferences: {\r\n ref: 'props.seasonalDifferences',\r\n label: 'Seasonal differences',\r\n type: 'integer',\r\n defaultValue: 12,\r\n show: (data) => {\r\n return [6, 7, 12].indexOf(data.props.analysisTypeId) >= 0 && [1, 2].indexOf(data.props.differencing) >= 0;\r\n },\r\n },\r\n firstDifferences: {\r\n ref: 'props.firstDifferences',\r\n label: 'First differences',\r\n type: 'integer',\r\n defaultValue: 1,\r\n show: (data) => {\r\n return [6, 7, 9, 12].indexOf(data.props.analysisTypeId) >= 0 && data.props.differencing === 2;\r\n },\r\n },\r\n // Autocorrelation\r\n lagMax: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Lag max',\r\n ref: 'props.lagMax',\r\n options: [{\r\n value: true,\r\n label: 'Auto',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [6].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n lagMaxValue: {\r\n ref: 'props.lagMaxValue',\r\n label: 'Lag max',\r\n type: 'integer',\r\n defaultValue: 20,\r\n show: (data) => {\r\n return [6].indexOf(data.props.analysisTypeId) >= 0 && data.props.lagMax === false;\r\n },\r\n },\r\n // Ljung-Box Test\r\n lag: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Lag',\r\n ref: 'props.lag',\r\n options: [{\r\n value: true,\r\n label: 'Auto',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [7].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n lagValue: {\r\n ref: 'props.lagValue',\r\n label: 'Lag',\r\n type: 'integer',\r\n defaultValue: 1,\r\n show: (data) => {\r\n return [7].indexOf(data.props.analysisTypeId) >= 0 && data.props.lag === false;\r\n },\r\n },\r\n // Decompose time series\r\n decomposeInFourCharts: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Display in 4 charts ',\r\n ref: 'props.decomposeInFourCharts',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [8].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n // ARIMA forecast\r\n forecastingPeriods: {\r\n ref: 'props.forecastingPeriods',\r\n label: 'Forecasting periods',\r\n type: 'integer',\r\n show: (data) => {\r\n return [9, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n defaultValue: 12,\r\n },\r\n displayARIMAParams: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Display ARIMA parameters',\r\n ref: 'props.displayARIMAParams',\r\n options: [{\r\n value: false,\r\n label: 'Off',\r\n }, {\r\n value: true,\r\n label: 'On',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n autoARIMA: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Parameter settings',\r\n ref: 'props.autoARIMA',\r\n options: [{\r\n value: true,\r\n label: 'Auto',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n AROrder: {\r\n ref: 'props.AROrder',\r\n label: 'AR Order(p)',\r\n type: 'integer',\r\n defaultValue: 0,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\r\n },\r\n },\r\n DegreeOfDifferencing: {\r\n ref: 'props.DegreeOfDifferencing',\r\n label: 'Degree of differencing(d)',\r\n type: 'integer',\r\n defaultValue: 0,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\r\n },\r\n },\r\n MAOrder: {\r\n ref: 'props.MAOrder',\r\n label: 'MA Order(q)',\r\n type: 'integer',\r\n defaultValue: 0,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\r\n },\r\n },\r\n SeasonalAROrder: {\r\n ref: 'props.SeasonalAROrder',\r\n label: 'Seasonal AR Order(P)',\r\n type: 'integer',\r\n defaultValue: 0,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\r\n },\r\n },\r\n SeasonalDegreeOfDifferencing: {\r\n ref: 'props.SeasonalDegreeOfDifferencing',\r\n label: 'Seasonal degree of differencing(D)',\r\n type: 'integer',\r\n defaultValue: 0,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\r\n },\r\n },\r\n SeasonalMAOrder: {\r\n ref: 'props.SeasonalMAOrder',\r\n label: 'Seasonal MA Order(Q)',\r\n type: 'integer',\r\n defaultValue: 0,\r\n show: (data) => {\r\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\r\n },\r\n },\r\n // HoltWinters\r\n displayHoltWintersParams: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Display Holt-Winters parameters',\r\n ref: 'props.displayHoltWintersParams',\r\n options: [{\r\n value: false,\r\n label: 'Off',\r\n }, {\r\n value: true,\r\n label: 'On',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n autoHoltWinters: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Parameter settings',\r\n ref: 'props.autoHoltWinters',\r\n options: [{\r\n value: true,\r\n label: 'Auto',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n holtWintersAlpha: {\r\n ref: 'props.holtWintersAlpha',\r\n label: 'Alpha',\r\n type: 'integer',\r\n defaultValue: 1,\r\n show: (data) => {\r\n return [30].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoHoltWinters === false;\r\n },\r\n },\r\n holtWintersBeta: {\r\n ref: 'props.holtWintersBeta',\r\n label: 'Beta',\r\n type: 'integer',\r\n defaultValue: 1,\r\n show: (data) => {\r\n return [30].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoHoltWinters === false;\r\n },\r\n },\r\n holtWintersGamma: {\r\n ref: 'props.holtWintersGamma',\r\n label: 'Alpha',\r\n type: 'integer',\r\n defaultValue: 1,\r\n show: (data) => {\r\n return [30].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoHoltWinters === false;\r\n },\r\n },\r\n // ARIMA and Holt-Winters\r\n seasonal: {\r\n type: 'string',\r\n component: 'dropdown',\r\n label: 'Seasonal',\r\n ref: 'props.seasonal',\r\n options: [{\r\n value: 'mult',\r\n label: 'Multiplicative',\r\n }, {\r\n value: 'additive',\r\n label: 'Additive',\r\n }],\r\n defaultValue: 'additive',\r\n show: (data) => {\r\n return [8, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n // Text mining / Wordcloud\r\n numOfFrequentTerms: {\r\n ref: 'props.numOfFrequentTerms',\r\n label: 'Show top N frequent terms',\r\n type: 'integer',\r\n defaultValue: 50,\r\n show: (data) => {\r\n return [13].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n tolower: {\r\n type: 'string',\r\n component: 'switch',\r\n label: 'Convert to lower case',\r\n ref: 'props.tolower',\r\n options: [{\r\n value: 'FALSE',\r\n label: 'Off',\r\n }, {\r\n value: 'TRUE',\r\n label: 'On',\r\n }],\r\n defaultValue: 'TRUE',\r\n show: (data) => {\r\n return [13].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n removeNumbers: {\r\n type: 'string',\r\n component: 'switch',\r\n label: 'Remove numbers',\r\n ref: 'props.removeNumbers',\r\n options: [{\r\n value: 'FALSE',\r\n label: 'Off',\r\n }, {\r\n value: 'TRUE',\r\n label: 'On',\r\n }],\r\n defaultValue: 'TRUE',\r\n show: (data) => {\r\n return [13].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n stopwords: {\r\n type: 'string',\r\n component: 'switch',\r\n label: 'Remove English common stepwords',\r\n ref: 'props.stopwords',\r\n options: [{\r\n value: 'FALSE',\r\n label: 'Off',\r\n }, {\r\n value: 'TRUE',\r\n label: 'On',\r\n }],\r\n defaultValue: 'TRUE',\r\n show: (data) => {\r\n return [13].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n removePunctuation: {\r\n type: 'string',\r\n component: 'switch',\r\n label: 'Remove punctuations',\r\n ref: 'props.removePunctuation',\r\n options: [{\r\n value: 'FALSE',\r\n label: 'Off',\r\n }, {\r\n value: 'TRUE',\r\n label: 'On',\r\n }],\r\n defaultValue: 'TRUE',\r\n show: (data) => {\r\n return [13].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n stemming: {\r\n type: 'string',\r\n component: 'switch',\r\n label: 'Text stemming',\r\n ref: 'props.stemming',\r\n options: [{\r\n value: 'FALSE',\r\n label: 'Off',\r\n }, {\r\n value: 'TRUE',\r\n label: 'On',\r\n }],\r\n defaultValue: 'TRUE',\r\n show: (data) => {\r\n return [13].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n // Decision tree\r\n rpartMethod: {\r\n type: 'string',\r\n component: 'dropdown',\r\n label: 'Method',\r\n ref: 'props.rpartMethod',\r\n options: [{\r\n value: 'class',\r\n label: 'Class',\r\n }, {\r\n value: 'anova',\r\n label: 'Anova',\r\n }],\r\n defaultValue: 'class',\r\n show: (data) => {\r\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n minSplit: {\r\n ref: 'props.minSplit',\r\n label: 'Minimum split',\r\n type: 'integer',\r\n defaultValue: 20,\r\n show: (data) => {\r\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n minBucket: {\r\n ref: 'props.minBucket',\r\n label: 'Minimum bucket',\r\n type: 'integer',\r\n defaultValue: 6,\r\n show: (data) => {\r\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n cp: {\r\n ref: 'props.cp',\r\n label: 'Complexity parameter(cp)',\r\n type: 'number',\r\n defaultValue: 0.01,\r\n show: (data) => {\r\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n maxDepth: {\r\n ref: 'props.maxDepth',\r\n label: 'Max depth',\r\n type: 'integer',\r\n defaultValue: 30,\r\n show: (data) => {\r\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n defaultCollapseLevel: {\r\n ref: 'props.defaultCollapseLevel',\r\n label: 'Default Collapse Level',\r\n type: 'integer',\r\n defaultValue: 3,\r\n show: (data) => {\r\n return [25].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n displayResultsOnAllNodes: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Display results on all nodes',\r\n ref: 'props.displayResultsOnAllNodes',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [25].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n calcOddsRatio: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Calculate odds ratio',\r\n ref: 'props.calcOddsRatio',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [29].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n splitDataset: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Split into training and test datasets',\r\n ref: 'props.splitDataset',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [25, 27, 29].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n splitPercentage: {\r\n ref: 'props.splitPercentage',\r\n label: 'Treat first N% records as training dataset',\r\n type: 'number',\r\n min: 0.01,\r\n max: 0.99,\r\n defaultValue: 0.8,\r\n show: (data) => {\r\n return ([25, 27, 29].indexOf(data.props.analysisTypeId) >= 0 && data.props.splitDataset === true) || ([26, 28].indexOf(data.props.analysisTypeId) >= 0);\r\n },\r\n },\r\n // *****\r\n // Analysis Options\r\n // *****\r\n debugMode: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Debug mode',\r\n ref: 'props.debugMode',\r\n options: [{\r\n value: false,\r\n label: 'Off',\r\n }, {\r\n value: true,\r\n label: 'On',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return (enableDebugMode);\r\n },\r\n },\r\n debugModeLink: {\r\n label: 'What is debug mode?',\r\n component: 'link',\r\n url: 'https://github.com/mhamano/advanced-analytics-toolbox/blob/master/docs/debugmode.md',\r\n show: (data) => {\r\n return (enableDebugMode);\r\n },\r\n },\r\n },\r\n },\r\n settings: {\r\n uses: 'settings',\r\n items: {\r\n presentation: {\r\n type: 'items',\r\n label: 'Presentation',\r\n items: {\r\n line: {\r\n type: 'string',\r\n component: 'dropdown',\r\n ref: 'props.line',\r\n options: [{\r\n value: 'none',\r\n label: 'Line',\r\n }, {\r\n value: 'tozeroy',\r\n label: 'Area',\r\n }],\r\n defaultValue: 'none',\r\n show: (data) => {\r\n return [0, 6, 8, 9, 17, 20, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n datapoints: {\r\n type: 'boolean',\r\n label: 'Show data points',\r\n ref: 'props.datapoints',\r\n defaultValue: false,\r\n show: (data) => {\r\n return [0, 6, 8, 9, 17, 20, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n borderWidth: {\r\n type: 'number',\r\n component: 'slider',\r\n label: 'Border Width',\r\n ref: 'props.borderWidth',\r\n min: 0,\r\n max: 10,\r\n step: 1,\r\n defaultValue: 1,\r\n show: (data) => {\r\n return [0, 6, 8, 9, 15, 17, 20, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n pointRadius: {\r\n type: 'number',\r\n component: 'slider',\r\n label: 'Point Radius',\r\n ref: 'props.pointRadius',\r\n min: 1,\r\n max: 10,\r\n step: 1,\r\n defaultValue: 6,\r\n show: (data) => {\r\n return [0, 6, 8, 9, 15, 17, 20, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n bubbleSize: {\r\n type: 'number',\r\n component: 'slider',\r\n label: 'Bubble Size',\r\n ref: 'props.bubbleSize',\r\n min: 0,\r\n max: 50,\r\n step: 1,\r\n defaultValue: 12,\r\n show: (data) => {\r\n return [1, 10, 16, 19, 25].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n marginTop: {\r\n type: 'number',\r\n component: 'slider',\r\n label: 'Margin top',\r\n ref: 'props.marginTop',\r\n min: 0,\r\n max: 200,\r\n step: 1,\r\n defaultValue: 10,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n marginBottom: {\r\n type: 'number',\r\n component: 'slider',\r\n label: 'Margin bottom',\r\n ref: 'props.marginBottom',\r\n min: 0,\r\n max: 200,\r\n step: 1,\r\n defaultValue: 10,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n marginRight: {\r\n type: 'number',\r\n component: 'slider',\r\n label: 'Margin right',\r\n ref: 'props.marginRight',\r\n min: 0,\r\n max: 200,\r\n step: 1,\r\n defaultValue: 10,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n marginLeft: {\r\n type: 'number',\r\n component: 'slider',\r\n label: 'Margin left',\r\n ref: 'props.marginLeft',\r\n min: 0,\r\n max: 200,\r\n step: 1,\r\n defaultValue: 10,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n defineScreenSize: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Screen size',\r\n ref: 'props.defineScreenSize',\r\n options: [{\r\n value: true,\r\n label: 'Auto',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [25].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n screenWidth: {\r\n label: 'Width',\r\n ref: 'props.screenWidth',\r\n type: 'integer',\r\n defaultValue: 960,\r\n show: (data) => {\r\n return [25].indexOf(data.props.analysisTypeId) >= 0 && data.props.defineScreenSize === false;\r\n },\r\n },\r\n screenHeight: {\r\n label: 'Height',\r\n ref: 'props.screenHeight',\r\n type: 'integer',\r\n defaultValue: 500,\r\n show: (data) => {\r\n return [25].indexOf(data.props.analysisTypeId) >= 0 && data.props.defineScreenSize === false;\r\n },\r\n },\r\n },\r\n },\r\n colorsAndLegend: {\r\n type: 'items',\r\n label: 'Colors and legend',\r\n items: {\r\n colors: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Colors',\r\n ref: 'props.colors',\r\n options: [{\r\n value: true,\r\n label: 'Auto',\r\n }, {\r\n value: false,\r\n label: 'Custom',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 15, 17, 19, 20, 25, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n // colorBy: {\r\n // type: 'string',\r\n // component: 'dropdown',\r\n // ref: 'props.colorBy',\r\n // options: [{\r\n // value: 'single',\r\n // label: 'Single color',\r\n // }, {\r\n // value: 'dimension',\r\n // label: 'By dimension',\r\n // }],\r\n // defaultValue: 'single',\r\n // show: (data) => {\r\n // return [1].indexOf(data.props.analysisTypeId) >= 0 && data.props.colors === false;\r\n // },\r\n // },\r\n colorForMain: {\r\n label: 'Color',\r\n component: 'color-picker',\r\n ref: 'props.colorForMain',\r\n type: 'integer',\r\n defaultValue: 3,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 15, 17, 19, 20, 25, 29, 30].indexOf(data.props.analysisTypeId) >= 0 && data.props.colors === false;\r\n },\r\n },\r\n colorForSub: {\r\n label: 'Color (Trend/Forecast)',\r\n component: 'color-picker',\r\n ref: 'props.colorForSub',\r\n type: 'integer',\r\n defaultValue: 7,\r\n show: (data) => {\r\n return [0, 1, 9, 17, 19, 20, 30].indexOf(data.props.analysisTypeId) >= 0 && data.props.colors === false;\r\n },\r\n },\r\n showLegend: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Show legend',\r\n ref: 'props.showLegend',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [0, 1, 9, 10, 15, 16, 17, 19, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n },\r\n },\r\n xAxis: {\r\n type: 'items',\r\n label: 'X-axis',\r\n items: {\r\n xLabelsAndTitle: {\r\n type: 'boolean',\r\n label: 'Show title',\r\n component: 'switch',\r\n ref: 'props.xLabelsAndTitle',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [0, 1, 9, 10, 16, 17, 20, 24, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n xAxisPosition: {\r\n type: 'string',\r\n label: 'Position',\r\n component: 'dropdown',\r\n ref: 'props.xAxisPosition',\r\n options: [{\r\n value: 'bottom',\r\n label: 'Bottom',\r\n }, {\r\n value: 'top',\r\n label: 'Top',\r\n }],\r\n defaultValue: 'bottom',\r\n show: (data) => {\r\n return [0, 1, 9, 10, 15, 17, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n xScale: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Scale',\r\n ref: 'props.xScale',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 10, 15, 17, 19, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n xAxisType: {\r\n type: 'string',\r\n label: 'Axis Type',\r\n component: 'dropdown',\r\n ref: 'props.xAxisType',\r\n options: [{\r\n value: '-',\r\n label: 'Auto',\r\n }, {\r\n value: 'linear',\r\n label: 'Linear',\r\n }, {\r\n value: 'category',\r\n label: 'Category',\r\n }, {\r\n value: 'log',\r\n label: 'Log',\r\n }, {\r\n value: 'data',\r\n label: 'Date',\r\n }],\r\n defaultValue: '-',\r\n show: (data) => {\r\n return [0, 17].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n },\r\n },\r\n yAxis: {\r\n type: 'items',\r\n label: 'Y-axis',\r\n items: {\r\n yLabelsAndTitle: {\r\n type: 'boolean',\r\n label: 'Show title',\r\n component: 'switch',\r\n ref: 'props.yLabelsAndTitle',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [0, 1, 9, 10, 16, 17, 20, 24, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n yAxisPosition: {\r\n type: 'string',\r\n label: 'Position',\r\n component: 'dropdown',\r\n ref: 'props.yAxisPosition',\r\n options: [{\r\n value: 'left',\r\n label: 'Left',\r\n }, {\r\n value: 'right',\r\n label: 'Right',\r\n }],\r\n defaultValue: 'left',\r\n show: (data) => {\r\n return [0, 1, 9, 10, 15, 17, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n yScale: {\r\n type: 'boolean',\r\n component: 'switch',\r\n label: 'Scale',\r\n ref: 'props.yScale',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: true,\r\n show: (data) => {\r\n return [0, 1, 6, 8, 9, 10, 15, 17, 19, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n },\r\n },\r\n zAxis: {\r\n type: 'items',\r\n label: 'Z-axis',\r\n show: (data) => {\r\n return [16].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n items: {\r\n zLabelsAndTitle: {\r\n type: 'boolean',\r\n label: 'Show title',\r\n component: 'switch',\r\n ref: 'props.zLabelsAndTitle',\r\n options: [{\r\n value: true,\r\n label: 'On',\r\n }, {\r\n value: false,\r\n label: 'Off',\r\n }],\r\n defaultValue: false,\r\n show: (data) => {\r\n return [16].indexOf(data.props.analysisTypeId) >= 0;\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n };\r\n});\r\n"]} \ No newline at end of file +{"version":3,"sources":["properties.js"],"names":["define","analysis","qlik","$q","enableDebugMode","getNumberFormatSimple","app","currApp","undefined","defer","getAppLayout","layout","thousandSep","qLocaleInfo","qThousandSep","decimalSep","qDecimalSep","resolve","value","label","promise","type","component","items","dims","Dimensions","ref","itemTitleRef","allowAdd","allowRemove","addTranslation","expression","maxlength","meas","Measures","numberFormatting","options","defaultValue","formatting","show","data","numberFormattingSimple","then","customCurrency","prefixSuffix","numberFormatPattern","moneyFormatPattern","customFormatPattern","sorting","indexOf","props","analysisTypeId","sortDim","dimSort","dimSortByExpression","dimSortByExpressionAsc","dimSortByExpressionString","dimSortByNum","dimSortByNumAsc","dimSortByAlph","dimSortByAlphAsc","addons","uses","dataHandling","ReferenceLine","fixlimit","fixlimitlabel","fixlimitstyle","fixlimitwidth","fixlimitcolor","analysisCategoryDropDown","analysisCategories","map","d","id","name","analysisTypeDropDown","res","analysisTypes","filter","category","analysisCategoryId","displayTable","displayFormula","extendLine","extendDurations","interval","confidenceLevel","frequency","numberOfClusters","optimizationMethod","clusterMax","bootstrap","scaleData","dividedBy","differencing","seasonalDifferences","firstDifferences","lagMax","lagMaxValue","lag","lagValue","decomposeInFourCharts","forecastingPeriods","displayARIMAParams","autoARIMA","AROrder","DegreeOfDifferencing","MAOrder","SeasonalAROrder","SeasonalDegreeOfDifferencing","SeasonalMAOrder","displayHoltWintersParams","autoHoltWinters","holtWintersAlpha","holtWintersBeta","holtWintersGamma","seasonal","numOfFrequentTerms","tolower","removeNumbers","stopwords","removePunctuation","stemming","rpartMethod","minSplit","minBucket","cp","maxDepth","defaultCollapseLevel","displayResultsOnAllNodes","calcOddsRatio","splitDataset","splitPercentage","min","max","debugMode","debugModeLink","url","settings","presentation","line","datapoints","borderWidth","step","pointRadius","bubbleSize","marginTop","marginBottom","marginRight","marginLeft","defineScreenSize","screenWidth","screenHeight","colorsAndLegend","colors","colorForMain","colorForSub","showLegend","xAxis","xLabelsAndTitle","xAxisPosition","xScale","xAxisType","yAxis","yLabelsAndTitle","yAxisPosition","yScale","zAxis","zLabelsAndTitle"],"mappings":"AAAA,YAAAA,SAAQ,6BAA8B,OAAQ,SAAU,SAACC,EAAUC,EAAMC,GAEvE,GAAMC,IAAkB,EAElBC,EAAwB,WAC5B,GAAMC,GAAMJ,EAAKK,QAALC,QACNC,EAAQN,EAAGM,OAiCjB,OA/BAH,GAAII,aAAa,SAACC,GAChB,GAAMC,GAAcD,EAAOE,YAAYC,aACjCC,EAAaJ,EAAOE,YAAYG,WACtC,OAAOP,GAAMQ,UAGPC,MAAO,EACPC,MAAAA,IAAWP,EAAX,QAGAM,MAAO,EACPC,MAAAA,IAAWP,EAAX,MAA4BG,EAA5B,MAGAG,MAAO,EACPC,MAAAA,IAAWP,EAAX,MAA4BG,EAA5B,OAGAG,MAAO,EACPC,MAAO,QAGPD,MAAO,EACPC,MAAAA,KAAYJ,EAAZ,OAGAG,MAAO,EACPC,MAAAA,KAAYJ,EAAZ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MAAO,QAETkB,cAAc,EACdE,KAAM,SAACC,GACL,OAAQ,IAAIS,QAAQT,EAAKU,MAAMC,iBAAmB","file":"../../properties.js","sourcesContent":["define(['./lib/js/analysis/analysis', 'qlik', 'ng!$q'], (analysis, qlik, $q) => {\n // Control on debug mode\n const enableDebugMode = true;\n\n const getNumberFormatSimple = () => {\n const app = qlik.currApp(this);\n const defer = $q.defer();\n\n app.getAppLayout((layout) => {\n const thousandSep = layout.qLocaleInfo.qThousandSep;\n const decimalSep = layout.qLocaleInfo.qDecimalSep;\n return defer.resolve(\n [\n {\n value: 0,\n label: `1${thousandSep}000`,\n },\n {\n value: 1,\n label: `1${thousandSep}000${decimalSep}1`,\n },\n {\n value: 2,\n label: `1${thousandSep}000${decimalSep}12`,\n },\n {\n value: 3,\n label: '12%',\n },\n {\n value: 4,\n label: `12${decimalSep}3%`,\n },\n {\n value: 5,\n label: `12${decimalSep}34%`,\n },\n ]);\n });\n return defer.promise;\n };\n\n return {\n type: 'items',\n component: 'accordion',\n items: {\n // dimensions: {\n // uses: \"dimensions\",\n // show: false,\n // },\n // measures: {\n // uses: \"measures\",\n // show: false,\n // },\n dims: {\n label: 'Dimensions',\n items: {\n Dimensions: {\n type: 'array',\n ref: 'props.dimensions',\n label: 'Dimensions',\n itemTitleRef: 'label',\n allowAdd: true,\n allowRemove: true,\n addTranslation: 'Add dimension',\n items: {\n expression: {\n label: 'Field',\n type: 'string',\n ref: 'expression',\n expression: 'optional',\n },\n label: {\n label: 'Label',\n type: 'string',\n maxlength: 100,\n ref: 'label',\n },\n },\n },\n },\n },\n meas: {\n label: 'Measures',\n items: {\n Measures: {\n type: 'array',\n ref: 'props.measures',\n label: 'Measures',\n itemTitleRef: 'label',\n allowAdd: true,\n allowRemove: true,\n addTranslation: 'Add measure',\n items: {\n expression: {\n label: 'Expression',\n type: 'string',\n ref: 'expression',\n expression: 'optional',\n },\n label: {\n label: 'Label',\n type: 'string',\n maxlength: 100,\n ref: 'label',\n },\n numberFormatting: {\n type: 'string',\n component: 'dropdown',\n label: 'Number formatting',\n ref: 'numberFormatting',\n options: [\n {\n value: 0,\n label: 'Auto',\n },\n {\n value: 1,\n label: 'Number',\n },\n {\n value: 2,\n label: 'Money',\n },\n {\n value: 5,\n label: 'Custom',\n },\n ],\n defaultValue: 0,\n },\n formatting: {\n type: 'boolean',\n component: 'switch',\n label: 'Formatting',\n ref: 'formatting',\n options: [{\n value: true,\n label: 'Simple',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n show: (data) => {\n return data.numberFormatting === 1;\n },\n },\n numberFormattingSimple: {\n type: 'string',\n component: 'dropdown',\n ref: 'numberFormattingSimple',\n options: getNumberFormatSimple().then((items) => {\n return items;\n }),\n defaultValue: 2,\n show: (data) => {\n return data.numberFormatting === 1 && (data.formatting === true || typeof data.formatting == 'undefined');\n },\n },\n customCurrency: {\n label: 'Currency',\n type: 'string',\n maxlength: 100,\n ref: 'customCurrency',\n defaultValue: '$',\n show: (data) => {\n return data.numberFormatting === 2;\n },\n },\n prefixSuffix: {\n type: 'string',\n component: 'dropdown',\n ref: 'prefixSuffix',\n options: [{\n value: 'prefix',\n label: 'Prefix',\n }, {\n value: 'suffix',\n label: 'Suffix',\n }],\n defaultValue: 'prefix',\n show: (data) => {\n return data.numberFormatting === 2;\n },\n },\n numberFormatPattern: {\n label: 'Format pattern',\n type: 'string',\n maxlength: 100,\n ref: 'numberFormatPattern',\n defaultValue: ',.2f',\n show: (data) => {\n return data.numberFormatting === 1 && data.formatting === false;\n },\n },\n moneyFormatPattern: {\n label: 'Format pattern',\n type: 'string',\n maxlength: 100,\n ref: 'moneyFormatPattern',\n defaultValue: ',.2f',\n show: (data) => {\n return data.numberFormatting === 2;\n },\n },\n customFormatPattern: {\n label: 'Format pattern',\n type: 'string',\n maxlength: 100,\n ref: 'customFormatPattern',\n defaultValue: ',.2f',\n show: (data) => {\n return data.numberFormatting === 5;\n },\n },\n },\n },\n },\n },\n sorting: {\n type: 'items',\n label: 'Sorting',\n show: (data) => {\n return [0, 17].indexOf(data.props.analysisTypeId) >= 0;\n },\n items: {\n sortDim: {\n type: 'items',\n label: 'Dimension',\n items: {\n dimSort: {\n type: 'boolean',\n component: 'switch',\n label: 'Sorting',\n ref: 'props.dimSort',\n options: [{\n value: true,\n label: 'Auto',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n },\n dimSortByExpression: {\n type: 'boolean',\n label: 'Sort by expression',\n ref: 'props.dimSortByExpression',\n defaultValue: false,\n show: (data) => {\n return !data.props.dimSort;\n },\n },\n dimSortByExpressionAsc: {\n type: 'integer',\n component: 'dropdown',\n ref: 'props.dimSortByExpressionAsc',\n options: [{\n value: 1,\n label: 'Ascending',\n }, {\n value: -1,\n label: 'Descending',\n }],\n defaultValue: 1,\n show: (data) => {\n return !data.props.dimSort && data.props.dimSortByExpression;\n },\n },\n dimSortByExpressionString: {\n label: 'Expression',\n type: 'string',\n ref: 'props.dimSortByExpressionString',\n expression: 'optional',\n show: (data) => {\n return !data.props.dimSort && data.props.dimSortByExpression;\n },\n },\n dimSortByNum: {\n type: 'boolean',\n label: 'Sort numerically',\n ref: 'props.dimSortByNum',\n defaultValue: false,\n show: (data) => {\n return !data.props.dimSort;\n },\n },\n dimSortByNumAsc: {\n type: 'integer',\n component: 'dropdown',\n ref: 'props.dimSortByNumAsc',\n options: [{\n value: 1,\n label: 'Ascending',\n }, {\n value: -1,\n label: 'Descending',\n }],\n defaultValue: 1,\n show: (data) => {\n return !data.props.dimSort && data.props.dimSortByNum;\n },\n },\n dimSortByAlph: {\n type: 'boolean',\n label: 'Sort alphabetically',\n ref: 'props.dimSortByAlph',\n defaultValue: false,\n show: (data) => {\n return !data.props.dimSort;\n },\n },\n dimSortByAlphAsc: {\n type: 'integer',\n component: 'dropdown',\n ref: 'props.dimSortByAlphAsc',\n options: [{\n value: 1,\n label: 'Ascending',\n }, {\n value: -1,\n label: 'Descending',\n }],\n defaultValue: 1,\n show: (data) => {\n return !data.props.dimSort && data.props.dimSortByAlph;\n },\n },\n },\n },\n },\n },\n addons: {\n uses: 'addons',\n items: {\n dataHandling: {\n uses: 'dataHandling',\n },\n // Section for Reference Line\n ReferenceLine: {\n label: 'Reference Line',\n items: {\n fixlimit: {\n ref: 'props.limit',\n label: 'Limit',\n type: 'integer',\n defaultValue: \"\",\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n fixlimitlabel:{\n type:'string',\n label:'Label',\n ref:'props.limitlabel',\n defaultValue:'Reference Line',\n show:(data)=>{\n return[9].indexOf(data.props.analysisTypeId)>=0;\n },\n },\n //line style\n fixlimitstyle: {\n type: 'string',\n label: 'Line style',\n component: 'dropdown',\n ref: 'props.limitstyle',\n options: [{\n value: 'lines',\n label: 'lines',\n }, {\n value: 'dashdot',\n label: 'dashdot',\n }, {\n value: 'solid',\n label: 'solid',\n }, {\n value: 'dot',\n label: 'dot',\n }],\n defaultValue: 'lines',\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n //line width\n fixlimitwidth: {\n type: 'string',\n label: 'Line Width',\n component: 'dropdown',\n ref: 'props.limitwidth',\n options: [{\n value: '1',\n label: 'tiny',\n }, {\n value: '2',\n label: 'mid',\n }, {\n value: '4',\n label: 'huge',\n }],\n defaultValue: '1',\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n // line color\n fixlimitcolor: {\n label: 'Color',\n component: 'color-picker',\n ref: 'props.limitcolor',\n type: 'integer',\n defaultValue: 11,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n },\n },\n //end of section for Reference line\n },\n },\n analysis: {\n label: 'Analysis Settings',\n items: {\n analysisCategoryDropDown: {\n type: 'integer',\n component: 'dropdown',\n label: 'Analysis Category',\n ref: 'props.analysisCategoryId',\n options: analysis.analysisCategories.map((d) => {\n return {\n value: d.id,\n label: d.name,\n };\n }),\n defaultValue: -1,\n },\n analysisTypeDropDown: {\n type: 'integer',\n component: 'dropdown',\n label: 'Analysis Type',\n ref: 'props.analysisTypeId',\n options: (data) => {\n const res = analysis.analysisTypes\n .filter((d) => {\n return d.category === data.props.analysisCategoryId;\n })\n .map((d) => {\n return {\n value: d.id,\n label: d.name,\n };\n });\n return res;\n },\n show: (data) => {\n return data.props.analysisCategoryId >= 0;\n },\n defaultValue: -1,\n },\n displayTable: {\n type: 'boolean',\n component: 'switch',\n label: 'Table display mode',\n ref: 'props.displayTable',\n options: [{\n value: false,\n label: 'Off',\n }, {\n value: true,\n label: 'On',\n }],\n defaultValue: false,\n show: (data) => {\n return [0, 9, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n // *****\n // Analysis Options\n // *****\n displayFormula: {\n type: 'boolean',\n component: 'switch',\n label: 'Display formula',\n ref: 'props.displayFormula',\n options: [{\n value: false,\n label: 'Off',\n }, {\n value: true,\n label: 'On',\n }],\n defaultValue: false,\n show: (data) => {\n return [0].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n extendLine: {\n type: 'boolean',\n component: 'switch',\n label: 'Extend line',\n ref: 'props.extendLine',\n options: [{\n value: false,\n label: 'Off',\n }, {\n value: true,\n label: 'On',\n }],\n defaultValue: false,\n show: (data) => {\n return [0].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n extendDurations: {\n ref: 'props.extendDurations',\n label: 'Extend durations',\n type: 'string',\n show: (data) => {\n return [0].indexOf(data.props.analysisTypeId) >= 0 && data.props.extendLine === true;\n },\n defaultValue: 12,\n },\n interval: {\n type: 'string',\n component: 'dropdown',\n label: 'Interval',\n ref: 'props.interval',\n options: [{\n value: 'confidence',\n label: 'confidence',\n }, {\n value: 'prediction',\n label: 'prediction',\n }],\n defaultValue: 'confidence',\n show: (data) => {\n return [0, 1, 17].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n confidenceLevel: {\n ref: 'props.confidenceLevel',\n label: 'Confidence level',\n type: 'string',\n show: (data) => {\n return [0, 1, 2, 3, 4, 5, 9, 17, 22, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n defaultValue: 0.95,\n },\n frequency: {\n ref: 'props.frequency',\n label: 'Frequency',\n type: 'integer',\n show: (data) => {\n return [8, 9, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n defaultValue: 12,\n },\n // k-means\n numberOfClusters: {\n ref: 'props.numberOfClusters',\n label: 'Number of clusters',\n type: 'integer',\n show: (data) => {\n return [10, 16, 24].indexOf(data.props.analysisTypeId) >= 0;\n },\n defaultValue: 3,\n },\n optimizationMethod: {\n ref: 'props.optimizationMethod',\n label: 'Optimization method',\n component: 'dropdown',\n type: 'string',\n options: [{\n value: 'gap',\n label: 'Gap Statistic',\n }],\n defaultValue: 'gap',\n show: (data) => {\n return [23].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n clusterMax: {\n ref: 'props.clusterMax',\n label: 'Max number of clusters',\n type: 'integer',\n show: (data) => {\n return [23].indexOf(data.props.analysisTypeId) >= 0;\n },\n defaultValue: 10,\n },\n bootstrap: {\n ref: 'props.bootstrap',\n label: 'Number of Monte Carlo samples',\n type: 'integer',\n show: (data) => {\n return [23].indexOf(data.props.analysisTypeId) >= 0;\n },\n defaultValue: 10,\n },\n scaleData: {\n type: 'boolean',\n component: 'switch',\n label: 'Scale data',\n ref: 'props.scaleData',\n options: [{\n value: false,\n label: 'Off',\n }, {\n value: true,\n label: 'On',\n }],\n defaultValue: false,\n show: (data) => {\n return [10, 16, 23, 24].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n dividedBy: {\n type: 'string',\n component: 'dropdown',\n label: 'Grouped by',\n ref: 'props.dividedBy',\n options: [{\n value: 'variables',\n label: 'Variables',\n },\n {\n value: 'clusters',\n label: 'Clusters',\n }],\n defaultValue: 'clusters',\n show: (data) => {\n return [24].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n // Time series analysis\n differencing: {\n ref: 'props.differencing',\n label: 'Differencing',\n component: 'dropdown',\n type: 'integer',\n options: [{\n value: 0,\n label: 'Off',\n }, {\n value: 1,\n label: 'Seasonal differences',\n }, {\n value: 2,\n label: 'First and seasonal differences',\n }],\n defaultValue: 0,\n show: (data) => {\n return [6, 7, 12].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n seasonalDifferences: {\n ref: 'props.seasonalDifferences',\n label: 'Seasonal differences',\n type: 'integer',\n defaultValue: 12,\n show: (data) => {\n return [6, 7, 12].indexOf(data.props.analysisTypeId) >= 0 && [1, 2].indexOf(data.props.differencing) >= 0;\n },\n },\n firstDifferences: {\n ref: 'props.firstDifferences',\n label: 'First differences',\n type: 'integer',\n defaultValue: 1,\n show: (data) => {\n return [6, 7, 9, 12].indexOf(data.props.analysisTypeId) >= 0 && data.props.differencing === 2;\n },\n },\n // Autocorrelation\n lagMax: {\n type: 'boolean',\n component: 'switch',\n label: 'Lag max',\n ref: 'props.lagMax',\n options: [{\n value: true,\n label: 'Auto',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n show: (data) => {\n return [6].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n lagMaxValue: {\n ref: 'props.lagMaxValue',\n label: 'Lag max',\n type: 'integer',\n defaultValue: 20,\n show: (data) => {\n return [6].indexOf(data.props.analysisTypeId) >= 0 && data.props.lagMax === false;\n },\n },\n // Ljung-Box Test\n lag: {\n type: 'boolean',\n component: 'switch',\n label: 'Lag',\n ref: 'props.lag',\n options: [{\n value: true,\n label: 'Auto',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n show: (data) => {\n return [7].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n lagValue: {\n ref: 'props.lagValue',\n label: 'Lag',\n type: 'integer',\n defaultValue: 1,\n show: (data) => {\n return [7].indexOf(data.props.analysisTypeId) >= 0 && data.props.lag === false;\n },\n },\n // Decompose time series\n decomposeInFourCharts: {\n type: 'boolean',\n component: 'switch',\n label: 'Display in 4 charts ',\n ref: 'props.decomposeInFourCharts',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: true,\n show: (data) => {\n return [8].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n // ARIMA forecast\n forecastingPeriods: {\n ref: 'props.forecastingPeriods',\n label: 'Forecasting periods',\n type: 'integer',\n show: (data) => {\n return [9, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n defaultValue: 12,\n },\n displayARIMAParams: {\n type: 'boolean',\n component: 'switch',\n label: 'Display ARIMA parameters',\n ref: 'props.displayARIMAParams',\n options: [{\n value: false,\n label: 'Off',\n }, {\n value: true,\n label: 'On',\n }],\n defaultValue: false,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n autoARIMA: {\n type: 'boolean',\n component: 'switch',\n label: 'Parameter settings',\n ref: 'props.autoARIMA',\n options: [{\n value: true,\n label: 'Auto',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n AROrder: {\n ref: 'props.AROrder',\n label: 'AR Order(p)',\n type: 'integer',\n defaultValue: 0,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\n },\n },\n DegreeOfDifferencing: {\n ref: 'props.DegreeOfDifferencing',\n label: 'Degree of differencing(d)',\n type: 'integer',\n defaultValue: 0,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\n },\n },\n MAOrder: {\n ref: 'props.MAOrder',\n label: 'MA Order(q)',\n type: 'integer',\n defaultValue: 0,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\n },\n },\n SeasonalAROrder: {\n ref: 'props.SeasonalAROrder',\n label: 'Seasonal AR Order(P)',\n type: 'integer',\n defaultValue: 0,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\n },\n },\n SeasonalDegreeOfDifferencing: {\n ref: 'props.SeasonalDegreeOfDifferencing',\n label: 'Seasonal degree of differencing(D)',\n type: 'integer',\n defaultValue: 0,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\n },\n },\n SeasonalMAOrder: {\n ref: 'props.SeasonalMAOrder',\n label: 'Seasonal MA Order(Q)',\n type: 'integer',\n defaultValue: 0,\n show: (data) => {\n return [9].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoARIMA === false;\n },\n },\n // HoltWinters\n displayHoltWintersParams: {\n type: 'boolean',\n component: 'switch',\n label: 'Display Holt-Winters parameters',\n ref: 'props.displayHoltWintersParams',\n options: [{\n value: false,\n label: 'Off',\n }, {\n value: true,\n label: 'On',\n }],\n defaultValue: false,\n show: (data) => {\n return [30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n autoHoltWinters: {\n type: 'boolean',\n component: 'switch',\n label: 'Parameter settings',\n ref: 'props.autoHoltWinters',\n options: [{\n value: true,\n label: 'Auto',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n show: (data) => {\n return [30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n holtWintersAlpha: {\n ref: 'props.holtWintersAlpha',\n label: 'Alpha',\n type: 'integer',\n defaultValue: 1,\n show: (data) => {\n return [30].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoHoltWinters === false;\n },\n },\n holtWintersBeta: {\n ref: 'props.holtWintersBeta',\n label: 'Beta',\n type: 'integer',\n defaultValue: 1,\n show: (data) => {\n return [30].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoHoltWinters === false;\n },\n },\n holtWintersGamma: {\n ref: 'props.holtWintersGamma',\n label: 'Alpha',\n type: 'integer',\n defaultValue: 1,\n show: (data) => {\n return [30].indexOf(data.props.analysisTypeId) >= 0 && data.props.autoHoltWinters === false;\n },\n },\n // ARIMA and Holt-Winters\n seasonal: {\n type: 'string',\n component: 'dropdown',\n label: 'Seasonal',\n ref: 'props.seasonal',\n options: [{\n value: 'mult',\n label: 'Multiplicative',\n }, {\n value: 'additive',\n label: 'Additive',\n }],\n defaultValue: 'additive',\n show: (data) => {\n return [8, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n // Text mining / Wordcloud\n numOfFrequentTerms: {\n ref: 'props.numOfFrequentTerms',\n label: 'Show top N frequent terms',\n type: 'integer',\n defaultValue: 50,\n show: (data) => {\n return [13].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n tolower: {\n type: 'string',\n component: 'switch',\n label: 'Convert to lower case',\n ref: 'props.tolower',\n options: [{\n value: 'FALSE',\n label: 'Off',\n }, {\n value: 'TRUE',\n label: 'On',\n }],\n defaultValue: 'TRUE',\n show: (data) => {\n return [13].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n removeNumbers: {\n type: 'string',\n component: 'switch',\n label: 'Remove numbers',\n ref: 'props.removeNumbers',\n options: [{\n value: 'FALSE',\n label: 'Off',\n }, {\n value: 'TRUE',\n label: 'On',\n }],\n defaultValue: 'TRUE',\n show: (data) => {\n return [13].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n stopwords: {\n type: 'string',\n component: 'switch',\n label: 'Remove English common stepwords',\n ref: 'props.stopwords',\n options: [{\n value: 'FALSE',\n label: 'Off',\n }, {\n value: 'TRUE',\n label: 'On',\n }],\n defaultValue: 'TRUE',\n show: (data) => {\n return [13].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n removePunctuation: {\n type: 'string',\n component: 'switch',\n label: 'Remove punctuations',\n ref: 'props.removePunctuation',\n options: [{\n value: 'FALSE',\n label: 'Off',\n }, {\n value: 'TRUE',\n label: 'On',\n }],\n defaultValue: 'TRUE',\n show: (data) => {\n return [13].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n stemming: {\n type: 'string',\n component: 'switch',\n label: 'Text stemming',\n ref: 'props.stemming',\n options: [{\n value: 'FALSE',\n label: 'Off',\n }, {\n value: 'TRUE',\n label: 'On',\n }],\n defaultValue: 'TRUE',\n show: (data) => {\n return [13].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n // Decision tree\n rpartMethod: {\n type: 'string',\n component: 'dropdown',\n label: 'Method',\n ref: 'props.rpartMethod',\n options: [{\n value: 'class',\n label: 'Class',\n }, {\n value: 'anova',\n label: 'Anova',\n }],\n defaultValue: 'class',\n show: (data) => {\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n minSplit: {\n ref: 'props.minSplit',\n label: 'Minimum split',\n type: 'integer',\n defaultValue: 20,\n show: (data) => {\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n minBucket: {\n ref: 'props.minBucket',\n label: 'Minimum bucket',\n type: 'integer',\n defaultValue: 6,\n show: (data) => {\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n cp: {\n ref: 'props.cp',\n label: 'Complexity parameter(cp)',\n type: 'number',\n defaultValue: 0.01,\n show: (data) => {\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n maxDepth: {\n ref: 'props.maxDepth',\n label: 'Max depth',\n type: 'integer',\n defaultValue: 30,\n show: (data) => {\n return [25, 26].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n defaultCollapseLevel: {\n ref: 'props.defaultCollapseLevel',\n label: 'Default Collapse Level',\n type: 'integer',\n defaultValue: 3,\n show: (data) => {\n return [25].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n displayResultsOnAllNodes: {\n type: 'boolean',\n component: 'switch',\n label: 'Display results on all nodes',\n ref: 'props.displayResultsOnAllNodes',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: false,\n show: (data) => {\n return [25].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n calcOddsRatio: {\n type: 'boolean',\n component: 'switch',\n label: 'Calculate odds ratio',\n ref: 'props.calcOddsRatio',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: true,\n show: (data) => {\n return [29].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n splitDataset: {\n type: 'boolean',\n component: 'switch',\n label: 'Split into training and test datasets',\n ref: 'props.splitDataset',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: false,\n show: (data) => {\n return [25, 27, 29].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n splitPercentage: {\n ref: 'props.splitPercentage',\n label: 'Treat first N% records as training dataset',\n type: 'number',\n min: 0.01,\n max: 0.99,\n defaultValue: 0.8,\n show: (data) => {\n return ([25, 27, 29].indexOf(data.props.analysisTypeId) >= 0 && data.props.splitDataset === true) || ([26, 28].indexOf(data.props.analysisTypeId) >= 0);\n },\n },\n // *****\n // Analysis Options\n // *****\n debugMode: {\n type: 'boolean',\n component: 'switch',\n label: 'Debug mode',\n ref: 'props.debugMode',\n options: [{\n value: false,\n label: 'Off',\n }, {\n value: true,\n label: 'On',\n }],\n defaultValue: false,\n show: (data) => {\n return (enableDebugMode);\n },\n },\n debugModeLink: {\n label: 'What is debug mode?',\n component: 'link',\n url: 'https://github.com/mhamano/advanced-analytics-toolbox/blob/master/docs/debugmode.md',\n show: (data) => {\n return (enableDebugMode);\n },\n },\n },\n },\n settings: {\n uses: 'settings',\n items: {\n presentation: {\n type: 'items',\n label: 'Presentation',\n items: {\n line: {\n type: 'string',\n component: 'dropdown',\n ref: 'props.line',\n options: [{\n value: 'none',\n label: 'Line',\n }, {\n value: 'tozeroy',\n label: 'Area',\n }],\n defaultValue: 'none',\n show: (data) => {\n return [0, 6, 8, 9, 17, 20, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n datapoints: {\n type: 'boolean',\n label: 'Show data points',\n ref: 'props.datapoints',\n defaultValue: false,\n show: (data) => {\n return [0, 6, 8, 9, 17, 20, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n borderWidth: {\n type: 'number',\n component: 'slider',\n label: 'Border Width',\n ref: 'props.borderWidth',\n min: 0,\n max: 10,\n step: 1,\n defaultValue: 1,\n show: (data) => {\n return [0, 6, 8, 9, 15, 17, 20, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n pointRadius: {\n type: 'number',\n component: 'slider',\n label: 'Point Radius',\n ref: 'props.pointRadius',\n min: 1,\n max: 10,\n step: 1,\n defaultValue: 6,\n show: (data) => {\n return [0, 6, 8, 9, 15, 17, 20, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n bubbleSize: {\n type: 'number',\n component: 'slider',\n label: 'Bubble Size',\n ref: 'props.bubbleSize',\n min: 0,\n max: 50,\n step: 1,\n defaultValue: 12,\n show: (data) => {\n return [1, 10, 16, 19, 25].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n marginTop: {\n type: 'number',\n component: 'slider',\n label: 'Margin top',\n ref: 'props.marginTop',\n min: 0,\n max: 200,\n step: 1,\n defaultValue: 10,\n show: (data) => {\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n marginBottom: {\n type: 'number',\n component: 'slider',\n label: 'Margin bottom',\n ref: 'props.marginBottom',\n min: 0,\n max: 200,\n step: 1,\n defaultValue: 10,\n show: (data) => {\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n marginRight: {\n type: 'number',\n component: 'slider',\n label: 'Margin right',\n ref: 'props.marginRight',\n min: 0,\n max: 200,\n step: 1,\n defaultValue: 10,\n show: (data) => {\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n marginLeft: {\n type: 'number',\n component: 'slider',\n label: 'Margin left',\n ref: 'props.marginLeft',\n min: 0,\n max: 200,\n step: 1,\n defaultValue: 10,\n show: (data) => {\n return [0, 1, 6, 8, 9, 10, 14, 15, 16, 17, 19, 20, 23, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n defineScreenSize: {\n type: 'boolean',\n component: 'switch',\n label: 'Screen size',\n ref: 'props.defineScreenSize',\n options: [{\n value: true,\n label: 'Auto',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n show: (data) => {\n return [25].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n screenWidth: {\n label: 'Width',\n ref: 'props.screenWidth',\n type: 'integer',\n defaultValue: 960,\n show: (data) => {\n return [25].indexOf(data.props.analysisTypeId) >= 0 && data.props.defineScreenSize === false;\n },\n },\n screenHeight: {\n label: 'Height',\n ref: 'props.screenHeight',\n type: 'integer',\n defaultValue: 500,\n show: (data) => {\n return [25].indexOf(data.props.analysisTypeId) >= 0 && data.props.defineScreenSize === false;\n },\n },\n },\n },\n colorsAndLegend: {\n type: 'items',\n label: 'Colors and legend',\n items: {\n colors: {\n type: 'boolean',\n component: 'switch',\n label: 'Colors',\n ref: 'props.colors',\n options: [{\n value: true,\n label: 'Auto',\n }, {\n value: false,\n label: 'Custom',\n }],\n defaultValue: true,\n show: (data) => {\n return [0, 1, 6, 8, 9, 15, 17, 19, 20, 25, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n // colorBy: {\n // type: 'string',\n // component: 'dropdown',\n // ref: 'props.colorBy',\n // options: [{\n // value: 'single',\n // label: 'Single color',\n // }, {\n // value: 'dimension',\n // label: 'By dimension',\n // }],\n // defaultValue: 'single',\n // show: (data) => {\n // return [1].indexOf(data.props.analysisTypeId) >= 0 && data.props.colors === false;\n // },\n // },\n colorForMain: {\n label: 'Color',\n component: 'color-picker',\n ref: 'props.colorForMain',\n type: 'integer',\n defaultValue: 3,\n show: (data) => {\n return [0, 1, 6, 8, 9, 15, 17, 19, 20, 25, 29, 30].indexOf(data.props.analysisTypeId) >= 0 && data.props.colors === false;\n },\n },\n colorForSub: {\n label: 'Color (Trend/Forecast)',\n component: 'color-picker',\n ref: 'props.colorForSub',\n type: 'integer',\n defaultValue: 7,\n show: (data) => {\n return [0, 1, 9, 17, 19, 20, 30].indexOf(data.props.analysisTypeId) >= 0 && data.props.colors === false;\n },\n },\n showLegend: {\n type: 'boolean',\n component: 'switch',\n label: 'Show legend',\n ref: 'props.showLegend',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: false,\n show: (data) => {\n return [0, 1, 9, 10, 15, 16, 17, 19, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n },\n },\n xAxis: {\n type: 'items',\n label: 'X-axis',\n items: {\n xLabelsAndTitle: {\n type: 'boolean',\n label: 'Show title',\n component: 'switch',\n ref: 'props.xLabelsAndTitle',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: false,\n show: (data) => {\n return [0, 1, 9, 10, 16, 17, 20, 24, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n xAxisPosition: {\n type: 'string',\n label: 'Position',\n component: 'dropdown',\n ref: 'props.xAxisPosition',\n options: [{\n value: 'bottom',\n label: 'Bottom',\n }, {\n value: 'top',\n label: 'Top',\n }],\n defaultValue: 'bottom',\n show: (data) => {\n return [0, 1, 9, 10, 15, 17, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n xScale: {\n type: 'boolean',\n component: 'switch',\n label: 'Scale',\n ref: 'props.xScale',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: true,\n show: (data) => {\n return [0, 1, 6, 8, 9, 10, 15, 17, 19, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n xAxisType: {\n type: 'string',\n label: 'Axis Type',\n component: 'dropdown',\n ref: 'props.xAxisType',\n options: [{\n value: '-',\n label: 'Auto',\n }, {\n value: 'linear',\n label: 'Linear',\n }, {\n value: 'category',\n label: 'Category',\n }, {\n value: 'log',\n label: 'Log',\n }, {\n value: 'data',\n label: 'Date',\n }],\n defaultValue: '-',\n show: (data) => {\n return [0, 17].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n },\n },\n yAxis: {\n type: 'items',\n label: 'Y-axis',\n items: {\n yLabelsAndTitle: {\n type: 'boolean',\n label: 'Show title',\n component: 'switch',\n ref: 'props.yLabelsAndTitle',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: false,\n show: (data) => {\n return [0, 1, 9, 10, 16, 17, 20, 24, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n yAxisPosition: {\n type: 'string',\n label: 'Position',\n component: 'dropdown',\n ref: 'props.yAxisPosition',\n options: [{\n value: 'left',\n label: 'Left',\n }, {\n value: 'right',\n label: 'Right',\n }],\n defaultValue: 'left',\n show: (data) => {\n return [0, 1, 9, 10, 15, 17, 20, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n yScale: {\n type: 'boolean',\n component: 'switch',\n label: 'Scale',\n ref: 'props.yScale',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: true,\n show: (data) => {\n return [0, 1, 6, 8, 9, 10, 15, 17, 19, 24, 29, 30].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n },\n },\n zAxis: {\n type: 'items',\n label: 'Z-axis',\n show: (data) => {\n return [16].indexOf(data.props.analysisTypeId) >= 0;\n },\n items: {\n zLabelsAndTitle: {\n type: 'boolean',\n label: 'Show title',\n component: 'switch',\n ref: 'props.zLabelsAndTitle',\n options: [{\n value: true,\n label: 'On',\n }, {\n value: false,\n label: 'Off',\n }],\n defaultValue: false,\n show: (data) => {\n return [16].indexOf(data.props.analysisTypeId) >= 0;\n },\n },\n },\n },\n },\n },\n },\n };\n});\n"]} \ No newline at end of file From 78a23a76f1f3c941ffad152d827212e38bcb942c Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:24:43 +0100 Subject: [PATCH 09/10] Add files via upload --- build/dev/lib/maps/analysis/analysis.js.map | 2 +- build/dev/lib/maps/analysis/regression_model.js.map | 1 + build/dev/lib/maps/analysis/regression_predict.js.map | 1 + build/dev/lib/maps/analysis/regression_predict_table.js.map | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 build/dev/lib/maps/analysis/regression_model.js.map create mode 100644 build/dev/lib/maps/analysis/regression_predict.js.map create mode 100644 build/dev/lib/maps/analysis/regression_predict_table.js.map diff --git a/build/dev/lib/maps/analysis/analysis.js.map b/build/dev/lib/maps/analysis/analysis.js.map index 1ba9724..225e255 100644 --- a/build/dev/lib/maps/analysis/analysis.js.map +++ b/build/dev/lib/maps/analysis/analysis.js.map @@ -1 +1 @@ -{"version":3,"sources":["analysis/analysis.js"],"names":["define","analysisCategories","id","name","analysisTypes","category","file","minDims","minMeas","sortId","allowAddMea","setCustomButtonLabel","dimButtonLabel","meaButtonLabel","meaButtonLabelOthers","sort","a","b"],"mappings":"AAAA,YAAAA,WAAW,WACT,OACEC,qBAEIC,GAAI,EACJC,KAAM,sCAGND,GAAI,EACJC,KAAM,wCAGND,GAAI,EACJC,KAAM,mCAGND,GAAI,EACJC,KAAM,sBAGND,GAAI,EACJC,KAAM,uCAGND,GAAI,EACJC,KAAM,yBAGND,GAAI,EACJC,KAAM,eAGND,GAAI,EACJC,KAAM,mBAGND,GAAI,EACJC,KAAM,gBAGVC,gBAEIF,GAAI,EACJG,SAAU,EACVF,KAAM,yCACNG,KAAM,qBACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,EACbC,sBAAsB,IAGtBT,GAAI,EACJG,SAAU,EACVF,KAAM,2CACNG,KAAM,uBACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,EACbC,sBAAsB,IAGtBT,GAAI,EACJG,SAAU,EACVF,KAAM,SACNG,KAAM,SACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,E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BACNG,KAAM,sBACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,EACbC,sBAAsB,EACtBC,gBAAiB,iBACjBC,gBAAiB,kCAAmC,oCACpDC,qBAAsB,qCAGtBZ,GAAI,GACJG,SAAU,EACVF,KAAM,uCACNG,KAAM,8BACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,EACbC,sBAAsB,EACtBC,gBAAiB,iBACjBC,gBAAiB,kCAAmC,oCACpDC,qBAAsB,qCAGtBZ,GAAI,GACJG,SAAU,EACVF,KAAM,0CACNG,KAAM,+BACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,EACbC,sBAAsB,EACtBC,gBAAiB,iBACjBC,gBAAiB,kCAAmC,oCACpDC,qBAAsB,qCAGtBZ,GAAI,GACJG,SAAU,EACVF,KAAM,6BACNG,KAAM,sBACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,IAGbR,GAAI,GACJG,SAAU,EACVF,KAAM,eACNG,KAAM,eACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRE,sBAAsB,IAExBI,KAAK,SAACC,EAAGC,GACT,MAAOD,GAAEP,OAASQ,EAAER","file":"../../js/analysis/analysis.js","sourcesContent":["define([], () => {\r\n return {\r\n analysisCategories: [\r\n {\r\n id: 0,\r\n name: 'Simple linear regression analysis',\r\n },\r\n {\r\n id: 1,\r\n name: 'Multiple linear regression analysis',\r\n },\r\n {\r\n id: 2,\r\n name: 'Statistical hypothesis testing',\r\n },\r\n {\r\n id: 7,\r\n name: 'Variance analysis',\r\n },\r\n {\r\n id: 6,\r\n name: 'Principal Component Analysis (PCA)',\r\n },\r\n {\r\n id: 3,\r\n name: 'Time series analysis',\r\n },\r\n {\r\n id: 4,\r\n name: 'Clustering',\r\n },\r\n {\r\n id: 8,\r\n name: 'Classification',\r\n },\r\n {\r\n id: 5,\r\n name: 'Text mining',\r\n },\r\n ],\r\n analysisTypes: [\r\n {\r\n id: 0,\r\n category: 0,\r\n name: 'Line chart with linear regression line',\r\n file: 'simple_linear_line',\r\n minDims: 1,\r\n minMeas: 1,\r\n sortId: 2,\r\n allowAddMea: false,\r\n setCustomButtonLabel: false,\r\n },\r\n {\r\n id: 1,\r\n category: 0,\r\n name: 'Scatter plot with linear regression line',\r\n file: 'simple_linear_bubble',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 3,\r\n allowAddMea: false,\r\n setCustomButtonLabel: false,\r\n },\r\n {\r\n id: 2,\r\n category: 2,\r\n name: 'F-Test',\r\n file: 'f_test',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 1,\r\n allowAddMea: false,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\r\n meaButtonLabelOthers: '',\r\n },\r\n {\r\n id: 3,\r\n category: 2,\r\n name: 'T-Test - Two sample T-Test',\r\n file: 't_test',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 2,\r\n allowAddMea: false,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\r\n meaButtonLabelOthers: '',\r\n },\r\n {\r\n id: 4,\r\n category: 2,\r\n name: 'T-Test - Welch two sample T-Test',\r\n file: 't_test',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 3,\r\n allowAddMea: false,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\r\n meaButtonLabelOthers: '',\r\n },\r\n {\r\n id: 5,\r\n category: 2,\r\n name: 'T-Test - Paired T-Test',\r\n file: 't_test',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 4,\r\n allowAddMea: false,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\r\n meaButtonLabelOthers: '',\r\n },\r\n {\r\n id: 6,\r\n category: 3,\r\n name: 'Autocorrelation',\r\n file: 'autocorrelation',\r\n minDims: 1,\r\n minMeas: 1,\r\n sortId: 1,\r\n allowAddMea: false,\r\n setCustomButtonLabel: false,\r\n },\r\n {\r\n id: 7,\r\n category: 3,\r\n name: 'Ljung-Box Test',\r\n file: 'ljung_box_test',\r\n minDims: 1,\r\n minMeas: 1,\r\n sortId: 2,\r\n allowAddMea: false,\r\n setCustomButtonLabel: false,\r\n },\r\n {\r\n id: 8,\r\n category: 3,\r\n name: 'Decomposing time series',\r\n file: 'timeseries_decomposition',\r\n minDims: 1,\r\n minMeas: 1,\r\n sortId: 3,\r\n allowAddMea: false,\r\n setCustomButtonLabel: false,\r\n },\r\n {\r\n id: 9,\r\n category: 3,\r\n name: 'ARIMA forecast',\r\n file: 'timeseries_forecast',\r\n minDims: 1,\r\n minMeas: 1,\r\n sortId: 6,\r\n setCustomButtonLabel: false,\r\n },\r\n {\r\n id: 10,\r\n category: 4,\r\n name: 'k-means clustering',\r\n file: 'kmeans',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 1,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset: X-axis', 'Add measure - Dataset: Y-axis'],\r\n meaButtonLabelOthers: 'Add measure - Dataset',\r\n },\r\n {\r\n id: 11,\r\n category: 1,\r\n name: 'Multiple regression analysis',\r\n file: 'regression_analysis',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 1,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 12,\r\n category: 3,\r\n name: 'Augmented Dickey-Fuller Test',\r\n file: 'augmented_dickey_fuller_test',\r\n minDims: 1,\r\n minMeas: 1,\r\n sortId: 4,\r\n allowAddMea: false,\r\n },\r\n {\r\n id: 13,\r\n category: 5,\r\n name: 'Text mining / Wordcloud',\r\n file: 'textmining_wordcloud',\r\n minDims: 2,\r\n minMeas: 0,\r\n sortId: 1,\r\n allowAddMea: false,\r\n },\r\n {\r\n id: 14,\r\n category: 1,\r\n name: 'Correlation matrix heatmap',\r\n file: 'correlation_heatmap',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 4,\r\n allowAddMea: true,\r\n },\r\n {\r\n id: 15,\r\n category: 1,\r\n name: 'Plot regression coefficients',\r\n file: 'coefplot',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 3,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 16,\r\n category: 4,\r\n name: 'k-means clustering (3D)',\r\n file: 'kmeans_3d',\r\n minDims: 1,\r\n minMeas: 3,\r\n sortId: 2,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset: X-axis', 'Add measure - Dataset: Y-axis', 'Add measure - Dataset: Z-axis'],\r\n meaButtonLabelOthers: 'Add measure - Dataset',\r\n },\r\n {\r\n id: 17,\r\n category: 1,\r\n name: 'Line chart with multiple regression line',\r\n file: 'regression_analysis_line_chart',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 2,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 18,\r\n category: 6,\r\n name: 'Principal Component Analysis (PCA)',\r\n file: 'pca',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 1,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Variable field', 'Add measure - Variable field'],\r\n meaButtonLabelOthers: 'Add measure - Variable field',\r\n },\r\n {\r\n id: 19,\r\n category: 6,\r\n name: 'PCA - Biplot',\r\n file: 'pca_biplot',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 3,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Variable field', 'Add measure - Variable field'],\r\n meaButtonLabelOthers: 'Add measure - Variable field',\r\n },\r\n {\r\n id: 20,\r\n category: 6,\r\n name: 'PCA - Variance plot',\r\n file: 'pca_variance',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 2,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Variable field', 'Add measure - Variable field'],\r\n meaButtonLabelOthers: 'Add measure - Variable field',\r\n },\r\n {\r\n id: 21,\r\n category: 7,\r\n name: 'ANOVA - Single factor',\r\n file: 'anova',\r\n minDims: 2,\r\n minMeas: 1,\r\n sortId: 1,\r\n },\r\n {\r\n id: 22,\r\n category: 7,\r\n name: 'Tukey - Single factor',\r\n file: 'tukey',\r\n minDims: 2,\r\n minMeas: 1,\r\n sortId: 2,\r\n },\r\n {\r\n id: 23,\r\n category: 4,\r\n name: 'Find optimal number of clusters',\r\n file: 'kmeans_optimize',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 4,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset', 'Add measure - Dataset'],\r\n meaButtonLabelOthers: 'Add measure - Dataset',\r\n },\r\n {\r\n id: 24,\r\n category: 4,\r\n name: 'k-means - Cluster means/centers',\r\n file: 'kmeans_means',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 3,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Dataset: X-axis', 'Add measure - Dataset: Y-axis'],\r\n meaButtonLabelOthers: 'Add measure - Dataset',\r\n },\r\n {\r\n id: 25,\r\n category: 8,\r\n name: 'Decision tree',\r\n file: 'decision_tree',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 0,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 26,\r\n category: 8,\r\n name: 'Decision tree - Evaluate model',\r\n file: 'decision_tree_predict',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 1,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 27,\r\n category: 8,\r\n name: 'Logistic regression analysis',\r\n file: 'logistic_regression',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 2,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 28,\r\n category: 8,\r\n name: 'Logistic regression - Evaluate model',\r\n file: 'logistic_regression_predict',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 3,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 29,\r\n category: 8,\r\n name: 'Logistic regression - Plot coefficients',\r\n file: 'logistic_regression_coefplot',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 4,\r\n allowAddMea: true,\r\n setCustomButtonLabel: true,\r\n dimButtonLabel: ['Add dimension'],\r\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\r\n meaButtonLabelOthers: 'Add measure - Predictor variable',\r\n },\r\n {\r\n id: 14,\r\n category: 8,\r\n name: 'Correlation matrix heatmap',\r\n file: 'correlation_heatmap',\r\n minDims: 1,\r\n minMeas: 2,\r\n sortId: 5,\r\n allowAddMea: true,\r\n },\r\n {\r\n id: 30,\r\n category: 3,\r\n name: 'Holt-Winters',\r\n file: 'holt_winters',\r\n minDims: 1,\r\n minMeas: 1,\r\n sortId: 5,\r\n setCustomButtonLabel: false,\r\n },\r\n ].sort((a, b) => {\r\n return a.sortId - b.sortId;\r\n }),\r\n };\r\n});\r\n"]} \ No newline at end of file +{"version":3,"sources":["analysis/analysis.js"],"names":["define","analysisCategories","id","name","analysisTypes","category","file","minDims","minMeas","sortId","allowAddMea","setCustomButtonLabel","dimButtonLabel","meaButtonLabel","meaButtonLabelOthers","sort","a","b"],"mappings":"AAAA,YAAAA,WAAW,WACT,OACEC,qBAEIC,GAAI,EACJC,KAAM,sCAGND,GAAI,EACJC,KAAM,wCAGND,GAAI,EACJC,KAAM,mCAGND,GAAI,EACJC,KAAM,sBAGND,GAAI,EACJC,KAAM,uCAGND,GAAI,EACJC,KAAM,yBAGND,GAAI,EACJC,KAAM,eAGND,GAAI,EACJC,KAAM,mBAGND,GAAI,EACJC,KAAM,gBAGVC,gBAEIF,GAAI,EACJG,SAAU,EACVF,KAAM,yCACNG,KAAM,qBACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,EACbC,sBAAsB,IAGtBT,GAAI,EACJG,SAAU,EACVF,KAAM,2C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,GAAI,GACJG,SAAU,EACVF,KAAM,4BACNG,KAAM,mBACNC,QAAS,EACTC,QAAS,EACTC,OAAQ,EACRC,aAAa,EACbC,sBAAsB,EACtBC,gBAAiB,iBACjBC,gBAAiB,kCAAmC,oCACpDC,qBAAsB,qCAExBC,KAAK,SAACC,EAAGC,GACT,MAAOD,GAAEP,OAASQ,EAAER","file":"../../js/analysis/analysis.js","sourcesContent":["define([], () => {\n return {\n analysisCategories: [\n {\n id: 0,\n name: 'Simple linear regression analysis',\n },\n {\n id: 1,\n name: 'Multiple linear regression analysis',\n },\n {\n id: 2,\n name: 'Statistical hypothesis testing',\n },\n {\n id: 7,\n name: 'Variance analysis',\n },\n {\n id: 6,\n name: 'Principal Component Analysis (PCA)',\n },\n {\n id: 3,\n name: 'Time series analysis',\n },\n {\n id: 4,\n name: 'Clustering',\n },\n {\n id: 8,\n name: 'Classification',\n },\n {\n id: 5,\n name: 'Text mining',\n },\n ],\n analysisTypes: [\n {\n id: 0,\n category: 0,\n name: 'Line chart with linear regression line',\n file: 'simple_linear_line',\n minDims: 1,\n minMeas: 1,\n sortId: 2,\n allowAddMea: false,\n setCustomButtonLabel: false,\n },\n {\n id: 1,\n category: 0,\n name: 'Scatter plot with linear regression line',\n file: 'simple_linear_bubble',\n minDims: 1,\n minMeas: 2,\n sortId: 3,\n allowAddMea: false,\n setCustomButtonLabel: false,\n },\n {\n id: 2,\n category: 2,\n name: 'F-Test',\n file: 'f_test',\n minDims: 1,\n minMeas: 2,\n sortId: 1,\n allowAddMea: false,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\n meaButtonLabelOthers: '',\n },\n {\n id: 3,\n category: 2,\n name: 'T-Test - Two sample T-Test',\n file: 't_test',\n minDims: 1,\n minMeas: 2,\n sortId: 2,\n allowAddMea: false,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\n meaButtonLabelOthers: '',\n },\n {\n id: 4,\n category: 2,\n name: 'T-Test - Welch two sample T-Test',\n file: 't_test',\n minDims: 1,\n minMeas: 2,\n sortId: 3,\n allowAddMea: false,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\n meaButtonLabelOthers: '',\n },\n {\n id: 5,\n category: 2,\n name: 'T-Test - Paired T-Test',\n file: 't_test',\n minDims: 1,\n minMeas: 2,\n sortId: 4,\n allowAddMea: false,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset A', 'Add measure - Dataset B'],\n meaButtonLabelOthers: '',\n },\n {\n id: 6,\n category: 3,\n name: 'Autocorrelation',\n file: 'autocorrelation',\n minDims: 1,\n minMeas: 1,\n sortId: 1,\n allowAddMea: false,\n setCustomButtonLabel: false,\n },\n {\n id: 7,\n category: 3,\n name: 'Ljung-Box Test',\n file: 'ljung_box_test',\n minDims: 1,\n minMeas: 1,\n sortId: 2,\n allowAddMea: false,\n setCustomButtonLabel: false,\n },\n {\n id: 8,\n category: 3,\n name: 'Decomposing time series',\n file: 'timeseries_decomposition',\n minDims: 1,\n minMeas: 1,\n sortId: 3,\n allowAddMea: false,\n setCustomButtonLabel: false,\n },\n {\n id: 9,\n category: 3,\n name: 'ARIMA forecast',\n file: 'timeseries_forecast',\n minDims: 1,\n minMeas: 1,\n sortId: 6,\n setCustomButtonLabel: false,\n },\n {\n id: 10,\n category: 4,\n name: 'k-means clustering',\n file: 'kmeans',\n minDims: 1,\n minMeas: 2,\n sortId: 1,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset: X-axis', 'Add measure - Dataset: Y-axis'],\n meaButtonLabelOthers: 'Add measure - Dataset',\n },\n {\n id: 11,\n category: 1,\n name: 'Multiple regression analysis',\n file: 'regression_analysis',\n minDims: 1,\n minMeas: 2,\n sortId: 1,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 12,\n category: 3,\n name: 'Augmented Dickey-Fuller Test',\n file: 'augmented_dickey_fuller_test',\n minDims: 1,\n minMeas: 1,\n sortId: 4,\n allowAddMea: false,\n },\n {\n id: 13,\n category: 5,\n name: 'Text mining / Wordcloud',\n file: 'textmining_wordcloud',\n minDims: 2,\n minMeas: 0,\n sortId: 1,\n allowAddMea: false,\n },\n {\n id: 14,\n category: 1,\n name: 'Correlation matrix heatmap',\n file: 'correlation_heatmap',\n minDims: 1,\n minMeas: 2,\n sortId: 4,\n allowAddMea: true,\n },\n {\n id: 15,\n category: 1,\n name: 'Plot regression coefficients',\n file: 'coefplot',\n minDims: 1,\n minMeas: 2,\n sortId: 3,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 16,\n category: 4,\n name: 'k-means clustering (3D)',\n file: 'kmeans_3d',\n minDims: 1,\n minMeas: 3,\n sortId: 2,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset: X-axis', 'Add measure - Dataset: Y-axis', 'Add measure - Dataset: Z-axis'],\n meaButtonLabelOthers: 'Add measure - Dataset',\n },\n {\n id: 17,\n category: 1,\n name: 'Line chart with multiple regression line',\n file: 'regression_analysis_line_chart',\n minDims: 1,\n minMeas: 2,\n sortId: 2,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 18,\n category: 6,\n name: 'Principal Component Analysis (PCA)',\n file: 'pca',\n minDims: 1,\n minMeas: 2,\n sortId: 1,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Variable field', 'Add measure - Variable field'],\n meaButtonLabelOthers: 'Add measure - Variable field',\n },\n {\n id: 19,\n category: 6,\n name: 'PCA - Biplot',\n file: 'pca_biplot',\n minDims: 1,\n minMeas: 2,\n sortId: 3,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Variable field', 'Add measure - Variable field'],\n meaButtonLabelOthers: 'Add measure - Variable field',\n },\n {\n id: 20,\n category: 6,\n name: 'PCA - Variance plot',\n file: 'pca_variance',\n minDims: 1,\n minMeas: 2,\n sortId: 2,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Variable field', 'Add measure - Variable field'],\n meaButtonLabelOthers: 'Add measure - Variable field',\n },\n {\n id: 21,\n category: 7,\n name: 'ANOVA - Single factor',\n file: 'anova',\n minDims: 2,\n minMeas: 1,\n sortId: 1,\n },\n {\n id: 22,\n category: 7,\n name: 'Tukey - Single factor',\n file: 'tukey',\n minDims: 2,\n minMeas: 1,\n sortId: 2,\n },\n {\n id: 23,\n category: 4,\n name: 'Find optimal number of clusters',\n file: 'kmeans_optimize',\n minDims: 1,\n minMeas: 2,\n sortId: 4,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset', 'Add measure - Dataset'],\n meaButtonLabelOthers: 'Add measure - Dataset',\n },\n {\n id: 24,\n category: 4,\n name: 'k-means - Cluster means/centers',\n file: 'kmeans_means',\n minDims: 1,\n minMeas: 2,\n sortId: 3,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Dataset: X-axis', 'Add measure - Dataset: Y-axis'],\n meaButtonLabelOthers: 'Add measure - Dataset',\n },\n {\n id: 25,\n category: 8,\n name: 'Decision tree',\n file: 'decision_tree',\n minDims: 1,\n minMeas: 2,\n sortId: 0,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 26,\n category: 8,\n name: 'Decision tree - Evaluate model',\n file: 'decision_tree_predict',\n minDims: 1,\n minMeas: 2,\n sortId: 1,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 27,\n category: 8,\n name: 'Logistic regression analysis',\n file: 'logistic_regression',\n minDims: 1,\n minMeas: 2,\n sortId: 2,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 28,\n category: 8,\n name: 'Logistic regression - Evaluate model',\n file: 'logistic_regression_predict',\n minDims: 1,\n minMeas: 2,\n sortId: 3,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 29,\n category: 8,\n name: 'Logistic regression - Plot coefficients',\n file: 'logistic_regression_coefplot',\n minDims: 1,\n minMeas: 2,\n sortId: 4,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n {\n id: 14,\n category: 8,\n name: 'Correlation matrix heatmap',\n file: 'correlation_heatmap',\n minDims: 1,\n minMeas: 2,\n sortId: 5,\n allowAddMea: true,\n },\n {\n id: 30,\n category: 3,\n name: 'Holt-Winters',\n file: 'holt_winters',\n minDims: 1,\n minMeas: 1,\n sortId: 5,\n setCustomButtonLabel: false,\n },\n\t {\n id: 31,\n category: 1,\n name: 'Multiple regression prediction',\n file: 'regression_predict',\n minDims: 1,\n minMeas: 2,\n sortId: 2,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n\t {\n id: 32,\n category: 1,\n name: 'Multiple regression prediction table',\n file: 'regression_predict_table',\n minDims: 1,\n minMeas: 2,\n sortId: 2,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n\t {\n id: 33,\n category: 1,\n name: 'Multiple regression model',\n file: 'regression_model',\n minDims: 1,\n minMeas: 2,\n sortId: 1,\n allowAddMea: true,\n setCustomButtonLabel: true,\n dimButtonLabel: ['Add dimension'],\n meaButtonLabel: ['Add measure - Response variable', 'Add measure - Predictor variable'],\n meaButtonLabelOthers: 'Add measure - Predictor variable',\n },\n ].sort((a, b) => {\n return a.sortId - b.sortId;\n }),\n };\n});\n"]} \ No newline at end of file diff --git a/build/dev/lib/maps/analysis/regression_model.js.map b/build/dev/lib/maps/analysis/regression_model.js.map new file mode 100644 index 0000000..009ab12 --- /dev/null +++ b/build/dev/lib/maps/analysis/regression_model.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["analysis/regression_model.js"],"names":["define","utils","$q","createCube","app","$scope","layout","dimension","validateDimension","props","dimensions","qNullSuppression","qDef","qFieldDefs","meaLen","measures","length","rowsLabel","label","validateMeasure","params","meaList","dataType","i","mea","param","push","soglia","split","norm","cor","fo","displayDebugModeMessage","debugMode","saveRDataset","getDebugSaveDatasetScript","defMea1","displayRScriptsToConsole","qLabel","backendApi","applyPatches","qPath","qOp","qValue","JSON","stringify","patchApplied","drawChart","defer","requestPage","qTop","qLeft","qWidth","qHeight","getData","then","dataPages","qHyperCube","qMeasureInfo","qMatrix","qText","displayConnectionError","extId","displayReturnedDatasetToConsole","result","parse","estimate","stdError","tValue","pr","minPr","Math","max","apply","residuals","sigma","df","rSquared","adjRSquared","fstatistic","aic","html","$","resolve","promise"],"mappings":"AAAA,YAAAA,SACE,gBACA,SACC,SAACC,EAAOC,GACT,OASEC,WATK,SASMC,EAAKC,GACd,GAAMC,GAASD,EAAOC,OAGhBC,EAAYN,EAAMO,kBAAkBF,EAAOG,MAAMC,WAAW,IAC5DA,IACJC,kBAAkB,EAClBC,MACEC,YAAaN,MAIXO,EAASR,EAAOG,MAAMM,SAASC,MACrCX,GAAOY,WAAa,cAAkD,IAAlCX,EAAOG,MAAMM,SAAS,GAAGG,MAAeZ,EAAOG,MAAMM,SAAS,GAAGG,MAAQjB,EAAMkB,gBAAgBb,EAAOG,MAAMM,SAAS,IAKzJ,KAAK,GAJDK,GAAYnB,EAAMkB,gBAAgBb,EAAOG,MAAMM,SAAS,IAAxD,aAAwEd,EAAMkB,gBAAgBb,EAAOG,MAAMM,SAAS,IAApH,WACAM,EAAU,kBACVC,EAAW,KAENC,EAAI,EAAGA,EAAIT,EAAQS,IAAK,CAC/B,GAAMC,GAAMvB,EAAMkB,gBAAgBb,EAAOG,MAAMM,SAASQ,GACxD,IAAIC,EAAIR,OAAS,EAAG,CAClB,GAAMS,GAAAA,IAAYD,EAAZ,UAAyBD,CAC/BH,IAAUK,EACVJ,GAAAA,WAAsBE,EACtBD,GAAY,IAEZjB,EAAOY,UAAUS,KAAKzB,EAAMkB,gBAAgBb,EAAOG,MAAMM,SAASQ,MAIzE,GAA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q) => {\n return {\n /**\n * createCube - create HyperCubes\n *\n * @param {Object} app reference to app\n * @param {Object} $scope angular $scope\n *\n * @return {Null} null\n */\n createCube(app, $scope) {\n const layout = $scope.layout;\n\n // Set definitions for dimensions and measures\n const dimension = utils.validateDimension(layout.props.dimensions[0]);\n const dimensions = [{\n qNullSuppression: true,\n qDef: {\n qFieldDefs: [dimension]\n },\n }];\n\n const meaLen = layout.props.measures.length;\n $scope.rowsLabel = ['(Intercept)', (layout.props.measures[1].label != '') ? layout.props.measures[1].label : utils.validateMeasure(layout.props.measures[0]) ]; // Label for dimension values\n let params = `${utils.validateMeasure(layout.props.measures[0])} as mea0, ${utils.validateMeasure(layout.props.measures[1])} as mea1`;\n let meaList = 'q$mea0 ~ q$mea1';\n let dataType = 'NN';\n\n for (let i = 2; i < meaLen; i++) {\n const mea = utils.validateMeasure(layout.props.measures[i]);\n if (mea.length > 0) {\n const param = `,${mea} as mea${i}`;\n params += param;\n meaList += ` + q$mea${i}`;\n dataType += 'N';\n\n $scope.rowsLabel.push(utils.validateMeasure(layout.props.measures[i]));\n }\n }\n\t // Normalize data - Find Correlation - Split condition - set training data for fit model using most correlated features.\n\t const soglia = 0.3;\n\t const split = `q$mea0 > 0.0`;\n\t const norm = `library(caret);target <- q$mea0; preParams <- preProcess(q[,1:${meaLen}], method=c(\"range\"));q <- predict(preParams, q[,1:${meaLen}]); q$mea0 <- target`;\n\t const cor = `m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = \"pearson\"))`;\n\t const fo = `f=\"\";for(j in 2:${meaLen}) if(!is.na(m[j]) && m[j]>=${soglia}){l=paste(\"q$mea\",j-1,sep=\"\"); f=paste(f,l,sep=\" + \")} ;f=paste(\"q$mea0 ~ \",substring(f,3));str(f)`;\n\t \n // Debug mode - set R dataset name to store the q data. \n utils.displayDebugModeMessage(layout.props.debugMode);\n const saveRDataset = utils.getDebugSaveDatasetScript(layout.props.debugMode, 'debug_regression_analysis.rda');\n\n const defMea1 = `R.ScriptEvalExStr('${dataType}','${saveRDataset} library(jsonlite);${norm};${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});lm_summary <- summary(lm_result);\n json <- toJSON(list(coef(lm_summary)[,\"Estimate\"], coef(lm_summary)[,\"Std. Error\"], coef(lm_summary)[,\"t value\"], coef(lm_summary)[,\"Pr(>|t|)\"],\n as.double(summary(lm_result$residuals)), summary(lm_result)$sigma, summary(lm_result)$df, lm_summary$r.squared, lm_summary$adj.r.squared,\n summary(lm_result)$fstatistic, extractAIC(lm_result)[2])); json;',${params})`;\n\n // Debug mode - display R Scripts to console\n utils.displayRScriptsToConsole(layout.props.debugMode, [defMea1]);\n\n const measures = [\n {\n qDef: {\n qDef: defMea1,\n },\n },\n {\n qDef: {\n qLabel: '-',\n qDef: '', // Dummy\n },\n },\n {\n qDef: {\n qLabel: '-',\n qDef: '', // Dummy\n },\n },\n {\n qDef: {\n qLabel: '-',\n qDef: '', // Dummy\n },\n },\n {\n qDef: {\n qLabel: '-',\n qDef: '', // Dummy\n },\n },\n ];\n\n $scope.backendApi.applyPatches([\n {\n qPath: '/qHyperCubeDef/qDimensions',\n qOp: 'replace',\n qValue: JSON.stringify(dimensions),\n },\n {\n qPath: '/qHyperCubeDef/qMeasures',\n qOp: 'replace',\n qValue: JSON.stringify(measures),\n },\n ], false);\n\n $scope.patchApplied = true;\n return null;\n },\n /**\n * drawChart - draw chart with updated data\n *\n * @param {Object} $scope angular $scope\n *\n * @return {Object} Promise object\n */\n drawChart($scope) {\n const defer = $q.defer();\n const layout = $scope.layout;\n\n const dimension = utils.validateDimension(layout.props.dimensions[0]);\n const requestPage = [{\n qTop: 0,\n qLeft: 0,\n qWidth: 2,\n qHeight: 1,\n }];\n\n $scope.backendApi.getData(requestPage).then((dataPages) => {\n const measureInfo = $scope.layout.qHyperCube.qMeasureInfo;\n\n // Display error when all measures' grand total return NaN.\n if (dataPages[0].qMatrix[0][1].qText.length === 0 || dataPages[0].qMatrix[0][1].qText == '-') {\n utils.displayConnectionError($scope.extId);\n } else {\n // Debug mode - display returned dataset to console\n utils.displayReturnedDatasetToConsole(layout.props.debugMode, dataPages[0]);\n\n const result = JSON.parse(dataPages[0].qMatrix[0][1].qText);\n\n const estimate = result[0];\n const stdError = result[1];\n const tValue = result[2];\n const pr = result[3];\n const minPr = Math.max.apply(null, pr);\n\n const residuals = result[4];\n\n const sigma = result[5];\n const df = result[6];\n\n const rSquared = result[7];\n const adjRSquared = result[8];\n\n const fstatistic = result[9];\n const aic = result[10];\n\n // Set table header\n let html = `\n

Residuals:

\n \n \n \n \n \n \n \n \n \n \n \n
Min1QMedian3QMax
${residuals[0]}${residuals[1]}${residuals[2]}${residuals[4]}${residuals[5]}
\n\n

Coefficients:

\n \n \n \n \n \n \n \n `;\n\n // Set regression analysis results to table\n for (let i = 0; i < $scope.rowsLabel.length; i++) {\n html += `\n \n `;\n }\n\n // Set table footer and other results\n html += `\n \n
EstimateStd.Errort valuePr(>|t|)Signif
${$scope.rowsLabel[i]}${estimate[i]}${stdError[i]}${tValue[i]}${pr[i]}${(pr[i] < 0.001) ? '' : (pr[i] < 0.01) ? '' : (pr[i] < 0.05) ? '' : (pr[i] < 0.1) ? '.' : ''}
\n
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
\n\n

Others:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
ItemValue
Residual standard error${sigma[0]} on ${df[1]} degrees of freedom
Multiple R-squared${rSquared[0]}
Adjusted R-squared${adjRSquared[0]}
F-statistic ${fstatistic[0]} on ${fstatistic[1]} and ${fstatistic[2]} DF, p-value: < ${minPr}
AIC${aic[0]}
\n `;\n\n // Set HTML element for chart\n $(`.advanced-analytics-toolsets-${$scope.extId}`).html(html);\n }\n return defer.resolve();\n });\n return defer.promise;\n },\n };\n});\n"]} \ No newline at end of file diff --git a/build/dev/lib/maps/analysis/regression_predict.js.map b/build/dev/lib/maps/analysis/regression_predict.js.map new file mode 100644 index 0000000..caf9c17 --- /dev/null +++ b/build/dev/lib/maps/analysis/regression_predict.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["analysis/regression_predict.js"],"names":["define","lineChart","utils","$q","createCube","app","$scope","layout","dimension","validateDimension","props","dimensions","qNullSuppression","qDef","qFieldDefs","qSortCriterias","qSortByExpression","dimSort","dimSortByExpression","dimSortByExpressionAsc","qSortByNumeric","dimSortByNum","dimSortByNumAsc","qSortByAscii","dimSortByAlph","dimSortByAlphAsc","qExpression","qv","dimSortByExpressionString","meaLen","measures","length","rowsLabel","validateMeasure","params","meaList","i","mea","param","push","soglia","norm","cor","fo","split","s","displayDebugModeMessage","debugMode","saveRDataset","getDebugSaveDatasetScript","defMea1","interval","confidenceLevel","defMea2","defMea3","displayRScriptsToConsole","measure","qLabel","backendApi","applyPatches","qPath","qOp","qValue","JSON","stringify","patchApplied","drawChart","defer","requestPage","qTop","qLeft","qWidth","qHeight","getData","then","dataPages","measureInfo","qHyperCube","qMeasureInfo","isNaN","qMin","qMax","displayConnectionError","extId","displayReturnedDatasetToConsole","palette","getDefaultPaletteColor","elemNum","dim1","mea1","mea2","mea3","mea4","$","each","qMatrix","key","value","qElemNumber","qNum","qText","chartData","x","y","name","mode","type","line","color","colorForSub","html","chart","draw","setEvents","resolve","promise"],"mappings":"AAAA,YAAAA,SACE,sBACA,gBACA,SACC,SAACC,EAAWC,EAAOC,GACpB,OASEC,WATK,SASMC,EAAKC,GACd,GAAMC,GAASD,EAAOC,OAChBC,EAAYN,EAAMO,kBAAkBF,EAAOG,MAAMC,WAAW,IAC5DA,IAEFC,kBAAkB,EAClBC,MACEC,YAAaN,GACbO,iBACEC,kBAAmBT,EAAOG,MAAMO,UAAYV,EAAOG,MAAMQ,oBAAsB,EAAIX,EAAOG,MAAMS,uBAChGC,eAAiBb,EAAOG,MAAMO,QAAW,EAAMV,EAAOG,MAAMW,aAAoBd,EAAOG,MAAMY,gBAAjB,EAC5EC,aAAchB,EAAOG,M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AGK,OAClDF,MAAMH,EAAY,GAAGI,OAASD,MAAMH,EAAY,GAAGK,OACnDF,MAAMH,EAAY,GAAGI,OAASD,MAAMH,EAAY,GAAGK,MAEtD/E,EAAMgF,uBAAuB5E,EAAO6E,WAC/B,CAELjF,EAAMkF,gCAAgC7E,EAAOG,MAAMqC,UAAW4B,EAAU,GAExE,IAAMU,GAAUnF,EAAMoF,yBAChBC,KACAC,KACAC,KACAC,KACAC,KACAC,IAGNC,GAAEC,KAAKnB,EAAU,GAAGoB,QAAS,SAACC,EAAKC,GACjCV,EAAQhD,KAAK0D,EAAM,GAAGC,aACR,GAAjBD,EAAM,GAAGE,MACNX,EAAKjD,KAAK0D,EAAM,GAAGG,OACnBX,EAAKlD,KAAK0D,EAAM,GAAGE,MACnBT,EAAKnD,KAAK0D,EAAM,GAAGE,MACnBR,EAAKpD,KAAK0D,EAAM,GAAGE,MACnBP,EAAKrD,KAAK0D,EAAM,GAAGE,OAGrB,IAAME,KAEFC,EAAGd,EACHe,EAAGb,EACHc,KAAM,MACfC,KAAM,OACNC,KAAM,MACGC,MACEC,MAAAA,QAAevB,EAAQ9E,EAAOG,MAAMmG,aAApC,QAMNhB,GAAAA,gCAAkCvF,EAAO6E,OAAS2B,KAAlD,sBAA6ExG,EAAO6E,MAApF,2CAEA,IAAM4B,GAAQ9G,EAAU+G,KAAK1G,EAAQ+F,EAAvB,aAA+C/F,EAAO6E,MAAS,KAC7ElF,GAAUgH,UAAUF,EAAOzG,EAAQD,GAErC,MAAO8D,GAAM+C,YAER/C,EAAMgD","file":"../../js/analysis/regression_predict.js","sourcesContent":["define([\n '../chart/line_chart',\n '../util/utils',\n 'ng!$q',\n], (lineChart, utils, $q) => {\n return {\n /**\n * createCube - create HyperCubes\n *\n * @param {Object} app reference to app\n * @param {Object} $scope angular $scope\n *\n * @return {Null} null\n */\n createCube(app, $scope) {\n const layout = $scope.layout;\n const dimension = utils.validateDimension(layout.props.dimensions[0]);\n const dimensions = [\n {\n qNullSuppression: true,\n qDef: {\n qFieldDefs: [dimension],\n qSortCriterias: [{\n qSortByExpression: layout.props.dimSort || !layout.props.dimSortByExpression ? 0 : layout.props.dimSortByExpressionAsc,\n qSortByNumeric: (layout.props.dimSort) ? 1 : (!layout.props.dimSortByNum) ? 0 : layout.props.dimSortByNumAsc,\n qSortByAscii: layout.props.dimSort || !layout.props.dimSortByAlph ? 0 : layout.props.dimSortByAlphAsc,\n qExpression: {\n qv: layout.props.dimSortByExpressionString,\n },\n }],\n },\n },\n ];\n\n const meaLen = layout.props.measures.length;\n $scope.rowsLabel = ['(Intercept)', utils.validateMeasure(layout.props.measures[1])]; // Label for dimension values\n let params = `${utils.validateMeasure(layout.props.measures[0])} as mea0, ${utils.validateMeasure(layout.props.measures[1])} as mea1`;\n let meaList = 'q$mea0 ~ q$mea1';\n\n for (let i = 2; i < meaLen; i++) {\n const mea = utils.validateMeasure(layout.props.measures[i]);\n if (mea.length > 0) {\n const param = `,${mea} as mea${i}`;\n params += param;\n meaList += ` + q$mea${i}`;\n\n $scope.rowsLabel.push(utils.validateMeasure(layout.props.measures[i]));\n } \n }\n\t \n\t // Normalize data - Find Correlation - Split condition - set training data for fit model and predict only NA values, using most correlated features. \n\t const soglia = 0.3;\n\t const norm = `library(caret);target <- q$mea0; preParams <- preProcess(q[,1:${meaLen}], method=c(\"range\"));q <- predict(preParams, q[,1:${meaLen}]); q$mea0 <- target`;\n\t const cor = `m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = \"pearson\"))`;\n\t const fo = `f=\"\";for(j in 2:${meaLen}) if(!is.na(m[j]) && m[j]>=${soglia}){l=paste(\"q$mea\",j-1,sep=\"\"); f=paste(f,l,sep=\" + \")} ;f=paste(\"q$mea0 ~ \",substring(f,3));str(f)`; \n\t const split = `q$mea0 > 0`;\t\n\t const s = `q = subset(q,q$mea0 == 0); q$mea0[q$mea0 == 0] <- NA;`;\n\t \n // Debug mode - set R dataset name to store the q data.\n utils.displayDebugModeMessage(layout.props.debugMode);\n const saveRDataset = utils.getDebugSaveDatasetScript(layout.props.debugMode, 'debug_regression_analysis_line_chart.rda');\n\t\t \n const defMea1 = `R.ScriptEval('${saveRDataset} ${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel}); }[,1]',${params})`;\n const defMea2 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel}); }[,2]',${params})`;\n const defMea3 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel}); }[,3]',${params})`;\n\n // Debug mode - display R Scripts to console\n utils.displayRScriptsToConsole(layout.props.debugMode, [defMea1, defMea2, defMea3]);\n\n const measure = utils.validateMeasure(layout.props.measures[0]);\n const measures = [\n {\n qDef: {\n qDef: measure,\n },\n },\n {\n qDef: {\n qDef: defMea1,\n },\n },\n {\n qDef: {\n qDef: defMea2,\n },\n },\n {\n qDef: {\n qDef: defMea3,\n },\n },\n {\n qDef: {\n qLabel: '-',\n qDef: '', // Dummy\n },\n },\n ];\n\n $scope.backendApi.applyPatches([\n {\n qPath: '/qHyperCubeDef/qDimensions',\n qOp: 'replace',\n qValue: JSON.stringify(dimensions),\n },\n {\n qPath: '/qHyperCubeDef/qMeasures',\n qOp: 'replace',\n qValue: JSON.stringify(measures),\n },\n ], false);\n\n $scope.patchApplied = true;\n return null;\n },\n /**\n * drawChart - draw chart with updated data\n *\n * @param {Object} $scope angular $scope\n *\n * @return {Object} Promise object\n */\n drawChart($scope, app) {\n const defer = $q.defer();\n const layout = $scope.layout;\n\n const requestPage = [{\n qTop: 0,\n qLeft: 0,\n qWidth: 6,\n qHeight: 1500,\n }];\n\n $scope.backendApi.getData(requestPage).then((dataPages) => {\n const measureInfo = $scope.layout.qHyperCube.qMeasureInfo;\n\n // Display error when all measures' grand total return NaN.\n if (isNaN(measureInfo[1].qMin) && isNaN(measureInfo[1].qMax)\n && isNaN(measureInfo[2].qMin) && isNaN(measureInfo[2].qMax)\n && isNaN(measureInfo[3].qMin) && isNaN(measureInfo[3].qMax)\n ) {\n utils.displayConnectionError($scope.extId);\n } else {\n // Debug mode - display returned dataset to console\n utils.displayReturnedDatasetToConsole(layout.props.debugMode, dataPages[0]);\n\t \n const palette = utils.getDefaultPaletteColor();\n const elemNum = [];\n const dim1 = []; // Dimension\n const mea1 = [];\n const mea2 = [];\n const mea3 = [];\n const mea4 = [];\n\t\t \n\t\t \n $.each(dataPages[0].qMatrix, (key, value) => { \n elemNum.push(value[0].qElemNumber);\n\t\t if(value[1].qNum == 0) \n dim1.push(value[0].qText);\t\t\n mea1.push(value[1].qNum);\n mea2.push(value[2].qNum);\n mea3.push(value[3].qNum);\n mea4.push(value[4].qNum);\n\t\t });\n\n const chartData = [ \n {\n x: dim1,\n y: mea2,\n name: 'Fit',\n\t\t\t mode: 'none',\n\t\t\t type: 'bar',\n line: {\n color: `rgba(${palette[layout.props.colorForSub]},1)`,\n },\n },\n ];\n\n // Set HTML element for chart\n $(`.advanced-analytics-toolsets-${$scope.extId}`).html(`
`);\n\n const chart = lineChart.draw($scope, chartData, `aat-chart-${$scope.extId}`, null);\n lineChart.setEvents(chart, $scope, app);\n }\n return defer.resolve();\n });\n return defer.promise;\n },\n };\n});\n"]} \ No newline at end of file diff --git a/build/dev/lib/maps/analysis/regression_predict_table.js.map b/build/dev/lib/maps/analysis/regression_predict_table.js.map new file mode 100644 index 0000000..42a3b16 --- /dev/null +++ b/build/dev/lib/maps/analysis/regression_predict_table.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["analysis/regression_predict_table.js"],"names":["define","lineChart","utils","$q","createCube","app","$scope","layout","dimension","validateDimension","props","dimensions","qNullSuppression","qDef","qFieldDefs","qSortCriterias","qSortByExpression","dimSort","dimSortByExpression","dimSortByExpressionAsc","qSortByNumeric","dimSortByNum","dimSortByNumAsc","qSortByAscii","dimSortByAlph","dimSortByAlphAsc","qExpression","qv","dimSortByExpressionString","meaLen","measures","length","rowsLabel","validateMeasure","params","meaList","i","mea","param","push","soglia","norm","cor","fo","split","s","displayDebugModeMessage","debugMode","saveRDataset","getDebugSaveDatasetScript","defMea1","interval","confidenceLevel","defMea2","defMea3","displayRScriptsToConsole","measure","qLabel","backendApi","applyPatches","qPath","qOp","qValue","JSON","stringify","patchApplied","drawChart","defer","requestPage","qTop","qLeft","qWidth","qHeight","getData","then","dataPages","measureInfo","qHyperCube","qMeasureInfo","isNaN","qMin","qMax","displayConnectionError","extId","displayReturnedDatasetToConsole","elemNum","getDefaultPaletteColor","dim1","mea1","mea2","mea3","mea4","$","each","qMatrix","key","value","qElemNumber","qNum","qText","html","Math","ceil","resolve","promise"],"mappings":"AAAA,YAAAA,SACE,sBACA,gBACA,SACC,SAACC,EAAWC,EAAOC,GACpB,OASEC,WATK,SASMC,EAAKC,GACd,GAAMC,GAASD,EAAOC,OAChBC,EAAYN,EAAMO,kBAAkBF,EAAOG,MAAMC,WAAW,IAC5DA,IAEFC,kBAAkB,EAClBC,MACEC,YAAaN,GACbO,iBACEC,kBAAmBT,EAAOG,MAAMO,UAAYV,EAAOG,MAAMQ,oBAAsB,EAAIX,EAAOG,MAAMS,uBAChGC,eAAiBb,EAAOG,MAAMO,QAAW,EAAMV,EAAOG,MAAMW,aAAoB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,IAAIC,MAAMH,EAAY,GAAGI,OAASD,MAAMH,EAAY,GAAGK,OAClDF,MAAMH,EAAY,GAAGI,OAASD,MAAMH,EAAY,GAAGK,OACnDF,MAAMH,EAAY,GAAGI,OAASD,MAAMH,EAAY,GAAGK,MAEtD/E,EAAMgF,uBAAuB5E,EAAO6E,WAC/B,CAELjF,EAAMkF,gCAAgC7E,EAAOG,MAAMqC,UAAW4B,EAAU,GAExE,IACMU,IADUnF,EAAMoF,6BAEhBC,KACAC,KACAC,KACAC,KACAC,IAGNC,GAAEC,KAAKlB,EAAU,GAAGmB,QAAS,SAACC,EAAKC,GACjCX,EAAQ9C,KAAKyD,EAAM,GAAGC,aACR,GAAjBD,EAAM,GAAGE,MACNX,EAAKhD,KAAKyD,EAAM,GAAGG,OACnBX,EAAKjD,KAAKyD,EAAM,GAAGE,MACnBT,EAAKlD,KAAKyD,EAAM,GAAGE,MACnBR,EAAKnD,KAAKyD,EAAM,GAAGE,MACnBP,EAAKpD,KAAKyD,EAAM,GAAGE,OAiBrB,KAAK,GAZDE,GAAAA,+PAYKhE,EAAI,EAAGA,EAAImD,EAAKxD,OAAQK,IAC/BgE,GAAAA,WAAmBb,EAAKnD,GAAxB,YAAsCiE,KAAKC,KAAKb,EAAKrD,IAArD,kCAKFgE,IAAAA,0DAMAR,EAAAA,gCAAkCtF,EAAO6E,OAASiB,KAAKA,GAGzD,MAAOjC,GAAMoC,YAERpC,EAAMqC","file":"../../js/analysis/regression_predict_table.js","sourcesContent":["define([\n '../chart/line_chart',\n '../util/utils',\n 'ng!$q',\n], (lineChart, utils, $q) => {\n return {\n /**\n * createCube - create HyperCubes\n *\n * @param {Object} app reference to app\n * @param {Object} $scope angular $scope\n *\n * @return {Null} null\n */\n createCube(app, $scope) {\n const layout = $scope.layout;\n const dimension = utils.validateDimension(layout.props.dimensions[0]);\n const dimensions = [\n {\n qNullSuppression: true,\n qDef: {\n qFieldDefs: [dimension],\n qSortCriterias: [{\n qSortByExpression: layout.props.dimSort || !layout.props.dimSortByExpression ? 0 : layout.props.dimSortByExpressionAsc,\n qSortByNumeric: (layout.props.dimSort) ? 1 : (!layout.props.dimSortByNum) ? 0 : layout.props.dimSortByNumAsc,\n qSortByAscii: layout.props.dimSort || !layout.props.dimSortByAlph ? 0 : layout.props.dimSortByAlphAsc,\n qExpression: {\n qv: layout.props.dimSortByExpressionString,\n },\n }],\n },\n },\n ];\n\n const meaLen = layout.props.measures.length;\n $scope.rowsLabel = ['(Intercept)', utils.validateMeasure(layout.props.measures[1])]; // Label for dimension values\n let params = `${utils.validateMeasure(layout.props.measures[0])} as mea0, ${utils.validateMeasure(layout.props.measures[1])} as mea1`;\n let meaList = 'q$mea0 ~ q$mea1';\n\n for (let i = 2; i < meaLen; i++) {\n const mea = utils.validateMeasure(layout.props.measures[i]);\n if (mea.length > 0) {\n const param = `,${mea} as mea${i}`;\n params += param;\n meaList += ` + q$mea${i}`;\n\n $scope.rowsLabel.push(utils.validateMeasure(layout.props.measures[i]));\n } \n }\n\t \n\t // Normalize data - Find Correlation - Split condition - set training data for fit model and predict only NA values, using most correlated features. \n\t const soglia = 0.3;\n\t const norm = `library(caret);target <- q$mea0; preParams <- preProcess(q[,1:${meaLen}], method=c(\"range\"));q <- predict(preParams, q[,1:${meaLen}]); q$mea0 <- target`;\n\t const cor = `m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = \"pearson\"))`;\n\t const fo = `f=\"\";for(j in 2:${meaLen}) if(!is.na(m[j]) && m[j]>=${soglia}){l=paste(\"q$mea\",j-1,sep=\"\"); f=paste(f,l,sep=\" + \")} ;f=paste(\"q$mea0 ~ \",substring(f,3));str(f)`; \n\t const split = `q$mea0 > 0`;\t\n\t const s = `q = subset(q,q$mea0 == 0); q$mea0[q$mea0 == 0] <- NA;`;\n\t \n // Debug mode - set R dataset name to store the q data.\n utils.displayDebugModeMessage(layout.props.debugMode);\n const saveRDataset = utils.getDebugSaveDatasetScript(layout.props.debugMode, 'debug_regression_analysis_line_chart.rda');\n\t\t \n const defMea1 = `R.ScriptEval('${saveRDataset} ${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel}); }[,1]',${params})`;\n const defMea2 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel}); }[,2]',${params})`;\n const defMea3 = `R.ScriptEval('${norm}; if(sum(q$mea0)> 0 && min(q$mea0) == 0){${cor}; ${fo}; lm_result <- lm(as.formula(f), q, ${split});${s} predict(lm_result, q, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel});} else{lm_result <- lm(${meaList});predict(lm_result, interval=\"${layout.props.interval}\", level=${layout.props.confidenceLevel}); }[,3]',${params})`;\n\n // Debug mode - display R Scripts to console\n utils.displayRScriptsToConsole(layout.props.debugMode, [defMea1, defMea2, defMea3]);\n\n const measure = utils.validateMeasure(layout.props.measures[0]);\n const measures = [\n {\n qDef: {\n qDef: measure,\n },\n },\n {\n qDef: {\n qDef: defMea1,\n },\n },\n {\n qDef: {\n qDef: defMea2,\n },\n },\n {\n qDef: {\n qDef: defMea3,\n },\n },\n {\n qDef: {\n qLabel: '-',\n qDef: '', // Dummy\n },\n },\n ];\n\n $scope.backendApi.applyPatches([\n {\n qPath: '/qHyperCubeDef/qDimensions',\n qOp: 'replace',\n qValue: JSON.stringify(dimensions),\n },\n {\n qPath: '/qHyperCubeDef/qMeasures',\n qOp: 'replace',\n qValue: JSON.stringify(measures),\n },\n ], false);\n\n $scope.patchApplied = true;\n return null;\n },\n /**\n * drawChart - draw chart with updated data\n *\n * @param {Object} $scope angular $scope\n *\n * @return {Object} Promise object\n */\n drawChart($scope, app) {\n const defer = $q.defer();\n const layout = $scope.layout;\n\n const requestPage = [{\n qTop: 0,\n qLeft: 0,\n qWidth: 6,\n qHeight: 1500,\n }];\n\n $scope.backendApi.getData(requestPage).then((dataPages) => {\n const measureInfo = $scope.layout.qHyperCube.qMeasureInfo;\n\n // Display error when all measures' grand total return NaN.\n if (isNaN(measureInfo[1].qMin) && isNaN(measureInfo[1].qMax)\n && isNaN(measureInfo[2].qMin) && isNaN(measureInfo[2].qMax)\n && isNaN(measureInfo[3].qMin) && isNaN(measureInfo[3].qMax)\n ) {\n utils.displayConnectionError($scope.extId);\n } else {\n // Debug mode - display returned dataset to console\n utils.displayReturnedDatasetToConsole(layout.props.debugMode, dataPages[0]);\n\t \n const palette = utils.getDefaultPaletteColor();\n const elemNum = [];\n const dim1 = []; // Dimension\n const mea1 = [];\n const mea2 = [];\n const mea3 = [];\n const mea4 = [];\n\t\t \n\t\t \n $.each(dataPages[0].qMatrix, (key, value) => { \n elemNum.push(value[0].qElemNumber);\n\t\t if(value[1].qNum == 0) \n dim1.push(value[0].qText);\t\t\n mea1.push(value[1].qNum);\n mea2.push(value[2].qNum);\n mea3.push(value[3].qNum);\n mea4.push(value[4].qNum);\n\t\t });\n\n\t\t \n // Set table header\n let html = `\n

Predicted:

\n \n \n \n \n \n \n \n `;\n\t\t \n\t\t // Set regression analysis results to table\n for (let i = 0; i < dim1.length; i++) {\n html += `\n `;\n }\n\n // Set table footer and other results\n html += `\n \n
CodeRemaining Life
${dim1[i]}${Math.ceil(mea2[i])}
\n\t\t `;\n\t\t \n\t \t // Set HTML element for chart\n $(`.advanced-analytics-toolsets-${$scope.extId}`).html(html); \n\t\t \n }\n return defer.resolve();\n });\n return defer.promise;\n },\n };\n});\n"]} \ No newline at end of file From 7cb84c2ddc986af088b6d876242428ab1e19e38f Mon Sep 17 00:00:00 2001 From: Renato Strazzulla Date: Thu, 15 Feb 2018 15:26:01 +0100 Subject: [PATCH 10/10] Add files via upload --- build/dev/lib/js/analysis/analysis.js | 2 +- build/dev/lib/js/analysis/regression_model.js | 2 ++ build/dev/lib/js/analysis/regression_predict.js | 2 ++ build/dev/lib/js/analysis/regression_predict_table.js | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 build/dev/lib/js/analysis/regression_model.js create mode 100644 build/dev/lib/js/analysis/regression_predict.js create mode 100644 build/dev/lib/js/analysis/regression_predict_table.js diff --git a/build/dev/lib/js/analysis/analysis.js b/build/dev/lib/js/analysis/analysis.js index b187be4..1200a79 100644 --- a/build/dev/lib/js/analysis/analysis.js +++ b/build/dev/lib/js/analysis/analysis.js @@ -1,2 +1,2 @@ -"use strict";define([],function(){return{analysisCategories:[{id:0,name:"Simple linear regression analysis"},{id:1,name:"Multiple linear regression analysis"},{id:2,name:"Statistical hypothesis testing"},{id:7,name:"Variance analysis"},{id:6,name:"Principal Component Analysis (PCA)"},{id:3,name:"Time series analysis"},{id:4,name:"Clustering"},{id:8,name:"Classification"},{id:5,name:"Text mining"}],analysisTypes:[{id:0,category:0,name:"Line chart with linear regression line",file:"simple_linear_line",minDims:1,minMeas:1,sortId:2,allowAddMea:!1,setCustomButtonLabel:!1},{id:1,category:0,name:"Scatter plot with linear regression line",file:"simple_linear_bubble",minDims:1,minMeas:2,sortId:3,allowAddMea:!1,setCustomButtonLabel:!1},{id:2,category:2,name:"F-Test",file:"f_test",minDims:1,minMeas:2,sortId:1,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:3,category:2,name:"T-Test - Two sample T-Test",file:"t_test",minDims:1,minMeas:2,sortId:2,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:4,category:2,name:"T-Test - Welch two sample T-Test",file:"t_test",minDims:1,minMeas:2,sortId:3,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:5,category:2,name:"T-Test - Paired T-Test",file:"t_test",minDims:1,minMeas:2,sortId:4,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:6,category:3,name:"Autocorrelation",file:"autocorrelation",minDims:1,minMeas:1,sortId:1,allowAddMea:!1,setCustomButtonLabel:!1},{id:7,category:3,name:"Ljung-Box Test",file:"ljung_box_test",minDims:1,minMeas:1,sortId:2,allowAddMea:!1,setCustomButtonLabel:!1},{id:8,category:3,name:"Decomposing time series",file:"timeseries_decomposition",minDims:1,minMeas:1,sortId:3,allowAddMea:!1,setCustomButtonLabel:!1},{id:9,category:3,name:"ARIMA forecast",file:"timeseries_forecast",minDims:1,minMeas:1,sortId:6,setCustomButtonLabel:!1},{id:10,category:4,name:"k-means clustering",file:"kmeans",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset: X-axis","Add measure - Dataset: Y-axis"],meaButtonLabelOthers:"Add measure - Dataset"},{id:11,category:1,name:"Multiple regression analysis",file:"regression_analysis",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:12,category:3,name:"Augmented Dickey-Fuller Test",file:"augmented_dickey_fuller_test",minDims:1,minMeas:1,sortId:4,allowAddMea:!1},{id:13,category:5,name:"Text mining / Wordcloud",file:"textmining_wordcloud",minDims:2,minMeas:0,sortId:1,allowAddMea:!1},{id:14,category:1,name:"Correlation matrix heatmap",file:"correlation_heatmap",minDims:1,minMeas:2,sortId:4,allowAddMea:!0},{id:15,category:1,name:"Plot regression coefficients",file:"coefplot",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:16,category:4,name:"k-means clustering (3D)",file:"kmeans_3d",minDims:1,minMeas:3,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset: X-axis","Add measure - Dataset: Y-axis","Add measure - Dataset: Z-axis"],meaButtonLabelOthers:"Add measure - Dataset"},{id:17,category:1,name:"Line chart with multiple regression line",file:"regression_analysis_line_chart",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:18,category:6,name:"Principal Component Analysis (PCA)",file:"pca",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Variable field","Add measure - Variable field"],meaButtonLabelOthers:"Add measure - Variable field"},{id:19,category:6,name:"PCA - Biplot",file:"pca_biplot",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Variable field","Add measure - Variable field"],meaButtonLabelOthers:"Add measure - Variable field"},{id:20,category:6,name:"PCA - Variance plot",file:"pca_variance",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Variable field","Add measure - Variable field"],meaButtonLabelOthers:"Add measure - Variable field"},{id:21,category:7,name:"ANOVA - Single factor",file:"anova",minDims:2,minMeas:1,sortId:1},{id:22,category:7,name:"Tukey - Single factor",file:"tukey",minDims:2,minMeas:1,sortId:2},{id:23,category:4,name:"Find optimal number of clusters",file:"kmeans_optimize",minDims:1,minMeas:2,sortId:4,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset","Add measure - Dataset"],meaButtonLabelOthers:"Add measure - Dataset"},{id:24,category:4,name:"k-means - Cluster means/centers",file:"kmeans_means",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset: X-axis","Add measure - Dataset: Y-axis"],meaButtonLabelOthers:"Add measure - Dataset"},{id:25,category:8,name:"Decision tree",file:"decision_tree",minDims:1,minMeas:2,sortId:0,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:26,category:8,name:"Decision tree - Evaluate model",file:"decision_tree_predict",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:27,category:8,name:"Logistic regression analysis",file:"logistic_regression",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:28,category:8,name:"Logistic regression - Evaluate model",file:"logistic_regression_predict",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:29,category:8,name:"Logistic regression - Plot coefficients",file:"logistic_regression_coefplot",minDims:1,minMeas:2,sortId:4,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:14,category:8,name:"Correlation matrix heatmap",file:"correlation_heatmap",minDims:1,minMeas:2,sortId:5,allowAddMea:!0},{id:30,category:3,name:"Holt-Winters",file:"holt_winters",minDims:1,minMeas:1,sortId:5,setCustomButtonLabel:!1}].sort(function(e,a){return e.sortId-a.sortId})}}); +"use strict";define([],function(){return{analysisCategories:[{id:0,name:"Simple linear regression analysis"},{id:1,name:"Multiple linear regression analysis"},{id:2,name:"Statistical hypothesis testing"},{id:7,name:"Variance analysis"},{id:6,name:"Principal Component Analysis (PCA)"},{id:3,name:"Time series analysis"},{id:4,name:"Clustering"},{id:8,name:"Classification"},{id:5,name:"Text mining"}],analysisTypes:[{id:0,category:0,name:"Line chart with linear regression line",file:"simple_linear_line",minDims:1,minMeas:1,sortId:2,allowAddMea:!1,setCustomButtonLabel:!1},{id:1,category:0,name:"Scatter plot with linear regression line",file:"simple_linear_bubble",minDims:1,minMeas:2,sortId:3,allowAddMea:!1,setCustomButtonLabel:!1},{id:2,category:2,name:"F-Test",file:"f_test",minDims:1,minMeas:2,sortId:1,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:3,category:2,name:"T-Test - Two sample T-Test",file:"t_test",minDims:1,minMeas:2,sortId:2,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:4,category:2,name:"T-Test - Welch two sample T-Test",file:"t_test",minDims:1,minMeas:2,sortId:3,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:5,category:2,name:"T-Test - Paired T-Test",file:"t_test",minDims:1,minMeas:2,sortId:4,allowAddMea:!1,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset A","Add measure - Dataset B"],meaButtonLabelOthers:""},{id:6,category:3,name:"Autocorrelation",file:"autocorrelation",minDims:1,minMeas:1,sortId:1,allowAddMea:!1,setCustomButtonLabel:!1},{id:7,category:3,name:"Ljung-Box Test",file:"ljung_box_test",minDims:1,minMeas:1,sortId:2,allowAddMea:!1,setCustomButtonLabel:!1},{id:8,category:3,name:"Decomposing time series",file:"timeseries_decomposition",minDims:1,minMeas:1,sortId:3,allowAddMea:!1,setCustomButtonLabel:!1},{id:9,category:3,name:"ARIMA forecast",file:"timeseries_forecast",minDims:1,minMeas:1,sortId:6,setCustomButtonLabel:!1},{id:10,category:4,name:"k-means clustering",file:"kmeans",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset: X-axis","Add measure - Dataset: Y-axis"],meaButtonLabelOthers:"Add measure - Dataset"},{id:11,category:1,name:"Multiple regression analysis",file:"regression_analysis",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:12,category:3,name:"Augmented Dickey-Fuller Test",file:"augmented_dickey_fuller_test",minDims:1,minMeas:1,sortId:4,allowAddMea:!1},{id:13,category:5,name:"Text mining / Wordcloud",file:"textmining_wordcloud",minDims:2,minMeas:0,sortId:1,allowAddMea:!1},{id:14,category:1,name:"Correlation matrix heatmap",file:"correlation_heatmap",minDims:1,minMeas:2,sortId:4,allowAddMea:!0},{id:15,category:1,name:"Plot regression coefficients",file:"coefplot",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:16,category:4,name:"k-means clustering (3D)",file:"kmeans_3d",minDims:1,minMeas:3,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset: X-axis","Add measure - Dataset: Y-axis","Add measure - Dataset: Z-axis"],meaButtonLabelOthers:"Add measure - Dataset"},{id:17,category:1,name:"Line chart with multiple regression line",file:"regression_analysis_line_chart",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:18,category:6,name:"Principal Component Analysis (PCA)",file:"pca",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Variable field","Add measure - Variable field"],meaButtonLabelOthers:"Add measure - Variable field"},{id:19,category:6,name:"PCA - Biplot",file:"pca_biplot",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Variable field","Add measure - Variable field"],meaButtonLabelOthers:"Add measure - Variable field"},{id:20,category:6,name:"PCA - Variance plot",file:"pca_variance",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Variable field","Add measure - Variable field"],meaButtonLabelOthers:"Add measure - Variable field"},{id:21,category:7,name:"ANOVA - Single factor",file:"anova",minDims:2,minMeas:1,sortId:1},{id:22,category:7,name:"Tukey - Single factor",file:"tukey",minDims:2,minMeas:1,sortId:2},{id:23,category:4,name:"Find optimal number of clusters",file:"kmeans_optimize",minDims:1,minMeas:2,sortId:4,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset","Add measure - Dataset"],meaButtonLabelOthers:"Add measure - Dataset"},{id:24,category:4,name:"k-means - Cluster means/centers",file:"kmeans_means",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Dataset: X-axis","Add measure - Dataset: Y-axis"],meaButtonLabelOthers:"Add measure - Dataset"},{id:25,category:8,name:"Decision tree",file:"decision_tree",minDims:1,minMeas:2,sortId:0,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:26,category:8,name:"Decision tree - Evaluate model",file:"decision_tree_predict",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:27,category:8,name:"Logistic regression analysis",file:"logistic_regression",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:28,category:8,name:"Logistic regression - Evaluate model",file:"logistic_regression_predict",minDims:1,minMeas:2,sortId:3,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:29,category:8,name:"Logistic regression - Plot coefficients",file:"logistic_regression_coefplot",minDims:1,minMeas:2,sortId:4,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:14,category:8,name:"Correlation matrix heatmap",file:"correlation_heatmap",minDims:1,minMeas:2,sortId:5,allowAddMea:!0},{id:30,category:3,name:"Holt-Winters",file:"holt_winters",minDims:1,minMeas:1,sortId:5,setCustomButtonLabel:!1},{id:31,category:1,name:"Multiple regression prediction",file:"regression_predict",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:32,category:1,name:"Multiple regression prediction table",file:"regression_predict_table",minDims:1,minMeas:2,sortId:2,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"},{id:33,category:1,name:"Multiple regression model",file:"regression_model",minDims:1,minMeas:2,sortId:1,allowAddMea:!0,setCustomButtonLabel:!0,dimButtonLabel:["Add dimension"],meaButtonLabel:["Add measure - Response variable","Add measure - Predictor variable"],meaButtonLabelOthers:"Add measure - Predictor variable"}].sort(function(e,a){return e.sortId-a.sortId})}}); //# sourceMappingURL=../../maps/analysis/analysis.js.map diff --git a/build/dev/lib/js/analysis/regression_model.js b/build/dev/lib/js/analysis/regression_model.js new file mode 100644 index 0000000..dd92301 --- /dev/null +++ b/build/dev/lib/js/analysis/regression_model.js @@ -0,0 +1,2 @@ +"use strict";define(["../util/utils","ng!$q"],function(e,t){return{createCube:function(t,a){var s=a.layout,r=e.validateDimension(s.props.dimensions[0]),n=[{qNullSuppression:!0,qDef:{qFieldDefs:[r]}}],l=s.props.measures.length;a.rowsLabel=["(Intercept)",""!=s.props.measures[1].label?s.props.measures[1].label:e.validateMeasure(s.props.measures[0])];for(var d=e.validateMeasure(s.props.measures[0])+" as mea0, "+e.validateMeasure(s.props.measures[1])+" as mea1",i="q$mea0 ~ q$mea1",o="NN",u=2;u0){var p=","+m+" as mea"+u;d+=p,i+=" + q$mea"+u,o+="N",a.rowsLabel.push(e.validateMeasure(s.props.measures[u]))}}var q=.3,h="q$mea0 > 0.0",c="library(caret);target <- q$mea0; preParams <- preProcess(q[,1:"+l+'], method=c("range"));q <- predict(preParams, q[,1:'+l+"]); q$mea0 <- target",f='m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = "pearson"))',b='f="";for(j in 2:'+l+") if(!is.na(m[j]) && m[j]>="+q+'){l=paste("q$mea",j-1,sep=""); f=paste(f,l,sep=" + ")} ;f=paste("q$mea0 ~ ",substring(f,3));str(f)';e.displayDebugModeMessage(s.props.debugMode);var y=e.getDebugSaveDatasetScript(s.props.debugMode,"debug_regression_analysis.rda"),g="R.ScriptEvalExStr('"+o+"','"+y+" library(jsonlite);"+c+";"+f+"; "+b+"; lm_result <- lm(as.formula(f), q, "+h+');lm_summary <- summary(lm_result);\n json <- toJSON(list(coef(lm_summary)[,"Estimate"], coef(lm_summary)[,"Std. Error"], coef(lm_summary)[,"t value"], coef(lm_summary)[,"Pr(>|t|)"],\n as.double(summary(lm_result$residuals)), summary(lm_result)$sigma, summary(lm_result)$df, lm_summary$r.squared, lm_summary$adj.r.squared,\n summary(lm_result)$fstatistic, extractAIC(lm_result)[2])); json;\','+d+")";e.displayRScriptsToConsole(s.props.debugMode,[g]);var v=[{qDef:{qDef:g}},{qDef:{qLabel:"-",qDef:""}},{qDef:{qLabel:"-",qDef:""}},{qDef:{qLabel:"-",qDef:""}},{qDef:{qLabel:"-",qDef:""}}];return a.backendApi.applyPatches([{qPath:"/qHyperCubeDef/qDimensions",qOp:"replace",qValue:JSON.stringify(n)},{qPath:"/qHyperCubeDef/qMeasures",qOp:"replace",qValue:JSON.stringify(v)}],!1),a.patchApplied=!0,null},drawChart:function(a){var s=t.defer(),r=a.layout,n=(e.validateDimension(r.props.dimensions[0]),[{qTop:0,qLeft:0,qWidth:2,qHeight:1}]);return a.backendApi.getData(n).then(function(t){a.layout.qHyperCube.qMeasureInfo;if(0===t[0].qMatrix[0][1].qText.length||"-"==t[0].qMatrix[0][1].qText)e.displayConnectionError(a.extId);else{e.displayReturnedDatasetToConsole(r.props.debugMode,t[0]);for(var n=JSON.parse(t[0].qMatrix[0][1].qText),l=n[0],d=n[1],i=n[2],o=n[3],u=Math.max.apply(null,o),m=n[4],p=n[5],q=n[6],h=n[7],c=n[8],f=n[9],b=n[10],y='\n

Residuals:

\n \n \n \n \n \n \n \n \n \n \n \n
Min1QMedian3QMax
'+m[0]+""+m[1]+""+m[2]+""+m[4]+""+m[5]+'
\n\n

Coefficients:

\n \n \n \n \n \n \n \n ',g=0;g\n \n ";y+='\n \n
EstimateStd.Errort valuePr(>|t|)Signif
"+a.rowsLabel[g]+""+l[g]+""+d[g]+""+i[g]+""+o[g]+""+(o[g]<.001?'':o[g]<.01?'':o[g]<.05?'':o[g]<.1?".":"")+"
\n
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
\n\n

Others:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
ItemValue
Residual standard error'+p[0]+" on "+q[1]+" degrees of freedom
Multiple R-squared"+h[0]+"
Adjusted R-squared"+c[0]+"
F-statistic "+f[0]+" on "+f[1]+" and "+f[2]+" DF, p-value: < "+u+"
AIC"+b[0]+"
\n ",$(".advanced-analytics-toolsets-"+a.extId).html(y)}return s.resolve()}),s.promise}}}); +//# sourceMappingURL=../../maps/analysis/regression_model.js.map diff --git a/build/dev/lib/js/analysis/regression_predict.js b/build/dev/lib/js/analysis/regression_predict.js new file mode 100644 index 0000000..8a324df --- /dev/null +++ b/build/dev/lib/js/analysis/regression_predict.js @@ -0,0 +1,2 @@ +"use strict";define(["../chart/line_chart","../util/utils","ng!$q"],function(e,r,a){return{createCube:function(e,a){var s=a.layout,t=r.validateDimension(s.props.dimensions[0]),p=[{qNullSuppression:!0,qDef:{qFieldDefs:[t],qSortCriterias:[{qSortByExpression:s.props.dimSort||!s.props.dimSortByExpression?0:s.props.dimSortByExpressionAsc,qSortByNumeric:s.props.dimSort?1:s.props.dimSortByNum?s.props.dimSortByNumAsc:0,qSortByAscii:s.props.dimSort||!s.props.dimSortByAlph?0:s.props.dimSortByAlphAsc,qExpression:{qv:s.props.dimSortByExpressionString}}]}}],l=s.props.measures.length;a.rowsLabel=["(Intercept)",r.validateMeasure(s.props.measures[1])];for(var i=r.validateMeasure(s.props.measures[0])+" as mea0, "+r.validateMeasure(s.props.measures[1])+" as mea1",o="q$mea0 ~ q$mea1",n=2;n0){var u=","+m+" as mea"+n;i+=u,o+=" + q$mea"+n,a.rowsLabel.push(r.validateMeasure(s.props.measures[n]))}}var q=.3,d="library(caret);target <- q$mea0; preParams <- preProcess(q[,1:"+l+'], method=c("range"));q <- predict(preParams, q[,1:'+l+"]); q$mea0 <- target",c='m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = "pearson"))',v='f="";for(j in 2:'+l+") if(!is.na(m[j]) && m[j]>="+q+'){l=paste("q$mea",j-1,sep=""); f=paste(f,l,sep=" + ")} ;f=paste("q$mea0 ~ ",substring(f,3));str(f)',f="q$mea0 > 0",h="q = subset(q,q$mea0 == 0); q$mea0[q$mea0 == 0] <- NA;";r.displayDebugModeMessage(s.props.debugMode);var y=r.getDebugSaveDatasetScript(s.props.debugMode,"debug_regression_analysis_line_chart.rda"),b="R.ScriptEval('"+y+" "+d+"; if(sum(q$mea0)> 0 && min(q$mea0) == 0){"+c+"; "+v+"; lm_result <- lm(as.formula(f), q, "+f+");"+h+' predict(lm_result, q, interval="'+s.props.interval+'", level='+s.props.confidenceLevel+");} else{lm_result <- lm("+o+');predict(lm_result, interval="'+s.props.interval+'", level='+s.props.confidenceLevel+"); }[,1]',"+i+")",g="R.ScriptEval('"+d+"; if(sum(q$mea0)> 0 && min(q$mea0) == 0){"+c+"; "+v+"; lm_result <- lm(as.formula(f), q, "+f+");"+h+' predict(lm_result, q, interval="'+s.props.interval+'", level='+s.props.confidenceLevel+");} else{lm_result <- lm("+o+');predict(lm_result, interval="'+s.props.interval+'", level='+s.props.confidenceLevel+"); }[,2]',"+i+")",N="R.ScriptEval('"+d+"; if(sum(q$mea0)> 0 && min(q$mea0) == 0){"+c+"; "+v+"; lm_result <- lm(as.formula(f), q, "+f+");"+h+' predict(lm_result, q, interval="'+s.props.interval+'", level='+s.props.confidenceLevel+");} else{lm_result <- lm("+o+');predict(lm_result, interval="'+s.props.interval+'", level='+s.props.confidenceLevel+"); }[,3]',"+i+")";r.displayRScriptsToConsole(s.props.debugMode,[b,g,N]);var S=r.validateMeasure(s.props.measures[0]),$=[{qDef:{qDef:S}},{qDef:{qDef:b}},{qDef:{qDef:g}},{qDef:{qDef:N}},{qDef:{qLabel:"-",qDef:""}}];return a.backendApi.applyPatches([{qPath:"/qHyperCubeDef/qDimensions",qOp:"replace",qValue:JSON.stringify(p)},{qPath:"/qHyperCubeDef/qMeasures",qOp:"replace",qValue:JSON.stringify($)}],!1),a.patchApplied=!0,null},drawChart:function(s,t){var p=a.defer(),l=s.layout,i=[{qTop:0,qLeft:0,qWidth:6,qHeight:1500}];return s.backendApi.getData(i).then(function(a){var i=s.layout.qHyperCube.qMeasureInfo;if(isNaN(i[1].qMin)&&isNaN(i[1].qMax)&&isNaN(i[2].qMin)&&isNaN(i[2].qMax)&&isNaN(i[3].qMin)&&isNaN(i[3].qMax))r.displayConnectionError(s.extId);else{r.displayReturnedDatasetToConsole(l.props.debugMode,a[0]);var o=r.getDefaultPaletteColor(),n=[],m=[],u=[],q=[],d=[],c=[];$.each(a[0].qMatrix,function(e,r){n.push(r[0].qElemNumber),0==r[1].qNum&&m.push(r[0].qText),u.push(r[1].qNum),q.push(r[2].qNum),d.push(r[3].qNum),c.push(r[4].qNum)});var v=[{x:m,y:q,name:"Fit",mode:"none",type:"bar",line:{color:"rgba("+o[l.props.colorForSub]+",1)"}}];$(".advanced-analytics-toolsets-"+s.extId).html('
');var f=e.draw(s,v,"aat-chart-"+s.extId,null);e.setEvents(f,s,t)}return p.resolve()}),p.promise}}}); +//# sourceMappingURL=../../maps/analysis/regression_predict.js.map diff --git a/build/dev/lib/js/analysis/regression_predict_table.js b/build/dev/lib/js/analysis/regression_predict_table.js new file mode 100644 index 0000000..266d882 --- /dev/null +++ b/build/dev/lib/js/analysis/regression_predict_table.js @@ -0,0 +1,2 @@ +"use strict";define(["../chart/line_chart","../util/utils","ng!$q"],function(e,r,s){return{createCube:function(e,s){var a=s.layout,t=r.validateDimension(a.props.dimensions[0]),p=[{qNullSuppression:!0,qDef:{qFieldDefs:[t],qSortCriterias:[{qSortByExpression:a.props.dimSort||!a.props.dimSortByExpression?0:a.props.dimSortByExpressionAsc,qSortByNumeric:a.props.dimSort?1:a.props.dimSortByNum?a.props.dimSortByNumAsc:0,qSortByAscii:a.props.dimSort||!a.props.dimSortByAlph?0:a.props.dimSortByAlphAsc,qExpression:{qv:a.props.dimSortByExpressionString}}]}}],l=a.props.measures.length;s.rowsLabel=["(Intercept)",r.validateMeasure(a.props.measures[1])];for(var i=r.validateMeasure(a.props.measures[0])+" as mea0, "+r.validateMeasure(a.props.measures[1])+" as mea1",o="q$mea0 ~ q$mea1",n=2;n0){var u=","+m+" as mea"+n;i+=u,o+=" + q$mea"+n,s.rowsLabel.push(r.validateMeasure(a.props.measures[n]))}}var q=.3,d="library(caret);target <- q$mea0; preParams <- preProcess(q[,1:"+l+'], method=c("range"));q <- predict(preParams, q[,1:'+l+"]); q$mea0 <- target",c='m = abs(cor(subset(q,q$mea0 != 0),q$mea0[q$mea0 != 0], method = "pearson"))',f='f="";for(j in 2:'+l+") if(!is.na(m[j]) && m[j]>="+q+'){l=paste("q$mea",j-1,sep=""); f=paste(f,l,sep=" + ")} ;f=paste("q$mea0 ~ ",substring(f,3));str(f)',v="q$mea0 > 0",h="q = subset(q,q$mea0 == 0); q$mea0[q$mea0 == 0] <- NA;";r.displayDebugModeMessage(a.props.debugMode);var y=r.getDebugSaveDatasetScript(a.props.debugMode,"debug_regression_analysis_line_chart.rda"),b="R.ScriptEval('"+y+" "+d+"; if(sum(q$mea0)> 0 && min(q$mea0) == 0){"+c+"; "+f+"; lm_result <- lm(as.formula(f), q, "+v+");"+h+' predict(lm_result, q, interval="'+a.props.interval+'", level='+a.props.confidenceLevel+");} else{lm_result <- lm("+o+');predict(lm_result, interval="'+a.props.interval+'", level='+a.props.confidenceLevel+"); }[,1]',"+i+")",g="R.ScriptEval('"+d+"; if(sum(q$mea0)> 0 && min(q$mea0) == 0){"+c+"; "+f+"; lm_result <- lm(as.formula(f), q, "+v+");"+h+' predict(lm_result, q, interval="'+a.props.interval+'", level='+a.props.confidenceLevel+");} else{lm_result <- lm("+o+');predict(lm_result, interval="'+a.props.interval+'", level='+a.props.confidenceLevel+"); }[,2]',"+i+")",N="R.ScriptEval('"+d+"; if(sum(q$mea0)> 0 && min(q$mea0) == 0){"+c+"; "+f+"; lm_result <- lm(as.formula(f), q, "+v+");"+h+' predict(lm_result, q, interval="'+a.props.interval+'", level='+a.props.confidenceLevel+");} else{lm_result <- lm("+o+');predict(lm_result, interval="'+a.props.interval+'", level='+a.props.confidenceLevel+"); }[,3]',"+i+")";r.displayRScriptsToConsole(a.props.debugMode,[b,g,N]);var S=r.validateMeasure(a.props.measures[0]),$=[{qDef:{qDef:S}},{qDef:{qDef:b}},{qDef:{qDef:g}},{qDef:{qDef:N}},{qDef:{qLabel:"-",qDef:""}}];return s.backendApi.applyPatches([{qPath:"/qHyperCubeDef/qDimensions",qOp:"replace",qValue:JSON.stringify(p)},{qPath:"/qHyperCubeDef/qMeasures",qOp:"replace",qValue:JSON.stringify($)}],!1),s.patchApplied=!0,null},drawChart:function(e,a){var t=s.defer(),p=e.layout,l=[{qTop:0,qLeft:0,qWidth:6,qHeight:1500}];return e.backendApi.getData(l).then(function(s){var a=e.layout.qHyperCube.qMeasureInfo;if(isNaN(a[1].qMin)&&isNaN(a[1].qMax)&&isNaN(a[2].qMin)&&isNaN(a[2].qMax)&&isNaN(a[3].qMin)&&isNaN(a[3].qMax))r.displayConnectionError(e.extId);else{r.displayReturnedDatasetToConsole(p.props.debugMode,s[0]);var l=(r.getDefaultPaletteColor(),[]),i=[],o=[],n=[],m=[],u=[];$.each(s[0].qMatrix,function(e,r){l.push(r[0].qElemNumber),0==r[1].qNum&&i.push(r[0].qText),o.push(r[1].qNum),n.push(r[2].qNum),m.push(r[3].qNum),u.push(r[4].qNum)});for(var q='\n

Predicted:

\n \n \n \n \n \n \n \n ',d=0;d\n ";q+="\n \n
CodeRemaining Life
"+i[d]+""+Math.ceil(n[d])+"
\n\t\t ",$(".advanced-analytics-toolsets-"+e.extId).html(q)}return t.resolve()}),t.promise}}}); +//# sourceMappingURL=../../maps/analysis/regression_predict_table.js.map