In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
"
+ "param_dist = {\n",
+ " 'n_estimators': randint(100, 200),\n",
+ " 'max_depth': [None, 10, 20, 30, 40],\n",
+ " 'min_samples_split': randint(2, 11),\n",
+ " 'min_samples_leaf': randint(1, 5),\n",
+ " 'max_features': ['sqrt', 'log2', None]\n",
+ "}"
]
},
{
"cell_type": "code",
- "execution_count": 54,
- "id": "ee3e5e3e-bba7-4203-894b-6b3f5e9979a0",
+ "execution_count": 41,
+ "id": "110cd1e6-661d-46a3-be2b-5816b16661a8",
"metadata": {},
"outputs": [],
"source": [
- "lgbm = lgb.LGBMClassifier(class_weight='balanced', random_state=42, n_estimators=150, n_jobs=1)"
+ "stratified_kfold = StratifiedKFold(n_splits=3, shuffle=True, random_state=42)\n",
+ "random_search = RandomizedSearchCV(\n",
+ " estimator=rf_opt,\n",
+ " param_distributions=param_dist,\n",
+ " n_iter=10,\n",
+ " cv=stratified_kfold,\n",
+ " scoring='f1_macro',\n",
+ " n_jobs=-1,\n",
+ " random_state=42,\n",
+ " verbose=1\n",
+ ")\n"
]
},
{
"cell_type": "code",
- "execution_count": 56,
- "id": "73e0e652-61dc-4696-8c52-2e7fe10500a5",
- "metadata": {
- "scrolled": true
- },
+ "execution_count": 42,
+ "id": "b140e62a-1735-47d8-9b8a-271d46ab7c6d",
+ "metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "[LightGBM] [Info] Auto-choosing col-wise multi-threading, the overhead of testing was 0.088841 seconds.\n",
- "You can set `force_col_wise=true` to remove the overhead.\n",
- "[LightGBM] [Info] Total Bins 63750\n",
- "[LightGBM] [Info] Number of data points in the train set: 65669, number of used features: 250\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "\n",
+ "--- Starting Random Forest Optimization ---\n",
+ "Fitting 3 folds for each of 10 candidates, totalling 30 fits\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\giore\\anaconda3\\envs\\codeLab\\Lib\\site-packages\\sklearn\\model_selection\\_split.py:811: UserWarning: The least populated class in y has only 2 members, which is less than n_splits=3.\n",
+ " warnings.warn(\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "id": "ee3e5e3e-bba7-4203-894b-6b3f5e9979a0",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "lgbm = lgb.LGBMClassifier(class_weight='balanced', random_state=42, n_estimators=150, n_jobs=1)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "id": "73e0e652-61dc-4696-8c52-2e7fe10500a5",
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[LightGBM] [Info] Auto-choosing col-wise multi-threading, the overhead of testing was 0.088841 seconds.\n",
+ "You can set `force_col_wise=true` to remove the overhead.\n",
+ "[LightGBM] [Info] Total Bins 63750\n",
+ "[LightGBM] [Info] Number of data points in the train set: 65669, number of used features: 250\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
"[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
"[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
"[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
@@ -5388,7 +6527,9 @@
{
"cell_type": "markdown",
"id": "ddbacf80-5204-41a9-b099-4f4b67fd633a",
- "metadata": {},
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true
+ },
"source": [
"
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
"
+ "param_dist = {\n",
+ " 'n_estimators': randint(100, 200),\n",
+ " 'max_depth': [None, 10, 20, 30, 40],\n",
+ " 'min_samples_split': randint(2, 11),\n",
+ " 'min_samples_leaf': randint(1, 5),\n",
+ " 'max_features': ['sqrt', 'log2', None]\n",
+ "}"
]
},
{
"cell_type": "code",
- "execution_count": 54,
- "id": "ee3e5e3e-bba7-4203-894b-6b3f5e9979a0",
+ "execution_count": 41,
+ "id": "110cd1e6-661d-46a3-be2b-5816b16661a8",
"metadata": {},
"outputs": [],
"source": [
- "lgbm = lgb.LGBMClassifier(class_weight='balanced', random_state=42, n_estimators=150, n_jobs=1)"
+ "stratified_kfold = StratifiedKFold(n_splits=3, shuffle=True, random_state=42)\n",
+ "random_search = RandomizedSearchCV(\n",
+ " estimator=rf_opt,\n",
+ " param_distributions=param_dist,\n",
+ " n_iter=10,\n",
+ " cv=stratified_kfold,\n",
+ " scoring='f1_macro',\n",
+ " n_jobs=-1,\n",
+ " random_state=42,\n",
+ " verbose=1\n",
+ ")\n"
]
},
{
"cell_type": "code",
- "execution_count": 56,
- "id": "73e0e652-61dc-4696-8c52-2e7fe10500a5",
- "metadata": {
- "scrolled": true
- },
+ "execution_count": 42,
+ "id": "b140e62a-1735-47d8-9b8a-271d46ab7c6d",
+ "metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "[LightGBM] [Info] Auto-choosing col-wise multi-threading, the overhead of testing was 0.088841 seconds.\n",
- "You can set `force_col_wise=true` to remove the overhead.\n",
- "[LightGBM] [Info] Total Bins 63750\n",
- "[LightGBM] [Info] Number of data points in the train set: 65669, number of used features: 250\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Info] Start training from score -2.708050\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
- "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "\n",
+ "--- Starting Random Forest Optimization ---\n",
+ "Fitting 3 folds for each of 10 candidates, totalling 30 fits\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\giore\\anaconda3\\envs\\codeLab\\Lib\\site-packages\\sklearn\\model_selection\\_split.py:811: UserWarning: The least populated class in y has only 2 members, which is less than n_splits=3.\n",
+ " warnings.warn(\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "id": "ee3e5e3e-bba7-4203-894b-6b3f5e9979a0",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "lgbm = lgb.LGBMClassifier(class_weight='balanced', random_state=42, n_estimators=150, n_jobs=1)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "id": "73e0e652-61dc-4696-8c52-2e7fe10500a5",
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[LightGBM] [Info] Auto-choosing col-wise multi-threading, the overhead of testing was 0.088841 seconds.\n",
+ "You can set `force_col_wise=true` to remove the overhead.\n",
+ "[LightGBM] [Info] Total Bins 63750\n",
+ "[LightGBM] [Info] Number of data points in the train set: 65669, number of used features: 250\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Info] Start training from score -2.708050\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
+ "[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
"[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
"[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
"[LightGBM] [Warning] No further splits with positive gain, best gain: -inf\n",
@@ -5388,7 +6527,9 @@
{
"cell_type": "markdown",
"id": "ddbacf80-5204-41a9-b099-4f4b67fd633a",
- "metadata": {},
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true
+ },
"source": [
"