Denoising
Denoising
EWMAFilter
Bases: TransformerStep
Filter each feature using EWM (Exponential Moving Window)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
span |
float
|
Time constant of the EMA (Exponential Moving Average) |
required |
name |
Optional[str]
|
Name of the step, by default None |
None
|
Source code in ceruleo/transformation/features/denoising.py
transform(X, y=None)
Return a new dataframe with the features filtered
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A new DatafFrame with the same index as the input with the features filtered |
Source code in ceruleo/transformation/features/denoising.py
GaussianFilter
Bases: TransformerStep
Apply a gaussian filter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window_size |
int
|
Size of the gaussian filter |
required |
std |
float
|
Standard deviation of the filter |
required |
min_points |
int
|
Minimun nomber of points of the rolling window, by default 1 |
1
|
center |
bool
|
Wether the guassian window should be centered, by default False |
False
|
Source code in ceruleo/transformation/features/denoising.py
transform(X)
Return a new dataframe with the features filtered
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A new DatafFrame with the same index as the input with the features filtered |
Source code in ceruleo/transformation/features/denoising.py
MeanFilter
Bases: TransformerStep
Filter each feature using a rolling mean filter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
int
|
Size of the rolling window |
required |
min_periods |
int
|
Minimum number of non-null points of the rolling window, by default 15 |
15
|
name |
Optional[str]
|
Name of the step, by default None |
None
|
center |
Wether the guassian window should be centered, by default False |
True
|
Source code in ceruleo/transformation/features/denoising.py
transform(X, y=None)
Return a new dataframe with the features filtered
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A new DatafFrame with the same index as the input with the features filtered |
Source code in ceruleo/transformation/features/denoising.py
MedianFilter
Bases: TransformerStep
Filter each feature using a rolling median filter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
int
|
Size of the rolling window |
required |
min_periods |
int
|
Minimum number of points of the rolling window, by default 15 |
15
|
name |
Optional[str]
|
Name of the step, by default None |
None
|
Source code in ceruleo/transformation/features/denoising.py
transform(X, y=None)
Return a new dataframe with the features filtered
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A new DatafFrame with the same index as the input with the features filtered |
Source code in ceruleo/transformation/features/denoising.py
MultiDimensionalKMeans
Bases: TransformerStep
Clusterize data points and replace each feature with the centroid feature it belongs to
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n_clusters |
int
|
Number of clusters to obtain by default 5 |
5
|
name |
Optional[str]
|
Name of the step, by default None |
None
|
Source code in ceruleo/transformation/features/denoising.py
partial_fit(X)
Fit the model to the input data to obtain the clusters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
transform(X, y=None)
Transform the input life with the centroid information
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A new DataFrame in which each point was replaced by the centroid it belongs to |
Source code in ceruleo/transformation/features/denoising.py
OneDimensionalKMeans
Bases: TransformerStep
Clusterize each feature into a number of clusters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n_clusters |
int
|
Number of clusters, by default 5 |
5
|
Source code in ceruleo/transformation/features/denoising.py
partial_fit(X)
Fit the model to the input data to obtain the clusters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Source code in ceruleo/transformation/features/denoising.py
transform(X, y=None)
Transform the input dataframe
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A new DataFrame with the same index as the input. Each feature is replaced with the clusters of each point |
Source code in ceruleo/transformation/features/denoising.py
SavitzkyGolayTransformer
Bases: TransformerStep
Filter each feature using LOESS
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
int
|
window size of the filter |
required |
order |
int
|
Order of the filter, by default 2 |
2
|
name |
Optional[str]
|
Step name |
None
|
Source code in ceruleo/transformation/features/denoising.py
transform(X, y=None)
Return a new dataframe with the features filtered
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
DataFrame
|
Input life |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A new DatafFrame with the same index as the input with the features filtered |