1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! A small, pure-Rust gradient boosting library with a deliberately narrow
//! scope: **GBDT only, binary classification only, CPU only, dense numerical
//! features**. No DART/GOSS/RF, no multiclass, no ranking, no regression, no
//! sparse inputs, no GPU, no FFI bindings.
//!
//! # Quickstart
//!
//! ```no_run
//! use nanogbm::{Config, DatasetBuilder, GbdtTrainer};
//!
//! # let n_rows = 1000usize;
//! # let n_features = 5usize;
//! # let features: Vec<f64> = vec![0.0; n_rows * n_features];
//! # let labels: Vec<f32> = vec![0.0; n_rows];
//! let cfg = Config {
//! num_iterations: 100,
//! learning_rate: 0.1,
//! num_leaves: 31,
//! ..Config::default()
//! };
//!
//! let train = DatasetBuilder::from_rows(&features, n_rows, n_features, &labels, &cfg)?;
//! let model = GbdtTrainer::new(&cfg).fit(&train, None)?;
//! let probs = model.predict_proba(&features, n_rows);
//! # Ok::<(), nanogbm::Error>(())
//! ```
//!
//! # Highlights
//!
//! - Histogram learner with sibling-by-subtraction.
//! - Missing values handled at the split (NaN bucket, per-node direction by gain).
//! - Early stopping truncates the model to the best iteration.
//! - Deterministic: same [`Config`] + same data → byte-identical model. All
//! randomness flows through a single `ChaCha8Rng` seeded from
//! [`Config::seed`].
//! - Bincode v2 + serde serialization of [`Model`].
//!
//! See the `examples/` directory for runnable end-to-end programs.
pub use GbdtTrainer;
pub use Config;
pub use ;
pub use ;
pub use Model;