pub struct Tree {
pub nodes: Vec<Node>,
}Fields§
§nodes: Vec<Node>Implementations§
source§impl Tree
impl Tree
pub fn new() -> Self
pub fn fit<T: Splitter>( &mut self, data: &Matrix<'_, u16>, cuts: &JaggedMatrix<f64>, grad: &[f32], hess: &[f32], splitter: &T, max_leaves: usize, max_depth: usize, parallel: bool )
pub fn predict_contributions_row( &self, data: &Matrix<'_, f64>, row: usize, contribs: &mut [f64], weights: &[f64] )
pub fn predict_contributions( &self, data: &Matrix<'_, f64>, contribs: &mut [f64], weights: &[f64], parallel: bool )
pub fn predict(&self, data: &Matrix<'_, f64>, parallel: bool) -> Vec<f64>
pub fn value_partial_dependence(&self, feature: usize, value: f64) -> f64
pub fn distribute_leaf_weights(&self) -> Vec<f64>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Tree
impl<'de> Deserialize<'de> for Tree
source§fn 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more