Skip to content
Snippets Groups Projects
Select Git revision
  • 56f9810a28736676a480bdcac3756ab7ea3e0c5c
  • main default
  • logRegressionVisuals
  • Dashboard
  • explainerAnnotation
  • DT-Class-Design
  • WIP-4-ModelCreation-class
  • Data_Ingestion_Class_Creation
  • 3-dummy-issue
  • 5-feature
10 results

config.py

Blame
  • user avatar
    Abdullah Shah authored
    56f9810a
    History
    config.py 3.61 KiB
    """
    This is a docstring for config.
    """
    from bokeh.models import Select, Slider, Row, Column, Dropdown, Paragraph
    from bokeh.layouts import column, row
    
    
    
    X_train = 0
    X_test = 0
    y_train = 0
    y_test = 0
    
    spectral = 0
    source = 0
    
    datasets_names = [
        "Make Classification",
        "Multilabel Classification",
        "Blobs",
        "Noisy Moons", 
        "Noisy Circles"
    ]
    
    model_names = [
        "Logistic Regression",
        "Decision Tree"
    ]
    
    regularization_names = [
        "none",
        "l2",
        "l1",
        "elasticnet" #both l1 and l2 combined
    ]
    
    regularization_names_liblinear = [
        "l2",
        "l1"
    ]
    
    solver_names = [
        "newton-cg", #dependent on l2 or none regularization
        "lbfgs", #dependent on l1 or none regularization
        "liblinear", #dependent on l1 or l2 regularization
        "sag", #dependent on l2 or none regularization
        "saga" #dependent on elasticnet, l1, l2, or none regularization
    ]
    
    #synthetic data sliders and dropdowns
    dataset_select = Select(value='Make Classification',
                            title='Select Dataset',
                            width=200,
                            options=datasets_names)
    
    samples_slider = Slider(title="Number of samples",
                            value=1500.0,
                            start=200.0,
                            end=3000.0,
                            step=100,
                            width=400)
    
    classes_slider = Slider(title="Number of Classes",
                            value = 3,
                            start=2,
                            end=20,
                            step=1,
                            width=400)
    
    features_slider = Slider(title="Number of Features",
                             value = 3,
                             start=2,
                             end=1000,
                             step=1,
                             width=400)
    
    inf_slider = Slider(title='Informative Classes',
                        value=3,
                        start=2,
                        end=100,
                        step=1,
                        width=400)
    
    data_split_slider = Slider(title="Validation Size",
                               value=.2,
                               start=0.1,
                               end=.8,
                               step=.1,
                               width=400)
    
    # modelling sliders and dropdowns
    models_select = Select(value='Logistic Regression',
                           title='Select Model',
                           width=200,
                           options=model_names)
    
    normalization_select = Select(value='none',
                                  title='Select Regularization',
                                  width=200,
                                  options=regularization_names)
    
    normalization_select_liblinear = Select(value='none',
                                  title='Select Regularization',
                                  width=200,
                                  options=regularization_names_liblinear)
    
    solver_select = Select(value = "newton-cg",
                           title='Select Solver',
                           width=200,
                           options=solver_names)
    
    index_slider = Slider(title="Data Record",
                          value=9.0,
                          start=0,
                          end=3000.0,
                          step=1,
                          width=200)
    
    myMessage = 'You have entered nothing yet: (none)'
    text_output = Paragraph(text=myMessage, width=200, height=100)
    
    selects = Row(dataset_select, width=420)
    inputs = Column(selects, 
                    samples_slider, 
                    classes_slider, 
                    inf_slider, 
                    features_slider, 
                    data_split_slider, models_select, solver_select, normalization_select, normalization_select_liblinear, index_slider)