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
Posteriors from binary:logistic #25
Comments
This is strange, the option is sufficient for getting the posterior probability. Maybe you can post a minimal script that reproduce the error. |
Hey This is the Higgs script that you posted previously, slightly modified: # setup parameters for xgboost
param = {}
# use logistic regression loss, use raw prediction before logistic transformation
# since we only need the rank
param['objective'] = 'binary:logistic'
# scale weight of positive examples
param['scale_pos_weight'] = sum_wneg/sum_wpos
param['bst:eta'] = 0.1
param['bst:max_depth'] = 6
param['bst:subsample'] = 0.4
param['eval_metric'] = 'auc'
param['silent'] = 1
param['nthread'] = 16
param['booster_type'] = 0 #0 = trees, 1=linear Thanks for the quick reply. j |
This is because the xgboost does not remember objective in model in past version, and when you load it with empty parameter, it does not remember the option. I have made a fix to the problem, check out the most recent version and see if it fixes your problem. |
You mean I have to reload param when I predict? I will check the fix and let you know - appreciate the help. j |
In the old version, when you load the model, you create a Booster with param that contains the same objective. The newest version should solve the problem |
I downloaded the new version, hit make (needed to remove -fopenmp flag), but libxboostpy.so was not generated so I got a traceback when xgboost was imported. I kept the old version in xgboost_archive directory. Any suggestions? j |
If this is a compilation issue, pls report the compiler message. you need On Friday, August 15, 2014, HoD3521 notifications@github.com wrote:
Sincerely,Tianqi Chen |
$ /usr/bin/python -u higgs-numpy.py |
Let me try making in python folder and get back to you. |
making in the python folder worked - thanks. |
And the posteriors look correct. Really appreciate the help. j |
I am glad it works out for you. Thank you for using xgboost |
e81a11d Merge pull request #25 from daiyl0320/master 35c3b37 add retry mechanism to ConnectTracker and modify Listen backlog to 128 in rabit_traker.py c71ed6f try deply doxygen 62e5647 try deply doxygen 732f1c6 try 2fa6e02 ok 0537665 minor 7b59dcb minor 5934950 new doc f538187 ok 44b6049 new doc 387339b add more 9d4397a chg 2879a48 chg 30e3110 ok 9ff0301 add link translation 6b629c2 k 32e1955 ok 8f4839d fix 93137b2 ok 7eeeb79 reload recommonmark a8f00cc minor 19b0f01 ok dd01184 minor c1cdc19 minor fcf0f43 try rst cbc21ae try 62ddfa7 tiny aefc05c final change 2aee9b4 minor fe4e7c2 ok 8001983 change to subtitle 5ca33e4 ok 88f7d24 update guide 29d43ab add code fe8bb3b minor hack for readthedocs 229c71d Merge branch 'master' of ssh://github.com/dmlc/rabit 7424218 ok d1d45bb Update README.md 1e8813f Update README.md 1ccc990 Update README.md 0323e06 remove readme 679a835 remove theme 7ea5b7c remove numpydoc to napoleon b73e2be Merge branch 'master' of ssh://github.com/dmlc/rabit 1742283 ok 1838e25 Update python-requirements.txt bc4e957 ok fba6fc2 ok 0251101 ok d50b905 ok d4f2509 ok cdf401a ok fef0ef2 new doc cef360d ok c125d2a ok 270a49e add requirments 744f901 get the basic doc 1cb5cad Merge branch 'master' of ssh://github.com/dmlc/rabit 8cc07ba minor d74f126 Update .travis.yml 52b3dcd Update .travis.yml 099581b Update .travis.yml 1258046 Update .travis.yml 7addac9 Update Makefile 0ea7adf Update .travis.yml f858856 Update travis_script.sh d8eac4a Update README.md 3cc49ad lint and travis ceedf4e fix fd8920c fix win32 8bbed35 modify 9520b90 Merge pull request #14 from dmlc/hjk41 df14bb1 fix type f441dc7 replace tab with blankspace 2467942 remove unnecessary include 181ef47 defined long long and ulonglong 1582180 use int32_t to define int and int64_t to define long. in VC long is 32bit e0b7da0 fix git-subtree-dir: subtree/rabit git-subtree-split: e81a11d
When I use param['objective'] = 'binary:logistic' the range of output values is not in [0,1] as mentioned in the wiki.
Is there something else I must do to get the posterior probability?
thanks
j
The text was updated successfully, but these errors were encountered: