dotnet / dotnet/machinelearning-modelbuilder
ML.NET Tutorial - Sentiment Prediction Sample Code
- Vorherrschende Sprache
- Dockerfile
- Sterne
- 285
- Forks
- 66
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi,
I have tried your tutorial to developed my first AI Model using your tutorial with link below, it is an AI sample for sentiment Analysis.
All the Steps worked fine and i am able to create a model successfully but when i tried consuming this model as per instruction it ran but its giving response in opposite. like my below code it should give me positve sentiment but it is output as Negative that is wrong.
Tutorial Link:
https://dotnet.microsoft.com/en-us/learn/ml-dotnet/get-started-tutorial/intro
The sample code for Reference:
`var sampleData = new SentimentMLModel.ModelInput()
{
Col0 = "This restaurant was wonderful."
};
//Load model and predict output
var result = SentimentMLModel.Predict(sampleData);
// If Prediction is 1, sentiment is "Positive"; otherwise, sentiment is "Negative"
var sentiment = result.PredictedLabel == 1 ? "Positive" : "Negative";
Console.WriteLine($"Text: {sampleData.Col0}\nSentiment: {sentiment}");`
The Output:
"Sentiment: Negative"

Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit dem ML.NET-Tutorial zur Sentimentvorhersage und dem bereitgestellten SentimentMLModel-Beispielcode. Reproduziere das Ergebnis für "This restaurant was wonderful." und untersuche, wie das generierte Modell PredictedLabel im Vergleich zur Positive/Negative-Zuordnung des Tutorials darstellt. Als erledigt gilt die Aufgabe, wenn das Tutorial und das Beispiel diesen positiven Satz konsistent als Positive klassifizieren und die Beispielausgabe bei Bedarf aktualisiert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, machine-learning
- Bereich
- documentation, machine-learning
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100