pub struct FittedGradientBoostingRegressor<F> { /* private fields */ }Expand description
A fitted gradient boosting regressor.
Stores the initial prediction (intercept) and the sequence of fitted trees.
Predictions are computed as init + learning_rate * sum(tree_predictions).
Implementations§
Source§impl<F: Float + Send + Sync + 'static> FittedGradientBoostingRegressor<F>
impl<F: Float + Send + Sync + 'static> FittedGradientBoostingRegressor<F>
Sourcepub fn learning_rate(&self) -> F
pub fn learning_rate(&self) -> F
Returns the learning rate used during training.
Sourcepub fn n_features(&self) -> usize
pub fn n_features(&self) -> usize
Returns the number of features the model was trained on.
Trait Implementations§
Source§impl<F: Clone> Clone for FittedGradientBoostingRegressor<F>
impl<F: Clone> Clone for FittedGradientBoostingRegressor<F>
Source§fn clone(&self) -> FittedGradientBoostingRegressor<F>
fn clone(&self) -> FittedGradientBoostingRegressor<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Debug> Debug for FittedGradientBoostingRegressor<F>
impl<F: Debug> Debug for FittedGradientBoostingRegressor<F>
Source§impl<F: Float + Send + Sync + 'static> FittedPipelineEstimator<F> for FittedGradientBoostingRegressor<F>
impl<F: Float + Send + Sync + 'static> FittedPipelineEstimator<F> for FittedGradientBoostingRegressor<F>
Source§fn predict_pipeline(&self, x: &Array2<F>) -> Result<Array1<F>, FerroError>
fn predict_pipeline(&self, x: &Array2<F>) -> Result<Array1<F>, FerroError>
Generate predictions for the input data. Read more
Source§impl<F: Float + Send + Sync + 'static> HasFeatureImportances<F> for FittedGradientBoostingRegressor<F>
impl<F: Float + Send + Sync + 'static> HasFeatureImportances<F> for FittedGradientBoostingRegressor<F>
Source§fn feature_importances(&self) -> &Array1<F>
fn feature_importances(&self) -> &Array1<F>
Returns a reference to the feature importance array. Read more
Source§impl<F: Float + Send + Sync + 'static> Predict<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for FittedGradientBoostingRegressor<F>
impl<F: Float + Send + Sync + 'static> Predict<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for FittedGradientBoostingRegressor<F>
Source§fn predict(&self, x: &Array2<F>) -> Result<Array1<F>, FerroError>
fn predict(&self, x: &Array2<F>) -> Result<Array1<F>, FerroError>
Predict target values.
§Errors
Returns FerroError::ShapeMismatch if the number of features does
not match the fitted model.
Source§type Output = ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>
type Output = ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>
The prediction output type (e.g.,
ndarray::Array1<F> or ndarray::Array1<usize>).Source§type Error = FerroError
type Error = FerroError
The error type returned by
predict.Auto Trait Implementations§
impl<F> Freeze for FittedGradientBoostingRegressor<F>where
F: Freeze,
impl<F> RefUnwindSafe for FittedGradientBoostingRegressor<F>where
F: RefUnwindSafe,
impl<F> Send for FittedGradientBoostingRegressor<F>where
F: Send,
impl<F> Sync for FittedGradientBoostingRegressor<F>where
F: Sync,
impl<F> Unpin for FittedGradientBoostingRegressor<F>where
F: Unpin,
impl<F> UnsafeUnpin for FittedGradientBoostingRegressor<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FittedGradientBoostingRegressor<F>where
F: UnwindSafe + RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more