AI/ERROR LOG
-
grid seacrh cv를 사용할때 파라미터들을 정리해야 합니다. 이전의 도큐먼트를 참고하여 설정할 Logistic Regression 모델의 파라미터 입니다. Logistic Regression -> penalty : "l1", "l2", "elasticnet", "none" default "l2" 하지만 param_lr = {"penalty":["l1", "l2", "elasticnet", "none"]} 위의 코드는 아래의 에러문구가 뜹니다. # ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty 아래의 코드처럼 penalty에 l2만 써주면 해결됩니다. param_lr = {"penalty":[ "l2"]..
ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penaltygrid seacrh cv를 사용할때 파라미터들을 정리해야 합니다. 이전의 도큐먼트를 참고하여 설정할 Logistic Regression 모델의 파라미터 입니다. Logistic Regression -> penalty : "l1", "l2", "elasticnet", "none" default "l2" 하지만 param_lr = {"penalty":["l1", "l2", "elasticnet", "none"]} 위의 코드는 아래의 에러문구가 뜹니다. # ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty 아래의 코드처럼 penalty에 l2만 써주면 해결됩니다. param_lr = {"penalty":[ "l2"]..
2021.05.19 -
def fit_clasifiers(gs_clfs, X, y): for clf in gs_clfs: print(X.shape) clf.fit(X, y) #before #fit_clasifiers(gs_clfs, X_train, y_train) #after fit_clasifiers(gs_clfs, X_train, y_train.values.ravel()) show_gridsearch_result(gs_clfs) DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel(). fit_clasifie..
DataConversionWarning: A column-vector y was passed when a 1d array was expected.def fit_clasifiers(gs_clfs, X, y): for clf in gs_clfs: print(X.shape) clf.fit(X, y) #before #fit_clasifiers(gs_clfs, X_train, y_train) #after fit_clasifiers(gs_clfs, X_train, y_train.values.ravel()) show_gridsearch_result(gs_clfs) DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel(). fit_clasifie..
2021.05.19