[go: nahoru, domu]

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

Sign error in QuantileLossFunction #8087

Closed
ahyoussef opened this issue Dec 19, 2016 · 3 comments
Closed

Sign error in QuantileLossFunction #8087

ahyoussef opened this issue Dec 19, 2016 · 3 comments

Comments

@ahyoussef
Copy link

Description

The QuantileLossFunction in sklearn/ensemble/gradient_boosting.py has a sign error, making it take negative values for certain inputs.

@pprett @amueller

Steps/Code to Reproduce

Here is the code generating the wrong behavior

from sklearn.ensemble.gradient_boosting import QuantileLossFunction
import numpy as np

x = np.array([-1])
print(QuantileLossFunction(1, 0.5)(x, np.array([0])))

Expected Results

0.5

Actual Results

-0.5

Versions

Darwin-16.3.0-x86_64-i386-64bit
Python 3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]
NumPy 1.11.2
SciPy 0.18.1
Scikit-Learn 0.19.dev0

@agramfort
Copy link
Member

it was not merged because the PRs did not contain any test.
please finish the work and we'll be happy to merge.

@devanshdalal
Copy link
Contributor

this should be closed if works is done now.

@ahyoussef
Copy link
Author

All looks fine indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants