Trait light_curve_feature::FeatureEvaluator [−][src]
pub trait FeatureEvaluator<T: Float>: Send + Clone + Debug + Serialize + DeserializeOwned + JsonSchema { fn eval(&self, ts: &mut TimeSeries<'_, T>) -> Result<Vec<T>, EvaluatorError>; fn get_info(&self) -> &EvaluatorInfo; fn get_names(&self) -> Vec<&str>; fn get_descriptions(&self) -> Vec<&str>; fn eval_or_fill(&self, ts: &mut TimeSeries<'_, T>, fill_value: T) -> Vec<T> { ... } fn size_hint(&self) -> usize { ... } fn min_ts_length(&self) -> usize { ... } fn is_t_required(&self) -> bool { ... } fn is_m_required(&self) -> bool { ... } fn is_w_required(&self) -> bool { ... } fn is_sorting_required(&self) -> bool { ... } fn check_ts_length(
&self,
ts: &TimeSeries<'_, T>
) -> Result<usize, EvaluatorError> { ... } }
Expand description
The trait each feature should implement
Required methods
fn eval(&self, ts: &mut TimeSeries<'_, T>) -> Result<Vec<T>, EvaluatorError>
fn eval(&self, ts: &mut TimeSeries<'_, T>) -> Result<Vec<T>, EvaluatorError>
Should return the vector of feature values or EvaluatorError
Should return the vector of feature names. The length and feature order should
correspond to eval()
output
fn get_descriptions(&self) -> Vec<&str>
fn get_descriptions(&self) -> Vec<&str>
Should return the vector of feature descriptions. The length and feature order should
correspond to eval()
output
Provided methods
fn eval_or_fill(&self, ts: &mut TimeSeries<'_, T>, fill_value: T) -> Vec<T>
fn eval_or_fill(&self, ts: &mut TimeSeries<'_, T>, fill_value: T) -> Vec<T>
Should return the vector of feature values and fill invalid components with given value
Should return the size of vectors returned by eval()
and get_names()
fn min_ts_length(&self) -> usize
fn min_ts_length(&self) -> usize
Should return minimum time series length to successfully find feature value