Пример #1
0
def test_cars():
    X, y = cars.load()

    run_automl_test(
        dataset=(X, y),
        input=(MatrixContinuousDense, Supervised[VectorCategorical]),
        output=VectorCategorical,
        search_timeout=60,
        evaluation_timeout=5,
        expected_fitness=0.9,
    )
Пример #2
0
# import high-level API
from autogoal.ml import AutoML
from autogoal.kb import MatrixContinuousDense, CategoricalVector

# load data
from autogoal.datasets import cars
X, y = cars.load()

# instantiate AutoML class
automl = AutoML(
    input=MatrixContinuousDense(),
    output=CategoricalVector(),
    # ... other parameters and constraints
)

# fit the model
automl.fit(X, y)

# save the best model
with open("model.bin", "wb") as fp:
    automl.save(fp)