당뇨병 예측¶
이 데이터 세트는 1988년부터 시작되었으며 4개의 데이터베이스(Cleveland, 헝가리, 스위스, Long Beach V)로 구성되어 있습니다. 여기에는 예측된 속성을 포함하여 76개의 속성이 포함되어 있지만 게시된 모든 실험은 그 중 14개의 하위 집합을 사용하는 것을 참조합니다. "표적" 필드는 환자의 심장 질환의 존재를 나타냅니다. 정수 값 0 = 질병 없음 및 1 = 질병입니다.
- reference
컬럼¶
age :나이
sex: 성별
cp: 흉통 유형(4개 값)
trestbps: 안정시 혈압
chol: mg/dl의 혈청 콜레스테롤
fbs: 공복 혈당 > 120mg/dl
restecg: 안정시 심전도 결과(값 0,1,2)
thalach: 최대 심박수 달성
exang:운동 유발 협심증
oldpeak = 휴식에 비해 운동으로 유발된 ST 우울증
slope: 피크 운동 ST 세그먼트의 기울기
ca: 형광등으로 채색된 주요 혈관(0-3)의 수
thal: 0 = 정상; 1 = 고정된 결함; 2 = 가역적 결함
환자의 이름과 사회 보장 번호는 최근에 데이터베이스에서 제거되어 더미 값으로 대체
데이터 살펴보기¶
import pandas as pd
df = pd.read_csv('./data/heart.csv')
df
age | sex | cp | trestbps | chol | fbs | restecg | thalach | exang | oldpeak | slope | ca | thal | target | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 52 | 1 | 0 | 125 | 212 | 0 | 1 | 168 | 0 | 1.0 | 2 | 2 | 3 | 0 |
1 | 53 | 1 | 0 | 140 | 203 | 1 | 0 | 155 | 1 | 3.1 | 0 | 0 | 3 | 0 |
2 | 70 | 1 | 0 | 145 | 174 | 0 | 1 | 125 | 1 | 2.6 | 0 | 0 | 3 | 0 |
3 | 61 | 1 | 0 | 148 | 203 | 0 | 1 | 161 | 0 | 0.0 | 2 | 1 | 3 | 0 |
4 | 62 | 0 | 0 | 138 | 294 | 1 | 1 | 106 | 0 | 1.9 | 1 | 3 | 2 | 0 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1020 | 59 | 1 | 1 | 140 | 221 | 0 | 1 | 164 | 1 | 0.0 | 2 | 0 | 2 | 1 |
1021 | 60 | 1 | 0 | 125 | 258 | 0 | 0 | 141 | 1 | 2.8 | 1 | 1 | 3 | 0 |
1022 | 47 | 1 | 0 | 110 | 275 | 0 | 0 | 118 | 1 | 1.0 | 1 | 1 | 2 | 0 |
1023 | 50 | 0 | 0 | 110 | 254 | 0 | 0 | 159 | 0 | 0.0 | 2 | 0 | 2 | 1 |
1024 | 54 | 1 | 0 | 120 | 188 | 0 | 1 | 113 | 0 | 1.4 | 1 | 1 | 3 | 0 |
1025 rows × 14 columns
df.shape
(1025, 14)
df.isnull().sum()
age 0 sex 0 cp 0 trestbps 0 chol 0 fbs 0 restecg 0 thalach 0 exang 0 oldpeak 0 slope 0 ca 0 thal 0 target 0 dtype: int64
df.dtypes
age int64 sex int64 cp int64 trestbps int64 chol int64 fbs int64 restecg int64 thalach int64 exang int64 oldpeak float64 slope int64 ca int64 thal int64 target int64 dtype: object
df['age'] == 0
0 False 1 False 2 False 3 False 4 False ... 1020 False 1021 False 1022 False 1023 False 1024 False Name: age, Length: 1025, dtype: bool
(df['age'] == 50).sum()
21
데이터 시각화¶
import matplotlib.pyplot as plt
import seaborn as sns
corrmat = df.corr()
fig = plt.figure(figsize=(16,16))
sns.heatmap(corrmat, annot = True)
plt.show()
sns.countplot(x='sex', data = df)
<AxesSubplot:xlabel='sex', ylabel='count'>
df["sex"].value_counts()
1 713 0 312 Name: sex, dtype: int64
sns.countplot(x='sex', data = df, palette = 'coolwarm')
<AxesSubplot:xlabel='sex', ylabel='count'>
df['target']
0 0 1 0 2 0 3 0 4 0 .. 1020 1 1021 0 1022 0 1023 1 1024 0 Name: target, Length: 1025, dtype: int64
df['target'].value_counts()
1 526 0 499 Name: target, dtype: int64
df["age"].value_counts()
58 68 57 57 54 53 59 46 52 43 56 39 51 39 62 37 60 37 44 36 64 34 41 32 63 32 61 31 67 31 55 30 65 27 53 26 43 26 42 26 66 25 45 25 48 23 46 23 50 21 47 18 49 17 35 15 39 14 70 14 38 12 68 12 40 11 71 11 69 9 37 6 34 6 29 4 74 3 76 3 77 3 Name: age, dtype: int64
plt.figure(figsize=(16,16))
sns.countplot(x='age', data = df)
<AxesSubplot:xlabel='age', ylabel='count'>
df.hist(figsize=(14,14))
plt.show()
sns.pairplot(df, hue='target')
<seaborn.axisgrid.PairGrid at 0x7f19fe041a00>
plt.figure(figsize = (16,16))
sns.swarmplot (x=df["age"])
<AxesSubplot:xlabel='age'>
pd.crosstab(df.age, df.target).plot(kind='bar', figsize = (15,15))
<AxesSubplot:xlabel='age'>
pd.crosstab(df.ca, df.target).plot(kind='bar', figsize = (15,15))
<AxesSubplot:xlabel='ca'>
plt.figure(figsize=(15,5))
sns.scatterplot(x="age", y="trestbps", hue="target", data=df )
<AxesSubplot:xlabel='age', ylabel='trestbps'>
plt.figure(figsize=(15,5))
sns.pointplot(x="age", y="trestbps", hue="target", data = df)
<AxesSubplot:xlabel='age', ylabel='trestbps'>
plt.figure(figsize=(15,5))
sns.lineplot(x="age", y="trestbps", hue="target", data = df)
<AxesSubplot:xlabel='age', ylabel='trestbps'>
데이터 분석¶
gridSearchCV 실습
ridSearchCV 는?
사이킷런에서는 분류 알고리즘이나 회귀 알고리즘에 사용되는 하이퍼파라미터를 순차적으로 입력해 학습을 하고 측정을 하면서 가장 좋은 파라미터를 알려준다. GridSearchCV가 없다면 max_depth 가 2일때 가장 최적의 스코어를 뽑아내는지 1일때 가장 최적인 스코어를 뽑아내는지 일일이 학습을 해야 한다. 하지만 grid 파라미터 안에서 집합을 만들고 적용하면 최적화된 파라미터를 뽑아낼 수 있다.
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix, classification_report, accuracy_score
dataX = df.drop('target',axis=1)
dataX
age | sex | cp | trestbps | chol | fbs | restecg | thalach | exang | oldpeak | slope | ca | thal | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 52 | 1 | 0 | 125 | 212 | 0 | 1 | 168 | 0 | 1.0 | 2 | 2 | 3 |
1 | 53 | 1 | 0 | 140 | 203 | 1 | 0 | 155 | 1 | 3.1 | 0 | 0 | 3 |
2 | 70 | 1 | 0 | 145 | 174 | 0 | 1 | 125 | 1 | 2.6 | 0 | 0 | 3 |
3 | 61 | 1 | 0 | 148 | 203 | 0 | 1 | 161 | 0 | 0.0 | 2 | 1 | 3 |
4 | 62 | 0 | 0 | 138 | 294 | 1 | 1 | 106 | 0 | 1.9 | 1 | 3 | 2 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1020 | 59 | 1 | 1 | 140 | 221 | 0 | 1 | 164 | 1 | 0.0 | 2 | 0 | 2 |
1021 | 60 | 1 | 0 | 125 | 258 | 0 | 0 | 141 | 1 | 2.8 | 1 | 1 | 3 |
1022 | 47 | 1 | 0 | 110 | 275 | 0 | 0 | 118 | 1 | 1.0 | 1 | 1 | 2 |
1023 | 50 | 0 | 0 | 110 | 254 | 0 | 0 | 159 | 0 | 0.0 | 2 | 0 | 2 |
1024 | 54 | 1 | 0 | 120 | 188 | 0 | 1 | 113 | 0 | 1.4 | 1 | 1 | 3 |
1025 rows × 13 columns
dataY = df['target']
dataY
0 0 1 0 2 0 3 0 4 0 .. 1020 1 1021 0 1022 0 1023 1 1024 0 Name: target, Length: 1025, dtype: int64
x_train, x_test, y_train, y_test = train_test_split(dataX, dataY, test_size = 0.2, random_state = 0)
x_train
age | sex | cp | trestbps | chol | fbs | restecg | thalach | exang | oldpeak | slope | ca | thal | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
315 | 42 | 1 | 3 | 148 | 244 | 0 | 0 | 178 | 0 | 0.8 | 2 | 2 | 2 |
204 | 66 | 0 | 2 | 146 | 278 | 0 | 0 | 152 | 0 | 0.0 | 1 | 1 | 2 |
363 | 53 | 1 | 2 | 130 | 246 | 1 | 0 | 173 | 0 | 0.0 | 2 | 3 | 2 |
5 | 58 | 0 | 0 | 100 | 248 | 0 | 0 | 122 | 0 | 1.0 | 1 | 0 | 2 |
1017 | 53 | 1 | 0 | 123 | 282 | 0 | 1 | 95 | 1 | 2.0 | 1 | 2 | 3 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
835 | 49 | 1 | 2 | 118 | 149 | 0 | 0 | 126 | 0 | 0.8 | 2 | 3 | 2 |
192 | 67 | 0 | 2 | 115 | 564 | 0 | 0 | 160 | 0 | 1.6 | 1 | 0 | 3 |
629 | 65 | 1 | 3 | 138 | 282 | 1 | 0 | 174 | 0 | 1.4 | 1 | 1 | 2 |
559 | 67 | 1 | 0 | 120 | 237 | 0 | 1 | 71 | 0 | 1.0 | 1 | 0 | 2 |
684 | 60 | 1 | 2 | 140 | 185 | 0 | 0 | 155 | 0 | 3.0 | 1 | 0 | 2 |
820 rows × 13 columns
y_test
807 1 27 0 77 0 406 1 886 0 .. 877 1 320 1 362 1 452 0 500 1 Name: target, Length: 205, dtype: int64
import numpy as np
penalty = ['l1', 'l2']
C = np.logspace(0,4,10)
hyperparametes = dict(C=C, penalty = penalty)
hyperparametes
{'C': array([1.00000000e+00, 2.78255940e+00, 7.74263683e+00, 2.15443469e+01, 5.99484250e+01, 1.66810054e+02, 4.64158883e+02, 1.29154967e+03, 3.59381366e+03, 1.00000000e+04]), 'penalty': ['l1', 'l2']}
logistic = LogisticRegression()
logistic
LogisticRegression()
from sklearn.model_selection import GridSearchCV
clf = GridSearchCV(logistic, hyperparametes)
clf.fit(x_train, y_train)
/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py:610: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: Traceback (most recent call last): File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_validation.py", line 593, in _fit_and_score estimator.fit(X_train, y_train, **fit_params) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 1306, in fit solver = _check_solver(self.solver, self.penalty, self.dual) File "/home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py", line 443, in _check_solver raise ValueError("Solver %s supports only 'l2' or 'none' penalties, " ValueError: Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty. warnings.warn("Estimator fit failed. The score on this train-test" /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/model_selection/_search.py:918: UserWarning: One or more of the test scores are non-finite: [ nan 0.85121951 nan 0.84878049 nan 0.84756098 nan 0.84756098 nan 0.85121951 nan 0.85121951 nan 0.85 nan 0.85 nan 0.85121951 nan 0.85 ] warnings.warn( /home/goldang/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:763: ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT. Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html Please also refer to the documentation for alternative solver options: https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression n_iter_i = _check_optimize_result(
GridSearchCV(estimator=LogisticRegression(), param_grid={'C': array([1.00000000e+00, 2.78255940e+00, 7.74263683e+00, 2.15443469e+01, 5.99484250e+01, 1.66810054e+02, 4.64158883e+02, 1.29154967e+03, 3.59381366e+03, 1.00000000e+04]), 'penalty': ['l1', 'l2']})
predict = clf.predict(x_test)
accuracy_score(y_test, predict)
0.8634146341463415
clf.best_params_
{'C': 1.0, 'penalty': 'l2'}
KNN 알고리즘 (최근접이웃알고리즘)¶
from sklearn.neighbors import KNeighborsClassifier
classifier = KNeighborsClassifier(n_neighbors=3)
classifier.fit(x_train, y_train)
KNeighborsClassifier(n_neighbors=3)
predict = classifier.predict(x_test)
accuracy_score(y_test, predict)
0.9121951219512195
params = {'n_neighbors' : list(range(1,20)),
'p' : [1,2,3,4,5,6,7,8,9,10],
'leaf_size' : list(range(1,20)),
'weights' : ['uniform', 'distance']
}
knn = KNeighborsClassifier()
KNNModel = GridSearchCV(knn, params, cv=3, n_jobs=-1)
KNNModel.fit(x_train, y_train)
GridSearchCV(cv=3, estimator=KNeighborsClassifier(), n_jobs=-1, param_grid={'leaf_size': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], 'n_neighbors': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], 'p': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'weights': ['uniform', 'distance']})
KNNModel.best_params_
{'leaf_size': 1, 'n_neighbors': 18, 'p': 1, 'weights': 'distance'}
predict = KNNModel.predict(x_test)
accuracy_score(y_test, predict)
1.0
너무 높은 정확도가 나와서 문제이다.
데이터 가공¶
- SVM(support vectors machine)
from sklearn.svm import SVC
SVC_classifier = SVC(kernel = 'linear', gamma=10, C=1.0)
SVC_classifier.fit(x_train, y_train)
SVC(gamma=10, kernel='linear')
predict = SVC_classifier.predict(x_test)
accuracy_score(y_test, predict)
0.8390243902439024
'kaggle' 카테고리의 다른 글
의료데이터_심부전증 예방하기(with 캐글) (0) | 2021.08.20 |
---|---|
자살률 시각화(with 캐글) (0) | 2021.08.20 |
의료데이터 입문(with 캐글) (0) | 2021.08.20 |
kaggle_Bike Sharing Demand[입문용] (0) | 2021.05.22 |
XGBoost 개념 이해 (0) | 2021.05.15 |