File tree 1 file changed +4
-5
lines changed
test/Microsoft.ML.Functional.Tests
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ public void ReconfigurablePrediction()
44
44
// Create a training pipeline.
45
45
var pipeline = mlContext . Transforms . Text . FeaturizeText ( "Features" , "SentimentText" )
46
46
. AppendCacheCheckpoint ( mlContext )
47
- . Append ( mlContext . BinaryClassification . Trainers . LogisticRegression (
48
- new LogisticRegressionBinaryTrainer . Options { NumberOfThreads = 1 } ) ) ;
47
+ . Append ( mlContext . BinaryClassification . Trainers . LbfgsLogisticRegression (
48
+ new LbfgsLogisticRegressionBinaryTrainer . Options { NumberOfThreads = 1 } ) ) ;
49
49
50
50
// Train the model.
51
51
var model = pipeline . Fit ( data ) ;
@@ -74,10 +74,9 @@ public void ReconfigurablePrediction()
74
74
public void ReconfigurablePredictionNoPipeline ( )
75
75
{
76
76
var mlContext = new MLContext ( seed : 1 ) ;
77
-
78
77
var data = mlContext . Data . LoadFromEnumerable ( TypeTestData . GenerateDataset ( ) ) ;
79
- var pipeline = mlContext . BinaryClassification . Trainers . LogisticRegression (
80
- new Trainers . LogisticRegressionBinaryTrainer . Options { NumberOfThreads = 1 } ) ;
78
+ var pipeline = mlContext . BinaryClassification . Trainers . LbfgsLogisticRegression (
79
+ new Trainers . LbfgsLogisticRegressionBinaryTrainer . Options { NumberOfThreads = 1 } ) ;
81
80
var model = pipeline . Fit ( data ) ;
82
81
var newModel = mlContext . BinaryClassification . ChangeModelThreshold ( model , - 2.0f ) ;
83
82
var rnd = new Random ( 1 ) ;
You can’t perform that action at this time.
0 commit comments