SynaptIX logoSynaptIX

Pipelines

v0.1.7

Automatic machine learning end-to-end: AutoPipeline detects the task, cleans the data, compares models, tunes the best one and evaluates it. Pipeline offers the same steps in declarative form.

AutoPipeline — ML in One Line

auto.py
import synaptix as sx

df = sx.load_dataset("penguins")

auto = sx.AutoPipeline(task="classification")
auto.fit(df, target="species")   # detect -> clean -> compare -> tune -> evaluate

print("Best model:", auto.best_model_)
print("Best params:", auto.best_params_)
print("Evaluation:", auto.evaluate())

# Predict on raw data — preprocessing is applied automatically
auto.predict(df.head(5))

If task is omitted, it is detected automatically from the target column type (classification for categoricals, regression for numerics).

Declarative Pipeline

Build the flow explicitly, step by step:

declarative.py
import synaptix as sx

df = sx.load_dataset("titanic")

pipe = (
    sx.Pipeline()
    .clean()                                  # missing values, dtypes
    .outliers(method="iqr")                   # optional outlier handling
    .model(sx.supervised.LogisticRegression())
    .tune({"C": [0.1, 1, 10]})               # GridSearch with CV
    .evaluate(cv=5)
)

pipe.fit(df, target="survived")
print(pipe.summary())

API Reference

AutoPipeline
AutoPipeline(task=None, models=None, cv=5)
Pipeline
Pipeline()
detect_task
detect_task(y) -> str
save / load
pipe.save(path) / Pipeline.load(path)