pub struct AutomaticKernelConstructor {
pub max_components: usize,
pub include_periodic: bool,
pub include_linear: bool,
pub include_polynomial: bool,
pub correlation_threshold: f64,
pub use_cross_validation: bool,
pub random_state: Option<u64>,
}Expand description
Automatic kernel constructor that can intelligently choose and combine kernels
Fields§
§max_components: usizeMaximum number of components to consider in composite kernels
include_periodic: boolWhether to consider periodic patterns
include_linear: boolWhether to consider linear trends
include_polynomial: boolWhether to consider polynomial features
correlation_threshold: f64Minimum correlation threshold for including components
use_cross_validation: boolWhether to use cross-validation for kernel selection
random_state: Option<u64>Random state for reproducible results
Implementations§
Source§impl AutomaticKernelConstructor
impl AutomaticKernelConstructor
Sourcepub fn max_components(self, max_components: usize) -> Self
pub fn max_components(self, max_components: usize) -> Self
Set maximum number of components
Sourcepub fn include_periodic(self, include_periodic: bool) -> Self
pub fn include_periodic(self, include_periodic: bool) -> Self
Set whether to include periodic patterns
Sourcepub fn include_linear(self, include_linear: bool) -> Self
pub fn include_linear(self, include_linear: bool) -> Self
Set whether to include linear trends
Sourcepub fn correlation_threshold(self, threshold: f64) -> Self
pub fn correlation_threshold(self, threshold: f64) -> Self
Set correlation threshold
Sourcepub fn random_state(self, random_state: Option<u64>) -> Self
pub fn random_state(self, random_state: Option<u64>) -> Self
Set random state
Sourcepub fn use_cross_validation(self, use_cross_validation: bool) -> Self
pub fn use_cross_validation(self, use_cross_validation: bool) -> Self
Set whether to use cross-validation for kernel evaluation
Sourcepub fn construct_kernel(
&self,
X: ArrayView2<'_, f64>,
y: ArrayView1<'_, f64>,
) -> SklResult<KernelConstructionResult>
pub fn construct_kernel( &self, X: ArrayView2<'_, f64>, y: ArrayView1<'_, f64>, ) -> SklResult<KernelConstructionResult>
Automatically construct the best kernel for the given data
Trait Implementations§
Source§impl Clone for AutomaticKernelConstructor
impl Clone for AutomaticKernelConstructor
Source§fn clone(&self) -> AutomaticKernelConstructor
fn clone(&self) -> AutomaticKernelConstructor
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 Debug for AutomaticKernelConstructor
impl Debug for AutomaticKernelConstructor
Auto Trait Implementations§
impl Freeze for AutomaticKernelConstructor
impl RefUnwindSafe for AutomaticKernelConstructor
impl Send for AutomaticKernelConstructor
impl Sync for AutomaticKernelConstructor
impl Unpin for AutomaticKernelConstructor
impl UnwindSafe for AutomaticKernelConstructor
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> 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