def plotErrorVsSize()

in analysis/analyze.py [0:0]


def plotErrorVsSize(dat, x='sketch_bytes', unit='qid'):
    unit = makeListLike(unit)
    raw_aggdat = rawAggregateExperimentResults(dat, by=[x, 'sketch_name'] + unit)
    print(raw_aggdat.shape)
    chart = alt.Chart(raw_aggdat).mark_point(size=10, opacity=0.3).encode(
        x=f"{x}:Q", 
        y=alt.Y('rmse:Q', title="rmse"), 
        color=alt.Color('sketch_name'),
    )
    chart = chart + chart.transform_loess(f'{x}', f'rmse', groupby=['sketch_name']).mark_line(size=4)
    return chart, raw_aggdat