Trait lfa::basis::Composable
source · pub trait Composable: Sized {
fn lfa<A: Approximator<Projection>>(self, approximator: A) -> LFA<Self, A> { ... }
fn stack<P>(self, p: P) -> Stack<Self, P> { ... }
fn add<P: Space>(self, p: P) -> Sum<Self, P>
where
Self: Space,
{ ... }
fn subtract<P: Space>(self, p: P) -> Sum<Self, Negate<P>>
where
Self: Space,
{ ... }
fn shift(self, offset: f64) -> Shift<Self> { ... }
fn multiply<P: Space>(self, p: P) -> Product<Self, P>
where
Self: Space,
{ ... }
fn divide<P: Space>(self, p: P) -> Product<Self, Reciprocal<P>>
where
Self: Space,
{ ... }
fn scale(self, factor: f64) -> Scale<Self> { ... }
fn normalise_l1(self) -> L1Normalise<Self> { ... }
fn normalise_l2(self) -> L2Normalise<Self> { ... }
fn normalise_lp(self, p: u8) -> LpNormalise<Self> { ... }
fn normalise_linf(self) -> LinfNormalise<Self> { ... }
}
Expand description
Trait for projector composition.
This trait works very much like the Rust Iterator
; only without any required methods. By
implementing this on your Projector
you gain access to a suite of constructors that can be
used for rapid prototyping without explicit degradation in performance.
Provided Methods§
sourcefn lfa<A: Approximator<Projection>>(self, approximator: A) -> LFA<Self, A>
fn lfa<A: Approximator<Projection>>(self, approximator: A) -> LFA<Self, A>
Return an LFA
using this Projector
instance and a given Approximator
.
sourcefn add<P: Space>(self, p: P) -> Sum<Self, P>where
Self: Space,
fn add<P: Space>(self, p: P) -> Sum<Self, P>where
Self: Space,
Return the Sum
of this Projector
and another.
sourcefn subtract<P: Space>(self, p: P) -> Sum<Self, Negate<P>>where
Self: Space,
fn subtract<P: Space>(self, p: P) -> Sum<Self, Negate<P>>where
Self: Space,
Return the Sum
of this Projector
and the Negate
d other.
sourcefn shift(self, offset: f64) -> Shift<Self>
fn shift(self, offset: f64) -> Shift<Self>
Return the original Projector
with all activations Shift
ed by some offset
.
sourcefn multiply<P: Space>(self, p: P) -> Product<Self, P>where
Self: Space,
fn multiply<P: Space>(self, p: P) -> Product<Self, P>where
Self: Space,
Return the Product
of this Projector
and another.
sourcefn divide<P: Space>(self, p: P) -> Product<Self, Reciprocal<P>>where
Self: Space,
fn divide<P: Space>(self, p: P) -> Product<Self, Reciprocal<P>>where
Self: Space,
Return the Product
of this Projector
and the Reciprocal
of the other.
sourcefn scale(self, factor: f64) -> Scale<Self>
fn scale(self, factor: f64) -> Scale<Self>
Return the original Projector
with all activations Scale
d by some factor
.
sourcefn normalise_l1(self) -> L1Normalise<Self>
fn normalise_l1(self) -> L1Normalise<Self>
Return the original Projector
with all activations normalised in L₁.
sourcefn normalise_l2(self) -> L2Normalise<Self>
fn normalise_l2(self) -> L2Normalise<Self>
Return the original Projector
with all activations normalised in L₂.
sourcefn normalise_lp(self, p: u8) -> LpNormalise<Self>
fn normalise_lp(self, p: u8) -> LpNormalise<Self>
Return the original Projector
with all activations normalised in Lp.
sourcefn normalise_linf(self) -> LinfNormalise<Self>
fn normalise_linf(self) -> LinfNormalise<Self>
Return the original Projector
with all activations normalised in L∞.