How to use the vowpalwabbit.sklearn_vw.tovw function in vowpalwabbit

To help you get started, we’ve selected a few vowpalwabbit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nnnet / sdsj2018_AutoML_config / lib / model_other.py View on Github external
def save_to_vw(filepath: str, X: pd.DataFrame, y: pd.Series=None, chunk_size=1000):
    with open(filepath, "w+") as f:
        for pos in range(0, len(X), chunk_size):
            chunk_X = X.iloc[pos:pos + chunk_size, :]
            chunk_y = y.iloc[pos:pos + chunk_size] if y is not None else None
            for row in tovw(chunk_X, chunk_y):
                f.write(row + "\n")

vowpalwabbit

Vowpal Wabbit Python package

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

89 / 100
Full package analysis

Similar packages