feat(Events): added EventFilter, EventLabeller (#186)

This commit is contained in:
Mark Aron Szulyovszky
2022-01-26 23:22:43 +01:00
committed by GitHub
parent 1042c82333
commit 42a1bc59cb
65 changed files with 759 additions and 276571 deletions
+15
View File
@@ -0,0 +1,15 @@
from sklearn.preprocessing import MinMaxScaler, Normalizer, StandardScaler
from .sklearn import SKLearnTransformation
from typing import Literal
ScalerTypes = Literal['normalize', 'minmax', 'standardize']
def get_scaler(type: ScalerTypes) -> SKLearnTransformation:
if type == 'normalize':
return SKLearnTransformation(Normalizer())
elif type == 'minmax':
return SKLearnTransformation(MinMaxScaler(feature_range= (-1, 1)))
elif type == 'standardize':
return SKLearnTransformation(StandardScaler())
else:
raise Exception("Scaler type not supported")