Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance Sklearn RandomizedSearchCV突然卡住了_Performance_Parameters_Scikit Learn_Grid Search - Fatal编程技术网

Performance Sklearn RandomizedSearchCV突然卡住了

Performance Sklearn RandomizedSearchCV突然卡住了,performance,parameters,scikit-learn,grid-search,Performance,Parameters,Scikit Learn,Grid Search,我尝试对SVM模型进行随机搜索,但似乎要花很长时间。这对KNN很有效。在完成某些任务后,我发现这个过程在某个地方卡住了。以下是我的代码: # SVC Parameter Tuning svc_params = {'C': np.power(10, np.arange(-5., 1.)), 'kernel': ['rbf', 'linear', 'sigmoid', 'poly'], 'degree': np.arange(3, 21),

我尝试对SVM模型进行随机搜索,但似乎要花很长时间。这对KNN很有效。在完成某些任务后,我发现这个过程在某个地方卡住了。以下是我的代码:

# SVC Parameter Tuning
svc_params = {'C': np.power(10, np.arange(-5., 1.)), 
              'kernel': ['rbf', 'linear', 'sigmoid', 'poly'],
              'degree': np.arange(3, 21), 
              'coef0' : np.linspace(0, 1, 100), 
              'shrinking': [True, False], 
              'class_weight' : ['balanced', None]}

svc = RandomizedSearchCV(SVC(), 
                         svc_params, 
                         cv = 5, 
                         scoring = 'roc_auc', 
                         n_jobs = 128, 
                         n_iter = 100,
                         verbose = 2)
在取得一些结果后,这个过程陷入了困境

[CV]  kernel=poly, C=0.0001, degree=20, coef0=0.848484848485, 
shrinking=True, class_weight=balanced, total=  11.1s
[CV]  kernel=poly, C=0.0001, degree=20, coef0=0.848484848485, 
shrinking=True, class_weight=balanced, total=  11.0s
[CV]  kernel=poly, C=0.0001, degree=20, coef0=0.848484848485, 
shrinking=True, class_weight=balanced, total=  11.5s

我真是不知所措。谢谢你的帮助

您的数据有多大?对于svm,标准化/标准化数据效果最好。你的数据是经过预处理的吗?@VivekKumar我的数据大小约为900,有9个特征。大多数都是分类值。你能发布一个到你的数据集的链接吗?我使用的是kaggle()的数据。我再次查看了sklearn的文档,我认为这可能是由学位设置引起的。我将其静音后效果良好。这可能是由于有一个高阶和多核,然后所有的数据点可能会崩溃到一个拥挤的空间。你的数据有多大?对于svm,标准化/标准化数据效果最好。你的数据是经过预处理的吗?@VivekKumar我的数据大小约为900,有9个特征。大多数都是分类值。你能发布一个到你的数据集的链接吗?我使用的是kaggle()的数据。我再次查看了sklearn的文档,我认为这可能是由学位设置引起的。我将其静音后效果良好。这可能是由于有一个高度和多核,然后所有的数据点可能会崩溃到一个拥挤的空间。