dotnet / dotnet/machinelearning-modelbuilder
Provide list of labels related to score array
- Vorherrschende Sprache
- Dockerfile
- Sterne
- 285
- Forks
- 66
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
An image classification gives the following output:
```
public class ModelOutput
{
// ColumnName attribute is used to change the column name from
// its default value, which is the name of the field.
[ColumnName("PredictedLabel")]
public String Prediction { get; set; }
public float[] Score { get; set; }
}
```
If a model classifies two labels, the first one is related to the first array item and the second to the second array item.
But, from a programmer/model user perspective, I do not know what is what...
I have to program something like this:
```
...
Console.WriteLine($"This is a {predictionResult.Prediction} with a reliabilty of {GetPercentage(predictionResult)}% (Time: {sw.ElapsedMilliseconds}ms)");
Console.WriteLine("=============== End of process, hit any key to finish ===============");
Console.ReadKey();
}
private static double GetPercentage(ModelOutput predictionResult)
{
if (predictionResult.Prediction.ToUpper() == "HEAD")
{
return predictionResult.Score[0] * 100;
}
if (predictionResult.Prediction.ToUpper() == "TAIL")
{
return predictionResult.Score[1] * 100;
}
return -1;
}
```
Please provide a list (array?) of the labels te be expected related to the array index of the prediction outcome.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Keine Repository-Datei oder kein Test ist angegeben. Beginne damit, die generierte ModelOutput und die Reihenfolge der image-classification-Scores nachzuverfolgen, und ermittle dann, wo die label-to-score-Beziehung offengelegt wird. Die Aufgabe ist erledigt, wenn Verbraucher Labels erhalten können, die an jedem Score-Index ausgerichtet sind, ohne die Positionen von HEAD und TAIL fest zu codieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- machine-learning
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100