Trait relearn::spaces::FeatureSpace [−][src]
pub trait FeatureSpace<T>: Space + BaseFeatureSpace {
fn features(&self, element: &Self::Element) -> T;
}
Expand description
A space whose elements can be converted to feature vectors.
The representation is generally suited for use as input to a machine learning model,
in contrast to ReprSpace
, which yields a compact representation.
Required methods
Implementors
impl<S, T> FeatureSpace<ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>> for OptionSpace<S> where
S: for<'a> FeatureSpaceOut<ArrayViewMut<'a, T, Ix1>>,
T: Clone + Zero + One,
impl<S, T> FeatureSpace<ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>> for S where
S: CategoricalSpace,
T: Clone + Zero + One,
impl<S, T> FeatureSpace<T> for NonEmptyFeatures<S> where
S: FeatureSpace<T>,
T: BasicArray<f32, 1>,
Represents elements with one-hot feature vectors.
impl<T> FeatureSpace<Tensor> for IntervalSpace<T> where
T: Copy + Float + PartialOrd + CastInto<f32>,
Represent elements as a float vector of length 0.