pub struct TaskFeatures {
pub data_size: Option<usize>,
pub noise_level: Option<f32>,
pub complexity: Option<f32>,
pub is_classification: bool,
pub input_dim: Option<usize>,
pub output_dim: Option<usize>,
pub domain: Option<String>,
}Expand description
Features describing a learning task.
Fields§
§data_size: Option<usize>Number of training examples.
noise_level: Option<f32>Estimated noise level (0.0 to 1.0).
complexity: Option<f32>Task complexity (0.0 to 1.0).
is_classification: boolWhether this is classification (vs regression).
input_dim: Option<usize>Number of input features.
output_dim: Option<usize>Number of output classes/values.
domain: Option<String>Domain identifier.
Implementations§
Source§impl TaskFeatures
impl TaskFeatures
Sourcepub fn with_data_size(self, size: usize) -> Self
pub fn with_data_size(self, size: usize) -> Self
Set data size.
Sourcepub fn with_noise(self, noise: f32) -> Self
pub fn with_noise(self, noise: f32) -> Self
Set noise level.
Sourcepub fn with_complexity(self, complexity: f32) -> Self
pub fn with_complexity(self, complexity: f32) -> Self
Set complexity.
Sourcepub fn classification(self) -> Self
pub fn classification(self) -> Self
Set classification flag.
Sourcepub fn regression(self) -> Self
pub fn regression(self) -> Self
Set regression flag.
Sourcepub fn with_domain(self, domain: impl Into<String>) -> Self
pub fn with_domain(self, domain: impl Into<String>) -> Self
Set domain.
Trait Implementations§
Source§impl Clone for TaskFeatures
impl Clone for TaskFeatures
Source§fn clone(&self) -> TaskFeatures
fn clone(&self) -> TaskFeatures
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 TaskFeatures
impl Debug for TaskFeatures
Source§impl Default for TaskFeatures
impl Default for TaskFeatures
Source§fn default() -> TaskFeatures
fn default() -> TaskFeatures
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TaskFeatures
impl<'de> Deserialize<'de> for TaskFeatures
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 Freeze for TaskFeatures
impl RefUnwindSafe for TaskFeatures
impl Send for TaskFeatures
impl Sync for TaskFeatures
impl Unpin for TaskFeatures
impl UnsafeUnpin for TaskFeatures
impl UnwindSafe for TaskFeatures
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request