Skip to content

Bug: Simple pipeline with sklearn StandardScaler / LinearRegression does not work #533

@ActurialCapital

Description

@ActurialCapital

Describe the bug
Simple pipeline with sklearn StandardScaler / LinearRegression does not work

To Reproduce

>>> from neuraxle.pipeline import Pipeline
>>> from neuraxle.steps.sklearn import SKLearnWrapper
>>> from sklearn.preprocessing import StandardScaler
>>> from sklearn.linear_model import LinearRegression

>>> # Create your pipeline
>>> pipeline = Pipeline([
    SKLearnWrapper(StandardScaler()),  # Scale the features
    SKLearnWrapper(LinearRegression())  # Apply linear regression
])

>>> # Example data
>>> X = [[0, 1], [2, 3], [4, 5]]  # Features
>>> y = [0, 1, 2]  # Target variable

>>> # Fit the pipeline
>>> pipeline = pipeline.fit(X, y)
TypeError: LinearRegression.fit() missing 1 required positional argument: 'y'

Expected behavior
Preprocess and fit on train data

Additional context
neuraxle==0.8.1
scikit-learn = "^1.4.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem rightwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions