pub struct Task {
pub task_id: usize,
pub x: Array2<Float>,
pub y: Array1<i32>,
pub weight: Float,
pub classes: Vec<i32>,
}Expand description
Represents a single task in multi-task learning
Fields§
§task_id: usizeTask identifier
x: Array2<Float>Training data for this task
y: Array1<i32>Training labels for this task
weight: FloatTask weight (importance)
classes: Vec<i32>Task-specific class mapping
Implementations§
Source§impl Task
impl Task
Sourcepub fn with_weight(self, weight: Float) -> Self
pub fn with_weight(self, weight: Float) -> Self
Set task weight
Sourcepub fn n_features(&self) -> usize
pub fn n_features(&self) -> usize
Get number of features
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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