예제 #1
0
def test_timeseries(fm):
    fm_with_time = fm.reset_index()
    fm_with_time['time'] = pd.to_datetime(fm_with_time['time'])
    col_1 = fm_with_time['time']
    col_2 = fm_with_time['label']
    hplot.show(hplot.timeseries(col_1, col_2))
    hplot.show(hplot.timeseries(col_1, col_2), static=True)
예제 #2
0
def test_gridplot(fm):
    p1 = hplot.show(hplot.histogram(fm['flights.distance_group']),
                    fig=True,
                    static=True)
    p2 = hplot.show(hplot.histogram(fm['flights.distance_group'], n_bins=15),
                    fig=True,
                    static=True)
    hplot.gridplot([p1, p2], n_cols=2)
    hplot.gridplot([[p1], [p2]])
예제 #3
0
def test_modify_plot(fm):
    hplot.show(hplot.histogram(fm['flights.distance_group']),
               width=300,
               height=300,
               title='Distance Histogram',
               x_axis='axis x',
               y_axis='axis y',
               x_range=(0, 1000),
               y_range=(0, 1000))
예제 #4
0
def test_color(fm):
    colors = ['white', '#000000', 'green']
    hplot.show(hplot.histogram(fm['flights.distance_group']), colors=colors)
    hplot.show(hplot.piechart(fm['flights.dest']), colors=colors)
    hplot.show(hplot.scatter(fm['distance'], fm['distance']), colors=colors)

    fm_with_time = fm.reset_index()
    fm_with_time['time'] = pd.to_datetime(fm_with_time['time'])
    col_1 = fm_with_time['time']
    col_2 = fm_with_time['label']
    hplot.show(hplot.timeseries(col_1, col_2), colors=colors)
예제 #5
0
def test_dend_plot(fit_dend):
    show(dendrogram(fit_dend), static=True)
    show(dendrogram(fit_dend))
예제 #6
0
def test_f1(Xy):
    X, y = Xy
    hplot.show(hplot.f1(X, y, RandomForestClassifier()))
예제 #7
0
def test_roc_auc(Xy):
    X, y = Xy
    hplot.show(hplot.roc_auc(X, y, RandomForestClassifier(), n_splits=3))
예제 #8
0
def test_scatter(fm):
    col_1 = fm['scheduled_elapsed_time']
    col_2 = fm['distance']
    agg = fm['flights.carrier']
    hplot.show(hplot.scatter(col_1, col_2, agg))
    hplot.show(hplot.scatter(col_1, col_2, agg), static=True)
예제 #9
0
def test_histogram(fm):
    hplot.show(hplot.histogram(fm['flights.distance_group']))
    hplot.show(hplot.histogram(fm['flights.distance_group']), static=True)
예제 #10
0
def test_piechart(fm):
    hplot.show(hplot.piechart(fm['flights.carrier']))
    hplot.show(hplot.piechart(fm['flights.carrier']), static=True)