Is your feature request related to a problem? Please describe.
I'm trying to build a library of data science charts for visualizing the results of ML.NET model training. One of those is a graphical confusion matrix pictured below (no offense to the wonderful built-in formatted table option present in ML.NET already).
Unfortunately, there's no public way of getting the names of classes for the matrix as ConfusionMatrix.PredictedClassesIndicators is internal. This means that class labels in multi-class classification charts must:
Use an arbitrary label like "Class 1"
Require the caller to specify an array of class names
Call the public ConfusionMatrix.GetFormattedConfusionMatrix and parse the output to get the class names from the generated output.
Describe the solution you'd like
Either make PredictedClassesIndicators publicly gettable or provide a GetClassLabel(int classIndex): string method for accessing this information.
Describe alternatives you've considered
Right now I am requiring callers to provide an array of class names for multi-class classification. However, if this feature goes some time before it is implemented, I may decide to write code to parse the results of GetFormattedConfusionMatrix which does include those internal labels.
Additional context
My goal is for ML.NET to be as viable as SciKit-Learn in as many contexts as possible. Right now, I'm using ML.NET for my master's program and I'd much rather turn in a report with a graphical confusion matrix than a formatted text confusion matrix. Also, I'm running these charts in a Polyglot Notebook.
Is your feature request related to a problem? Please describe. I'm trying to build a library of data science charts for visualizing the results of ML.NET model training. One of those is a graphical confusion matrix pictured below (no offense to the wonderful built-in formatted table option present in ML.NET already).
Unfortunately, there's no public way of getting the names of classes for the matrix as
ConfusionMatrix.PredictedClassesIndicators
is internal. This means that class labels in multi-class classification charts must:ConfusionMatrix.GetFormattedConfusionMatrix
and parse the output to get the class names from the generated output.Describe the solution you'd like Either make
PredictedClassesIndicators
publicly gettable or provide aGetClassLabel(int classIndex): string
method for accessing this information.Describe alternatives you've considered Right now I am requiring callers to provide an array of class names for multi-class classification. However, if this feature goes some time before it is implemented, I may decide to write code to parse the results of
GetFormattedConfusionMatrix
which does include those internal labels.Additional context My goal is for ML.NET to be as viable as SciKit-Learn in as many contexts as possible. Right now, I'm using ML.NET for my master's program and I'd much rather turn in a report with a graphical confusion matrix than a formatted text confusion matrix. Also, I'm running these charts in a Polyglot Notebook.