def get_freqmap_card_ghsom(): return dbc.CardBody(children=[ html.Div( children=[ html.Div(id='grafo_ghsom_freq', children='', style=pu.get_css_style_center()), html.Div( id='div_freq_map_ghsom', children=None #,style={'margin': '0 auto','width': '100%', 'display': 'flex','align-items': 'center', 'justify-content': 'center','flex-wrap': 'wrap', 'flex-direction': 'column ' } ), ], style=pu.get_css_style_inline_flex()), html.Div(children=[ dbc.FormGroup([ dbc.RadioItems( options=[ { "label": "Linear Scale", "value": 0 }, { "label": "Logarithmic Scale", "value": 1 }, ], value=0, id="radioscale_freq_ghsom", inline=True, ), ], style=pu.get_css_style_center()) ]), html.Div(style=pu.get_css_style_inline_flex(), children=[ html.H6( dbc.Badge('Minimum hits to plot a neuron ', pill=True, color="light", className="mr-1")), html.H6( dbc.Badge('0', pill=True, color="warning", className="mr-1", id='badge_min_hits_slider_ghsom')), ]), dcc.Slider(id='min_hits_slider_ghsom', min=0, max=0, value=0, step=1), ])
def get_statistics_card_ghsom(): return dbc.CardBody(children=[ html.Div(id='grafo_ghsom_estadisticas', children='', style=pu.get_css_style_center()), html.Div(id='div_estadisticas_ghsom', children='', style=pu.get_css_style_center()) ], style=pu.get_css_style_inline_flex())
def get_componentplans_card_gsom(): #Card: Component plans return dbc.CardBody(children=[ html.H5("Select Features"), dcc.Dropdown( id='dropdown_atrib_names_gsom', options=session_data.get_data_features_names_dcc_dropdown_format(), multi=True), html.Div([ dbc.Checklist(options=[{ "label": "Select All", "value": 1 }], value=[], id="check_seleccionar_todos_mapas_gsom"), dbc.Checklist(options=[{ "label": "Label Neurons", "value": 1 }], value=[], id="check_annotations_comp_gsom"), dbc.FormGroup([ dbc.RadioItems( options=[ { "label": "Linear Scale", "value": 0 }, { "label": "Logarithmic Scale", "value": 1 }, ], value=0, id="radioscale_cplans_gsom", inline=True, ), ]), dbc.Button("Plot Selected Components Map", id="ver_mapas_componentes_button_gsom", className="mr-2", color="primary") ], style=pu.get_css_style_center()), html.Div(id='component_plans_figures_gsom_div', children=[''], style=pu.get_css_style_inline_flex()) ])
def analyze_gsom_data(): # Body body = html.Div(children=[ html.H4('Data Analysis', className="card-title"), html.H6('Train Parameters', className="card-title"), html.Div(id='info_table_gsom', children=info_trained_params_gsom_table(), style=pu.get_css_style_center()), html.Div(children=[ dbc.Tabs( id='tabs_gsom', active_tab='statistics', style=pu.get_css_style_inline_flex(), children=[ dbc.Tab(get_select_splitted_option_card(), label='Select Splitted Dataset Part', tab_id='splitted_part', disabled=(not session_data.data_splitted)), dbc.Tab(get_statistics_card_gsom(), label='Statistics', tab_id='statistics'), dbc.Tab(get_winnersmaps_card_gsom(), label='Winners Map', tab_id='winners_map'), #dbc.Tab( get_freqmap_card_gsom() ,label = 'Freq Map',tab_id='freq_map'), #dbc.Tab( get_componentplans_card_gsom() ,label = 'Component Plans',tab_id='component_plans'), dbc.Tab(get_freq_and_cplans_cards_gsom(), label=' Freq. Map + Component Plans', tab_id='freq_and_cplans_gsom'), dbc.Tab(get_umatrix_card_gsom(), label=' U Matrix', tab_id='umatrix'), dbc.Tab(get_savemodel_card_gsom(), label='Save Model', tab_id='save_model'), ]), ]) ]) ############################### LAYOUT ############################## layout = html.Div(children=[ elements.navigation_bar, body, ]) return layout
def get_freqmap_card_gsom(): return dbc.CardBody(children=[ html.Div(id='div_freq_map_gsom', children='', style=pu.get_single_heatmap_css_style()), dbc.FormGroup([ dbc.RadioItems( options=[ { "label": "Linear Scale", "value": 0 }, { "label": "Logarithmic Scale", "value": 1 }, ], value=0, id="radioscale_freq_gsom", inline=True, ), ], style=pu.get_css_style_center()), html.Div(style=pu.get_css_style_inline_flex(), children=[ html.H6( dbc.Badge('Minimum hits to plot a neuron ', pill=True, color="light", className="mr-1")), html.H6( dbc.Badge('0', pill=True, color="warning", className="mr-1", id='badge_min_hits_slider_gsom')), ]), dcc.Slider(id='min_hits_slider_gsom', min=0, max=0, value=0, step=1), html.Div([ dbc.Button("Plot", id="ver_freq_map_gsom_button", className="mr-2", color="primary") ], style=pu.get_css_style_center()) ])
def get_umatrix_card_ghsom(): return dbc.CardBody(children=[ html.Div( children=[ html.Div( id='grafo_ghsom_umatrix', children='', #style=pu.get_css_style_inline_flex() ), html.Div( id='umatrix_div_fig_ghsom', children='', #style= pu.get_single_heatmap_css_style() ), ], style=pu.get_css_style_inline_flex()), html.Div(dbc.Checklist(options=[{ "label": "Label Neurons", "value": 1 }], value=[], id="check_annotations_um_ghsom"), style=pu.get_css_style_center()), dbc.FormGroup([ dbc.RadioItems( options=[ { "label": "Linear Scale", "value": 0 }, { "label": "Logarithmic Scale", "value": 1 }, ], value=0, id="radioscale_umatrix_ghsom", inline=True, ), ], style=pu.get_css_style_center()), ])
[ dbc.Col(html.Img(src=PLOTLY_LOGO, height="30px")), #dbc.Col(html.Img(src= base64.b64encode(open(CONFIG_LOGO, 'rb').read()), height="30px")), dbc.Col(dbc.NavbarBrand(APP_NAME, className="ml-2")), ], align="center", no_gutters=True, ), href="/", ), dbc.Modal( [ dbc.ModalHeader("About"), dbc.ModalBody([ html.Div( style=pu.get_css_style_inline_flex(), children=[ html.H6( dbc.Badge( 'Developer', pill=True, color="light", className="mr-1", id='badge_info_percentage_train_slider')), html.H6( dbc.Badge( 'adriwitek', pill=True, color="info", className="mr-1", id='badge_info_percentage_test_slider'))
def Training_animation(): session_data.reset_progressbar_value() layout = html.Div(children=[ html.Div(id="hidden_div_for_redirect_callback"), elements.navigation_bar, dbc.Card( color='light', children=[ dbc.CardBody( dbc.ListGroup( [ # Modelos guardados en la app dbc.ListGroupItem([ html.H4('Training...', id='status_string', className="card-title", style=pu.get_css_style_center()), html.Div(children=dbc.Badge( "Elapsed Time:", id='badge_t_transcurrido', color="warning", className="mr-1"), style={'textAlign': 'center'}), html.P(id='timer_training', children="00 h 00 m 00 s", className="text-muted", style={ 'font-family': 'Courier New', 'font-size': '2vw', 'textAlign': 'center' }), html.Div(children=get_plot_qe_evolution(), style={'textAlign': 'center'}), dcc.Interval(id="progress_interval", n_intervals=0, interval=1000, disabled=False), dbc.Progress(id="progressbar", value=0, color="warning"), dbc.Collapse( id='collapse_multiple_trainings', is_open=False, children=[ html.Div( children=[ dbc.Label('Training model '), dbc.Badge( '0', id= 'badge_current_model_training', pill=True, color="light", className="mr-1"), dbc.Label('of '), dbc.Badge(session_data. get_n_of_models(), pill=True, color="info", className="mr-1"), ], style=pu.get_css_style_inline_flex( ), ), dbc.Progress( id="progressbar_total_trainings", value=0), ]), html.Br(), html.Div([ dbc.Button("Analyze Model(s)", id="analyze_model_button", href='', disabled=True, className="mr-2", color="primary") ], style={'textAlign': 'center'}), ]), ], flush=True, ), ) ]), ]) return layout
def get_winnersmap_card_ghsom(): return dbc.CardBody(children=[ dbc.Alert([ html.H4("Target not selected yet!", className="alert-heading"), html.P("Please select a target below to print winners map. ") ], color='danger', id='alert_target_not_selected_ghsom', is_open=True), dbc.Alert([ html.H4("Too many different categorial targets !", className="alert-heading"), html. P("Since there are more than 269(max. diferenciable discrete colors) unique targets, color representation will be ambiguous for some of them. " ) ], color='danger', id='output_alert_too_categorical_targets_ghsom', is_open=False), dcc.Dropdown( id='dropdown_target_selection_ghsom', options=session_data.get_targets_options_dcc_dropdown_format(), multi=False, value=session_data.get_target_name()), html.Br(), dbc.Collapse( id='collapse_winnersmap_ghsom', is_open=False, children=[ html.Div( children=[ html.Div(id='grafo_ghsom_winners', children='', style=pu.get_css_style_center()), html.Div( id='winners_map_ghsom', children='', #style= pu.get_single_heatmap_css_style() ), ], style=pu.get_css_style_inline_flex()), html.Div(dbc.Checklist(options=[{ "label": "Label Neurons", "value": 1 }], value=[], id="check_annotations_winmap_ghsom"), style=pu.get_css_style_center()), dbc.Collapse( id='collapse_logscale_winners_ghsom', is_open=session_data.is_preselected_target_numerical(), children=[ dbc.FormGroup([ dbc.RadioItems( options=[ { "label": "Linear Scale", "value": 0 }, { "label": "Logarithmic Scale", "value": 1 }, ], value=0, id="radioscale_winners_ghsom", inline=True, ), ], style=pu.get_css_style_center()), ]) ]) ])