@@ -58,15 +58,7 @@ private static (Pipeline, ITransformer) ExploreModels(
58
58
59
59
if ( options . MlTask == TaskKind . BinaryClassification )
60
60
{
61
- var result = context . BinaryClassification . AutoFit ( trainData , label , validationData , settings :
62
- new AutoFitSettings ( )
63
- {
64
- StoppingCriteria = new ExperimentStoppingCriteria ( )
65
- {
66
- //default need to have a way to override
67
- TimeOutInMinutes = 10
68
- }
69
- } ) ;
61
+ var result = context . BinaryClassification . AutoFit ( trainData , label , validationData , 10 ) ;
70
62
result = result . OrderByDescending ( t => t . Metrics . Accuracy ) ;
71
63
var bestIteration = result . FirstOrDefault ( ) ;
72
64
pipelineToDeconstruct = bestIteration . Pipeline ;
@@ -75,22 +67,14 @@ private static (Pipeline, ITransformer) ExploreModels(
75
67
76
68
if ( options . MlTask == TaskKind . Regression )
77
69
{
78
- var result = context . Regression . AutoFit ( trainData , label , validationData , settings :
79
- new AutoFitSettings ( )
80
- {
81
- StoppingCriteria = new ExperimentStoppingCriteria ( )
82
- {
83
- //default need to have a way to override
84
- TimeOutInMinutes = 10
85
- }
86
- } ) ;
70
+ var result = context . Regression . AutoFit ( trainData , label , validationData , 10 ) ;
87
71
result = result . OrderByDescending ( t => t . Metrics . RSquared ) ;
88
72
var bestIteration = result . FirstOrDefault ( ) ;
89
73
pipelineToDeconstruct = bestIteration . Pipeline ;
90
74
model = bestIteration . Model ;
91
75
}
92
76
93
- if ( options . MlTask == TaskKind . Regression )
77
+ if ( options . MlTask == TaskKind . MulticlassClassification )
94
78
{
95
79
throw new NotImplementedException ( ) ;
96
80
}
0 commit comments