主要内容

fitcauto

利用优化的超参数自动选择分类模型

描述

给定预测器和响应数据,fitcauto自动尝试具有不同超参数值的分类模型类型。该函数使用贝叶斯优化来选择模型及其超参数值,并计算每个模型的交叉验证分类误差。优化完成后,fitcauto返回在整个数据集上训练的模型,该模型有望对新数据进行最佳分类。您可以使用预测而且损失返回模型的对象函数,分别对新数据进行分类和计算测试集分类误差。

使用fitcauto当你不确定哪种分类器类型最适合你的数据时。有关调优分类模型超参数的替代方法的信息,请参见选择功能

例子

Mdl= fitcauto (资源描述ResponseVarName返回一个分类模型Mdl使用调优的超参数。表资源描述包含预测变量和响应变量,其中ResponseVarName响应变量的名称。

Mdl= fitcauto (资源描述公式使用公式在变量中指定响应变量和要考虑的预测变量资源描述

Mdl= fitcauto (资源描述Y使用表中的预测变量资源描述类的标签是向量Y

例子

Mdl= fitcauto (XY使用矩阵中的预测变量X类的标签是向量Y

Mdl= fitcauto (___名称,值除以前语法中的任何输入参数组合外,还使用一个或多个名称-值对参数指定选项。例如,使用HyperparameterOptimizationOptions参数指定如何执行贝叶斯优化。

例子

MdlOptimizationResults= fitcauto(___此外回报OptimizationResults,一个BayesianOptimization对象,其中包含模型选择和超参数调优过程的结果。

例子

全部折叠

使用fitcauto自动选择具有优化超参数的分类模型,给定的预测器和响应数据存储在表中。

加载数据

加载carbig数据集,其中包含20世纪70年代和80年代初生产的汽车的测量数据。

负载carbig

根据是否是美国制造来对汽车进行分类。

Origin = categorical(cellstr(Origin));Origin = mergecats(Origin,{“法国”“日本”“德国”...“瑞典”“意大利”“英格兰”},“NotUSA”);

创建一个包含预测变量的表加速度位移,等等,以及响应变量起源

cars = table(加速度,位移,马力,...Model_Year MPG,体重,起源);

对数据进行分区

将数据划分为训练集和测试集。将大约80%的观测数据用于模型选择和超参数调优过程,20%的观测数据用于测试返回的最终模型的性能fitcauto。使用cvpartition对数据进行分区。

rng (“默认”用于数据分区的再现性c = cvpartition(原点,“坚持”, 0.2);trainingIdx = training(c);训练集指数%carsTrain = cars(trainingIdx,:);testdx =测试(c);测试集指数carsTest = cars(testdx,:);

运行fitcauto

将训练数据传递给fitcauto。默认情况下,fitcauto确定合适的模型类型进行尝试,使用贝叶斯优化找到好的超参数值,并返回训练好的模型Mdl用最好的预期表现。此外,fitcauto提供优化图和优化结果的迭代显示。有关如何解释这些结果的更多信息,请参见详细的显示

预计这个过程需要一些时间。若要加快优化过程,请考虑指定并行运行优化(如果您拥有并行计算工具箱™许可证)。要这样做,请通过“HyperparameterOptimizationOptions”、结构(UseParallel,真的)fitcauto作为名称-值对参数。

Mdl = fitcauto(carsTrain,“起源”);
警告:建议在优化朴素贝叶斯'Width'参数时,首先标准化所有数值预测器。如果您已经这样做了,请忽略此警告。
探索学习者类型:合奏,然而,nb,支持向量机,树总迭代(MaxObjectiveEvaluations): 150总时间(MaxTime):正  |=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 最好1 | | 0.14154 | 10.563 | 0.14154 | 0.14154 |合奏|方法:袋  | | | | | | | | | NumLearningCycles: 201  | | | | | | | | | MinLeafSize: 7 |
| 2 | Accept | 0.18269 | 0.57392 | 0.14154 | 0.14154 | knn | NumNeighbors: 3 |
| 3 | Accept | 0.23397 | 0.1264 | 0.14154 | 0.14154 | knn | NumNeighbors: 91 |
| 4 | Accept | 0.16308 | 12.867 | 0.14154 | 0.15468 | ensemble | Method: LogitBoost | | | | | | | | | NumLearningCycles: 274 | | | | | | | | | MinLeafSize: 15 |
| 5 | Accept | 0.20833 | 0.124 | 0.14154 | 0.15468 | knn | NumNeighbors: 4 |
| 6 | Accept | 0.22115 | 0.079641 | 0.14154 | 0.15468 | knn | NumNeighbors: 28 |
| 7 | Accept | 0.16923 | 0.20013 | 0.14154 | 0.15468 | tree | MinLeafSize: 105 |
| 8 | Accept | 0.37179 | 0.59222 | 0.14154 | 0.15468 | svm | BoxConstraint: 0.022186 | | | | | | | | | KernelScale: 0.085527 |
| 9 | Accept | 0.37179 | 0.11659 | 0.14154 | 0.15468 | svm | BoxConstraint: 0.045899 | | | | | | | | | KernelScale: 0.0024758 |
| 10 | Accept | 0.24615 | 0.98386 | 0.14154 | 0.15468 | nb | DistributionNames: kernel | | | | | | | | | Width: 1.1327 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 11 |接受| 0.16923 | 0.079996 | 0.14154 | 0.15468 | |树MinLeafSize: 78 |
| 12 | Accept | 0.26923 | 0.10923 | 0.14154 | 0.15468 | svm | BoxConstraint: 11.063 | | | | | | | | | KernelScale: 15.114 |
| 13 | Best | 0.12923 | 0.11568 | 0.12923 | 0.15468 | tree | MinLeafSize: 3 |
| 14 | Accept | 0.21154 | 0.084406 | 0.12923 | 0.15468 | knn | NumNeighbors: 2 |
| 15 | Accept | 0.14154 | 0.080022 | 0.12923 | 0.15294 | tree | MinLeafSize: 1 |
| 16 | Accept | 0.14769 | 0.092395 | 0.12923 | 0.15097 | tree | MinLeafSize: 2 |
| 17 |接受| 0.14154 | 10.869 | 0.12923 | 0.14872 | ensemble | Method: Bag | | | | | | | | | NumLearningCycles: 208 | | | | | | | | | MinLeafSize: 10 |
| 18 | Accept | 0.37179 | 0.12386 | 0.12923 | 0.14872 | svm | BoxConstraint: 116.46 | | | | | | | | | KernelScale: 0.52908 |
| 19 | Accept | 0.22769 | 0.15545 | 0.12923 | 0.14872 | nb | DistributionNames: normal | | | | | | | | | Width: NaN |
| 20 | Accept | 0.22115 | 0.070813 | 0.12923 | 0.14872 | knn | NumNeighbors: 8 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 21日|接受| 0.37179 | 0.11553 | 0.12923 | 0.14872 |支持向量机| BoxConstraint: 45.341  | | | | | | | | | KernelScale: 0.76949 |
| 22 | Accept | 0.12923 | 0.080362 | 0.12923 | 0.14194 | tree | MinLeafSize: 3 |
| 23 | Best | 0.10154 | 0.079656 | 0.10154 | 0.13213 | tree | MinLeafSize: 5 |
| 24 | Accept | 0.22769 | 0.2529 | 0.10154 | 0.13213 | nb | DistributionNames: kernel | | | | | | | | | Width: 0.42571 |
| 25 | Accept | 0.11385 | 0.080085 | 0.10154 | 0.1289 | tree | MinLeafSize: 11 |
| 26 | Accept | 0.13782 | 0.092228 | 0.10154 | 0.1289 | svm | BoxConstraint: 9.7286 | | | | | | | | | KernelScale: 293.41 |
| 27 |接受| 0.22769 | 0.073346 | 0.10154 | 0.1289 | nb | DistributionNames: normal | | | | | | | | | Width: NaN |
| 28 | Accept | 0.21795 | 0.074914 | 0.10154 | 0.1289 | knn | NumNeighbors: 42 |
| 29 | Accept | 0.24308 | 0.27621 | 0.10154 | 0.1289 | nb | DistributionNames: kernel | | | | | | | | | Width: 4.4662 |
| 30 | Accept | 0.16308 | 12.328 | 0.10154 | 0.1289 | ensemble | Method: LogitBoost | | | | | | | | | NumLearningCycles: 267 | | | | | | | | | MinLeafSize: 131 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 31日|接受| 0.24308 | 0.22334 | 0.10154 | 0.1289 | nb | DistributionNames:内核  | | | | | | | | | 宽度:0.66296 |
| 32 | Accept | 0.22115 | 0.066711 | 0.10154 | 0.1289 | knn | NumNeighbors: 28 |
| 33 | Accept | 0.13846 | 0.079934 | 0.10154 | 0.12465 | tree | MinLeafSize: 25 |
| 34 | Accept | 0.21474 | 0.085438 | 0.10154 | 0.12465 | knn | NumNeighbors: 14 |
| 35 | Accept | 0.16615 | 10.05 | 0.10154 | 0.12465 | ensemble | Method: LogitBoost | | | | | | | | | NumLearningCycles: 215 | | | | | | | | | MinLeafSize: 13 |
| 36 |接受| 0.14154 | 12.866 | 0.10154 | 0.12465 | ensemble | Method: Bag | | | | | | | | | NumLearningCycles: 254 | | | | | | | | | MinLeafSize: 31 |
| 37 |接受| 0.22769 | 0.070251 | 0.10154 | 0.12465 | nb | DistributionNames: normal | | | | | | | | | Width: NaN |
| 38 | Accept | 0.37179 | 0.077924 | 0.10154 | 0.12465 | svm | BoxConstraint: 0.0073633 | | | | | | | | | KernelScale: 774.33 |
| 39 | Accept | 0.16923 | 0.068411 | 0.10154 | 0.12552 | tree | MinLeafSize: 82 |
| 40 | Accept | 0.20833 | 0.064563 | 0.10154 | 0.12552 | knn | NumNeighbors: 4 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 41 |接受| 0.16308 | 12.932 | 0.10154 | 0.12552 |合奏|方法:LogitBoost  | | | | | | | | | NumLearningCycles: 274  | | | | | | | | | MinLeafSize: 150 |
| 42 | Accept | 0.22462 | 0.24365 | 0.10154 | 0.12552 | nb | DistributionNames: kernel | | | | | | | | | Width: 121.64 |
| 43 | Accept | 0.20308 | 11.027 | 0.10154 | 0.12552 | ensemble | Method: Bag | | | | | | | | | NumLearningCycles: 229 | | | | | | | | | MinLeafSize: 117 |
| 44 | Accept | 0.16923 | 0.069279 | 0.10154 | 0.12291 | tree | MinLeafSize: 84 |
| 45 | Accept | 0.22769 | 0.078716 | 0.10154 | 0.12291 | nb | DistributionNames: normal | | | | | | | | | Width: NaN |
| 46 | Accept | 0.22769 | 0.068458 | 0.10154 | 0.12291 | nb | DistributionNames: normal | | | | | | | | | Width: NaN |
| 47 |接受| 0.16615 | 9.9849 | 0.10154 | 0.12291 | ensemble | Method: LogitBoost | | | | | | | | | NumLearningCycles: 212 | | | | | | | | | MinLeafSize: 49 |
| 48 |接受| 0.14769 | 14.541 | 0.10154 | 0.12291 | ensemble | Method: Bag | | | | | | | | | NumLearningCycles: 288 | | | | | | | | | MinLeafSize: 25 |
| 49 | Accept | 0.23077 | 0.21379 | 0.10154 | 0.12291 | nb | DistributionNames: kernel | | | | | | | | | Width: 73.249 |
| 50 | Accept | 0.37179 | 0.091937 | 0.10154 | 0.12291 | svm | BoxConstraint: 0.0036501 | | | | | | | | | KernelScale: 1.0504 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 51 |接受| 0.21474 | 0.098808 | 0.10154 | 0.12291 |支持向量机| BoxConstraint: 64.859  | | | | | | | | | KernelScale: 23.779 |
| 52 | Accept | 0.37179 | 0.10415 | 0.10154 | 0.12291 | svm | BoxConstraint: 0.16622 | | | | | | | | | KernelScale: 4.4901 |
| 53 | Accept | 0.25846 | 0.2444 | 0.10154 | 0.12291 | nb | DistributionNames: kernel | | | | | | | | | Width: 0.079498 |
| 54 | Accept | 0.21154 | 0.074835 | 0.10154 | 0.12291 | knn | NumNeighbors: 2 |
| 55 | Accept | 0.13846 | 12.173 | 0.10154 | 0.12291 | ensemble | Method: Bag | | | | | | | | | NumLearningCycles: 234 | | | | | | | | | MinLeafSize: 8 |
| 56 | Accept | 0.36538 | 0.10958 | 0.10154 | 0.12291 | svm | BoxConstraint: 271.6 | | | | | | | | | KernelScale: 2.743 |
| 57 | Accept | 0.16615 | 11.482 | 0.10154 | 0.12291 | ensemble | Method: LogitBoost | | | | | | | | | NumLearningCycles: 248 | | | | | | | | | MinLeafSize: 117 |
| 58 | Accept | 0.37179 | 0.095419 | 0.10154 | 0.12291 | svm | BoxConstraint: 7.5785 | | | | | | | | | KernelScale: 0.0066815 |
| 59 | Accept | 0.37179 | 0.097469 | 0.10154 | 0.12291 | svm | BoxConstraint: 0.0017765 | | | | | | | | | KernelScale: 0.86786 |
| 60 | Accept | 0.37179 | 0.11284 | 0.10154 | 0.12291 | svm | BoxConstraint: 0.011465 | | | | | | | | | KernelScale: 0.02747 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 61 |接受| 0.11692 | 0.077515 | 0.10154 | 0.12239 | |树MinLeafSize: 12 |
| 62 | Accept | 0.29167 | 0.091617 | 0.10154 | 0.12239 | svm | BoxConstraint: 11.939 | | | | | | | | | KernelScale: 11.002 |
| 63 | Accept | 0.21795 | 0.067171 | 0.10154 | 0.12239 | knn | NumNeighbors: 6 |
| 64 | Accept | 0.18269 | 0.062887 | 0.10154 | 0.12239 | knn | NumNeighbors: 3 |
| 65 | Accept | 0.12923 | 0.075704 | 0.10154 | 0.11989 | tree | MinLeafSize: 3 |
| 66 | Accept | 0.16923 | 0.065889 | 0.10154 | 0.12048 | tree | MinLeafSize: 56 |
| 67 | Accept | 0.1891 | 0.068215 | 0.10154 | 0.12048 | knn | NumNeighbors: 1 |
| 68 |接受| 0.13231 | 14.135 | 0.10154 | 0.12048 | ensemble | Method: Bag | | | | | | | | | NumLearningCycles: 270 | | | | | | | | | MinLeafSize: 4 |
| 69 | Accept | 0.22769 | 0.060902 | 0.10154 | 0.12048 | nb | DistributionNames: normal | | | | | | | | | Width: NaN |
| 70 | Accept | 0.37231 | 0.24511 | 0.10154 | 0.12048 | nb | DistributionNames: kernel | | | | | | | | | Width: 1629.5 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 71 |接受| 0.16923 | 0.069135 | 0.10154 | 0.11947 | |树MinLeafSize: 61 |
| 72 | Accept | 0.22769 | 0.060552 | 0.10154 | 0.11947 | nb | DistributionNames: normal | | | | | | | | | Width: NaN |
| 73 | Accept | 0.16308 | 10.133 | 0.10154 | 0.11947 | ensemble | Method: LogitBoost | | | | | | | | | NumLearningCycles: 217 | | | | | | | | | MinLeafSize: 70 |
| 74 |接受| 0.13231 | 13.055 | 0.10154 | 0.11947 | ensemble | Method: Bag | | | | | | | | | NumLearningCycles: 257 | | | | | | | | | MinLeafSize: 2 |
| 75 | Accept | 0.21474 | 0.069312 | 0.10154 | 0.11947 | knn | NumNeighbors: 49 |
| 76 | Accept | 0.13846 | 0.083714 | 0.10154 | 0.1214 | tree | MinLeafSize: 25 |
| 77 | Accept | 0.12 | 0.069041 | 0.10154 | 0.11923 | tree | MinLeafSize: 6 |
| 78 | Accept | 0.10154 | 0.077399 | 0.10154 | 0.1118 | tree | MinLeafSize: 5 |
| 79 | Accept | 0.12 | 0.076269 | 0.10154 | 0.11007 | tree | MinLeafSize: 4 |
| 80 | Accept | 0.10154 | 0.09325 | 0.10154 | 0.10878 | tree | MinLeafSize: 5 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 81 |接受| 0.10154 | 0.074541 | 0.10154 | 0.10737 | |树MinLeafSize: 5 |
| 82 | Accept | 0.12 | 0.069929 | 0.10154 | 0.1063 | tree | MinLeafSize: 4 |
| 83 | Accept | 0.10154 | 0.072591 | 0.10154 | 0.10514 | tree | MinLeafSize: 5 |
| 84 | Accept | 0.10154 | 0.071254 | 0.10154 | 0.10366 | tree | MinLeafSize: 5 |
| 85 | Accept | 0.10154 | 0.077378 | 0.10154 | 0.10361 | tree | MinLeafSize: 5 |
| 86 | Accept | 0.10154 | 0.070643 | 0.10154 | 0.10348 | tree | MinLeafSize: 5 |
| 87 | Accept | 0.12 | 0.070551 | 0.10154 | 0.10286 | tree | MinLeafSize: 4 |
| 88 | Accept | 0.12 | 0.078438 | 0.10154 | 0.1029 | tree | MinLeafSize: 6 |
| 89 | Accept | 0.10154 | 0.072996 | 0.10154 | 0.10262 | tree | MinLeafSize: 5 |
| 90 | Accept | 0.10154 | 0.078162 | 0.10154 | 0.10246 | tree | MinLeafSize: 5 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 91 |接受| 0.10154 | 0.07038 | 0.10154 | 0.10267 | |树MinLeafSize: 5 |
| 92 | Accept | 0.10154 | 0.07752 | 0.10154 | 0.10257 | tree | MinLeafSize: 5 |
| 93 | Accept | 0.10154 | 0.076155 | 0.10154 | 0.10217 | tree | MinLeafSize: 5 |
| 94 | Accept | 0.10154 | 0.075983 | 0.10154 | 0.10221 | tree | MinLeafSize: 5 |
| 95 | Accept | 0.10154 | 0.07407 | 0.10154 | 0.10211 | tree | MinLeafSize: 5 |
| 96 | Accept | 0.10154 | 0.080633 | 0.10154 | 0.10207 | tree | MinLeafSize: 5 |
| 97 | Accept | 0.10154 | 0.086164 | 0.10154 | 0.10205 | tree | MinLeafSize: 5 |
| 98 | Accept | 0.10154 | 0.080264 | 0.10154 | 0.10191 | tree | MinLeafSize: 5 |
| 99 | Accept | 0.12308 | 0.076015 | 0.10154 | 0.1021 | tree | MinLeafSize: 17 |
| 100 | Accept | 0.10154 | 0.074579 | 0.10154 | 0.1019 | tree | MinLeafSize: 5 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 101 |接受| 0.10154 | 0.072077 | 0.10154 | 0.10186 | |树MinLeafSize: 5 |
| 102 | Accept | 0.10154 | 0.071287 | 0.10154 | 0.10199 | tree | MinLeafSize: 5 |
| 103 | Accept | 0.10154 | 0.080003 | 0.10154 | 0.10186 | tree | MinLeafSize: 5 |
| 104 | Accept | 0.12 | 0.07462 | 0.10154 | 0.10189 | tree | MinLeafSize: 13 |
| 105 | Accept | 0.10154 | 0.077244 | 0.10154 | 0.10198 | tree | MinLeafSize: 5 |
| 106 | Accept | 0.12 | 0.080302 | 0.10154 | 0.10173 | tree | MinLeafSize: 4 |
| 107 | Accept | 0.10154 | 0.071858 | 0.10154 | 0.10183 | tree | MinLeafSize: 5 |
| 108 | Accept | 0.10154 | 0.076013 | 0.10154 | 0.10166 | tree | MinLeafSize: 5 |
| 109 | Accept | 0.10154 | 0.079106 | 0.10154 | 0.10164 | tree | MinLeafSize: 5 |
| 110 | Accept | 0.10154 | 0.075807 | 0.10154 | 0.10172 | tree | MinLeafSize: 5 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 111 |接受| 0.10154 | 0.076903 | 0.10154 | 0.10159 | |树MinLeafSize: 5 |
| 112 | Accept | 0.10154 | 0.077409 | 0.10154 | 0.10163 | tree | MinLeafSize: 5 |
| 113 | Accept | 0.10154 | 0.069569 | 0.10154 | 0.10165 | tree | MinLeafSize: 5 |
| 114 | Accept | 0.12308 | 0.076744 | 0.10154 | 0.10156 | tree | MinLeafSize: 18 |
| 115 | Accept | 0.19551 | 0.097443 | 0.10154 | 0.10156 | svm | BoxConstraint: 1.2977 | | | | | | | | | KernelScale: 33.654 |
| 116 | Accept | 0.26603 | 0.099474 | 0.10154 | 0.10156 | svm | BoxConstraint: 0.082725 | | | | | | | | | KernelScale: 139.98 |
| 117 | Accept | 0.37179 | 0.077589 | 0.10154 | 0.10156 | svm | BoxConstraint: 0.0065156 | | | | | | | | | KernelScale: 559.53 |
| 118 | Accept | 0.15385 | 0.08281 | 0.10154 | 0.10156 | svm | BoxConstraint: 8.5337 | | | | | | | | | KernelScale: 482.07 |
| 119 | Accept | 0.20833 | 0.074271 | 0.10154 | 0.10156 | svm | BoxConstraint: 5.1729 | | | | | | | | | KernelScale: 980.38 |
| 120 | Accept | 0.17949 | 0.081488 | 0.10154 | 0.10156 | svm | BoxConstraint: 6.8028 | | | | | | | | | KernelScale: 578.14 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 121 |接受| 0.22115 | 0.076901 | 0.10154 | 0.10156 |支持向量机| BoxConstraint: 0.19345  | | | | | | | | | KernelScale: 367.75 |
| 122 | Accept | 0.17308 | 0.076171 | 0.10154 | 0.10156 | svm | BoxConstraint: 10.344 | | | | | | | | | KernelScale: 679.05 |
| 123 | Accept | 0.125 | 0.09187 | 0.10154 | 0.10156 | svm | BoxConstraint: 72.626 | | | | | | | | | KernelScale: 228.42 |
| 124 | Accept | 0.13462 | 0.15746 | 0.10154 | 0.10156 | svm | BoxConstraint: 586.5 | | | | | | | | | KernelScale: 176.02 |
| 125 | Accept | 0.13462 | 0.093366 | 0.10154 | 0.10156 | svm | BoxConstraint: 83.771 | | | | | | | | | KernelScale: 117.21 |
| 126 | Accept | 0.22436 | 0.10124 | 0.10154 | 0.10156 | svm | BoxConstraint: 962.52 | | | | | | | | | KernelScale: 20.898 |
| 127 | Accept | 0.15705 | 0.1133 | 0.10154 | 0.10156 | svm | BoxConstraint: 29.038 | | | | | | | | | KernelScale: 66.563 |
| 128 | Accept | 0.16346 | 0.10388 | 0.10154 | 0.10156 | svm | BoxConstraint: 156.8 | | | | | | | | | KernelScale: 62.775 |
| 129 | Accept | 0.13782 | 0.087555 | 0.10154 | 0.10156 | svm | BoxConstraint: 94.357 | | | | | | | | | KernelScale: 932.27 |
| 130 | Accept | 0.12821 | 0.093318 | 0.10154 | 0.10156 | svm | BoxConstraint: 25.982 | | | | | | | | | KernelScale: 247.06 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 131 |接受| 0.13462 | 0.08648 | 0.10154 | 0.10156 |支持向量机| BoxConstraint: 16.818  | | | | | | | | | KernelScale: 352.46 |
| 132 | Accept | 0.14103 | 0.090667 | 0.10154 | 0.10156 | svm | BoxConstraint: 15.817 | | | | | | | | | KernelScale: 130.15 |
| 133 | Accept | 0.12179 | 0.089208 | 0.10154 | 0.10156 | svm | BoxConstraint: 74.054 | | | | | | | | | KernelScale: 555.66 |
| 134 | Accept | 0.21474 | 0.082634 | 0.10154 | 0.10156 | svm | BoxConstraint: 0.80097 | | | | | | | | | KernelScale: 239.08 |
| 135 | Accept | 0.125 | 0.088947 | 0.10154 | 0.10156 | svm | BoxConstraint: 47.244 | | | | | | | | | KernelScale: 214.51 |
| 136 | Accept | 0.13141 | 0.07954 | 0.10154 | 0.10156 | svm | BoxConstraint: 13.389 | | | | | | | | | KernelScale: 145.55 |
| 137 | Accept | 0.13782 | 0.091167 | 0.10154 | 0.10156 | svm | BoxConstraint: 60.755 | | | | | | | | | KernelScale: 131.88 |
| 138 | Accept | 0.125 | 0.087338 | 0.10154 | 0.10156 | svm | BoxConstraint: 11.454 | | | | | | | | | KernelScale: 176.64 |
| 139 | Accept | 0.125 | 0.080567 | 0.10154 | 0.10156 | svm | BoxConstraint: 11.85 | | | | | | | | | KernelScale: 160.69 |
| 140 | Accept | 0.16667 | 0.083852 | 0.10154 | 0.10156 | svm | BoxConstraint: 11.155 | | | | | | | | | KernelScale: 652.28 |
|=================================================================================================================================| | Iter | Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | &损失结果验证(sec) | |验证损失确认的损失  | | | |=================================================================================================================================| | 141 |接受| 0.125 | 0.089769 | 0.10154 | 0.10156 |支持向量机| BoxConstraint: 10.933  | | | | | | | | | KernelScale: 172.97 |
| 142 | Accept | 0.21474 | 0.1003 | 0.10154 | 0.10156 | svm | BoxConstraint: 16.172 | | | | | | | | | KernelScale: 22.373 |
| 143 | Accept | 0.13782 | 0.0833 | 0.10154 | 0.10156 | svm | BoxConstraint: 7.6332 | | | | | | | | | KernelScale: 178.51 |
| 144 | Accept | 0.13462 | 0.10562 | 0.10154 | 0.10156 | svm | BoxConstraint: 6.7646 | | | | | | | | | KernelScale: 160.72 |
| 145 | Accept | 0.14103 | 0.076631 | 0.10154 | 0.10156 | svm | BoxConstraint: 6.8617 | | | | | | | | | KernelScale: 189.52 |
| 146 | Accept | 0.15385 | 0.082538 | 0.10154 | 0.10156 | svm | BoxConstraint: 6.0384 | | | | | | | | | KernelScale: 332.89 |
| 147 | Accept | 0.14423 | 0.077025 | 0.10154 | 0.10156 | svm | BoxConstraint: 5.7255 | | | | | | | | | KernelScale: 182.19 |
| 148 | Accept | 0.13782 | 0.089308 | 0.10154 | 0.10156 | svm | BoxConstraint: 70.212 | | | | | | | | | KernelScale: 818.46 |
| 149 | Accept | 0.14103 | 0.08348 | 0.10154 | 0.10156 | svm | BoxConstraint: 5.493 | | | | | | | | | KernelScale: 230.68 |
| 150 | Accept | 0.13782 | 0.079744 | 0.10154 | 0.10156 | svm | BoxConstraint: 5.3564 | | | | | | | | | KernelScale: 111.96 |

__________________________________________________________ 优化完成。总迭代:150总运行时间:835.2167秒训练和验证的总时间:193.4979秒最佳观察学习器是一个树模型,具有:MinLeafSize: 5观察验证损失:0.10154训练和验证时间:0.079656秒最佳估计学习器(返回模型)是一个树模型,具有:MinLeafSize: 5估计验证损失:0.10156估计训练和验证时间:0.076205秒

返回的最终模型fitcauto对应于最佳预估学习者。在返回模型之前,函数使用整个训练数据(carsTrain),列出的学习者(或模型)类型,以及显示的超参数值。

评估测试集性能

评估模型在测试集上的性能。

testAccuracy = 1 - loss(Mdl,carsTest,“起源”
testAccuracy = 0.9143
喀斯特岩溶confusionchart (carsTest.Origin,预测(Mdl))

使用fitcauto为了自动选择具有优化超参数的分类模型,给定的预测器和响应数据存储在单独的变量中。

加载数据

加载humanactivity数据集。该数据集包含24075个对人类五种物理活动的观察:坐(1)、站(2)、走(3)、跑(4)和跳舞(5)。每个观察都有60个特征,这些特征是从智能手机加速度计传感器测量的加速度数据中提取出来的。的变量的壮举包含24075个观测值的60个特征的预测器数据矩阵和响应变量actid以整数形式包含观察的活动id。

负载humanactivity

对数据进行分区

将数据划分为训练集和测试集。使用90%的观测值来选择模型,使用10%的观测值来验证返回的最终模型fitcauto。使用cvpartition保留10%的观测值用于测试。

rng (“默认”用于分区的再现性C = cvpartition(actid,“坚持”, 0.10);trainingIndices = training(c);%训练集的指数XTrain = feat(trainingIndices,:);YTrain = actid(trainingIndices);testIndices =测试(c);%测试集的索引XTest = feat(testindexes,:);YTest = actid(testIndices);

运行fitcauto

将训练数据传递给fitcauto。默认情况下,fitcauto确定要尝试的合适模型(或学习器)类型,使用贝叶斯优化为这些模型找到良好的超参数值,并返回具有最佳预期性能的训练模型。指定以并行方式运行优化(需要并行计算工具箱™)。返回第二个输出OptimizationResults其中包含贝叶斯优化的细节。

预计这个模型选择过程需要一些时间。默认情况下,fitcauto提供优化图和优化结果的迭代显示。有关如何解释这些结果的更多信息,请参见详细的显示

选项= struct(“UseParallel”,真正的);[Mdl,OptimizationResults] = fitcauto(XTrain,YTrain,“HyperparameterOptimizationOptions”、选择);
警告:建议在优化朴素贝叶斯'Width'参数时,首先标准化所有数值预测器。如果您已经这样做了,请忽略此警告。
使用“本地”配置文件启动并行池(parpool)…连接到并行池(worker数量:6)。将目标函数复制到worker…将目标函数复制给工人。
学习类型探索:集合,knn, nb,支持向量机,树总迭代(maxobjectiveassessments): 150总时间(MaxTime): Inf
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 最好1 | 6 | | 0.28088 | 48.752 | 0.28088 | 0.28088 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.22686  | | | | | | | | | | KernelScale: 330.4 |
| 2 | 6 | Best | 0.036459 | 51.455 | 0.036459 | 0.036459 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 254 | | | | | | | | | | MinLeafSize: 1786 | | | | | | | | | | MaxNumSplits: 12 |
| 3 | 6 | Best | 0.025845 | 5.1379 | 0.025845 | 0.025845 | tree | MinLeafSize: 59 |
| 4 | 6 | Best | 0.006415 | 60.999 | 0.006415 | 0.021738 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 214 | | | | | | | | | | MinLeafSize: 5 | | | | | | | | | | MaxNumSplits: 23 |
| 5 | 6 | Accept | 0.025845 | 4.8823 | 0.006415 | 0.021738 | tree | MinLeafSize: 59 |
| 6 | 6 | Accept | 0.017768 | 5.4601 | 0.006415 | 0.021738 | tree | MinLeafSize: 9 |
| 7 | 6 | Accept | 0.050212 | 1.1024 | 0.006415 | 0.021738 | | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 8 | 6 | Accept | 0.050212 | 0.64183 | 0.006415 | 0.021738 | | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 9 | 6 |接受| 0.019568 | 151.32 | 0.006415 | 0.021152 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 218 | | | | | | | | | | MinLeafSize: 2 | | | | | | | | | | MaxNumSplits: 63 |
| 10 | 6 |接受| 0.026537 | 165.42 | 0.006415 | 0.022035 |集成|方法:包| | | | | | | | | | NumLearningCycles: 264 | | | | | | | | | | MinLeafSize: 7 | | | | | | | | | | maxnum拆分:36 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 11 | 6 |接受| 0.59166 | 29.107 | 0.006415 | 0.022035 | nb | DistributionNames:内核  | | | | | | | | | | 宽度:4.7212 e-14 |
| 12 | 6 | Accept | 0.021645 | 50.626 | 0.006415 | 0.022122 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 243 | | | | | | | | | | MinLeafSize: 1247 | | | | | | | | | | MaxNumSplits: 45 |
| 13 | 6 | Accept | 0.043567 | 24.583 | 0.006415 | 0.022122 | knn | NumNeighbors: 144 |
| 14 | 6 | Accept | 0.028844 | 22.503 | 0.006415 | 0.022122 | knn | NumNeighbors: 18 |
| 15 | 6 | Accept | 0.04389 | 157.12 | 0.006415 | 0.022122 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.068467 | | | | | | | | | | KernelScale: 117.01 |
| 16 | 6 | Accept | 0.024598 | 20.721 | 0.006415 | 0.022122 | knn | NumNeighbors: 7 |
| 17 | 6 | Accept | 0.03009 | 20.969 | 0.006415 | 0.022122 | knn | NumNeighbors: 27 |
| 18 | 6 | Accept | 0.016753 | 6.5065 | 0.006415 | 0.021547 | tree | MinLeafSize: 2 |
| 19 | 6 | Accept | 0.040059 | 4.3496 | 0.006415 | 0.022122 | tree | MinLeafSize: 166 |
| 20 | 6 | Accept | 0.060319 | 2.2673 | 0.006415 | 0.022122 | tree | MinLeafSize: 1881 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 21 | 6 |接受| 0.050212 | 0.97596 | 0.006415 | 0.022122 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南|
| 22 | 6 | Accept | 0.036552 | 20.775 | 0.006415 | 0.022122 | knn | NumNeighbors: 67 |
| 23 | 6 | Accept | 0.050212 | 0.55594 | 0.006415 | 0.022122 | | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 24 | 6 | Accept | 0.11076 | 36.229 | 0.006415 | 0.022122 | knn | NumNeighbors: 2637 |
| 25 | 6 |接受| 0.27884 | 66.582 | 0.006415 | 0.024532 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 287 | | | | | | | | | | MinLeafSize: 4344 | | | | | | | | | | maxnum拆分:48 |
| 26 | 6 | Accept | 0.58127 | 31.861 | 0.006415 | 0.024532 | | DistributionNames: kernel | | | | | | | | | | Width: 1.6293e-06 |
| 27 | 6 | Accept | 0.01583 | 5.7511 | 0.006415 | 0.020656 | tree | MinLeafSize: 1 |
| 28 | 6 | Accept | 0.069319 | 1.806 | 0.006415 | 0.02077 | tree | MinLeafSize: 2284 |
| 29 | 6 |接受| 0.59166 | 352.55 | 0.006415 | 0.02077 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 790.4 | | | | | | | | | | KernelScale: 0.014348 |
| 30 | 6 | Accept | 0.043336 | 3.7865 | 0.006415 | 0.020133 | tree | MinLeafSize: 432 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 31日| 6 |接受| 0.10555 | 34.294 | 0.006415 | 0.020133 |资讯| NumNeighbors: 2430 |
| 32 | 6 | Accept | 0.021276 | 4.582 | 0.006415 | 0.018661 | tree | MinLeafSize: 17 |
| | 5 | 33接受| 0.030829 | 159.57 | 0.006415 | 0.018642 |合奏|方法:袋  | | | | | | | | | | NumLearningCycles: 288  | | | | | | | | | | MinLeafSize: 45  | | | | | | | | | | MaxNumSplits: 23 | | 34 | 5 |接受| 0.014307 | 49.903 | 0.006415 | 0.018642 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 234  | | | | | | | | | | MinLeafSize: 587  | | | | | | | | | | MaxNumSplits: 11 |
| 35 | 5 |接受| 0.050212 | 1.025 | 0.006415 | 0.018642 | nb | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 36 | 6 | Accept | 0.74165 | 24.131 | 0.006415 | 0.018661 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 217 | | | | | | | | | | MinLeafSize: 8856 | | | | | | | | | | MaxNumSplits: 36 |
| 37 | 6 | Accept | 0.4226 | 558.84 | 0.006415 | 0.018661 | | DistributionNames: kernel | | | | | | | | | | Width: 72.906 |
| 38 | 6 |接受| 0.57615 | 317.96 | 0.006415 | 0.018661 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 2.2347 | | | | | | | | | | KernelScale: 0.16176 |
| 39 | 6 | Accept | 0.59166 | 26.64 | 0.006415 | 0.018661 | | DistributionNames: kernel | | | | | | | | | | Width: 1.191e-07 |
| 40 | 6 | Accept | 0.087087 | 30.271 | 0.006415 | 0.018661 | knn | NumNeighbors: 1634 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 41 | 6 |接受| 0.73985 | 551.47 | 0.006415 | 0.018661 | nb | DistributionNames:内核  | | | | | | | | | | 宽度:1055.8 |
42 | | 4 |接受| 0.025983 | 146.08 | 0.006415 | 0.018661 |合奏|方法:袋  | | | | | | | | | | NumLearningCycles: 234  | | | | | | | | | | MinLeafSize: 73  | | | | | | | | | | 43 MaxNumSplits: 43 | | | 4 |接受| 0.02566 | 146.73 | 0.006415 | 0.018661 |合奏|方法:袋  | | | | | | | | | | NumLearningCycles: 234  | | | | | | | | | | MinLeafSize: 73  | | | | | | | | | | 44 MaxNumSplits: 43 | | | 4 |接受| 0.024922 | 124.65 | 0.006415 | 0.018661 |合奏|方法:袋| | | | | | | | | | NumLearningCycles: 206 | | | | | | | | | | MinLeafSize: 5 | | | | | | | | | | MaxNumSplits: 39 |
| 45 | 6 | Accept | 0.025891 | 23.638 | 0.006415 | 0.018661 | knn | NumNeighbors: 6 |
| 46 | 5 | Accept | 0.025891 | 24.038 | 0.006415 | 0.018661 | knn | NumNeighbors: 6 | | 47 | 5 | Accept | 0.025891 | 23.646 | 0.006415 | 0.018661 | knn | NumNeighbors: 6 |
| 48 | 6 |接受| 0.03009 | 188.48 | 0.006415 | 0.018661 |集成|方法:包| | | | | | | | | | NumLearningCycles: 299 | | | | | | | | | | MinLeafSize: 31 | | | | | | | | | | maxnum拆分:25 |
| 49 | 6 | Accept | 0.017214 | 6.0889 | 0.006415 | 0.017935 | tree | MinLeafSize: 4 |
| 50 | 6 | Accept | 0.01726 | 5.6027 | 0.006415 | 0.017303 | tree | MinLeafSize: 5 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 51 | 6 |接受| 0.037244 | 158.2 | 0.006415 | 0.017303 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 5.9571  | | | | | | | | | | KernelScale: 840.87 |
| 52 | 6 |接受| 0.046474 | 190.01 | 0.006415 | 0.017303 | svm |编码:onevsall | | | | | | | | | | BoxConstraint: 2.9119 | | | | | | | | | | KernelScale: 12.771 |
| 53 | 6 |接受| 0.032398 | 155.47 | 0.006415 | 0.017303 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 253 | | | | | | | | | | MinLeafSize: 14 | | | | | | | | | | MaxNumSplits: 22 |
| 54 | 6 | Accept | 0.054135 | 3.0156 | 0.006415 | 0.017093 | tree | MinLeafSize: 783 |
| 55 | 6 | Accept | 0.049797 | 28.421 | 0.006415 | 0.017093 | knn | NumNeighbors: 331 |
| 56 | 6 | Accept | 0.046566 | 27.524 | 0.006415 | 0.017093 | knn | NumNeighbors: 193 |
| 57 | 6 |接受| 0.36307 | 711.57 | 0.006415 | 0.017093 |支持|编码:onevsall | | | | | | | | | | BoxConstraint: 0.0011107 | | | | | | | | | | KernelScale: 0.80966 |
| 58 | 6 |接受| 0.022706 | 23.417 | 0.006415 | 0.017093 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 1.3505 | | | | | | | | | | KernelScale: 127.55 |
| 59 | 6 | Accept | 0.028798 | 4.1232 | 0.006415 | 0.01733 | tree | MinLeafSize: 84 |
| 60 | 6 | Accept | 0.041351 | 28.037 | 0.006415 | 0.01733 | knn | NumNeighbors: 124 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 61 | 6 |接受| 0.030044 | 26.265 | 0.006415 | 0.01733 |资讯| NumNeighbors: 26 |
| 62 | 6 |接受| 0.11838 | 284.42 | 0.006415 | 0.01733 | svm |编码:onevsall | | | | | | | | | | BoxConstraint: 0.0027874 | | | | | | | | | | KernelScale: 33.944 |
| 63 | 6 | Accept | 0.47116 | 54.038 | 0.006415 | 0.01733 | nb | DistributionNames: kernel | | | | | | | | | | Width: 4.7553e-05 |
| 64 | 6 | Accept | 0.26574 | 104.86 | 0.006415 | 0.01733 | nb | DistributionNames: kernel | | | | | | | | | | Width: 0.0011441 |
| 65 | 6 | Accept | 0.050212 | 0.72243 | 0.006415 | 0.01733 | nb | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 66 | 6 | Accept | 0.01726 | 5.6362 | 0.006415 | 0.016846 | tree | MinLeafSize: 5 |
| 67 | 6 | Accept | 0.077072 | 268.17 | 0.006415 | 0.016846 | nb | DistributionNames: kernel | | | | | | | | | | Width: 0.026902 |
| 68 | 6 | Accept | 0.031613 | 25.909 | 0.006415 | 0.016846 | knn | NumNeighbors: 33 |
| 69 | 6 | Accept | 0.02003 | 92.379 | 0.006415 | 0.016846 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 609.47 | | | | | | | | | | KernelScale: 39.88 |
| 70 | 6 | Accept | 0.1145 | 92.795 | 0.006415 | 0.016846 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 292 | | | | | | | | | | MinLeafSize: 3870 | | | | | | | | | | MaxNumSplits: 33 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 71 | 6 |接受| 0.012968 | 53.299 | 0.006415 | 0.016846 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 208  | | | | | | | | | | MinLeafSize: 5  | | | | | | | | | | MaxNumSplits: 10 |
| 72 | 6 | Accept | 0.011999 | 53.54 | 0.006415 | 0.016846 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 215 | | | | | | | | | | MinLeafSize: 5 | | | | | | | | | | MaxNumSplits: 11 |
| 73 | 6 | Accept | 0.011999 | 50.887 | 0.006415 | 0.012076 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 205 | | | | | | | | | | MinLeafSize: 2 | | | | | | | | | | MaxNumSplits: 11 |
| 74 | 6 | Accept | 0.039921 | 40.808 | 0.006415 | 0.012733 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 200 | | | | | | | | | | MinLeafSize: 1921 | | | | | | | | | | MaxNumSplits: 11 |
| 75 | 6 |接受| 0.04232 | 98.684 | 0.006415 | 0.012754 |集成|方法:包| | | | | | | | | | NumLearningCycles: 220 | | | | | | | | | | MinLeafSize: 1495 | | | | | | | | | | maxnum拆分:11 |
| 76 | 6 | Accept | 0.094702 | 397.88 | 0.006415 | 0.012754 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 671.76 | | | | | | | | | | KernelScale: 4.6418 |
| 77 | 6 | Accept | 0.065165 | 44.801 | 0.006415 | 0.013179 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 233 | | | | | | | | | | MinLeafSize: 2586 | | | | | | | | | | MaxNumSplits: 35 |
| 78 | 6 |接受| 0.22503 | 164.64 | 0.006415 | 0.013179 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 57.71 | | | | | | | | | | KernelScale: 2.0632 |
| 79 | 6 | Accept | 0.03069 | 44.42 | 0.006415 | 0.013027 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 213 | | | | | | | | | | MinLeafSize: 1619 | | | | | | | | | | MaxNumSplits: 95 |
| 80 | 6 |接受| 0.11459 | 71.56 | 0.006415 | 0.012064 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 212 | | | | | | | | | | MinLeafSize: 2669 | | | | | | | | | | MaxNumSplits: 31 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 81 | 6 |接受| 0.044582 | 41.462 | 0.006415 | 0.013176 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 207  | | | | | | | | | | MinLeafSize: 2211  | | | | | | | | | | MaxNumSplits: 56 |
| 82 | 6 | Accept | 0.014722 | 223.7 | 0.006415 | 0.013176 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 832.84 | | | | | | | | | | KernelScale: 392.65 |
| 83 | 6 | Accept | 0.018322 | 23.34 | 0.006415 | 0.013176 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 322.92 | | | | | | | | | | KernelScale: 542.76 |
| 84 | 6 |接受| 0.016984 | 28.833 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 727.84 | | | | | | | | | | KernelScale: 558.25 |
| 85 | 6 | Accept | 0.59166 | 2135.3 | 0.006415 | 0.013176 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.045413 | | | | | | | | | | KernelScale: 0.0034709 |
| 86 | 6 |接受| 0.012461 | 39.005 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 806.52 | | | | | | | | | | KernelScale: 244.64 |
| 87 | 6 |接受| 0.016753 | 22.649 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 173.38 | | | | | | | | | | KernelScale: 329.41 |
| 88 | 6 | Accept | 0.016845 | 28.292 | 0.006415 | 0.013176 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 242.37 | | | | | | | | | | KernelScale: 62.644 |
| 89 | 6 |接受| 0.016799 | 20.771 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 80.674 | | | | | | | | | | KernelScale: 242.97 |
| 90 | 6 | Accept | 0.041259 | 175.27 | 0.006415 | 0.013176 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 2.0147 | | | | | | | | | | KernelScale: 549.95 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 91 | 6 |接受| 0.017953 | 19.778 | 0.006415 | 0.013176 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 63.367  | | | | | | | | | | KernelScale: 263.72 |
| 92 | 6 |接受| 0.019568 | 19.245 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 55.612 | | | | | | | | | | KernelScale: 344.11 |
| 93 | 6 |接受| 0.016061 | 19.511 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 60.019 | | | | | | | | | | KernelScale: 185.49 |
| 94 | 6 |接受| 0.11847 | 149.5 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 770.37 | | | | | | | | | | KernelScale: 3.1188 |
| 95 | 6 |接受| 0.017953 | 18.428 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 43.94 | | | | | | | | | | KernelScale: 234.89 |
| 96 | 6 |接受| 0.025106 | 25.204 | 0.006415 | 0.013176 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 2.1294 | | | | | | | | | | KernelScale: 237.71 |
| 97 | 6 | Accept | 0.011676 | 70.358 | 0.006415 | 0.012446 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 283 | | | | | | | | | | MinLeafSize: 4 | | | | | | | | | | MaxNumSplits: 10 |
| 98 | 6 |接受| 0.031983 | 37.179 | 0.006415 | 0.012446 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 1.832 | | | | | | | | | | KernelScale: 449.73 |
| 99 | 6 | Accept | 0.0097379 | 76.639 | 0.006415 | 0.011402 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 299 | | | | | | | | | | MinLeafSize: 4 | | | | | | | | | | MaxNumSplits: 12 |
| 100 | 6 |接受| 0.22416 | 684.65 | 0.006415 | 0.011402 | svm |编码:onevsall | | | | | | | | | | BoxConstraint: 632.44 | | | | | | | | | | KernelScale: 1.8647 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 101 | 6 |接受| 0.11478 | 87.263 | 0.006415 | 0.011913 |合奏|方法:袋  | | | | | | | | | | NumLearningCycles: 272  | | | | | | | | | | MinLeafSize: 3176  | | | | | | | | | | MaxNumSplits: 54 |
| 102 | 6 | Accept | 0.0081687 | 75.177 | 0.006415 | 0.01045 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 291 | | | | | | | | | | MinLeafSize: 6 | | | | | | | | | | MaxNumSplits: 14 |
| 103 | 6 | Accept | 0.010753 | 70.01 | 0.006415 | 0.010258 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 284 | | | | | | | | | | MinLeafSize: 1 | | | | | | | | | | MaxNumSplits: 11 |
| 104 | 6 |接受| 0.36076 | 77 | 0.006415 | 0.010258 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0054235 | | | | | | | | | | KernelScale: 149.67 |
| 105 | 6 | Accept | 0.0084456 | 62.748 | 0.006415 | 0.0092051 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 214 | | | | | | | | | | MinLeafSize: 3 | | | | | | | | | | MaxNumSplits: 16 |
| 106 | 6 |接受| 0.012738 | 32.34 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 529.51 | | | | | | | | | | KernelScale: 161.83 |
| 107 | 6 |接受| 0.031521 | 41.482 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.6738 | | | | | | | | | | KernelScale: 289.2 |
| 108 | 6 |接受| 0.021368 | 38.604 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 567.35 | | | | | | | | | | KernelScale: 36.573 |
| 109 | 6 |接受| 0.050212 | 0.59557 | 0.006415 | 0.0092051 | | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 110 | 6 |接受| 0.57883 | 127.15 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0011506 | | | | | | | | | | KernelScale: 211.98 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 111 | 6 |接受| 0.050212 | 0.685 | 0.006415 | 0.0092051 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南|
| 112 | 6 |接受| 0.029583 | 33.504 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.49417 | | | | | | | | | | KernelScale: 209.72 |
| 113 | 6 | Accept | 0.012138 | 41.159 | 0.006415 | 0.0092051 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 967.85 | | | | | | | | | | KernelScale: 153.85 |
| 114 | 6 |接受| 0.030921 | 38.482 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.57771 | | | | | | | | | | KernelScale: 262.15 |
| 115 | 6 |接受| 0.1295 | 52.128 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.35331 | | | | | | | | | | KernelScale: 329.77 |
| 116 | 6 |接受| 0.028475 | 33.553 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.37306 | | | | | | | | | | KernelScale: 157.01 |
| 117 | 6 |接受| 0.050212 | 0.62316 | 0.006415 | 0.0092051 | | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 118 | 6 |接受| 0.030737 | 37 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.37996 | | | | | | | | | | KernelScale: 204.24 |
| 119 | 6 |接受| 0.021229 | 36.97 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 803.51 | | | | | | | | | | KernelScale: 38.271 |
| 120 | 6 | Accept | 0.015184 | 24.004 | 0.006415 | 0.0092051 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 119.72 | | | | | | | | | | KernelScale: 145.99 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 121 | 6 |接受| 0.06955 | 101.38 | 0.006415 | 0.0092051 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 39.152  | | | | | | | | | | KernelScale: 8.5572 |
| 122 | 6 |接受| 0.028291 | 32.637 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.32264 | | | | | | | | | | KernelScale: 134.73 |
| 123 | 6 |接受| 0.041951 | 51.65 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.28203 | | | | | | | | | | KernelScale: 237.1 |
| 124 | 6 |接受| 0.039921 | 216.38 | 0.006415 | 0.0092051 | svm |编码:onevsall | | | | | | | | | | BoxConstraint: 0.049329 | | | | | | | | | | KernelScale: 190.24 |
| 125 | 6 |接受| 0.048828 | 91.888 | 0.006415 | 0.0092051 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 180.12 | | | | | | | | | | KernelScale: 12.235 |
| 126 | 6 |接受| 0.030644 | 38.563 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.25725 | | | | | | | | | | KernelScale: 171.19 |
| 127 | 6 |接受| 0.029537 | 37.409 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.25269 | | | | | | | | | | KernelScale: 145.85 |
| 128 | 6 |接受| 0.02949 | 31.222 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.24034 | | | | | | | | | | KernelScale: 59.755 |
| 129 | 6 | Accept | 0.029537 | 130.19 | 0.006415 | 0.0092051 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 76.533 | | | | | | | | | | KernelScale: 22.982 |
| 130 | 6 |接受| 0.094702 | 174.14 | 0.006415 | 0.0092051 | svm |编码:onevsall | | | | | | | | | | BoxConstraint: 0.043666 | | | | | | | | | | KernelScale: 25.411 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 131 | 6 |接受| 0.037382 | 46.207 | 0.006415 | 0.0092051 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.23867  | | | | | | | | | | KernelScale: 204.62 |
| 132 | 6 |接受| 0.022152 | 40.588 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 887.62 | | | | | | | | | | KernelScale: 32.987 |
| 133 | 6 |接受| 0.032629 | 32.651 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.22511 | | | | | | | | | | KernelScale: 52.294 |
| 134 | 6 | Accept | 0.02806 | 131.12 | 0.006415 | 0.0092051 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.20346 | | | | | | | | | | KernelScale: 122.85 |
| 135 | 6 |接受| 0.59166 | 3480 | 0.006415 | 0.0092051 | svm |编码:onevsall | | | | | | | | | | BoxConstraint: 658.37 | | | | | | | | | | KernelScale: 0.0016161 |
| 136 | 6 | Accept | 0.59166 | 3481.3 | 0.006415 | 0.0092051 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 658.37 | | | | | | | | | | KernelScale: 0.0016161 |
| 137 | 6 |接受| 0.032121 | 44.172 | 0.006415 | 0.0092051 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 0.20648 | | | | | | | | | | KernelScale: 162.33 |
| 138 | 6 |接受| 0.30755 | 71.9 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.015886 | | | | | | | | | | KernelScale: 120.23 |
| 139 | 6 | Accept | 0.040936 | 233.89 | 0.006415 | 0.0092051 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.046614 | | | | | | | | | | KernelScale: 213.78 |
| 140 | 5 |接受| 0.040521 | 224.72 | 0.006415 | 0.0092051 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 0.043998  | | | | | | | | | | KernelScale: 195.58  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 141 | 5 |接受| 0.22208 | 64.659 | 0.006415 | 0.0092051 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.049755  | | | | | | | | | | KernelScale: 151.01 |
| 142 | 6 |接受| 0.029444 | 30.014 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.21789 | | | | | | | | | | KernelScale: 64.023 |
| 143 | 6 |接受| 0.046013 | 49.025 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.14805 | | | | | | | | | | KernelScale: 178.98 |
| 144 | 6 |接受| 0.013291 | 42.726 | 0.006415 | 0.0092051 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 960.14 | | | | | | | | | | KernelScale: 334.83 |
| 145 | 6 |接受| 0.59166 | 3493.5 | 0.006415 | 0.0092051 | svm |编码:onevsall | | | | | | | | | | BoxConstraint: 17.982 | | | | | | | | | | KernelScale: 0.0043756 |
| 146 | 6 |接受| 0.089533 | 189.71 | 0.006415 | 0.0092051 |支持|编码:onevsall | | | | | | | | | | BoxConstraint: 0.2326 | | | | | | | | | | KernelScale: 15.411 |
| 147 | 6 |接受| 0.03369 | 49.586 | 0.006415 | 0.0092051 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.21482 | | | | | | | | | | KernelScale: 180.5 |
| 148 | 6 | Accept | 0.013384 | 428.76 | 0.006415 | 0.0092051 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 920.16 | | | | | | | | | | KernelScale: 334.75 |
| 149 | 6 | Accept | 0.027368 | 117.6 | 0.006415 | 0.0092051 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.22783 | | | | | | | | | | KernelScale: 105.59 |
| 150 | 6 | Accept | 0.041674 | 234.61 | 0.006415 | 0.0092051 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.032335 | | | | | | | | | | KernelScale: 182.17 |

__________________________________________________________ 优化完成。总迭代:150总流逝时间:4534.2478秒训练和验证的总时间:24883.8563秒最佳观察学习者是一个集成模型,方法:AdaBoostM2 NumLearningCycles: 214 MinLeafSize: 5 maxnum拆分:23观察验证损失:0.006415训练和验证时间:60.9987秒最佳估计学习者(返回模型)是一个集成模型,方法:AdaBoostM2 NumLearningCycles: 214 MinLeafSize: 3 maxnum拆分:16估计验证损失:0.0092051训练和验证估计时间:57.8146秒fitcauto显示文档

返回的最终模型fitcauto对应于最佳预估学习者。在返回模型之前,函数使用整个训练数据(XTrain而且YTrain),列出的学习者(或模型)类型,以及显示的超参数值。

评估测试集性能

评估最终模型在测试数据集上的性能。

testAccuracy = 1 -损失(Mdl,XTest,YTest)
testAccuracy = 0.9917

最终的模型正确地分类了超过99%的观测数据。

使用fitcauto自动选择具有优化超参数的分类模型,给定的预测器和响应数据存储在表中。在将数据传递给fitcauto,执行特征选择以从数据集中移除不重要的预测因子。

加载和分区数据

阅读示例文件CreditRating_Historical.dat变成一个表。预测数据包括公司客户列表的财务比率和行业部门信息。响应变量由评级机构指定的信用评级组成。预览数据集的前几行。

信用评级=可读(“CreditRating_Historical.dat”);头(creditrating)
ans =8×8表ID WC_TA RE_TA EBIT_TA MVE_BVTD S_TA行业评级  _____ ______ ______ _______ ________ _____ ________ _______ 62394 0.013 0.104 0.036 0.447 0.142 3{“BB”}48608 0.232 0.335 0.062 1.969 0.281 8 {A} 42444 0.311 0.367 0.074 1.935 0.366 1 {A} 48631 0.194 0.263 0.062 1.017 0.228 - 4 {BBB的}43768 0.121 0.413 0.057 3.647 0.466 12 {' AAA '} 39255 -0.117 -0.799 0.01 0.179 0.082 - 4{“CCC”}62236 0.087 0.158 0.049 0.816 0.324 - 2 {BBB的}39354 0.005 0.181 0.034 2.597 0.388 7{“AA”}

的每一个值ID变量是唯一的客户ID,即长度(独特(creditrating.ID))等于在creditrating,ID变量是一个糟糕的预测器。删除ID变量,并将行业变量到a分类变量。

信用评级= removevars(信用评级,“ID”);creditrating。行业= categorical(creditrating.Industry);

将数据划分为训练集和测试集。将大约85%的观测数据用于模型选择和超参数调优过程,15%的观测数据用于测试返回的最终模型的性能fitcauto在新数据上。使用cvpartition对数据进行分区。

rng (“默认”用于分区的再现性C = cvpartition(信用评级。评级,“坚持”, 0.15);trainingIndices = training(c);%训练集的指数testIndices =测试(c);%测试集的索引creditTrain =信用评级(trainingIndices,:);creditTest = creditrating(testIndices,:);

执行特征选择

然后将训练数据传递给fitcauto,找到重要的预测因子fscchi2函数。可视化预测分数使用酒吧函数。因为有些分数可以,酒吧丢弃值,首先绘制有限的分数,然后绘制有限的表示分数用不同的颜色表示。

[idx,scores] = fscchi2(creditTrain,“评级”);栏(分数(idx))%表示有限分数持有veryImportant = isinf(分数);finiteMax = max(分数(~veryImportant));酒吧(finiteMax *重要(idx))%表示Inf分数持有xticklabels (strrep (creditTrain.Properties.VariableNames (idx),“_”“\ _”xtickangle(45) legend({“有限的分数”“正分数”})

注意行业Predictor的分数低,对应ap-value大于0.05,表示行业可能不是一个重要的特性。删除行业训练和测试数据集的特征。

creditTrain = removevars(creditTrain,“行业”);creditTest = removevars(creditTest,“行业”);

运行fitcauto

将训练数据传递给fitcauto。该函数使用贝叶斯优化来选择模型及其超参数值,并返回经过训练的模型Mdl用最好的预期表现。指定尝试所有可用的学习器类型并并行运行优化(需要并行计算工具箱™)。返回第二个输出结果其中包含贝叶斯优化的细节。

预计这个过程需要一些时间。默认情况下,fitcauto提供优化图和优化结果的迭代显示。有关如何解释这些结果的更多信息,请参见详细的显示

选项= struct(“UseParallel”,真正的);[Mdl,Results] = fitcauto(creditTrain;“评级”...“学习者”“所有”“HyperparameterOptimizationOptions”、选择);
警告:建议在优化朴素贝叶斯'Width'参数时,首先标准化所有数值预测器。如果您已经这样做了,请忽略此警告。
使用“本地”配置文件启动并行池(parpool)…连接到并行池(工人数:6)。
将目标函数复制给工人…将目标函数复制给工人。
学习类型探索:discr,集成,核,knn,线性,nb,支持向量机,树总迭代(maxobjectiveevalus): 240总时间(MaxTime): Inf
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 最好1 | 6 | | 0.42716 | 3.0379 | 0.42716 | 0.42716 | discr |三角洲:0.00046441  | | | | | | | | | | γ:0.2485 |
| 2 | 4 |接受| 0.74185 | 4.7899 | 0.24948 | 0.29794 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.48455  | | | | | | | | | | 最好KernelScale: 354.44 | | 3 | 4 | | 0.24948 | 5.0813 | 0.24948 | 0.29794 | |线性编码:onevsone  | | | | | | | | | | λ:6.3551 e-08  | | | | | | | | | | 学习者:物流| | 4 | 4 |接受| 0.29794 | 3.7295 | 0.24948 | 0.29794 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 12  | | | | | | | | | | LearnRate:0.063776 | | | | | | | | | | MinLeafSize: 277 |
| 5 | 3 | Accept | 0.25097 | 9.2655 | 0.24948 | 0.25067 | kernel | Coding: onevsone | | | | | | | | | | KernelScale: 7.8433 | | | | | | | | | | Lambda: 1.4468e-06 | | 6 | 3 b| Accept | 0.25067 | 0.81139 | 0.24948 | 0.25067 | knn | NumNeighbors: 105 | | | | | | | | | | Distance: minkowski |
| 7 | 6 | Accept | 0.52917 | 2.3362 | 0.24948 | 0.25067 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.002417 | | | | | | | | | | KernelScale: 356.9 |
| 8 | 3 |接受| 0.55818 | 0.63908 | 0.24948 | 0.25067 | discr |三角洲:0.98612  | | | | | | | | | | γ:0.86519 | | 9 | 3 |接受| 0.3781 | 1.6777 | 0.24948 | 0.25067 | |线性编码:onevsall  | | | | | | | | | | λ:1.0412 e-06  | | | | | | | | | | 学习者:物流| | 10 | 3 |接受| 0.43225 | 0.80766 | 0.24948 | 0.25067 | discr |三角洲:0.00013711  | | | | | | | | | | Gamma:0.60585  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 11 | 3 |接受| 0.47712 | 3.3756 | 0.24948 | 0.25067 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 2.7347  | | | | | | | | | | KernelScale: 24.465 |
| 12 | 6 | Accept | 0.25695 | 2.3709 | 0.24948 | 0.25067 | nb | DistributionNames: kernel | | | | | | | | | | Width: 0.057566 |
| 13 | 4 |接受| 0.26413 | 0.49941 | 0.24379 | 0.25067 | |树MinLeafSize: 30 | | 14 | 4 |接受| 0.42327 | 0.85101 | 0.24379 | 0.25067 |资讯| NumNeighbors: 56  | | | | | | | | | | 距离:余弦| |最好15 | 4 | | 0.24379 | 1.8084 | 0.24379 | 0.25067 | |线性编码:onevsone  | | | | | | | | | | λ:5.9172 e-05  | | | | | | | | | | 学习者:支持向量机|
| 16 | 3 |接受| 0.81544 | 4.9586 | 0.24379 | 0.25067 | |内核编码:onevsall  | | | | | | | | | | KernelScale: 0.0043375  | | | | | | | | | | λ:0.0023789 | | 17 | 3 |接受| 0.45169 | 0.96723 | 0.24379 | 0.25067 | |线性编码:onevsall  | | | | | | | | | | λ:0.0028505  | | | | | | | | | | 学习者:支持向量机|
| 18 | 6 | Accept | 0.33712 | 0.19972 | 0.24379 | 0.25695 | knn | NumNeighbors: 1 | | | | | | | | | |距离:cityblock |
| 19 | 3 |接受| 0.4834 | 0.38951 | 0.24379 | 0.25695 | knn | NumNeighbors: 72 | | | | | | | | | |距离:相关性| | 20 | 3 b|接受| 0.46336 | 0.78881 | 0.24379 | 0.25695 |线性|编码:onevsall | | | | | | | | | | Lambda: 0.0075732 | | | | | | | | | |学习者:支持向量机  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 21日| 3 |接受| 0.82082 | 2.9223 | 0.24379 | 0.25695 | |内核编码:onevsall  | | | | | | | | | | KernelScale: 0.0042587  | | | | | | | | | | λ:0.0014754 | | | 3 | 22日接受| 0.61292 | 1.8557 | 0.24379 | 0.25695 |合奏|方法:AdaBoostM2 | | | | | | | | | | NumLearningCycles: 13 | | | | | | | | | | LearnRate: 0.055349 | | | | | | | | | | MinLeafSize: 910 |
| 23 | 6 | Accept | 0.43255 | 0.68689 | 0.24379 | 0.25695 | discr | Delta: 0.016844 | | | | | | | | | | Gamma: 0.64466 |
| | 4 | 24日接受| 0.28866 | 1.9017 | 0.24379 | 0.25695 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 10  | | | | | | | | | | LearnRate: 0.11662  | | | | | | | | | | MinLeafSize: 181 | | 25 | 4 |接受| 0.74185 | 1.3546 | 0.24379 | 0.25695 |资讯| NumNeighbors: 1314  | | | | | | | | | | 距离:汉明| | | 4 | 26日接受| 0.42746 | 0.69002 | 0.24379 | 0.25695 | discr |三角洲:2.2544 e-06  | | | | | | | | | | γ:0.87275 |
| | 3 | 27日接受| 0.25606 | 12.143 | 0.24379 | 0.25498 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 132  | | | | | | | | | | LearnRate: 0.92674  | | | | | | | | | | MinLeafSize: 127 | | | 3 | 28日接受| 0.25366 | 2.4732 | 0.24379 | 0.25498 | nb | DistributionNames:内核  | | | | | | | | | | 宽度:0.10033 |
| 29 | 6 |接受| 0.66796 | 0.22938 | 0.24379 | 0.25498 | knn | NumNeighbors: 77 | | | | | | | | | |距离:提花|
| | 4 | 30日接受| 0.69488 | 1.9352 | 0.242 | 0.25498 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 8.4886  | | | | | | | | | | KernelScale: 192.19  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 最好31日| 4 | | 0.242 | 1.9467 | 0.242 | 0.25498 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 5.425  | | | | | | | | | | 32 KernelScale: 2.434 | | | 4 |接受| 0.32306 | 0.48104 | 0.242 | 0.25498 | |树MinLeafSize: 2 |
| 33 | 4 | Accept | 0.43225 | 0.10463 | 0.242 | 0.25498 | discr | Delta: 0.00015292 | | | | | | | | | | Gamma: 0.51045 |
| 34 | 4 | Accept | 0.32994 | 0.2065 | 0.242 | 0.25498 | tree | MinLeafSize: 3 |
| 35 | 6 | Accept | 0.53814 | 2.8748 | 0.242 | 0.25498 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 6.8148 | | | | | | | | | | KernelScale: 382.11 |
36 | | 4 |接受| 0.24529 | 105.62 | 0.242 | 0.25498 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.25488  | | | | | | | | | | 37 KernelScale: 0.0037823 | | | 4 |接受| 0.53814 | 3.3272 | 0.242 | 0.25498 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 6.8148  | | | | | | | | | | 38 KernelScale: 382.11 | | | 4 |接受| 0.53814 | 3.8593 | 0.242 | 0.25498 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 6.8148  | | | | | | | | | | KernelScale: 382.11 |
| 39 | 4 | Accept | 0.25965 | 14.211 | 0.242 | 0.25498 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 150 | | | | | | | | | | LearnRate: 0.014842 | | | | | | | | | | MinLeafSize: 21 |
| 40 | 5 |接受| 0.42656 | 0.16731 | 0.242 | 0.25498 | discr | Delta: 0.0020866 | | | | | | | | | | Gamma: 0.091054 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 41 | 5 |接受| 0.42656 | 0.11476 | 0.242 | 0.25498 | discr |三角洲:0.0020866  | | | | | | | | | | γ:0.091054 |
| 42 | 4 | Accept | 0.2767 | 21.389 | 0.242 | 0.25498 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 221 | | | | | | | | | | LearnRate: 0.0028588 | | | | | | | | | | MinLeafSize: 1 | | 43 | 4 | Accept | 0.29973 | 0.1848 | 0.242 | 0.25498 | tree | MinLeafSize: 7 |
| 44 | 4 | Accept | 0.25935 | 20.084 | 0.242 | 0.25498 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 304 | | | | | | | | | | LearnRate: NaN | | | | | | | | | | MinLeafSize: 100 |
| 45 | 3 | Accept | 0.24499 | 6.5071 | 0.242 | 0.26328 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.019387 | | | | | | | | | | KernelScale: 0.0047515 | | 46 | 3 b| Accept | 0.28059 | 0.19378 | 0.242 | 0.26328 | nb | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 47 | 6 | Accept | 0.27281 | 0.13181 | 0.242 | 0.26328 | knn | NumNeighbors: 8 | | | | | | | | | | Distance: chebychev |
48 | | 3 |接受| 0.2429 | 1.5474 | 0.242 | 0.26328 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.16719  | | | | | | | | | | KernelScale: 0.11257 | | 49 | 3 |接受| 0.2423 | 1.5219 | 0.242 | 0.26328 | |线性编码:onevsone  | | | | | | | | | | λ:4.28 e-07  | | | | | | | | | | 学习者:支持向量机| | 50 | 3 |接受| 0.67125 | 0.68464 | 0.242 | 0.26328 |资讯| NumNeighbors: 86  | | | | | | | | | | 距离:jaccard  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 51 | 3 |接受| 0.46485 | 0.8417 | 0.242 | 0.26328 | |树MinLeafSize: 645 |
| 52 | 6 |接受| 0.63147 | 3.1926 | 0.242 | 0.26328 |内核|编码:onevsall | | | | | | | | | | KernelScale: 176.2 | | | | | | | | | | Lambda: 2.3903e-06 |
53 | | 4 |接受| 0.37571 | 0.11086 | 0.242 | 0.26706 | |树MinLeafSize: 473 | | 54 | 4 |接受| 0.29136 | 0.43908 | 0.242 | 0.26706 |资讯| NumNeighbors: 354  | | | | | | | | | | 55距离:欧几里得| | | 4 |接受| 0.28059 | 0.50642 | 0.242 | 0.26706 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南|
| 56 | 3 | Accept | 0.36375 | 5.2617 | 0.242 | 0.26706 | kernel | Coding: onevsone | | | | | | | | | | KernelScale: 28.598 | | | | | | | | | | Lambda: 8.3238e-05 | | 57 | 3 b| Accept | 0.27251 | 0.13425 | 0.242 | 0.26706 | tree | MinLeafSize: 20 |
| 58 | 6 | Accept | 0.43225 | 0.083255 | 0.242 | 0.26706 | discr | Delta: 0.021467 | | | | | | | | | | Gamma: 0.66016 |
59 | | 3 |接受| 0.28059 | 0.10921 | 0.242 | 0.26106 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南| | 60 | 3 |接受| 0.42537 | 0.15885 | 0.242 | 0.26106 | discr |三角洲:0.001728  | | | | | | | | | | γ:0.89471  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 61 | 3 |接受| 0.81484 | 2.9209 | 0.242 | 0.26106 | |内核编码:onevsall  | | | | | | | | | | KernelScale: 0.0063987  | | | | | | | | | | λ:0.0075855 | | 62 | |接受| 0.24948 | 2.4493 | 0.242 | 0.26106 | |线性编码:onevsone | | | | | | | | | | Lambda: 1.3237e-07 | | | | | | | | | |学习者:logistic |
| 63 | 6 |接受| 0.68531 | 0.40944 | 0.242 | 0.26106 | knn | NumNeighbors: 260 | | | | | | | | | |距离:提花|
| 64 | 3 |接受| 0.32426 | 9.8071 | 0.242 | 0.26007 |合奏|方法:RUSBoost  | | | | | | | | | | NumLearningCycles: 132  | | | | | | | | | | LearnRate: 0.0014516  | | | | | | | | | | MinLeafSize: 104 | | 65 | |接受| 0.55369 | 0.69919 | 0.242 | 0.26007 |资讯| NumNeighbors: 615  | | | | | | | | | | 距离:相关| | 66 | |接受| 0.24319 | 1.5742 | 0.242 | 0.26007 | |线性编码:onevsone  | | | | | | | | | | λ:4.3001 e-09  | | | | | | | | | | 学习者:支持向量机| | 67 | 3 | Accept | 0.70894 | 1.9822 | 0.242 | 0.26007 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.45564 | | | | | | | | | | KernelScale: 51.195 |
| 68 | 6 | Accept | 0.46485 | 0.17082 | 0.242 | 0.26007 | tree | MinLeafSize: 611 |
| 69 | 5 |接受| 0.74185 | 2.1172 | 0.242 | 0.26007 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.94197  | | | | | | | | | | KernelScale: 524.56 | | 70 | |接受| 0.83548 | 6.3585 | 0.242 | 0.26007 | |内核编码:onevsall  | | | | | | | | | | KernelScale: 0.0038762  | | | | | | | | | | λ:2.288 e-06 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 71 | 3 |接受| 0.25905 | 16.096 | 0.242 | 0.26007 |合奏|方法:袋  | | | | | | | | | | NumLearningCycles: 160  | | | | | | | | | | LearnRate:南  | | | | | | | | | | MinLeafSize:2 | | 72 | |接受| 0.28448 | 13.826 | 0.242 | 0.26007 |合奏|方法:RUSBoost  | | | | | | | | | | NumLearningCycles: 161  | | | | | | | | | | LearnRate: 0.7581  | | | | | | | | | | MinLeafSize: 14 | | 73 | |接受| 0.25695 | 0.24642 | 0.242 | 0.26007 |资讯| NumNeighbors: 14  | | | | | | | | | | 距离:cityblock |
| 74 | 6 |接受| 0.32396 | 1.8799 | 0.242 | 0.26007 |内核|编码:onevsall | | | | | | | | | | KernelScale: 0.86904 | | | | | | | | | | Lambda: 0.29724 |
| 75 | 4 |接受| 0.32456 | 0.20481 | 0.242 | 0.26007 | |树MinLeafSize: 5 | | 76 | |接受| 0.32994 | 0.35799 | 0.242 | 0.26007 | |树MinLeafSize: 3 | | 77 | |接受| 0.26054 | 4.1734 | 0.242 | 0.26007 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 32  | | | | | | | | | | LearnRate: 0.06853  | | | | | | | | | | MinLeafSize: 19 |
| 78 | 4 |接受| 0.43703 | 0.92964 | 0.242 | 0.24831 |线性|编码:onevsall | | | | | | | | | | Lambda: 0.013265 | | | | | | | | | |学习者:logistic |
| 79 | 4 | Accept | 0.31588 | 17.116 | 0.242 | 0.24831 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 201 | | | | | | | | | | LearnRate: 0.0012955 | | | | | | | | | | MinLeafSize: 319 |
| 80 | 3 |接受| 0.25277 | 7.8173 | 0.242 | 0.24831 | |内核编码:onevsone  | | | | | | | | | | KernelScale: 0.78697  | | | | | | | | | | λ:4.1197 e-06  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 81 | 3 |接受| 0.43015 | 0.10239 | 0.242 | 0.24831 | discr |三角洲:0.0069822  | | | | | | | | | | γ:0.49526 |
| 82 | 6 | Accept | 0.42208 | 0.096953 | 0.242 | 0.24831 | discr | Delta: 0.057485 | | | | | | | | | | Gamma: 0.045714 |
| 83 | 3 |接受| 0.52617 | 2.3915 | 0.242 | 0.24831 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 0.26869  | | | | | | | | | | KernelScale: 17.595 | | 84 | |接受| 0.43344 | 1.2875 | 0.242 | 0.24831 |资讯| NumNeighbors: 119  | | | | | | | | | | 距离:mahalanobis | | 85 | |接受| 0.30093 | 1.3003 | 0.242 | 0.24831 | |线性编码:onevsone  | | | | | | | | | | λ:0.047624  | | | | | | | | | | 学习者:svm | | 86 | 3 | Accept | 0.42267 | 0.64506 | 0.242 | 0.24831 | knn | NumNeighbors: 48 | | | | | | | | | |距离:余弦|
| 87 | 6 | Accept | 0.32905 | 0.26891 | 0.242 | 0.24831 | knn | NumNeighbors: 65 | | | | | | | | | | Distance: seuclidean |
| 88 | 4 |接受| 0.24349 | 1.9282 | 0.242 | 0.24684 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0024196  | | | | | | | | | | KernelScale: 0.0082547 | | 89 | |接受| 0.24499 | 1.6543 | 0.242 | 0.24684 | |线性编码:onevsone  | | | | | | | | | | λ:3.3697 e-06  | | | | | | | | | | 学习者:支持向量机| | 90 | |接受| 0.24469 | 2.1463 | 0.242 | 0.24684 | |线性编码:onevsone  | | | | | | | | | | λ:6.5777 e-05  | | | | | | | | | | 学习者:物流|
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 91 | 4 |接受| 0.28059 | 0.15481 | 0.242 | 0.24684 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南|
| 92 | 5 | Accept | 0.28059 | 0.38138 | 0.242 | 0.24684 | nb | DistributionNames: normal | | | | | | | | | | Width: NaN | | 93 | 5 b| Accept | 0.28059 | 0.15804 | 0.242 | 0.24684 | nb | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 94 | 4 |接受| 0.29674 | 11.234 | 0.242 | 0.24684 |合奏|方法:RUSBoost  | | | | | | | | | | NumLearningCycles: 147  | | | | | | | | | | LearnRate: 0.95321  | | | | | | | | | | MinLeafSize: 112 | | 95 | |接受| 0.28059 | 0.12279 | 0.242 | 0.24684 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南|
| 96 | 4 | Accept | 0.29704 | 1.1016 | 0.242 | 0.24684 | ensemble | Method: AdaBoostM2 | | | | | | | | | | NumLearningCycles: 11 | | | | | | | | | | LearnRate: 0.0072731 | | | | | | | | | | MinLeafSize: 12 |
| 97 | 4 | Accept | 0.28059 | 0.099833 | 0.242 | 0.24684 | nb | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 98 | 4 |最佳| 0.2411 | 1.3634 | 0.2411 | 0.24471 |线性|编码:onevsone | | | | | | | | | | Lambda: 0.00056045 | | | | | | | | | |学习者:支持向量机|
| 99 | 4 | Accept | 0.74185 | 0.10441 | 0.2411 | 0.24471 | discr | Delta: 39.281 | | | | | | | | | | Gamma: 0.77032 |
| 100 | 4 | Accept | 0.30093 | 0.11043 | 0.2411 | 0.24471 | tree | MinLeafSize: 135 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 101 | 4 |接受| 0.46844 | 0.17182 | 0.2411 | 0.24471 |资讯| NumNeighbors: 2  | | | | | | | | | | 距离:余弦|
| 102 | 4 | Accept | 0.25426 | 3.1634 | 0.2411 | 0.24471 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 38 | | | | | | | | | | LearnRate: NaN | | | | | | | | | | MinLeafSize: 28 |
| 103 | 4 |接受| 0.24469 | 1.6558 | 0.2411 | 0.24558 |线性|编码:onevsone | | | | | | | | | | Lambda: 0.0012413 | | | | | | | | | |学习者:logistic |
| 104 | 4 |接受| 0.43823 | 3.6572 | 0.2411 | 0.24558 |内核|编码:onevsone | | | | | | | | | | KernelScale: 13.293 | | | | | | | | | | Lambda: 0.0031304 |
| 105 | 4 |接受| 0.31977 | 1.3423 | 0.2411 | 0.24556 |线性|编码:onevsone | | | | | | | | | | Lambda: 0.040102 | | | | | | | | | |学习者:logistic |
| 106 | 6 |接受| 0.24678 | 2.0849 | 0.2411 | 0.24529 |线性|编码:onevsone | | | | | | | | | | Lambda: 3.9918e-05 | | | | | | | | | |学习者:logistic |
| 107 | 5 |接受| 0.24678 | 1.9627 | 0.2411 | 0.24441 | |线性编码:onevsone  | | | | | | | | | | λ:3.9918 e-05  | | | | | | | | | | 学习者:物流| | 108 | |接受| 0.24678 | 2.3413 | 0.2411 | 0.24441 | |线性编码:onevsone  | | | | | | | | | | λ:3.9918 e-05  | | | | | | | | | | 学习者:物流|
| 109 | 4 | Accept | 0.29435 | 14.698 | 0.2411 | 0.24441 | ensemble | Method: Bag | | | | | | | | | | NumLearningCycles: 249 | | | | | | | | | | LearnRate: NaN | | | | | | | | | | MinLeafSize: 292 | | 110 | 4 | Accept | 0.37152 | 0.098701 | 0.2411 | 0.24441 | tree | MinLeafSize: 375 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 111 | 4 |接受| 0.25666 | 5.7386 | 0.2411 | 0.24441 |合奏|方法:袋  | | | | | | | | | | NumLearningCycles: 61  | | | | | | | | | | LearnRate:南  | | | | | | | | | | MinLeafSize:3 | | 112 | 4 | Accept | 0.28059 | 0.10645 | 0.2411 | 0.24441 | nb | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 113 | 4 | Accept | 0.28059 | 0.10515 | 0.2411 | 0.24441 | | DistributionNames: normal | | | | | | | | | | Width: NaN |
| 114 | 6 | Accept | 0.74185 | 2.7447 | 0.2411 | 0.24441 | nb | DistributionNames: kernel | | | | | | | | | | Width: 74.975 |
| 115 | 4 |接受| 0.78552 | 10.495 | 0.2411 | 0.24441 | |内核编码:onevsone  | | | | | | | | | | KernelScale: 0.0050713  | | | | | | | | | | λ:3.7406 e-06 | | 116 | |接受| 0.74185 | 2.7544 | 0.2411 | 0.24441 | nb | DistributionNames:内核  | | | | | | | | | | 宽度:74.975 | | 117 | |接受| 0.74185 | 2.6565 | 0.2411 | 0.24441 | nb | DistributionNames:内核  | | | | | | | | | | 宽度:74.975 |
| 118 | 4 | Accept | 0.45797 | 11.614 | 0.2411 | 0.24441 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.94716 | | | | | | | | | | KernelScale: 0.072905 |
| 119 | 4 |接受| 0.65271 | 1.6037 | 0.2411 | 0.24441 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010356 | | | | | | | | | | KernelScale: 1.3521 |
| 120 | 4 | Accept | 0.3108 | 1.4953 | 0.2411 | 0.24441 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.080708 | | | | | | | | | | KernelScale: 2.7439 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 121 | 4 |接受| 0.2414 | 1.2954 | 0.2411 | 0.24441 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0048396  | | | | | | | | | | KernelScale: 0.02413 |
| 122 | 4 |接受| 0.5157 | 9.6657 | 0.2411 | 0.24441 |内核|编码:onevsone | | | | | | | | | | KernelScale: 0.071659 | | | | | | | | | | Lambda: 1.3447e-05 |
| 123 | 4 |接受| 0.53186 | 390.32 | 0.2402 | 0.24441 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 416.46  | | | | | | | | | | 最好KernelScale: 0.0019087 | | 124 | | | 0.2402 | 1.4571 | 0.2402 | 0.24441 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.033468  | | | | | | | | | | KernelScale: 0.073489 |
| 125 | 4 |接受| 0.2402 | 1.3713 | 0.2402 | 0.24441 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0040249 | | | | | | | | | | KernelScale: 0.030373 |
| 126 | 3 |接受| 0.24529 | 39.503 | 0.2402 | 0.24441 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.32116  | | | | | | | | | | KernelScale: 0.0076281 | | 127 | |接受| 0.25576 | 1.4031 | 0.2402 | 0.24441 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.018022  | | | | | | | | | | KernelScale: 0.3703 |
| 128 | 6 | Accept | 0.2426 | 1.3555 | 0.2402 | 0.24229 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.029999 | | | | | | | | | | KernelScale: 0.046245 |
| 129 | 3 | Accept | 0.24499 | 9.5236 | 0.2402 | 0.24419 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.38346 | | | | | | | | | | KernelScale: 0.01786 | | 130 | 3 b| Accept | 0.28059 | 0.12828 | 0.2402 | 0.24419 | nb | DistributionNames: normal | | | | | | | | | | Width:南  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 131 | 3 |接受| 0.6886 | 1.4213 | 0.2402 | 0.24419 | |线性编码:onevsone  | | | | | | | | | | λ:3.0763  | | | | | | | | | | 学习者:物流| | 132 | |接受| 0.4487 | 3.111 | 0.2402 | 0.24419 |支持向量机|编码:onevsall | | | | | | | | | | BoxConstraint: 4.845 | | | | | | | | | | KernelScale: 0.74028 |
| 133 | 6 |接受| 0.24469 | 8.3042 | 0.2402 | 0.24441 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.45335 | | | | | | | | | | KernelScale: 0.02034 |
| 134 | 3 |接受| 0.26204 | 1.7109 | 0.2402 | 0.24441 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0011217  | | | | | | | | | | KernelScale: 0.10651 | | 135 | |接受| 0.74185 | 4.0388 | 0.2402 | 0.24441 | |内核编码:onevsone  | | | | | | | | | | KernelScale: 10.518  | | | | | | | | | | λ:0.20458 | | 136 | |接受| 0.29734 | 9.9598 | 0.2402 | 0.24441 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 107  | | | | | | | | | | LearnRate:0.0023672 | | | | | | | | | | MinLeafSize: 197 | | 137 | 3 | Accept | 0.44391 | 2.0399 | 0.2402 | 0.24441 | nb | DistributionNames: kernel | | | | | | | | | | Width: 0.00025608 |
| 138 | 6 |接受| 0.24559 | 3.2102 | 0.2402 | 0.24276 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.5211 | | | | | | | | | | KernelScale: 0.04163 |
| 139 | 4 |接受| 0.25067 | 1.4995 | 0.2402 | 0.24276 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.030306  | | | | | | | | | | KernelScale: 0.37391 | | 140 | |接受| 0.24559 | 1.6227 | 0.2402 | 0.24276 | |线性编码:onevsone  | | | | | | | | | | λ:3.0973 e-07  | | | | | | | | | | 学习者:支持向量机  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 141 | 4 |接受| 0.74634 | 7.0945 | 0.2402 | 0.24276 | |内核编码:onevsone  | | | | | | | | | | KernelScale: 0.01094  | | | | | | | | | | λ:0.0013866 |
| 142 | 4 |接受| 0.29076 | 1.3294 | 0.2402 | 0.24334 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.006875 | | | | | | | | | | KernelScale: 0.38629 |
| 143 | 4 |接受| 0.24379 | 1.4595 | 0.2402 | 0.24269 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010315 | | | | | | | | | | KernelScale: 0.0079737 |
| 144 | 4 | Accept | 0.24499 | 4.9134 | 0.2402 | 0.24226 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.62692 | | | | | | | | | | KernelScale: 0.033311 |
| 145 | 4 |接受| 0.24469 | 12.208 | 0.2402 | 0.24242 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010122 | | | | | | | | | | KernelScale: 0.0010167 |
| 146 | 4 |接受| 0.38588 | 1.5037 | 0.2402 | 0.24388 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0011127 | | | | | | | | | | KernelScale: 0.52838 |
| 147 | 4 |接受| 0.24589 | 1.3026 | 0.2402 | 0.24228 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.1424 | | | | | | | | | | KernelScale: 0.58035 |
| 148 | 4 |接受| 0.2408 | 1.2582 | 0.2402 | 0.24165 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010168 | | | | | | | | | | KernelScale: 0.032668 |
| 149 | 4 |接受| 0.24469 | 1.2764 | 0.2402 | 0.24197 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.13008 | | | | | | | | | | KernelScale: 0.53455 |
| 150 | 5 |接受| 0.24469 | 6.7111 | 0.2402 | 0.24222 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.45516 | | | | | | | | | | KernelScale: 0.024796 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 151 | 5 |接受| 0.30422 | 1.5471 | 0.2402 | 0.24244 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.36805  | | | | | | | | | | KernelScale: 4.7124 |
| 152 | 6 | Accept | 0.24559 | 1.5701 | 0.2402 | 0.2414 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.21039 | | | | | | | | | | KernelScale: 0.63504 |
| 153 | 5 |接受| 0.24529 | 66.311 | 0.2402 | 0.24243 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.45714  | | | | | | | | | | KernelScale: 0.0069546 | | 154 | |接受| 0.24589 | 1.604 | 0.2402 | 0.24243 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0010712  | | | | | | | | | | KernelScale: 0.043866 |
| 155 | 5 |接受| 0.29345 | 1.4823 | 0.2402 | 0.24262 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.032053 | | | | | | | | | | KernelScale: 0.88175 |
| 156 | 6 |接受| 0.25247 | 1.4792 | 0.2402 | 0.24289 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.14103 | | | | | | | | | | KernelScale: 0.91489 |
| 157 | 6 |接受| 0.2405 | 1.5732 | 0.2402 | 0.242 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010011 | | | | | | | | | | KernelScale: 0.012195 |
| 158 | 6 |接受| 0.2426 | 1.5232 | 0.2402 | 0.24223 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.52301 | | | | | | | | | | KernelScale: 0.69511 |
| 159 | 6 | Accept | 0.25456 | 1.9467 | 0.2402 | 0.24253 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.63305 | | | | | | | | | | KernelScale: 2.1073 |
| 160 | 5 |接受| 0.24559 | 133.37 | 0.2402 | 0.24253 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.73914  | | | | | | | | | | KernelScale: 0.005832  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 161 | 5 |接受| 0.57314 | 8.1723 | 0.2402 | 0.24253 | |内核编码:onevsall  | | | | | | | | | | KernelScale: 0.071267  | | | | | | | | | | λ:1.4009 e-06 |
| 162 | 5 | Accept | 0.24649 | 1.6878 | 0.2402 | 0.24325 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.19825 | | | | | | | | | | KernelScale: 0.74742 |
| 163 | 5 |接受| 0.2417 | 1.5824 | 0.2402 | 0.24297 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010619 | | | | | | | | | | KernelScale: 0.01008 |
| 164 | 4 |接受| 0.45528 | 140.46 | 0.2402 | 0.24441 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 0.00706  | | | | | | | | | | KernelScale: 0.030909 | | 165 | |接受| 0.31409 | 1.5573 | 0.2402 | 0.24441 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.56217  | | | | | | | | | | KernelScale: 7.5961 |
| 166 | 4 | Accept | 0.46575 | 2.2317 | 0.2402 | 0.24441 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.10607 | | | | | | | | | | KernelScale: 0.67446 |
| 167 | 4 |接受| 0.24529 | 3.3215 | 0.2402 | 0.24334 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 1.4843 | | | | | | | | | | KernelScale: 0.069679 |
| 168 | 4 |接受| 0.25396 | 1.3297 | 0.2402 | 0.24353 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.52671 | | | | | | | | | | KernelScale: 1.9394 |
| 169 | 5 |接受| 0.2402 | 1.5257 | 0.2402 | 0.24313 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010378 | | | | | | | | | | KernelScale: 0.012749 |
| 170 | 6 |接受| 0.3464 | 1.8583 | 0.2402 | 0.24237 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.50591 | | | | | | | | | | KernelScale: 9.2835 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 171 | 6 |接受| 0.24499 | 12.298 | 0.2402 | 0.24203 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0018442  | | | | | | | | | | KernelScale: 0.0012506 |
| 172 | 6 | Accept | 0.30272 | 1.6031 | 0.2402 | 0.24186 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 2.8265 | | | | | | | | | | KernelScale: 11.897 |
| 173 | 6 |接受| 0.24349 | 1.4247 | 0.2402 | 0.24134 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010459 | | | | | | | | | | KernelScale: 0.036404 |
| 174 | 6 | Accept | 0.29794 | 1.6502 | 0.2402 | 0.24299 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 5.4893 | | | | | | | | | | KernelScale: 13.359 |
| 175 | 5 |接受| 0.24529 | 109.43 | 0.2402 | 0.24345 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.88969  | | | | | | | | | | KernelScale: 0.0075436 | | 176 | |接受| 0.25007 | 1.6406 | 0.2402 | 0.24345 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0010212  | | | | | | | | | | KernelScale: 0.071763 |
| 177 | 5 |接受| 0.24619 | 2.171 | 0.2402 | 0.24259 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010341 | | | | | | | | | | KernelScale: 0.0039146 |
| 178 | 5 | Accept | 0.32576 | 1.6841 | 0.2402 | 0.24185 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 1.6102 | | | | | | | | | | KernelScale: 14.532 |
| 179 | 5 | Accept | 0.8262 | 890.49 | 0.2402 | 0.24179 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 0.18649 | | | | | | | | | | KernelScale: 0.0010802 |
| 180 | 5 |接受| 0.30212 | 1.5671 | 0.2402 | 0.24174 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 6.0833 | | | | | | | | | | KernelScale: 15.913 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 181 | 5 |接受| 0.24499 | 14.697 | 0.2402 | 0.24192 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0078062  | | | | | | | | | | KernelScale: 0.0020664 |
| 182 | 5 |接受| 0.24529 | 61.944 | 0.2402 | 0.2414 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 1.0466 | | | | | | | | | | KernelScale: 0.011265 |
| 183 | 5 |接受| 0.24499 | 17.644 | 0.2402 | 0.24186 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0021279 | | | | | | | | | | KernelScale: 0.0010743 |
| 184 | 5 |接受| 0.29794 | 1.6007 | 0.2402 | 0.24189 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010132 | | | | | | | | | | KernelScale: 0.17669 |
| 185 | 4 |接受| 0.24918 | 279.94 | 0.2402 | 0.24236 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 891.39  | | | | | | | | | | KernelScale: 0.076868 | | 186 | |接受| 0.26593 | 1.4006 | 0.2402 | 0.24236 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.14381  | | | | | | | | | | KernelScale: 1.2859 |
| 187 | 4 | Accept | 0.24768 | 1.438 | 0.2402 | 0.24161 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.47763 | | | | | | | | | | KernelScale: 1.4081 |
| 188 | 4 |接受| 0.24589 | 2.5142 | 0.2402 | 0.2416 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010362 | | | | | | | | | | KernelScale: 0.0024579 |
| 189 | 4 |接受| 0.2405 | 1.2662 | 0.2402 | 0.24215 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 11.232 | | | | | | | | | | KernelScale: 1.4768 |
| 190 | 4 |接受| 0.24678 | 1.2604 | 0.2402 | 0.24174 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.48152 | | | | | | | | | | KernelScale: 1.1771 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 191 | 4 |接受| 0.25426 | 1.2846 | 0.2402 | 0.24186 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.47194  | | | | | | | | | | KernelScale: 1.7714 |
| 192 | 5 | Accept | 0.24768 | 1.3295 | 0.2402 | 0.24188 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.44397 | | | | | | | | | | KernelScale: 1.3493 |
| 193 | 6 | Accept | 0.2414 | 1.3979 | 0.2402 | 0.24154 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 1.8796 | | | | | | | | | | KernelScale: 1.4211 |
| 194 | 6 |接受| 0.24499 | 18.984 | 0.2402 | 0.24225 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0018335 | | | | | | | | | | KernelScale: 0.0010104 |
| 195 | 6 | Accept | 0.25037 | 1.5112 | 0.2402 | 0.24212 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 0.41413 | | | | | | | | | | KernelScale: 1.4211 |
| 196 | 6 |接受| 0.24499 | 6.007 | 0.2402 | 0.24191 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010001 | | | | | | | | | | KernelScale: 0.0013198 |
| 197 | 6 |接受| 0.24529 | 111.16 | 0.2402 | 0.24215 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.046722 | | | | | | | | | | KernelScale: 0.0016388 |
| 198 | 5 |接受| 0.24499 | 18.688 | 0.2402 | 0.24186 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0033281  | | | | | | | | | | KernelScale: 0.0012057 | | 199 | |接受| 0.2426 | 1.4789 | 0.2402 | 0.24186 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 3.0066  | | | | | | | | | | KernelScale: 1.3889 |
| 200 | 6 |接受| 0.2417 | 1.499 | 0.2402 | 0.24212 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 1.7327 | | | | | | | | | | KernelScale: 1.3637 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 201 | 5 |接受| 0.26473 | 277.53 | 0.2402 | 0.24176 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.19781  | | | | | | | | | | KernelScale: 0.0010905 | | 202 | |接受| 0.30332 | 1.5632 | 0.2402 | 0.24176 |支持向量机|编码:onevsone | | | | | | | | | | BoxConstraint: 0.075228 | | | | | | | | | | KernelScale: 1.8677 |
| 203 | 5 |接受| 0.3108 | 1.5519 | 0.2402 | 0.24188 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 2.8086 | | | | | | | | | | KernelScale: 16.078 |
| 204 | 5 | Accept | 0.2414 | 1.4413 | 0.2402 | 0.24147 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 3.1547 | | | | | | | | | | KernelScale: 0.57043 |
| 205 | 5 |接受| 0.3108 | 1.5576 | 0.2402 | 0.24195 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 3.0235 | | | | | | | | | | KernelScale: 16.787 |
| 206 | 5 |接受| 0.2411 | 1.3939 | 0.2402 | 0.24163 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010447 | | | | | | | | | | KernelScale: 0.022855 |
| 207 | 5 |接受| 0.29704 | 1.5568 | 0.2402 | 0.24155 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.11574 | | | | | | | | | | KernelScale: 1.8573 |
| 208 | 5 |接受| 0.2426 | 1.4114 | 0.2402 | 0.24195 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 2.2749 | | | | | | | | | | KernelScale: 1.2395 |
| 209 | 5 |接受| 0.24559 | 3.445 | 0.2402 | 0.2417 | svm |编码:onevsone | | | | | | | | | | BoxConstraint: 560.48 | | | | | | | | | | KernelScale: 1.4181 |
| 210 | 4 |接受| 0.24678 | 266.64 | 0.2402 | 0.24136 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 11.849  | | | | | | | | | | KernelScale: 0.0095181  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 211 | 4 |接受| 0.24589 | 2.1278 | 0.2402 | 0.24136 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 41.82  | | | | | | | | | | KernelScale: 0.71147 |
| 212 | 3 |接受| 0.95034 | 1042.9 | 0.2402 | 0.24153 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 10.672  | | | | | | | | | | KernelScale: 0.0013453 | | 213 | |接受| 0.24649 | 2.0006 | 0.2402 | 0.24153 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 210.22  | | | | | | | | | | KernelScale: 1.4654 |
| 214 | 6 |接受| 0.26653 | 1.2521 | 0.2402 | 0.24136 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.16417 | | | | | | | | | | KernelScale: 1.3626 |
| 215 | 4 |接受| 0.2429 | 1.5969 | 0.2402 | 0.24136 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0010295  | | | | | | | | | | KernelScale: 0.008743 | | 216 | |接受| 0.33353 | 1.2604 | 0.2402 | 0.24136 | nb | DistributionNames:内核  | | | | | | | | | | 宽度:0.0017992 | | 217 | |接受| 0.28059 | 0.2661 | 0.2402 | 0.24136 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南|
| 218 | 4 | Accept | 0.24798 | 1.3024 | 0.2402 | 0.24173 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 66.132 | | | | | | | | | | KernelScale: 16.829 |
| 219 | 4 | Accept | 0.24529 | 1.255 | 0.2402 | 0.24156 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 1.0858 | | | | | | | | | | KernelScale: 1.3599 |
| 220 | 4 |接受| 0.2408 | 1.2539 | 0.2402 | 0.24183 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 3.8001 | | | | | | | | | | KernelScale: 1.3322 |
|===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 221 | 4 |接受| 0.24589 | 1.8906 | 0.2402 | 0.24185 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 399.07  | | | | | | | | | | KernelScale: 2.1791 |
| 222 | 4 | Accept | 0.2414 | 1.2821 | 0.2402 | 0.24187 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 4.8589 | | | | | | | | | | KernelScale: 1.3542 |
| 223 | 4 | Accept | 0.2423 | 1.2804 | 0.2402 | 0.24131 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 2.6082 | | | | | | | | | | KernelScale: 1.3565 |
| 224 | 4 |接受| 0.24559 | 3.1158 | 0.2402 | 0.24116 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 536.1 | | | | | | | | | | KernelScale: 1.4679 |
| 225 | 4 | Accept | 0.25067 | 1.3228 | 0.2402 | 0.24178 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 74.127 | | | | | | | | | | KernelScale: 18.528 |
| 226 | 3 |接受| 0.28358 | 328 | 0.2402 | 0.24207 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.47384  | | | | | | | | | | KernelScale: 0.001006 | | 227 | |接受| 0.24499 | 6.2167 | 0.2402 | 0.24207 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 0.0026293  | | | | | | | | | | KernelScale: 0.0019141 |
| 228 | 6 |接受| 0.2402 | 1.2501 | 0.2402 | 0.24173 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 0.0010356 | | | | | | | | | | KernelScale: 0.012867 |
| 229 | 3 | Accept | 0.24589 | 1.4248 | 0.2402 | 0.24173 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 104.21 | | | | | | | | | | KernelScale: 17.45 | | 230 | 3 | Accept | 0.43015 | 0.13765 | 0.2402 | 0.24173 | discr | Delta: 0.00951 | | | | | | | | | | Gamma:0.68613  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 231 | 3 |接受| 0.47383 | 2.5354 | 0.2402 | 0.24173 |支持向量机|编码:onevsall  | | | | | | | | | | BoxConstraint: 1.2431  | | | | | | | | | | KernelScale: 0.76632 | | 232 | |接受| 0.67664 | 0.30377 | 0.2402 | 0.24173 |资讯| NumNeighbors:8 | | | | | | | | | |距离:提花|
| 233 | 6 | Accept | 0.2414 | 1.2369 | 0.2402 | 0.24133 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 820.98 | | | | | | | | | | KernelScale: 17.331 |
| 234 | 3 |接受| 0.27759 | 1.4452 | 0.2402 | 0.24133 |支持向量机|编码:onevsone  | | | | | | | | | | BoxConstraint: 22.198  | | | | | | | | | | KernelScale: 17.97 | | 235 | |接受| 0.28059 | 0.13623 | 0.2402 | 0.24133 | nb | DistributionNames:正常  | | | | | | | | | | 宽度:南| | 236 | |接受| 0.52408 | 1.503 | 0.2402 | 0.24133 |资讯| NumNeighbors: 351  | | | | | | | | | | 距离:mahalanobis | | 237 | |接受| 0.27789 | 5.8867 | 0.2402 | 0.24133 |合奏|方法:RUSBoost | | | | | | | | | | NumLearningCycles: 68 | | | | | | | | | | LearnRate: 0.18331 | | | | | | | | | | MinLeafSize: 3 |
| 238 | 6 |接受| 0.24499 | 1.2819 | 0.2402 | 0.24188 |支持|编码:onevsone | | | | | | | | | | BoxConstraint: 201.86 | | | | | | | | | | KernelScale: 18.062 |
| 239 | 3 | Accept | 0.25097 | 1.4345 | 0.2402 | 0.24116 | svm | Coding: onevsone | | | | | | | | | | BoxConstraint: 105.8 | | | | | | | | | | KernelScale: 23.315 | | 240 | 3 | Accept | 0.30212 | 0.12275 | 0.2402 | 0.24116 | tree | MinLeafSize:122年  | |===========================================================================================================================================| | Iter | |活跃Eval培训| | |验证时间观察敏|估计分钟|学生| Hyperparameter:值| | | | | |损失结果工人&验证(sec) | |验证损失确认的损失  | | | |===========================================================================================================================================| | 241 | 3 |接受| 0.25307 | 11.978 | 0.2402 | 0.24116 |合奏|方法:AdaBoostM2  | | | | | | | | | | NumLearningCycles: 119  | | | | | | | | | | LearnRate: 0.60308  | | | | | | | | | | MinLeafSize:1 | | 242 | 3 | Accept | 0.44182 | 11.435 | 0.2402 | 0.24116 | svm | Coding: onevsall | | | | | | | | | | BoxConstraint: 6.2783 | | | | | | | | | | KernelScale: 0.19364 |

__________________________________________________________ 优化完成。总迭代:242总运行时间:1907.7403秒训练和验证的总时间:4936.5339秒最佳观察到的学习器是一个多类支持向量机模型,具有:编码(ECOC): onevsone BoxConstraint: 0.033468 KernelScale: 0.073489观察到的验证损失:0.2402训练和验证时间:1.4571秒最佳估计学习器(返回模型)是一个多类支持向量机模型,具有:编码(ECOC): onevsone BoxConstraint: 0.0010378 KernelScale: 0.012749估计验证损失:0.24116训练和验证估计时间:1.5595秒fitcauto显示文档

返回的最终模型fitcauto对应于最佳预估学习者。在返回模型之前,函数使用整个训练数据(creditTrain),列出的学习者(或模型)类型,以及显示的超参数值。

评估测试集性能

该模型Mdl对应于贝叶斯优化中的最佳点“min-visited-mean”标准。要衡量模型在新数据上的表现,请查看模型的交叉验证精度(cvAccuracy)及其基于贝叶斯优化的一般性能估计(estimatedAccuracy).

[x,~,iteration] = bestPoint(Results,“标准”“min-visited-mean”);cvError = Results.ObjectiveTrace(迭代);cvAccuracy = 1 - cvError
cvAccuracy = 0.7598
estimatedError = predictobobjective (Results,x);estimatedAccuracy = 1 - estimatedError
estimatedAccuracy = 0.7588

评估模型在测试集上的性能。根据结果创建一个混淆矩阵,并指定混淆矩阵中类的顺序。

testAccuracy = 1 - loss(Mdl,creditTest,“评级”
testAccuracy = 0.7438
cm =混淆图(creditTest. rating,预测(Mdl,creditTest));sortClasses(厘米,{“AAA”“AA”“一个”“BBB”“BB”“B”“CCC”})

输入参数

全部折叠

示例数据,指定为表。每行资源描述对应一个观测值,每一列对应一个预测值。可选地,资源描述可以为响应变量包含一个额外的列。不接受多列变量和字符向量单元格数组以外的单元格数组。

如果资源描述包含响应变量,您希望在中使用所有剩余变量资源描述作为预测器,使用指定响应变量ResponseVarName

如果资源描述包含响应变量,并且您希望仅在中使用其余变量的子集资源描述作为预测器,指定使用的公式公式

如果资源描述不包含响应变量,指定响应变量使用Y。响应变量的长度和其中的行数资源描述必须是相等的。

数据类型:表格

响应变量名,指定为中的变量名资源描述

您必须指定ResponseVarName作为字符向量或字符串标量。例如,如果响应变量Y存储为资源描述。Y,然后指定为“Y”。否则,软件处理的所有列资源描述,包括Y,作为训练模型时的预测因子。

响应变量必须是类别、字符或字符串数组、逻辑或数字向量或字符向量的单元格数组。如果Y是字符数组,则响应变量的每个元素必须对应于数组中的一行。

类指定类的顺序是一个很好的实践一会名称-值对参数。

数据类型:字符|字符串

响应变量和预测变量子集的解释模型,在表单中指定为字符向量或字符串标量“Y ~ X1 + X2 + X3”。在这种形式下,Y表示响应变量,和X1X2,X3表示预测变量。

中指定变量的子集资源描述使用公式作为训练模型的预测因子。如果您指定了一个公式,那么该软件不使用任何变量资源描述没有出现在公式

公式中的变量名必须同时为资源描述Tbl.Properties.VariableNames)和有效的MATLAB®标识符。

中的变量名可以验证资源描述通过使用isvarname函数。下面的代码返回逻辑1真正的)用于每个具有有效变量名的变量。

cellfun (@isvarname Tbl.Properties.VariableNames)
如果变量名称在资源描述无效的,然后使用matlab.lang.makeValidName函数。
Tbl.Properties.VariableNames = matlab.lang.makeValidName(Tbl.Properties.VariableNames);

数据类型:字符|字符串

类标签,指定为数字、类别或逻辑向量、字符或字符串数组或字符向量的单元格数组。

  • 如果Y是字符数组,则类标签的每个元素必须对应于数组中的一行。

  • 的长度Y必须等于里面的行数资源描述X

  • 类指定类顺序是一种良好的实践一会名称-值对参数。

数据类型:||分类|逻辑|字符|字符串|细胞

预测器数据,指定为数值矩阵。

每行X对应一个观测值,每一列对应一个预测值。

的长度Y和进去的行数X必须是相等的。

中出现的顺序指定预测符的名称X,使用PredictorNames名称-值对参数。

数据类型:|

请注意

软件处理,空字符向量(,空字符串(""),< >失踪,<定义>元素作为缺失的数据。该软件删除对应于响应变量中缺失值的数据行。然而,对预测数据中缺失值的处理X资源描述不同的模型(或学习器)有所不同。

名称-值对参数

的可选逗号分隔对名称,值参数。的名字参数名称和价值对应的值。的名字必须出现在引号内。您可以以任意顺序指定多个名称和值对参数Name1, Value1,…,的家

例子:“HyperparameterOptimizationOptions”、结构(“MaxObjectiveEvaluations”,200年,“详细”,2)指定运行优化过程的200次迭代(即尝试200个模型超参数组合),并在命令窗口中显示关于要评估的下一个模型超参数组合的信息。
优化选项

全部折叠

优化期间要尝试的分类模型类型,指定为由逗号分隔的对组成“学习者”下面第一个表中的值或第二个表中的一个或多个学习者名称。指定多个学习器名称为字符串或单元格数组。

价值 描述
“汽车” fitcauto自动选择一个子集的学习器,适合给定的预测器和响应数据。学习器可以有不同于默认值的模型超参数值。有关更多信息,请参见学习者的自动选择
“所有” fitcauto选择所有可能的学习器。
所有的线性的 fitcauto选择所有线性学习器:“discr”(线性判别类型),“线性”,“支持向量机”(线性核)。
“all-nonlinear” fitcauto选择所有非线性学习器:“discr”(具有二次判别类型),“合奏”“内核”“资讯”“注”“支持向量机”(具有高斯或多项式核),和“树”

学习者的名字 描述
“discr” 判别分析分类器
“合奏” 集成分类模型
“内核” 核分类模型
“资讯” k-最近邻模型
“线性” 线性分类模型
“注” 朴素贝叶斯分类器
“支持向量机” 金宝app支持向量机分类器
“树” 二叉决策分类树

例子:“学习者”,“所有”

例子:“学习者”,“合奏”

例子:“学习者”,{“支持向量机”,“树”}

数据类型:字符|字符串|细胞

要优化的超参数,指定为逗号分隔的对,由“OptimizeHyperparameters”而且“汽车”“所有”。可优化的超参数取决于模型(或学习器),如表中所述。

学习者的名字 Hyperparameters为“汽车” 附加超参数“所有” 笔记
“discr” δγ DiscrimType

  • 学习者值是所有的线性的,fitcauto函数在DiscrimType的值“线性”“diaglinear”,“pseudolinear”,不管OptimizeHyperparameters价值。

  • 学习者值是“all-nonlinear”,fitcauto函数在DiscrimType的值“二次”“diagquadratic”,“pseudoquadratic”,不管OptimizeHyperparameters价值。

有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters。请注意,在使用fitcauto

“合奏” 方法NumLearningCyclesLearnRateMinLeafSize MaxNumSplitsNumVariablesToSampleSplitCriterion

当整个乐团方法值是一种提升方法,集合NumBins值是50

有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters。请注意,在使用fitcauto

“内核” KernelScaleλ编码(只适用于三个或以上课程) 学习者NumExpansionDimensions 有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters而且OptimizeHyperparameters(只适用于三个或以上课程)。请注意,在使用fitcauto
“资讯” 距离NumNeighbors DistanceWeight指数标准化 有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters。请注意,在使用fitcauto
“线性” λ学习者编码(只适用于三个或以上课程) 正则化 有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters而且OptimizeHyperparameters(只适用于三个或以上课程)。请注意,在使用fitcauto
“注” DistributionNames宽度 内核 有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters。请注意,在使用fitcauto
“支持向量机” BoxConstraintKernelScale编码(只适用于三个或以上课程) KernelFunctionPolynomialOrder标准化

  • 学习者值是所有的线性的,fitcauto函数不优化KernelFunctionPolynomialOrderOptimizeHyperparameters值是“所有”

  • 学习者值是“all-nonlinear”,fitcauto函数在KernelFunction的值“高斯”而且多项式的,不管OptimizeHyperparameters价值。

  • 标准化值是真正的OptimizeHyperparameters值是“汽车”

有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters而且OptimizeHyperparameters(只适用于三个或以上课程)。请注意,在使用fitcauto

“树” MinLeafSize MaxNumSplitsSplitCriterion 有关包括超参数搜索范围在内的详细信息,请参见OptimizeHyperparameters。请注意,在使用fitcauto

请注意

“学习者”是否设置为其他值“汽车”,未被优化的模型超参数的默认值与默认拟合函数值匹配,除非表注释中另有说明。当“学习者”设置为“汽车”时,优化后的超参数搜索范围和未优化的超参数值可以根据训练数据的特征而变化。有关更多信息,请参见学习者的自动选择

例子:“OptimizeHyperparameters”、“所有”

选项的优化,指定为由逗号分隔的对组成“HyperparameterOptimizationOptions”还有一个结构。结构中的所有字段都是可选的。

字段名 默认的
MaxObjectiveEvaluations 最大迭代次数(目标函数计算) 30 * L,在那里l学习者的数量(见学习者
MaxTime

时间限制,指定为正实数。时间限制以秒为单位,由抽搐而且toc。运行时可能超过MaxTime因为MaxTime不中断函数求值。

ShowPlots 指示是否显示图的逻辑值。如果真正的,该字段根据迭代次数绘制最佳观测和估计的目标函数值(到目前为止)。 真正的
SaveIntermediateResults 指示是否保存结果的逻辑值。如果真正的,此字段将覆盖名为“BayesoptResults”在每次迭代中。变量是aBayesianOptimization对象。
详细的

在命令行显示:

  • 0-无迭代显示

  • 1-迭代显示

  • 2-迭代显示下一个要评估的点的附加信息

1
UseParallel 指示是否并行运行贝叶斯优化的逻辑值,这需要并行计算工具箱™。由于并行计时的不可再现性,并行贝叶斯优化不一定产生可再现的结果。
重新分区

指示是否在每次迭代中重新划分交叉验证的逻辑值。如果,优化器使用单个分区进行优化。

真正的通常会给出最健壮的结果,因为此设置考虑了分区噪声。然而,为了获得好的结果,真正的需要至少两倍的函数求值。

只指定以下三个选项中的一个。
CVPartition cvpartition对象,由cvpartition “Kfold”,5如果您没有指定任何交叉验证字段
坚持 范围内的标量(0,1)表示抵抗分数
Kfold 大于1的整数

例子:“HyperparameterOptimizationOptions”、结构(UseParallel,真的)

数据类型:结构体

分类选项

全部折叠

类别预测符列表,指定为逗号分隔的对,由“CategoricalPredictors”这个表中的一个值。

价值 描述
正整数向量 向量中的每个条目都是对应于预测器数据列(X资源描述),其中包含一个分类变量。
逻辑向量 一个真正的Entry表示预测器数据的对应列(X资源描述)是分类变量。
字符矩阵 矩阵的每一行都是一个预测变量的名称。名称必须与中的条目匹配PredictorNames。用额外的空格填充名字,这样字符矩阵的每一行都有相同的长度。
字符向量的字符串数组或单元格数组 数组中的每个元素都是一个预测变量的名称。名称必须与中的条目匹配PredictorNames
“所有” 所有预测因素都是绝对的。

默认情况下,如果预测器数据在表(资源描述),fitcauto如果一个变量是逻辑向量、分类向量、字符数组、字符串数组或字符向量的单元格数组,则假定该变量是分类的。然而,使用决策树的学习者假设数学上有序的分类向量是连续变量。如果预测器数据为矩阵(X),fitcauto假设所有预测因子都是连续的。要将任何其他预测符标识为类别预测符,请使用“CategoricalPredictors”名称-值对参数。

有关拟合函数如何处理分类预测器的详细信息,请参见自动创建虚拟变量

请注意

  • fitcauto不支持判别分析分类金宝app器的分类预测器。如果你愿意的话学习者包括“discr”类型时,不能指定“CategoricalPredictors”参数或使用示例数据表(资源描述),包含直言预测词。

  • fitcauto对于k-最近邻模型金宝app,不支持混合使用数字预测器和分类预测器。如果你愿意的话学习者包括“资讯”模型时,必须指定“CategoricalPredictors”值作为“所有”[]

例子:“CategoricalPredictors”、“所有”

数据类型:||逻辑|字符|字符串|细胞

用于训练的类名,指定为逗号分隔的对,由“类名”以及类别、字符或字符串数组、逻辑或数字向量或字符向量的单元格数组。一会必须具有相同的数据类型Y

如果一会是字符数组,则每个元素必须对应数组中的一行。

使用“类名”:

  • 在培训期间安排课程。

  • 指定与类顺序对应的任何输入或输出参数维度的顺序。例如,使用“类名”指定…尺寸的顺序成本或返回的分类分数的列顺序预测

  • 选择用于培训的类的子集。例如,假设集合中所有不同的类名Y{' a ', ' b ', ' c '}。用课堂上的观察来训练模型“一个”而且“c”只是,指定“类名”,{' a ', ' c '}

的默认值一会所有不同类名的集合在吗Y

例子:“类名”,{' b ', ' g '}

数据类型:分类|字符|字符串|逻辑|||细胞

错误分类代价,指定为逗号分隔的对,由“成本”一个方阵或结构数组。

  • 如果你指定一个方阵成本观察的真正类别是,然后成本(i, j)将一个点分类的成本是多少j。也就是说,行对应于真实的类,列对应于预测的类。的相应行和列的类顺序成本,也指定一会名称-值对参数。

  • 如果你指定一个结构年代,那么它必须有两个字段:

    • S.ClassNames,其中包含类名作为与Y

    • S.ClassificationCosts,其中包含成本矩阵,其行和列的顺序为S.ClassNames

的默认值成本ones(K) - eye(K),在那里K是不同类的数量。

例子:“成本”,[0 1;2 0]

数据类型:||结构体

预测器变量名,指定为逗号分隔的对,由“PredictorNames”和唯一名称的字符串数组或唯一字符向量的单元格数组。的功能“PredictorNames”这取决于你提供训练数据的方式。

  • 如果你提供X而且Y,那么你就可以使用了“PredictorNames”中预测变量的名称X

    • 里面名字的顺序PredictorNames必须对应的列顺序X。也就是说,PredictorNames {1}名字是X (: 1)PredictorNames {2}名字是X (:, 2)等等。同时,大小(X, 2)而且元素个数(PredictorNames)必须是相等的。

    • 默认情况下,PredictorNames{x1, x2,…}

  • 如果你提供资源描述,那么你就可以使用了“PredictorNames”选择在训练中使用哪些预测变量。也就是说,fitcauto中仅使用预测变量PredictorNames以及训练中的响应变量。

    • PredictorNames的子集Tbl.Properties.VariableNames并且不能包括响应变量的名称。

    • 默认情况下,PredictorNames包含所有预测变量的名称。

    • 一个好的实践是使用其中一种来指定训练的预测器“PredictorNames”公式,但不是两者都有。

例子:PredictorNames,{‘SepalLength’,‘SepalWidth’,‘PetalLength’,‘PetalWidth}

数据类型:字符串|细胞

每个类的先验概率,由逗号分隔的对组成“之前”和这个表中的一个值。

价值 描述
“经验” 类先验概率是类的相对频率Y
“统一” 所有类先验概率都等于1/K,在那里K是类的数量。
数值向量 每个元素都是一个类先验概率。对元素进行排序Mdl.ClassNames或使用一会名称-值对参数。软件对要求和的元素进行规范化1
结构

一个结构年代有两个字段:

  • S.ClassNames作为相同类型的变量包含类名Y

  • S.ClassProbs包含相应先验概率的向量。软件对要求和的元素进行规范化1

例子:“之前”,结构(“类名”,{{' b ', ' g '}}, ClassProbs, 1:2)

数据类型:||字符|字符串|结构体

响应变量名,指定为逗号分隔的对,由“ResponseName”和字符向量或字符串标量。

  • 如果你提供Y,那么你就可以使用了“ResponseName”为响应变量指定名称。

  • 如果你提供ResponseVarName公式,那么你就不能用了“ResponseName”

例子:“ResponseName”、“响应”

数据类型:字符|字符串

分数转换,指定为由逗号分隔的对组成“ScoreTransform”和字符向量、字符串标量或函数句柄。

该表总结了可用的字符向量和字符串标量。

价值 描述
“doublelogit” 1 / (1 +e2x
“invlogit” 日志(x/ (1 -x))
“ismax” 将得分最大的类的得分设置为1,并将所有其他类的得分设置为0
分对数的 1 / (1 +e- - - - - -x
“没有”“身份” x(转换)
“标志” 1x< 0
为0x= 0
1x> 0
“对称” 2x- 1
“symmetricismax” 将得分最大的类的得分设置为1,并将所有其他类的得分设置为-1
“symmetriclogit” 2 / (1 +e- - - - - -x) - 1

对于MATLAB函数或您定义的函数,使用其函数句柄进行分数转换。函数句柄必须接受一个矩阵(原始分数)并返回一个相同大小的矩阵(转换后的分数)。

例子:“ScoreTransform”、“分对数的

数据类型:字符|字符串|function_handle

观察权重,由逗号分隔的对组成“重量”和一个正的数字向量或者变量的名字资源描述。软件对每个观察结果进行加权X资源描述中对应的值权重。的长度权重必须等于行数X资源描述

如果将输入数据指定为表资源描述,然后权重可以是变量名中的资源描述它包含一个数值向量。在这种情况下,您必须指定权重作为字符向量或字符串标量。例如,如果权重向量W存储为资源描述。W,然后指定为' W '。否则,软件处理的所有列资源描述,包括W,作为预测因子或训练模型时的响应变量。

默认情况下,权重的(n, 1),在那里n观察的数量在吗X资源描述

软件规范化权重求和为各类别的先验概率值。

数据类型:||字符|字符串

输出参数

全部折叠

训练过的分类模型,作为该表中的分类模型对象之一返回。

学习者的名字 返回的模型对象
“discr” CompactClassificationDiscriminant
“合奏” CompactClassificationEnsemble
“内核”
“资讯” ClassificationKNN
“线性”
“注” CompactClassificationNaiveBayes
“支持向量机”
“树” CompactClassificationTree

优化结果,返回为BayesianOptimization对象。有关贝叶斯优化过程的更多信息,请参见贝叶斯优化

更多关于

全部折叠

详细的显示

当你设置详细的字段HyperparameterOptimizationOptions到的名称-值对参数12,fitcauto函数提供优化结果的迭代显示。

下表描述了显示中的列及其条目。

列名 描述
Iter 迭代次数—可以使用MaxObjectiveEvaluations字段“HyperparameterOptimizationOptions”名称-值对参数。
积极的员工 活动并行工作人员的数量-此列仅在通过设置并行运行优化时出现UseParallel字段“HyperparameterOptimizationOptions”到的名称-值对参数真正的
Eval结果

评估结果之一:

  • 最好的-该迭代中的学习器和超参数值给出了迄今为止计算的最小观测到的验证损失。也就是确认损失值是到目前为止计算的最小值。

  • 接受-该迭代中的学习器和超参数值给出了有意义的(例如,非)观察和估计的验证损失值。

  • 错误-此迭代中的学习器和超参数值导致错误(例如,a确认损失的价值).

确认损失 在此迭代中,为学习器和超参数值计算验证损失-特别是,fitcauto默认情况下计算交叉验证分类错误。方法更改验证方案CVPartition坚持,或Kfold字段“HyperparameterOptimizationOptions”名称-值对参数。
培训和验证时间(秒) 在此迭代中用学习器和超参数值训练和计算模型的验证损失所花费的时间(以秒为单位)——特别是,该值不包括更新贝叶斯优化过程维护的目标函数模型所需的时间。详情请参见贝叶斯优化
观察到的最小验证损失

到目前为止计算的观察到的最小验证损失-此值对应于最小值确认损失到目前为止在优化过程中计算的值。

默认情况下,fitcauto返回优化图,其中显示观测到的最小验证损失值的深蓝色点。这种情节不出现的时候ShowPlots字段“HyperparameterOptimizationOptions”名称-值对参数设置为

估计最小验证损失

估计的最小验证损失——在每次迭代中,fitcauto更新由贝叶斯优化过程维护的目标函数模型,并使用该模型估计最小验证损失。详情请参见贝叶斯优化

默认情况下,fitcauto返回优化图,其中显示浅蓝色点表示估计的最小验证损失值。这种情节不出现的时候ShowPlots字段“HyperparameterOptimizationOptions”名称-值对参数设置为

学习者 在此迭代中评估的模型类型-通过使用“学习者”名称-值对参数。
Hyperparameter:价值 方法指定优化中使用的超参数值“OptimizeHyperparameters”名称-值对参数。

显示还包括两个模型的描述:

  • 最佳观察学习者-该模型,使用列出的学习器类型和超参数值,产生最终观察到的最小验证损失。

  • 最佳预估学习者-该模型,使用列出的学习器类型和超参数值,产生最终估计的最小验证损失。fitcauto在整个训练数据集上重新训练模型,并将其作为Mdl输出。

提示

  • 根据数据的大小和指定的学习器的数量,fitcauto可能需要一些时间来运行。如果您拥有并行计算工具箱许可证,则可以通过并行运行优化来加快计算速度。为此,请指定“HyperparameterOptimizationOptions”、结构(UseParallel,真的)。您可以在结构中包含其他字段,以控制优化的其他方面。看到HyperparameterOptimizationOptions

算法

全部折叠

学习者的自动选择

当你指定“学习者”,“汽车”,fitcauto函数分析预测器和响应数据,以选择合适的学习器。该函数考虑数据集是否具有以下特征:

  • 分类预测

  • 超过5%的数据缺少值

  • 不平衡数据,其中最大类观测数据的数量与最小类观测数据的数量之比大于5

  • 在最小的班级里有超过100个观察结果

  • 宽数据,其中预测因子的数量大于或等于观测值的数量

  • 高维数据,其中预测因子的数量大于100

  • 大数据,即观测次数大于5万次

  • 二元响应变量

  • 有序响应变量

所选的学习者总是列表中所列学习者的子集学习者表格但是,在优化过程中尝试的相关模型对于未优化的超参数可能具有不同的默认值,对于正在优化的超参数也可能具有不同的搜索范围。

例如,当您指定学习者作为“汽车”,fitcauto函数尝试使用给定的SVM学习器KernelFunction值,基于本表中的数据集特征。

分类预测 缺失值 广泛的数据 支持向量机KernelFunction价值
是的 没有 要么是要么不是 多项式的
没有 没有 是的 “线性”
没有 没有 没有 “高斯”

贝叶斯优化

贝叶斯优化的目标,以及一般的优化,是找到一个使目标函数最小化的点。在fitcauto,点是一个学习器类型和一组学习器的超参数值(参见学习者而且OptimizeHyperparameters),目标函数默认为交叉验证分类误差。在贝叶斯优化中实现fitcauto内部维护一个多TreeBagger目标函数模型。也就是说,目标函数模型沿着学习者类型进行分割,对于给定的学习者,该模型为TreeBagger回归集成。(这个底层模型不同于其他使用贝叶斯优化的统计和机器学习工具箱™函数所使用的高斯过程模型。)贝叶斯优化通过使用目标函数评估来训练底层模型,并通过使用获取函数(“expected-improvement”).有关更多信息,请参见预期改善。采集函数在低建模目标函数值点的采样和探索尚未很好建模的区域之间进行平衡。在优化的最后,fitcauto在优化时评估的点中选择目标函数模型值最小的点。有关更多信息,请参见“标准”、“min-visited-mean”的名称-值对参数bestPoint

选择功能

  • 如果您不确定哪种模型最适合您的数据集,您可以选择使用分类学习者通过app,您可以对不同的模型进行超参数调优,并选择性能最佳的优化模型。尽管在优化模型超参数之前必须选择特定的模型,分类学习者为选择可优化超参数和设置超参数值提供了更大的灵活性。但是,您不能并行优化,请选择“线性”“内核”在应用程序中指定观察权重或指定先验概率。有关更多信息,请参阅分类学习App中的超参数优化

  • 如果知道哪些模型可能适合您的数据,则可以使用相应的模型拟合函数并指定“OptimizeHyperparameters”参数来调优超形参。您可以比较不同模型的结果,以选择最佳分类器。有关此过程的示例,请参见利用贝叶斯优化实现模型选择自动化

扩展功能

R2020a中引入