pub struct TransferLearningManager<T: Float + Debug + Send + Sync + 'static> { /* private fields */ }Expand description
Transfer learning manager backed by
crate::cross_domain_transfer::CrossDomainTransfer.
Implementations§
Source§impl<T: Float + Debug + Send + Sync + 'static + Default + Clone + Sum + ScalarOperand> TransferLearningManager<T>
impl<T: Float + Debug + Send + Sync + 'static + Default + Clone + Sum + ScalarOperand> TransferLearningManager<T>
pub fn new(settings: &TransferLearningSettings) -> Result<Self>
Sourcepub fn domain_adaptation_enabled(&self) -> bool
pub fn domain_adaptation_enabled(&self) -> bool
Whether the configured settings request domain adaptation.
Sourcepub fn transfer(
&mut self,
source_tasks: &[MetaTask<T>],
target_tasks: &[MetaTask<T>],
meta_parameters: &HashMap<String, Array1<T>>,
) -> Result<TransferLearningResult<T>>
pub fn transfer( &mut self, source_tasks: &[MetaTask<T>], target_tasks: &[MetaTask<T>], meta_parameters: &HashMap<String, Array1<T>>, ) -> Result<TransferLearningResult<T>>
Transfer from a set of source tasks to a set of target tasks.
Both task groups are summarised as domains (mean support features and
the fitted linear parameters), registered with the real
crate::cross_domain_transfer::CrossDomainTransfer engine, and the
transferred parameters are evaluated on the target tasks. Every number
reported here is measured, not assumed.
Sourcepub fn success_rate(&self) -> T
pub fn success_rate(&self) -> T
Fraction of transfers that improved the target-task loss.
Returns zero before any transfer has been attempted.
Auto Trait Implementations§
impl<T> Freeze for TransferLearningManager<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for TransferLearningManager<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for TransferLearningManager<T>where
PhantomData<T>: Send,
impl<T> Sync for TransferLearningManager<T>where
PhantomData<T>: Sync,
impl<T> Unpin for TransferLearningManager<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for TransferLearningManager<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for TransferLearningManager<T>where
PhantomData<T>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.