Trait prophet::traits::Prophet
[−]
[src]
pub trait Prophet { type Elem: Float; fn predict<'b, 'a: 'b>(&'a mut self,
input: &'b [Self::Elem])
-> &'b [Self::Elem]; }
Representative for neural network implementations that are only able to predict data, but have no ability to further improve by training themselves.
This might come in handy for future versions of this library to provide a way to convert a trainable neural network into a static one to optimize for space since there are many constructs in a neural network that are only needed for training purpose.
Associated Types
type Elem: Float
The type used internally to store weights, intermediate results etc.
In future versions of this library it might be possible to create neural networks
that can be parameterize over a given set of floating point types. For example
to create the possibility to use f32
or f64
internally.
Eventual language updates like adding f16
or f128
float primitives
would enhance this functionality furthermore.
Required Methods
fn predict<'b, 'a: 'b>(&'a mut self,
input: &'b [Self::Elem])
-> &'b [Self::Elem]
input: &'b [Self::Elem])
-> &'b [Self::Elem]
Predicts resulting data based on the given input data and on the data that was used to train this neural network, eventually.
The length of the resulting slice of predicted values is equal to the count of neurons in the output layer of the implementing neural network.
Panics
If the element count of the given input slice is not equal to the neuron count of the input layer for the implementing neural network.
Implementors
impl Prophet for NeuralNet