Snippets Collections
...
# define the scaler
scaler = MinMaxScaler()
# fit on the training dataset
scaler.fit(X_train)
# scale the training dataset
X_train = scaler.transform(X_train)
# scale the test dataset
X_test = scaler.transform(X_test)
def log_scale(x):
    C = 1 / np.log(10)
    return np.sign(x) * np.log10(1 + np.abs(x / C))
star

Fri Jan 14 2022 14:40:01 GMT+0000 (Coordinated Universal Time)

#python #scaling #prediction
star

Thu Dec 02 2021 11:45:37 GMT+0000 (Coordinated Universal Time)

#python #scaling #data

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension