Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/titsuki/raku-algorithm-xgboost
Algorithm::XGBoost - A Raku bindings for XGBoost ( https://github.com/dmlc/xgboost ).
https://github.com/titsuki/raku-algorithm-xgboost
perl6 raku rakulang xgboost
Last synced: 11 days ago
JSON representation
Algorithm::XGBoost - A Raku bindings for XGBoost ( https://github.com/dmlc/xgboost ).
- Host: GitHub
- URL: https://github.com/titsuki/raku-algorithm-xgboost
- Owner: titsuki
- License: artistic-2.0
- Created: 2021-08-05T18:06:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-27T02:42:26.000Z (over 1 year ago)
- Last Synced: 2024-11-05T18:56:45.597Z (about 2 months ago)
- Topics: perl6, raku, rakulang, xgboost
- Language: Raku
- Homepage:
- Size: 83 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Actions Status](https://github.com/titsuki/raku-Algorithm-XGBoost/workflows/test/badge.svg)](https://github.com/titsuki/raku-Algorithm-XGBoost/actions)
NAME
====Algorithm::XGBoost - A Raku bindings for XGBoost ( https://github.com/dmlc/xgboost ).
SYNOPSIS
========```raku
use Algorithm::XGBoost;
use Algorithm::XGBoost::Booster;
use Algorithm::XGBoost::DMatrix;
use Algorithm::XGBoost::Model;# agaricus.txt.test is here: https://github.com/dmlc/xgboost/tree/master/demo/data
my $dmat = Algorithm::XGBoost::DMatrix.from-file("agaricus.txt.train");
say $dmat.num-row; # 6513
say $dmat.num-col; # 127
my $model = Algorithm::XGBoost.train($dmat, 10);
$model.num-feature.say; # 127my @test = [[0e0,0e0],[0e0,1e0]];
my $test = Algorithm::XGBoost::DMatrix.from-matrix(@test);
say $model.predict($test); # (0.9858561754226685 0.9858561754226685)
```DESCRIPTION
===========Algorithm::XGBoost is a Raku bindings for XGBoost ( https://github.com/dmlc/xgboost ).
METHODS
-------### train
Defined as:
method train(Algorithm::XGBoost::DMatrix $dmat, Int $num-iteration, %param --> Algorithm::XGBoost::Model)
Trains a XGBoost model.
* `$dmat` The instance of Algorithm::XGBoost::DMatrix.
* `$num-iteration` The number of iterations for training.
* `%param` The parameter for training.
### version
Defined as:
method version(--> Version)
Returns the libxgboost version.
### global-config
Defined as:
multi method global-config(Str $json-str)
multi method global-config(--> Str)Sets/Gets the global parameters: verbosity and use_rmm.
* `verbosity` The verbosity of printing messages. Valid values of 0 (silent), 1 (warning), 2 (info), and 3 (debug).
* `use_rmm` Whether to use RAPIDS Memory Manager (RMM) to allocate GPU memory. This option is only applicable when XGBoost is built (compiled) with the RMM plugin enabled. Valid values are true and false.
AUTHOR
======Itsuki Toyota
COPYRIGHT AND LICENSE
=====================Copyright 2021 Itsuki Toyota
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.