Giter Club home page Giter Club logo

Comments (5)

xuyxu avatar xuyxu commented on June 16, 2024

Hi @Alaya-in-Matrix, what is the version of numpy installed.

from deep-forest.

Alaya-in-Matrix avatar Alaya-in-Matrix commented on June 16, 2024

@xuyxu It's numpy 1.19.5

deep-forest==0.1.5
joblib==1.1.0
numpy==1.19.5
scikit-learn==1.0.2
scipy==1.7.3
threadpoolctl==3.0.0

from deep-forest.

xuyxu avatar xuyxu commented on June 16, 2024

The regression demo works fine with your package environment:

from sklearn.datasets import load_boston
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error

from deepforest import CascadeForestRegressor

X, y = load_boston(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=1)
model = CascadeForestRegressor(random_state=1)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
mse = mean_squared_error(y_test, y_pred)
print("\nTesting MSE: {:.3f}".format(mse))

In addition, the CascadeForestRegressor also works fine if using xs = np.random.randn(10,1) in your code snippet. The exception possibly is caused by using a toy dataset with too few number of samples.

from deep-forest.

Alaya-in-Matrix avatar Alaya-in-Matrix commented on June 16, 2024

@xuyxu That's exactly what I'm reporting, why would DF work for xs = np.random.randn(10,1) but not work for randn(5,1)? that makes no sense

from deep-forest.

xuyxu avatar xuyxu commented on June 16, 2024

Closed via #14

from deep-forest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.