Exemplo n.º 1
0
def Optimization():
    scan_object = ta.Scan(x=x_train,
                          y=y_train,
                          params=parameters,
                          model=pet_finder_model,
                          val_split=0,
                          experiment_name='pet_finder')
    # Evaluate
    analyze_object = ta.Analyze(scan_object)
    scan_data = analyze_object.data

    # heatmap correlation
    analyze_object.plot_corr('val_accuracy', ['accuracy', 'loss', 'val_loss'])

    # a four dimensional bar grid
    ast.bargrid(scan_data,
                x='lr',
                y='val_accuracy',
                hue='num_Nodes',
                row='loss_function',
                col='dropout')
    list_of_parameters = analyze_object.table('val_loss',
                                              ['accuracy', 'loss', 'val_loss'],
                                              'val_accuracy')
    return list_of_parameters
Exemplo n.º 2
0
def test_simple_minimal(df):

    ast.corr(df)
    ast.kde(data=df, x='A')
    ast.hist(df, x='A')
    ast.pie(df, x='other')
    ast.swarm(df, x='A', y='B', hue='even')
    ast.scat(df, x='A', y='B', hue='even')
    ast.line(df, x='A')
    ast.grid(df, x='A', y='B', col='even')
    ast.box(df, x='odd', y='A', hue='even')
    ast.violin(df, x='odd', y='A', hue='even')
    ast.strip(df, x='odd', y='B', hue='even')
    ast.count(df, x='cats')
    ast.bargrid(df, x='even', y='B', hue='other', col='odd')
    ast.overlap(df, x='A', y='B', label_col='other')
    ast.multikde(df, x='A', label_col='even')
    ast.compare(df, x='A', y=['B', 'C'], label_col='other')
    ast.multicount(df, x='even', hue='odd', col='other')
Exemplo n.º 3
0
def bars_full(df):

    ast.bargrid(data=df,
                x='cats',
                y='B',
                hue='odd',
                row='even',
                col='other',
                style='astetik',
                dpi=72,
                title='This is a title',
                sub_title='And this a subtitle',
                x_label='this is x label',
                y_label='and this y',
                legend=False,
                x_scale='log',
                y_scale='symlog',
                x_limit=[10, 20],
                y_limit=[1, 21])
Exemplo n.º 4
0
    def plot_bars(self, x, y, hue, col):

        '''A comparison plot with 4 axis'''

        return bargrid(self.data,
                       x=x,
                       y=y,
                       hue=hue,
                       col=col,
                       col_wrap=4)
Exemplo n.º 5
0
    def plot_bars(self, x, y, hue, col):
        '''A comparison plot with 4 axis'''

        try:
            import astetik as ast
            return ast.bargrid(self.data,
                               x=x,
                               y=y,
                               hue=hue,
                               col=col,
                               col_wrap=4)
        except RuntimeError:
            print('Matplotlib Runtime Error. Plots will not work.')
                      y=y_train,
                      params=parameters,
                      model=pet_finder_model,
                      val_split=0,
                      experiment_name='pet_finder')
# Evaluate
analyze_object = ta.Analyze(scan_object)
scan_data = analyze_object.data

# heatmap correlation
analyze_object.plot_corr('val_accuracy', ['accuracy', 'loss', 'val_loss'])

# a four dimensional bar grid
ast.bargrid(scan_data,
            x='lr',
            y='val_accuracy',
            hue='num_Nodes',
            row='loss_function',
            col='dropout')
ast.bargrid(scan_data,
            x='lr',
            y='val_accuracy',
            hue='num_Nodes',
            row='final_activation',
            col='dropout')

# wrapper = KerasClassifier(build_fn=create_network, epochs=epochs)
# scorer = make_scorer(f1_score, average= 'weighted')
# grid = GridSearchCV(estimator=wrapper,param_grid=parameters,scoring=scorer,iid=False,cv=5,return_train_score=True,verbose=1)
# grid_result = grid.fit(x_train,labels_train)

best_parameters = analyze_object.table('val_loss',