dotnet / dotnet/machinelearning-modelbuilder

ML.NET Tutorial - Sentiment Prediction Sample Code

Abierto
#2,909 0 comentarios 0 reacciones 0 asignados Ver en GitHub
GS Tutorial
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"

![Sentiment](https://github.com/dotnet/machinelearning-modelbuilder/assets/6714943/a2023560-892c-45f8-ae68-aa6a449a2b30)

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.