'Getting standardized (beta) coefficients from StandardScaler()
I have a model that is normalized using StandardScaler. I need to get the beta coefficients from the coefficients that the model.coef_ stores. I've seen varying things online on if the coefficients that are derived as a result of the StandardScaler are already beta coefficients or not. Any explanation would be greatly appreciated!
'''
scaler = StandardScaler()
scaler.fit(X[feat_num])
X_train = scale_numeric(
X[feat_cat + feat_num].copy().reset_index(drop=True),
scaler,
feat_num
)
y_train = np.log(X["opg_bo"]).reset_index(drop=True)
model = LinearRegression()
model.fit(X_train,y_train)
model.coef_ #Im not sure if these are the beta coefficients or not...
'''
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
