dotnet / dotnet/machinelearning-modelbuilder
ML.NET Tutorial - Sentiment Prediction Sample Code
- Lenguaje dominante
- Dockerfile
- Estrellas
- 285
- Forks
- 66
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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"

Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con el tutorial de predicción de sentimientos de ML.NET y el código de ejemplo proporcionado de SentimentMLModel. Reproduce el resultado para "This restaurant was wonderful." e inspecciona cómo representa el modelo generado PredictedLabel frente a la asignación Positive/Negative del tutorial. Se considera terminado cuando el tutorial y el ejemplo clasifican de forma coherente esta frase positiva como Positive, con la salida de ejemplo actualizada si es necesario.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, machine-learning
- Área
- documentation, machine-learning
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100