-
Notifications
You must be signed in to change notification settings - Fork 6
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
Gamma regression does not work with example in docs #32
Comments
Hi Thomas, Scikit-Learn's Gamma Regression "HalfGammaLoss" loss function requires data to be greater than 0. there are some gridpoints with precipitation = 0 in the sample data, so It shouldn't work. Some options might be: 1/ implement a wrapper for the 2D gamma regressor implementation which drops 0-valued samples , then use XCast to extend it You may want to do option 1 anyway, because it looks like gamma regressor needs a different shape input vector than normal. Happy to help if you'd like. |
Option 2 does work, agree that 1 is a better path. I will work on it for a bit, and reach out if I get stuck. Thanks! |
X, Y, T = xc.load_sample_data() # load test data
gamma = xc.rGammaRegression()
gamma.fit(X, Y)
pred = gamma.predict(X)
ValueError: Some value(s) of y are out of the valid range of the loss 'HalfGammaLoss'.
The text was updated successfully, but these errors were encountered: