📜  岭回归实现python代码示例

📅  最后修改于: 2022-03-11 14:47:05.336000             🧑  作者: Mango

代码示例1
from sklearn.linear_model import Ridge
X_train, X_test, y_train, y_test = train_test_split(X_crime, y_crime,
                                                   random_state = 0)

linridge = Ridge(alpha=20.0).fit(X_train, y_train)