Code Monkey home page Code Monkey logo

Comments (4)

fenxouxiaoquan avatar fenxouxiaoquan commented on June 6, 2024

i try once more,seems the problem is gone,i just change double format to float format in the input hashmap

from xgboost-predictor-java.

hlbkin avatar hlbkin commented on June 6, 2024

@fenxouxiaoquan
Hello, I've actually found the same with standard xgboost4j.

However, when I tryied this library, I got practically the same result as in python (I inserted float[] array)

In xgboost4j I was inserting DMatrix(float[] mydata) as well

How can this be possible?

from xgboost-predictor-java.

fenxouxiaoquan avatar fenxouxiaoquan commented on June 6, 2024

@hlbkin
Hello, I didn't get it in fact. Dou you mean that you get the same predict result when you test it in xgboost-predictor and python? I get different predict result again today( 9.189394587749626E-5 for xgboost-predictor and 0.605 for python),just like about three months ago what i experienced, this time my input still a hashmap with nonezero values,do you have any ider to deal with this?

from xgboost-predictor-java.

cpfarrell avatar cpfarrell commented on June 6, 2024

I would recommend to always be using features as floats. XGBoost is explicit that it treats things as 32 bit due to performance optimizations (one example dmlc/xgboost#1410). If a model has been trained using xgboost its split values will be stored as floats and so giving it doubles may cause inaccurate predictions if hit just the right values.

from xgboost-predictor-java.

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.