Code Monkey home page Code Monkey logo

Comments (12)

tqchen avatar tqchen commented on May 3, 2024

This is strange, the option is sufficient for getting the posterior probability. Maybe you can post a minimal script that reproduce the error.

from xgboost.

HoD3521 avatar HoD3521 commented on May 3, 2024

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

from xgboost.

tqchen avatar tqchen commented on May 3, 2024

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.

from xgboost.

HoD3521 avatar HoD3521 commented on May 3, 2024

You mean I have to reload param when I predict?

I will check the fix and let you know - appreciate the help.

j

from xgboost.

tqchen avatar tqchen commented on May 3, 2024

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

from xgboost.

HoD3521 avatar HoD3521 commented on May 3, 2024

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

from xgboost.

tqchen avatar tqchen commented on May 3, 2024

If this is a compilation issue, pls report the compiler message. you need
to make in python folder

On Friday, August 15, 2014, HoD3521 [email protected] wrote:

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


Reply to this email directly or view it on GitHub
https://github.com/tqchen/xgboost/issues/25#issuecomment-52375332.

Sincerely,

Tianqi Chen
Computer Science & Engineering, University of Washington

from xgboost.

HoD3521 avatar HoD3521 commented on May 3, 2024

$ /usr/bin/python -u higgs-numpy.py
../../python
../../python/libxgboostpy.so
Traceback (most recent call last):
File "higgs-numpy.py", line 15, in
import xgboost as xgb
File "../../python/xgboost.py", line 20, in
xglib = ctypes.cdll.LoadLibrary(XGBOOST_PATH)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py", line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(../../python/libxgboostpy.so, 6): image not found

from xgboost.

HoD3521 avatar HoD3521 commented on May 3, 2024

Let me try making in python folder and get back to you.

from xgboost.

HoD3521 avatar HoD3521 commented on May 3, 2024

making in the python folder worked - thanks.

from xgboost.

HoD3521 avatar HoD3521 commented on May 3, 2024

And the posteriors look correct. Really appreciate the help.

j

from xgboost.

tqchen avatar tqchen commented on May 3, 2024

I am glad it works out for you. Thank you for using xgboost

from xgboost.

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.