coef0,: float, optional (default=0.0),Independent term in kernel function,It is only significant in 'poly' and 'sigmoid',影响模型受高阶多项式还是低阶多项式影响的结果
shrinking: bool,default=True
probability: bool,default=False
tol: 提前停止参数
cache_size:
class_weight: 类标签权重
verbose: 日志输出类型
max_iter: 最大迭代次数
decision_function_shape: ‘ovo’,'ovr',defalut='ovr'
random_state:
5.1.2 SVC类属性说明support_:
support_vectors_:
n_support_:
dual_coef_:
coef_:
intercept_:
fit_status_:
probA_:
probB_:
5.1.3 核函数选择有这么多核函数,该如何决定使用哪一个呢?有一个经验法则是,永远先从线性核函数开始尝试(LinearSVC比SVC(kernel='linear')快的多),特别是训练集非常大或特征非常多的时候,如果训练集不太大,可以试试高斯RBF核,大多数情况下它都非常好用。如果有多余时间和精力,可以使用交叉验证核网格搜索来尝试一些其他的核函数,特别是那些专门针对你数据集数据结构的和函数
5.2 GridSearchCV类说明 5.2.1 GridSearchCV参数说明estimator: 估算器,继承于BaseEstimator
param_grid: dict,键为参数名,值为该参数需要测试值选项
scoring: default=None
fit_params:
n_jobs: 设置要并行运行的作业数,取值为None或1,None表示1 job,1表示all processors,default=None
cv: 交叉验证的策略数,None或integer,None表示默认3-fold, integer指定“(分层)KFold”中的折叠数
verbose: 输出日志类型
5.2.2 GridSearchCV属性说明cv_results_: dict of numpy(masked) ndarray
best_estimator_:
best_score_: Mean cross-validated score of the best_estimator
best_params_:
best_index_: int,The index (of the ``cv_results_`` arrays) which corresponds to the best candidate parameter setting
scorer_:
n_splits_: The number of cross-validation splits (folds/iterations)
refit_time: float
5.3 RandomizedSearchCV类说明 5.3.1 RandomizedSearchCV参数说明estimator: 估算器,继承于BaseEstimator
param_distributions: dict,键为参数名,Dictionary with parameters names (string) as keys and distributions or lists of parameters to try. Distributions must provide a ``rvs`` method for sampling (such as those from scipy.stats.distributions). If a list is given, it is sampled uniformly
n_iter: 采样次数,default=10
scoring: default=None
fit_params:
n_jobs: 设置要并行运行的作业数,取值为None或1,None表示1 job,1表示all processors,default=None
cv: 交叉验证的策略数,None或integer,None表示默认3-fold, integer指定“(分层)KFold”中的折叠数
verbose: 输出日志类型
5.3.2 RandomizedSearchCV属性说明cv_results_: dict of numpy(masked) ndarray
best_estimators_:
best_score_: Mean cross-validated score of the best_estimator
best_params_:
best_index_: int,The index (of the ``cv_results_`` arrays) which corresponds to the best candidate parameter setting
scorer_:
n_splits_: The number of cross-validation splits (folds/iterations)
refit_time: float
参考资料:
(1)
(2)
(3)李航
(4)https://zhuanlan.zhihu.com/p/21932911?refer=baina