Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ActurialCapital opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@ActurialCapital
Copy link

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"

@ActurialCapital ActurialCapital added bug Something isn't working invalid This doesn't seem right labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant