Changing comments
I've added negative comments to the predict method but they are being evaluated as positive? Am I doing something wrong?
IEnumerable<SentimentData> sentiments = new[]
{
new SentimentData
{
SentimentText = "I suggest you kill yourself." // evaluated as positive
},
new SentimentData
{
SentimentText = "He is the best, and the article should say that."
}
};
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: c8e22825-c4ee-5a36-f911-8ad456970ecc
- Version Independent ID: ad0bf640-7dfc-1184-077c-358bb14277a7
- Content: Use ML.NET in a sentiment analysis binary classification scenario
- Content Source: docs/machine-learning/tutorials/sentiment-analysis.md
- Product: dotnet-ml
- GitHub Login: @JRAlexander
- Microsoft Alias: johalex
@GalOshri - Is this due to the small training dataset, or something else?
I also did the tests. I did the tests with a small list, a medium-sized list, a large size list, then changed the version of the library from 0.3 to 0.4 and vice versa, but the result is the same as for @ OnlyChildRecords. In my opinion, it is currently risky to use Sentiment Analysis in a real environment
I think it maybe to do with the training data. It's hard to guess if 0 or 1 represents a positive or negative comment because there are both positive and negative comments with 0's and 1' s and there is no explanation in the tutorial a to tell us if 1 or 0 represents positive or negative. For example:
1 ::::: Why are you threatening me? I'm not being disruptive, its you who is being disruptive. 1 == Goodbye Cruel World == I have decided to kill myself. My Dad died two weeks ago, and I wish to join him. I just wanted to say goodbye.
try updating the FastTreeBinaryClassifier() hyperparameters to: NumLeaves = 50, NumTrees = 50, MinDocumentsInLeafs = 20.
Closing this as I believe its resolved. Please reopen if that is not the case. Thanks!