Skip to content

Commit

Permalink
Merge pull request #3 from dotnet/master
Browse files Browse the repository at this point in the history
Update fork
  • Loading branch information
zeahmed committed May 10, 2018
2 parents bd83d91 + e9cd4bc commit 3fb99ae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DotnetCLIVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2
2.1.200
2 changes: 1 addition & 1 deletion build/publish.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<PublishSymbolsPackage>Microsoft.SymbolUploader.Build.Task</PublishSymbolsPackage>
<EnablePublishSymbols>false</EnablePublishSymbols>
<EnablePublishSymbols Condition="'$(EnablePublishSymbols)'==''" >true</EnablePublishSymbols>
</PropertyGroup>

<Import Project="$(PackagesDir)\$(PublishSymbolsPackage.ToLower())\$(PublishSymbolsPackageVersion)\build\PublishSymbols.targets" />
Expand Down
28 changes: 14 additions & 14 deletions test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public void TrainAndPredictSentimentModelTest()
OutputTokens = true,
StopWordsRemover = new PredefinedStopWordsRemover(),
VectorNormalizer = TextTransformTextNormKind.L2,
CharFeatureExtractor = new NGramNgramExtractor() { NgramLength = 2, AllLengths = true },
WordFeatureExtractor = new NGramNgramExtractor() { NgramLength = 3, AllLengths = false }
CharFeatureExtractor = new NGramNgramExtractor() { NgramLength = 3, AllLengths = false },
WordFeatureExtractor = new NGramNgramExtractor() { NgramLength = 2, AllLengths = true }
});

pipeline.Add(new FastTreeBinaryClassifier() { NumLeaves = 5, NumTrees = 5, MinDocumentsInLeafs = 2 });
Expand Down Expand Up @@ -65,16 +65,16 @@ public void TrainAndPredictSentimentModelTest()
var evaluator = new BinaryClassificationEvaluator();
BinaryClassificationMetrics metrics = evaluator.Evaluate(model, testData);

Assert.Equal(.7222, metrics.Accuracy, 4);
Assert.Equal(.9643, metrics.Auc, 1);
Assert.Equal(.96, metrics.Auprc, 2);
Assert.Equal(.5556, metrics.Accuracy, 4);
Assert.Equal(.8, metrics.Auc, 1);
Assert.Equal(.87, metrics.Auprc, 2);
Assert.Equal(1, metrics.Entropy, 3);
Assert.Equal(.7826, metrics.F1Score, 4);
Assert.Equal(.812, metrics.LogLoss, 3);
Assert.Equal(18.831, metrics.LogLossReduction, 3);
Assert.Equal(.6923, metrics.F1Score, 4);
Assert.Equal(.969, metrics.LogLoss, 3);
Assert.Equal(3.083, metrics.LogLossReduction, 3);
Assert.Equal(1, metrics.NegativePrecision, 3);
Assert.Equal(.444, metrics.NegativeRecall, 3);
Assert.Equal(.643, metrics.PositivePrecision, 3);
Assert.Equal(.111, metrics.NegativeRecall, 3);
Assert.Equal(.529, metrics.PositivePrecision, 3);
Assert.Equal(1, metrics.PositiveRecall);

ConfusionMatrix matrix = metrics.ConfusionMatrix;
Expand All @@ -88,10 +88,10 @@ public void TrainAndPredictSentimentModelTest()
Assert.Equal(0, matrix[0, 1]);
Assert.Equal(0, matrix["positive", "negative"]);

Assert.Equal(5, matrix[1, 0]);
Assert.Equal(5, matrix["negative", "positive"]);
Assert.Equal(4, matrix[1, 1]);
Assert.Equal(4, matrix["negative", "negative"]);
Assert.Equal(8, matrix[1, 0]);
Assert.Equal(8, matrix["negative", "positive"]);
Assert.Equal(1, matrix[1, 1]);
Assert.Equal(1, matrix["negative", "negative"]);
}

public class SentimentData
Expand Down

0 comments on commit 3fb99ae

Please sign in to comment.