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

How to treat the missing values? #6

Closed
xdwangh opened this issue Sep 21, 2016 · 2 comments
Closed

How to treat the missing values? #6

xdwangh opened this issue Sep 21, 2016 · 2 comments
Labels

Comments

@xdwangh
Copy link

xdwangh commented Sep 21, 2016

I trained model by xgboost with missing value. I don't know how to treat missing value in this tools

@xdwangh
Copy link
Author

xdwangh commented Sep 21, 2016

I found that I can set missing value as zero in file "FVec.java". However, some feature values actually are zeros.

@komiya-atsushi
Copy link
Owner

@xdwangh

You can represent missing values using Float.NaN or Double.NaN.

double[] featureValues = {
        1.0,
        Float.NaN, // missing value
        0.0,
        // ...
};

FVec fv = FVec.Transformer.fromArray(featureValues, false /* = do not treats zero as missing value */);

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

No branches or pull requests

2 participants