Code Monkey home page Code Monkey logo

xgboost.net's People

Contributors

ajanth85 avatar andreidegtiarev avatar coffeebenzene avatar cycloidistic avatar gatapia avatar kasuyasansan avatar mdabros avatar picnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xgboost.net's Issues

Unable to train model with train data provided

Given that I'm unable to compile the XGBoostTest solution in Visual Studio 2022, I've written a notebook to follow the steps towards training and saving a model from scratch.

After loading the data from train.csv I've called the Fit method and I constantly get the following error Error: XGBoost.lib.DllFailException: value 0 for Parameter num_output_group should be greater equal to 1. I've tried to use the SetParameter method available and also modified the default parameters and passed them to the Fit method, both without success.

These attempts were done using version 0.2.1 of the NuGet package since using the latest version would raise the following error Error: error CS0009: Metadata file ..\.nuget\packages\picnet.xgboost\0.2.2\lib\libxgboost.dll' could not be opened -- PE image doesn't contain managed metadata. (1,7): error CS0246: The type or namespace name 'XGBoost' could not be found (are you missing a using directive or an assembly reference?).

Any help would be appreciated.

Multiclass

We cannot build multiclass models with the current version.

Is this still active?

Hi @gatapia and @PicNet

Is this repository still active? I routinely get requests about features and/or new versions of xgboost.net via my SharpLearning wrapper for this library. So there still seems to be a need for it :).

XGBClassifier.DumpModelEx throws EntryPointNotFoundException

XGBClassifier.DumpModelEx throws EntryPointNotFoundException because entry point XGBoosterDumpModelEx is not found in libxgboost.dll. I inspected the DLL in question and I believe that the entry point was perhaps meant to be XGBoosterDumpModel.

Issue with nuget package

Hi @gatapia ,

I am having an issue with the nuget package when used as a dependency for another package. It seems that nuget tries to add the native dll as a reference for the targeted project:

image

To avoid nuget trying to do this, you can add the following to your .nuspec file:

<references>
   <reference file="XGBoost.dll" />
</references>

This will tell nuget that the XBoost.dll is the only dll to reference during install.
I tried this locally by modifying the PicNet.XGBoost.Net package, and it solves the issue.

Could you release a new version of the nuget package with this added to the .nuspec file? It would help me a lot since currently my own package doesn't work because of this issue.

best regards
Mads

Bad Image Format?

Any clue as to what is happening?

I have a form project which accesses Xgboost but when I try to load Xgboost to create XGBRegressor, I get this.

I'm using 4.7.1 .NET for the form project and therefore had to upgrade the Xgboost project to 4.7.1. I'm not using the Nuget version. I added the Xgboost project as another project in my solution and updated it to 4.7.1 .net.

Inner Exception 1:
BadImageFormatException: Could not load file or assembly 'XGBoost, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Unable to load DLL 'lib/libxgboost.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

NuGet package failing with the following exception:

System.DllNotFoundException: Unable to load DLL 'lib/libxgboost.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at XGBoost.XGBOOST_NATIVE_METHODS.XGDMatrixCreateFromMat(Single[] data, UInt64 nrow, UInt64 ncol, Single missing, IntPtr& handle)
at XGBoost.DMatrix..ctor(Single[][] data, Single[] labels)
at XGBoost.XGBClassifier.Fit(Single[][] data, Single[] labels)
at TestXGBoost.UnitTest1.TestMethod1() in c:\dev\projects\test_xgb\TestXGBoost\TestXGBoost\UnitTest1.cs:line 18

This is in a 64 bit MSTest project.

Add sample weights to DMatrix

Hi @gatapia,

I was trying to add support for sample weights in the XGBoost project in SharpLearning, related to this issue: mdabros/SharpLearning#82

However, it seems that the current DMatrix implementation in XGBoost.Net does not support setting the sample weights. This can be done via the python wrapper for instance, see this example: https://github.com/dmlc/xgboost/blob/master/demo/kaggle-higgs/higgs-numpy.py#L28

Would it be possible to add sample weight support to the DMatrix in XGBoost.Net?

Best regards
Mads

Inconsistent learning results with python's xgboost

I have moved the code written in python xgboost to c # xgboost.net
I did the same with the same data, but the results were different.
I have this problem because of the float-type decimal length problem,
It is expected that the data entered in python is different from the data entered in decimal length, resulting in different results.
Is there any possibility that I expected to happen?
I am trying to test this by changing float type to double type to solve this problem.

This article is written in Google Translator and may be difficult to read.
summary : I put the same data as python's xgboost, but got different results.
Thank you.

Handle error

Hi,
I get error for this line:
public IntPtr Handle => handle;

Any solution?

Failed to train if decimal separator in regional settings is ',' (comma)

XGBGetLastError returns:

Invalid Parameter format for base_score expect float but value='0,5'

Possible solution is to use System.Globalization.NumberFormatInfo to specify dot as decimal separator:

    public void SetParameters(IDictionary<string, Object> parameters)
    {
      var nfi = new NumberFormatInfo { NumberDecimalSeparator = "." };

      SetParameter("max_depth", ((int)parameters["max_depth"]).ToString());
      SetParameter("learning_rate", ((float)parameters["learning_rate"]).ToString(nfi));
        ....
    }

Save models

Save models so they don't have to be trained every time

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.