def get_variables_response_layout(): variable_response_p = \ dbc.FormGroup( [ dbc.Label("P value for variable response relation", html_for="var-per-page"), dbc.Input(id="p-var-res-relation", min=0.0, max=0.1, step=.00001, value=0.05), ], style={'margin-left': '5%'} ) use_correction = \ dbc.FormGroup( [ dbc.Label("Use p correction", html_for="var-per-page"), dcc.Dropdown(id="use-correction", options=[ {'label': 'Yes', 'value': 'True'}, {'label': 'No', 'value': 'False'}, ], value='True'), ], style={'margin-left': '5%'} ) cl = dbc.Col([use_correction, variable_response_p, dsc.spinner_button('Show variables/response relationship', 'variables-response-spinner', id='variables-response-button', n_clicks=0, color="primary", style={'margin': '5% 5% 10%'}) ], width=3) cr = dbc.Col([html.Div(children=[], id='variables-response-results-container')], width=9) return dbc.Row(children=[cl, cr])
def get_all_data_model(): cl = dbc.Col([dsc.spinner_button('Show model', 'all-data-model-spinner', id='all-data-model-button', n_clicks=0, color="primary", style={'margin': '5% 5% 10%'}) ], width=1) cr = dbc.Col([html.Div(children=[], id='all-data-model-container')], width=11) return dbc.Row(children=[cl, cr])
def get_variables_distribution_layout(): number_of_graphs = \ dbc.FormGroup( [ dbc.Label("Max number of variables per page", html_for="var-per-page"), dbc.Input(id="n-var-per-page", min=3, max=15, step=1, value=5), ], style={'margin-left': '5%'} ) cl = dbc.Col([number_of_graphs, dsc.spinner_button('Show variables distribution', 'variables-distribution-spinner', id='variables-distribution-button', n_clicks=0, color="primary", style={'margin': '5% 5% 10%'}) ], width=3) cr = dbc.Col([html.Div(children=[], id='variables-distributions-results-container')], width=9) return dbc.Row(children=[cl, cr])
def get_variables_relationship_layout(): setting_threshold = dbc.FormGroup( [ dbc.Label("Variables network threshold", html_for="network-threshold"), dbc.Input(id="network-threshold-input", min=0.01, max=1.0, step=.01, value=0.83), ], style={'margin-left': '5%'} ) setting_correlated = dbc.FormGroup( [ dbc.Label("Correlated threshold", html_for="correlated-threshold"), dbc.Input(id="correlated-threshold-text", min=0.01, max=1.0, step=.01, value=0.9), ], style={'margin-left': '5%'} ) nodes_size = dbc.FormGroup( [ dbc.Label("Nodes size", html_for="nodes-size"), dbc.Input(id="nodes-sizes-text", min=100, max=5000, step=10, value=3000), ], style={'margin-left': '5%'} ) setting_p_val = dbc.FormGroup( [ dbc.Label("P-value for correlations", html_for="p-val-threshold"), dbc.Input(id="network-pval-input", min=0.001, max=0.1, step=.001, value=0.05), ], style={'margin-left': '5%'} ) cl = dbc.Col([setting_p_val, setting_threshold, setting_correlated, nodes_size, dsc.spinner_button('Show variables network', 'variables-network-spinner', id='variables-network-button', n_clicks=0, color="primary", style={'margin': '5% 5% 10%'}) ], width=3) cr = dbc.Col([html.Div(children=[], id='variables-network-results-container')], width=9) return dbc.Row(children=[cl, cr])
def get_variables_importance(): # against_shuffle = {'scaler': None, 'train_perc': 0.9, 'runs': 200, # 'selection_type': 'keep_order', 'importance_stability_threshold': 0.9, # 'bootstrap_ci': 0.95, 'model': None, 'layout': 'spring', 'nodes_size': 4000} c1 = dsc.NamedInput('Number of runs', id='number-runs-insights', min=1, max=1000000, step=1, value=200, style={'margin': '5%'}) c3 = dsc.NamedInput('Bagging %', id='bagging-perc-insights', min=.01, max=1.0, step=.01, value=.5, style={'margin': '5%'}) models = available_settings.available_models.keys() options_list = [{'value': r, 'label': r} for r in models] c4 = dsc.NamedDropdown("Model", id='select-model-insights', options=options_list, style={'width': '100%', 'margin': '5%'}) scalers = available_settings.available_models_preprocessing.keys() options_list = [{'value': r, 'label': r} for r in scalers] c5 = dsc.NamedDropdown("Scaler", id='select-scaler-insights', style={'width': '100%', 'margin': '5%'}, options=options_list) selections = available_settings.available_random_selections options_list = [{'value': r, 'label': r} for r in selections] c6 = dsc.NamedDropdown("Random slection", id='select-random-insights', style={'width': '100%', 'margin': '5%'}, options=options_list) c7 = dsc.NamedInput('Train %', id='train-perc-insights', min=0.1, max=1.0, step=.01, value=0.9, style={'margin': '5%'}) div = html.Div(children=[c1, c3, c4, c5, c6, c7], style={'margin': '1%'}) cl = dbc.Col([div, dsc.spinner_button('Run insight', 'insights-spinner', id='insights-button', n_clicks=0, color="primary", style={'margin': '5% 5% 10%'}), # dbc.Button('Run comparison', id='compare-against-shuffle-button', # n_clicks=0, color="primary", style={'margin': '5% 5% 10%'}) ], width=3) cr = dbc.Col([html.Div(children=[], id='insights-container')], width=9) return dbc.Row(children=[cl, cr])
def row_1(): c1 = dbc.Col([ dcc.Upload(id="upload-data", children=html.Div( ["Drag and drop or click to select a file."]), multiple=False, style={ "width": "90%", "height": "60px", "lineHeight": "60px", "borderWidth": "1px", "borderStyle": "dashed", "borderRadius": "2px", "textAlign": "center", "margin": "5%" }), html.Div(id='output-data-upload', style={"margin": "5%"}) ], width=4) c2 = dbc.Col([ dsc.spinner_button('Load data', 'load-data-spinner', id='load-data-button', n_clicks=0, color="primary", block=True, size='lg'), ], width={ "size": 2, "offset": 5 }) r = dbc.Row(children=[c1, c2], align='center', style={'margin-top': '2%'}) return r