#[non_exhaustive]pub struct TimeSeriesTransformations {
pub filling: Option<HashMap<String, HashMap<FillingType, String>>>,
pub aggregation: Option<HashMap<String, AggregationTransformationValue>>,
}
Expand description
Transformations allowed on the dataset. Supported transformations are Filling
and Aggregation
. Filling
specifies how to add values to missing values in the dataset. Aggregation
defines how to aggregate data that does not align with forecast frequency.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.filling: Option<HashMap<String, HashMap<FillingType, String>>>
A key value pair defining the filling method for a column, where the key is the column name and the value is an object which defines the filling logic. You can specify multiple filling methods for a single column.
The supported filling methods and their corresponding options are:
-
frontfill
:none
(Supported only for target column) -
middlefill
:zero
,value
,median
,mean
,min
,max
-
backfill
:zero
,value
,median
,mean
,min
,max
-
futurefill
:zero
,value
,median
,mean
,min
,max
To set a filling method to a specific value, set the fill parameter to the chosen filling method value (for example "backfill" : "value"
), and define the filling value in an additional parameter prefixed with "_value". For example, to set backfill
to a value of 2
, you must include two parameters: "backfill": "value"
and "backfill_value":"2"
.
aggregation: Option<HashMap<String, AggregationTransformationValue>>
A key value pair defining the aggregation method for a column, where the key is the column name and the value is the aggregation method.
The supported aggregation methods are sum
(default), avg
, first
, min
, max
.
Aggregation is only supported for the target column.
Implementations§
source§impl TimeSeriesTransformations
impl TimeSeriesTransformations
sourcepub fn filling(&self) -> Option<&HashMap<String, HashMap<FillingType, String>>>
pub fn filling(&self) -> Option<&HashMap<String, HashMap<FillingType, String>>>
A key value pair defining the filling method for a column, where the key is the column name and the value is an object which defines the filling logic. You can specify multiple filling methods for a single column.
The supported filling methods and their corresponding options are:
-
frontfill
:none
(Supported only for target column) -
middlefill
:zero
,value
,median
,mean
,min
,max
-
backfill
:zero
,value
,median
,mean
,min
,max
-
futurefill
:zero
,value
,median
,mean
,min
,max
To set a filling method to a specific value, set the fill parameter to the chosen filling method value (for example "backfill" : "value"
), and define the filling value in an additional parameter prefixed with "_value". For example, to set backfill
to a value of 2
, you must include two parameters: "backfill": "value"
and "backfill_value":"2"
.
sourcepub fn aggregation(
&self
) -> Option<&HashMap<String, AggregationTransformationValue>>
pub fn aggregation( &self ) -> Option<&HashMap<String, AggregationTransformationValue>>
A key value pair defining the aggregation method for a column, where the key is the column name and the value is the aggregation method.
The supported aggregation methods are sum
(default), avg
, first
, min
, max
.
Aggregation is only supported for the target column.
source§impl TimeSeriesTransformations
impl TimeSeriesTransformations
sourcepub fn builder() -> TimeSeriesTransformationsBuilder
pub fn builder() -> TimeSeriesTransformationsBuilder
Creates a new builder-style object to manufacture TimeSeriesTransformations
.
Trait Implementations§
source§impl Clone for TimeSeriesTransformations
impl Clone for TimeSeriesTransformations
source§fn clone(&self) -> TimeSeriesTransformations
fn clone(&self) -> TimeSeriesTransformations
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TimeSeriesTransformations
impl Debug for TimeSeriesTransformations
source§impl PartialEq for TimeSeriesTransformations
impl PartialEq for TimeSeriesTransformations
source§fn eq(&self, other: &TimeSeriesTransformations) -> bool
fn eq(&self, other: &TimeSeriesTransformations) -> bool
self
and other
values to be equal, and is used
by ==
.