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

Convert an element of the space into a feature vector.

Args
  • element - An element of the space.
Returns

A feature vector with length NUM_FEATURES.

Implementors

Represents elements with one-hot feature vectors.

Represent elements as a float vector of length 0.