{
  "id": 87745,
  "title": "Beginner: GridSearchCV extremely slow",
  "url": "/competitions/digit-recognizer/discussion/87745",
  "author_name": "AS",
  "post_date": "2019-04-03T04:23:17.954000",
  "votes": 0,
  "comment_count": 1,
  "views": null,
  "content": "<p>Hi,</p>\n\n<p>I am just starting with machine learning and trying to classify digits using SVM algorithm.\nHowever, when I use GridSearchCV to find the best set of hyperparameters (C and gamma),  the program never completes. \nI have taken a subset of the training data (20%, ~8400 rows), and using only 3 folds for cross-validation.</p>\n\n<p>kernel=['rbf']\nC=[0.01, 1, 10,100]\ngamma=[0.01, 1, 10]\nparams={'SVM_<em>kernel':kernel, 'SVM</em>_C':C, 'SVM__gamma':gamma}\n...\nsteps=[('Scaler',StandardScaler()), ('SVM',svm)]\npipeline=Pipeline(steps)\n...\ngrid=GridSearchCV(pipeline,param_grid=params, return_train_score=True, cv=3, verbose=1)</p>\n\n<p>Is there something I am doing wrong? Any help would be appreciated.  </p>",
  "messages": [
    {
      "id": 1789449,
      "postDate": "2022-05-13T22:41:16.623Z",
      "content": "<p>Hi Even i had same trouble. with the same </p>",
      "rawMarkdown": "Hi Even i had same trouble. with the same "
    },
    {
      "id": 506169,
      "postDate": "2019-04-03T04:23:17.953Z",
      "content": "<p>Hi,</p>\n\n<p>I am just starting with machine learning and trying to classify digits using SVM algorithm.\nHowever, when I use GridSearchCV to find the best set of hyperparameters (C and gamma),  the program never completes. \nI have taken a subset of the training data (20%, ~8400 rows), and using only 3 folds for cross-validation.</p>\n\n<p>kernel=['rbf']\nC=[0.01, 1, 10,100]\ngamma=[0.01, 1, 10]\nparams={'SVM_<em>kernel':kernel, 'SVM</em>_C':C, 'SVM__gamma':gamma}\n...\nsteps=[('Scaler',StandardScaler()), ('SVM',svm)]\npipeline=Pipeline(steps)\n...\ngrid=GridSearchCV(pipeline,param_grid=params, return_train_score=True, cv=3, verbose=1)</p>\n\n<p>Is there something I am doing wrong? Any help would be appreciated.  </p>",
      "rawMarkdown": "Hi,\n\nI am just starting with machine learning and trying to classify digits using SVM algorithm.\nHowever, when I use GridSearchCV to find the best set of hyperparameters (C and gamma),  the program never completes. \nI have taken a subset of the training data (20%, ~8400 rows), and using only 3 folds for cross-validation.\n\n\nkernel=['rbf']\nC=[0.01, 1, 10,100]\ngamma=[0.01, 1, 10]\nparams={'SVM__kernel':kernel, 'SVM__C':C, 'SVM__gamma':gamma}\n...\nsteps=[('Scaler',StandardScaler()), ('SVM',svm)]\npipeline=Pipeline(steps)\n...\ngrid=GridSearchCV(pipeline,param_grid=params, return_train_score=True, cv=3, verbose=1)\n\nIs there something I am doing wrong? Any help would be appreciated.  "
    }
  ],
  "comments": [
    {
      "id": 1789449,
      "author_name": "George Puthean",
      "author_url": "",
      "post_date": "2022-05-13T22:41:16.623000",
      "content": "<p>Hi Even i had same trouble. with the same </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1789449": "Hi Even i had same trouble. with the same ",
    "506169": "Hi,\n\nI am just starting with machine learning and trying to classify digits using SVM algorithm.\nHowever, when I use GridSearchCV to find the best set of hyperparameters (C and gamma),  the program never completes. \nI have taken a subset of the training data (20%, ~8400 rows), and using only 3 folds for cross-validation.\n\n\nkernel=['rbf']\nC=[0.01, 1, 10,100]\ngamma=[0.01, 1, 10]\nparams={'SVM__kernel':kernel, 'SVM__C':C, 'SVM__gamma':gamma}\n...\nsteps=[('Scaler',StandardScaler()), ('SVM',svm)]\npipeline=Pipeline(steps)\n...\ngrid=GridSearchCV(pipeline,param_grid=params, return_train_score=True, cv=3, verbose=1)\n\nIs there something I am doing wrong? Any help would be appreciated.  "
  }
}