pub struct Tree { /* private fields */ }Implementations§
Source§impl Tree
impl Tree
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Revalidates a tree after deserialization or adapter conversion.
pub fn from_arrays(a: TreeArrays) -> Result<Self>
pub fn new(nodes: Vec<Node>, root: usize, n_features: usize) -> Result<Self>
pub fn nodes(&self) -> &[Node]
pub fn root(&self) -> usize
pub fn n_features(&self) -> usize
pub fn n_outputs(&self) -> usize
pub fn predict_row(&self, x: ArrayView1<'_, f64>) -> Result<&[f64]>
pub fn expected_value(&self) -> Vec<f64>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tree
impl<'de> Deserialize<'de> for Tree
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin 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