chore(Linter): reformatted code with black (#211)

* chore(Linter): reformatted code with black

* Create black.yaml
This commit is contained in:
Mark Aron Szulyovszky
2022-02-17 19:22:17 +01:00
committed by GitHub
parent f3fee4a4e1
commit 8dd2d88740
101 changed files with 2595 additions and 2319 deletions
+7 -6
View File
@@ -2,14 +2,15 @@ from sklearn.preprocessing import MinMaxScaler, Normalizer, StandardScaler
from .sklearn import SKLearnTransformation
from typing import Literal
ScalerTypes = Literal['normalize', 'minmax', 'standardize']
ScalerTypes = Literal["normalize", "minmax", "standardize"]
def get_scaler(type: ScalerTypes) -> SKLearnTransformation:
if type == 'normalize':
if type == "normalize":
return SKLearnTransformation(Normalizer())
elif type == 'minmax':
return SKLearnTransformation(MinMaxScaler(feature_range= (-1, 1)))
elif type == 'standardize':
elif type == "minmax":
return SKLearnTransformation(MinMaxScaler(feature_range=(-1, 1)))
elif type == "standardize":
return SKLearnTransformation(StandardScaler())
else:
raise Exception("Scaler type not supported")
raise Exception("Scaler type not supported")