[][src]Struct tensorflow_proto::tensorflow::boosted_trees::learner::LearnerConfig

pub struct LearnerConfig {
    pub num_classes: u32,
    pub regularization: Option<TreeRegularizationConfig>,
    pub constraints: Option<TreeConstraintsConfig>,
    pub pruning_mode: i32,
    pub growing_mode: i32,
    pub learning_rate_tuner: Option<LearningRateConfig>,
    pub multi_class_strategy: i32,
    pub averaging_config: Option<AveragingConfig>,
    pub weak_learner_type: i32,
    pub each_tree_start: Option<DecisionTreeConfig>,
    pub each_tree_start_num_layers: i32,
    pub feature_fraction: Option<FeatureFraction>,
}

Fields

num_classes: u32

Number of classes.

regularization: Option<TreeRegularizationConfig>

Regularization.

constraints: Option<TreeConstraintsConfig>

Constraints.

pruning_mode: i32

Pruning. POST_PRUNE is the default pruning mode.

growing_mode: i32

Growing Mode. LAYER_BY_LAYER is the default growing mode.

learning_rate_tuner: Option<LearningRateConfig>

Learning rate. By default we use fixed learning rate of 0.1.

multi_class_strategy: i32

Multi-class strategy. By default we use TREE_PER_CLASS for binary classification and linear regression. For other cases, we use DIAGONAL_HESSIAN as the default.

averaging_config: Option<AveragingConfig>

If you want to average the ensembles (for regularization), provide the config below.

weak_learner_type: i32

By default we use NORMAL_DECISION_TREE as weak learner.

each_tree_start: Option<DecisionTreeConfig>

If you want to enforce some splits and allow boosting to figure out the rest, you can provide a tree that represents the starting splits for each tree in the ensemble. Set both each_tree_start and each_tree_start_num_layers.

each_tree_start_num_layers: i32feature_fraction: Option<FeatureFraction>

Fraction of features to consider in each tree sampled randomly from all available features.

Implementations

impl LearnerConfig[src]

pub fn pruning_mode(&self) -> PruningMode[src]

Returns the enum value of pruning_mode, or the default if the field is set to an invalid enum value.

pub fn set_pruning_mode(&mut self, value: PruningMode)[src]

Sets pruning_mode to the provided enum value.

pub fn growing_mode(&self) -> GrowingMode[src]

Returns the enum value of growing_mode, or the default if the field is set to an invalid enum value.

pub fn set_growing_mode(&mut self, value: GrowingMode)[src]

Sets growing_mode to the provided enum value.

pub fn multi_class_strategy(&self) -> MultiClassStrategy[src]

Returns the enum value of multi_class_strategy, or the default if the field is set to an invalid enum value.

pub fn set_multi_class_strategy(&mut self, value: MultiClassStrategy)[src]

Sets multi_class_strategy to the provided enum value.

pub fn weak_learner_type(&self) -> WeakLearnerType[src]

Returns the enum value of weak_learner_type, or the default if the field is set to an invalid enum value.

pub fn set_weak_learner_type(&mut self, value: WeakLearnerType)[src]

Sets weak_learner_type to the provided enum value.

Trait Implementations

impl Clone for LearnerConfig[src]

impl Debug for LearnerConfig[src]

impl Default for LearnerConfig[src]

impl Message for LearnerConfig[src]

impl PartialEq<LearnerConfig> for LearnerConfig[src]

impl StructuralPartialEq for LearnerConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.