def parameter_importance(): import parameter_importance as pi # find datasets to fill in the selector selections = utils.select_init_data(request.args.get("id", "")) dataset = selections["current_dataset"] # get parameters for this dataset (cols, low_var_cols) = pi.get_params(dataset) # rank parameters (rank1, _, rank2, scores) = pi.rank(dataset) # correlation analysis (rank0, correlation_plots) = pi.correlation_analysis(dataset) # plot scatter_plot = pi.scatter_plot(dataset, request.args.get("varx", rank1[0]), request.args.get("vary", rank1[1])) scores_plot = pi.rlasso_scores_plot(rank2, scores) return render_template( "parameter_importance.html", cols=cols, low_var_cols=low_var_cols.tolist(), selections=selections, scatter_plot=scatter_plot, scores_plot=scores_plot, correlation_plots=correlation_plots, rank0=rank0[:9], rank1=rank1[:9], )
def initial_data(): import initial_data # find datasets to fill in the selector selections = utils.select_init_data(request.args.get("id", "")) # do plots (low_var_cols, var_percent, correlation_plot, pca_plot) = initial_data.produce_plots(selections["current_dataset"]) return render_template( "initial_data.html", selections=selections, correlation_plot=correlation_plot, low_var_cols=low_var_cols, var_percent=var_percent, pca_plot=pca_plot, )