"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:521: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
"WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use the retry module or similar alternatives.\n",
"# Tuning hyper-parameters for precision---------\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
" FutureWarning)\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/utils/validation.py:724: 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().\n",
" y = column_or_1d(y, warn=True)\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/metrics/classification.py:1437: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 due to no predicted samples.\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/model_selection/_search.py:814: DeprecationWarning: The default of the `iid` parameter will change from True to False in version 0.22 and will be removed in 0.24. This will change numeric results when test-set sizes are unequal.\n",
" DeprecationWarning)\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
" FutureWarning)\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/utils/validation.py:724: 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().\n",
" y = column_or_1d(y, warn=True)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Best parameters set found on development set:\n",
"\n",
"{'C': 3}\n",
"\n",
"Grid scores on development set:\n",
"\n",
"0.000 (+/-0.000) for {'C': 0.001}\n",
"0.000 (+/-0.000) for {'C': 0.003}\n",
"0.201 (+/-0.802) for {'C': 0.01}\n",
"0.000 (+/-0.000) for {'C': 0.003}\n",
"0.583 (+/-0.683) for {'C': 0.1}\n",
"0.917 (+/-0.211) for {'C': 0.3}\n",
"0.972 (+/-0.114) for {'C': 1}\n",
"0.989 (+/-0.044) for {'C': 3}\n",
"\n",
"Detailed classification report:\n",
"\n",
"The model is trained on the full development set.\n",
"The scores are computed on the full evaluation set.\n",
"\n",
" precision recall f1-score support\n",
"\n",
" 0 0.99 1.00 1.00 722\n",
" 1 1.00 0.95 0.97 128\n",
"\n",
" accuracy 0.99 850\n",
" macro avg 1.00 0.97 0.98 850\n",
"weighted avg 0.99 0.99 0.99 850\n",
"\n",
"\n",
"# Tuning hyper-parameters for recall---------\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/model_selection/_search.py:814: DeprecationWarning: The default of the `iid` parameter will change from True to False in version 0.22 and will be removed in 0.24. This will change numeric results when test-set sizes are unequal.\n",
" DeprecationWarning)\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
" FutureWarning)\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/utils/validation.py:724: 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().\n",
" y = column_or_1d(y, warn=True)\n",
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/metrics/classification.py:1437: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 due to no predicted samples.\n",
" 'precision', 'predicted', average, warn_for)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Best parameters set found on development set:\n",
"\n",
"{'C': 3}\n",
"\n",
"Grid scores on development set:\n",
"\n",
"0.000 (+/-0.000) for {'C': 0.001}\n",
"0.000 (+/-0.000) for {'C': 0.003}\n",
"0.008 (+/-0.031) for {'C': 0.01}\n",
"0.000 (+/-0.000) for {'C': 0.003}\n",
"0.039 (+/-0.002) for {'C': 0.1}\n",
"0.219 (+/-0.133) for {'C': 0.3}\n",
"0.524 (+/-0.211) for {'C': 1}\n",
"0.711 (+/-0.240) for {'C': 3}\n",
"\n",
"Detailed classification report:\n",
"\n",
"The model is trained on the full development set.\n",
"The scores are computed on the full evaluation set.\n",
"\n",
" precision recall f1-score support\n",
"\n",
" 0 0.99 1.00 1.00 722\n",
" 1 1.00 0.95 0.97 128\n",
"\n",
" accuracy 0.99 850\n",
" macro avg 1.00 0.97 0.98 850\n",
"weighted avg 0.99 0.99 0.99 850\n",
"\n",
"\n",
"# Tuning hyper-parameters for f1---------\n",
"\n",
"Best parameters set found on development set:\n",
"\n",
"{'C': 3}\n",
"\n",
"Grid scores on development set:\n",
"\n",
"0.000 (+/-0.000) for {'C': 0.001}\n",
"0.000 (+/-0.000) for {'C': 0.003}\n",
"0.015 (+/-0.059) for {'C': 0.01}\n",
"0.000 (+/-0.000) for {'C': 0.003}\n",
"0.072 (+/-0.007) for {'C': 0.1}\n",
"0.348 (+/-0.181) for {'C': 0.3}\n",
"0.674 (+/-0.197) for {'C': 1}\n",
"0.822 (+/-0.167) for {'C': 3}\n",
"\n",
"Detailed classification report:\n",
"\n",
"The model is trained on the full development set.\n",
"The scores are computed on the full evaluation set.\n",
"\n",
" precision recall f1-score support\n",
"\n",
" 0 0.99 1.00 1.00 722\n",
" 1 1.00 0.95 0.97 128\n",
"\n",
" accuracy 0.99 850\n",
" macro avg 1.00 0.97 0.98 850\n",
"weighted avg 0.99 0.99 0.99 850\n",
"\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sklearn/model_selection/_search.py:814: DeprecationWarning: The default of the `iid` parameter will change from True to False in version 0.22 and will be removed in 0.24. This will change numeric results when test-set sizes are unequal.\n",