pub struct Tree {
pub nodes: Vec<TreeNode>,
}Fields
nodes: Vec<TreeNode>Implementations
sourceimpl Tree
impl Tree
pub fn new() -> Self
pub fn fit(
&mut self,
data: &Matrix<'_, u16>,
cuts: &JaggedMatrix<f64>,
grad: &[f32],
hess: &[f32],
splitter: &HistogramSplitter,
max_leaves: usize,
max_depth: usize,
parallel: bool
)
pub fn predict_row(&self, data: &Matrix<'_, f64>, row: usize) -> f64
pub fn predict(&self, data: &Matrix<'_, f64>, parallel: bool) -> Vec<f64>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Tree
impl<'de> Deserialize<'de> for Tree
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnwindSafe for Tree
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more