dotnet / dotnet/machinelearning
Convert TrialResult to DataFrame
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
Description
## Description
[TrialResult](https://docs.microsoft.com/dotnet/api/microsoft.ml.automl.trialresult?view=ml-dotnet-preview) gives you important information about each trial AutoML runs as part of an experiment. Although today we have the NotebookMonitor for real-time visualizations and feedback during training, once training is done, to get similar information, users have to write their own code to access each of these pieces of information.
## Proposal
Given an AutoML experiment called `experiment`, when training is done, users should be able to call `ToDataFrame` to convert the results of an AutoML experiment into a `DataFrame`.
```csharp
TrialResult experimentResults = await experiment.RunAsync();
DataFrame results = experimentResults.ToDataFrame();
```
The result should display columns with information for each of the trials in a DataFrame similar to the following:
| TrialId | DurationInMilliseconds | Metric | Pipeline | Parameter |
| --- | --- | --- | --- | --- |
| 21 | 8.5 | 0.98 | ... | ... |
| 5 | 3.8 | 0.83 | ... | ... |
From there, if users to sort / query the results using the built-in DataFrame methods, they can. Additionally, they can export to CSV using the [WriteCsv](https://docs.microsoft.com/en-us/dotnet/api/microsoft.data.analysis.dataframe.writecsv?view=ml-dotnet-preview) method.
Contributor guide
Assessment
This issue has not been assessed yet.