SeriesExtensionsResampleUniform Method |
Name | Description | |
---|---|---|
ResampleUniformK, V, a(SeriesK, V, FuncK, a, Funca, a) |
Resample the series based on equivalence class on the keys and also generate values
for all keys of the target space that are between the minimal and maximal key of the
specified series (e.g. generate value for all days in the range covered by the series).
For each equivalence class (e.g. date), select the latest value (with greatest key).
A specified function `keyProj` is used to project keys to another space and `nextKey`
is used to generate all keys in the range.
When there are no values for a (generated) key, then the function attempts to get the
greatest value from the previous smaller chunk (i.e. value for the previous date time).
## Parameters
- `series` - An input series to be resampled
- `keyProj` - A function that transforms keys from original space to a new
space (which is then used for grouping based on equivalence)
- `nextKey` - A function that gets the next key in the transformed space
## Remarks
This operation is only supported on ordered series. The method throws
`InvalidOperationException` when the series is not ordered.
[category:Lookup, resampling and scaling]
| |
ResampleUniformK1, V, K2(SeriesK1, V, FuncK1, K2, FuncK2, K2, Lookup) |
Resample the series based on equivalence class on the keys and also generate values
for all keys of the target space that are between the minimal and maximal key of the
specified series (e.g. generate value for all days in the range covered by the series).
A specified function `keyProj` is used to project keys to another space and `nextKey`
is used to generate all keys in the range. The last value of each chunk is returned.
When there are no values for a (generated) key, then the function attempts to get the
greatest value from the previous smaller chunk (i.e. value for the previous date time).
## Parameters
- `series` - An input series to be resampled
- `fillMode` - When set to `Lookup.NearestSmaller` or `Lookup.NearestGreater`,
the function searches for a nearest available observation in an neighboring chunk.
Otherwise, the function `f` is called with an empty series as an argument.
- `keyProj` - A function that transforms keys from original space to a new
space (which is then used for grouping based on equivalence)
- `nextKey` - A function that gets the next key in the transformed space
## Remarks
This operation is only supported on ordered series. The method throws
`InvalidOperationException` when the series is not ordered.
[category:Lookup, resampling and scaling]
|