Skip to content

Commit 4056c63

Browse files
authored
[AutoML] Add AutoML XML documentation to all public members; migrate AutoML projects & tests into ML.NET solution; AutoML test fixes (#3351)
1 parent 53a1d02 commit 4056c63

30 files changed

+1178
-204
lines changed

Microsoft.ML.AutoML.sln

Lines changed: 0 additions & 91 deletions
This file was deleted.

Microsoft.ML.sln

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.FastTree", "Mi
274274
pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.symbols.nupkgproj = pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.symbols.nupkgproj
275275
EndProjectSection
276276
EndProject
277+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Auto", "src\Microsoft.ML.Auto\Microsoft.ML.Auto.csproj", "{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}"
278+
EndProject
279+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.AutoML.Tests", "test\Microsoft.ML.AutoML.Tests\Microsoft.ML.AutoML.Tests.csproj", "{D48126A1-5334-4575-BC91-4CDAA754C8C8}"
280+
EndProject
281+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mlnet", "src\mlnet\mlnet.csproj", "{C2F953F9-9825-48AB-88D8-D4538268F017}"
282+
EndProject
283+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mlnet.Tests", "test\mlnet.Tests\mlnet.Tests.csproj", "{73D4685B-94D2-4C28-A434-16ED6CA39BDE}"
284+
EndProject
277285
Global
278286
GlobalSection(SolutionConfigurationPlatforms) = preSolution
279287
Debug|Any CPU = Debug|Any CPU
@@ -968,6 +976,54 @@ Global
968976
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
969977
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
970978
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
979+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
980+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
981+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
982+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
983+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
984+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
985+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
986+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release|Any CPU.Build.0 = Release|Any CPU
987+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
988+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
989+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
990+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
991+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
992+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
993+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
994+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
995+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
996+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
997+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
998+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release|Any CPU.Build.0 = Release|Any CPU
999+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
1000+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
1001+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
1002+
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
1003+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1004+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug|Any CPU.Build.0 = Debug|Any CPU
1005+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
1006+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
1007+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
1008+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
1009+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release|Any CPU.ActiveCfg = Release|Any CPU
1010+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release|Any CPU.Build.0 = Release|Any CPU
1011+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
1012+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
1013+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
1014+
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
1015+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1016+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
1017+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
1018+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
1019+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
1020+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
1021+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
1022+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release|Any CPU.Build.0 = Release|Any CPU
1023+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
1024+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
1025+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
1026+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
9711027
EndGlobalSection
9721028
GlobalSection(SolutionProperties) = preSolution
9731029
HideSolutionNode = FALSE
@@ -1055,6 +1111,10 @@ Global
10551111
{AD7058C9-5608-49A8-BE23-58C33A74EE91} = {D3D38B03-B557-484D-8348-8BADEE4DF592}
10561112
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
10571113
{B1B3F284-FA3D-4D76-A712-FF04495D244B} = {D3D38B03-B557-484D-8348-8BADEE4DF592}
1114+
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
1115+
{D48126A1-5334-4575-BC91-4CDAA754C8C8} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
1116+
{C2F953F9-9825-48AB-88D8-D4538268F017} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
1117+
{73D4685B-94D2-4C28-A434-16ED6CA39BDE} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
10581118
EndGlobalSection
10591119
GlobalSection(ExtensibilityGlobals) = postSolution
10601120
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}

build.proj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
<ItemGroup>
2424
<Project Include="Microsoft.ML.sln" />
25-
<Project Include="Microsoft.ML.AutoML.sln" />
2625
</ItemGroup>
2726

2827
<Import Project="dir.traversal.targets" />
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Microsoft.ML;
2+
using Microsoft.ML.Auto;
3+
4+
namespace Samples.AutoML
5+
{
6+
public static class BinaryClassificationExperiment
7+
{
8+
public static void Example()
9+
{
10+
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
11+
// as a catalog of available operations and as the source of randomness.
12+
var mlContext = new MLContext();
13+
14+
// Download and featurize the dataset.
15+
var dataView = Microsoft.ML.SamplesUtils.DatasetUtils.LoadFeaturizedAdultDataset(mlContext);
16+
17+
// Run an AutoML experiment
18+
var experimentResult = mlContext.Auto()
19+
.CreateBinaryClassificationExperiment(60)
20+
.Execute(dataView, "IsOver50K");
21+
}
22+
}
23+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Microsoft.ML;
2+
using Microsoft.ML.Auto;
3+
4+
namespace Samples.AutoML
5+
{
6+
public static class BinaryClassificationExperimentWithExperimentSettings
7+
{
8+
public static void Example()
9+
{
10+
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
11+
// as a catalog of available operations and as the source of randomness.
12+
var mlContext = new MLContext();
13+
14+
// Download and featurize the dataset.
15+
var dataView = Microsoft.ML.SamplesUtils.DatasetUtils.LoadFeaturizedAdultDataset(mlContext);
16+
17+
// Run an AutoML experiment
18+
var experimentSettings = new BinaryExperimentSettings()
19+
{
20+
MaxExperimentTimeInSeconds = 60
21+
};
22+
var experimentResult = mlContext.Auto()
23+
.CreateBinaryClassificationExperiment(experimentSettings)
24+
.Execute(dataView, "IsOver50K");
25+
}
26+
}
27+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using Microsoft.ML;
2+
using Microsoft.ML.Auto;
3+
using Microsoft.ML.SamplesUtils;
4+
5+
namespace Samples.AutoML
6+
{
7+
public static class MulticlassClassificationExperiment
8+
{
9+
public static void Example()
10+
{
11+
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
12+
// as a catalog of available operations and as the source of randomness.
13+
var mlContext = new MLContext();
14+
15+
// Download and featurize the dataset.
16+
// Create a list of data examples.
17+
var examples = DatasetUtils.GenerateRandomMulticlassClassificationExamples(1000);
18+
19+
// Convert the examples list to an IDataView object, which is consumable by ML.NET API.
20+
var dataView = mlContext.Data.LoadFromEnumerable(examples);
21+
22+
// Run an AutoML experiment
23+
var experimentResult = mlContext.Auto()
24+
.CreateMulticlassClassificationExperiment(60)
25+
.Execute(dataView);
26+
}
27+
}
28+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using Microsoft.ML;
2+
using Microsoft.ML.Auto;
3+
using Microsoft.ML.SamplesUtils;
4+
5+
namespace Samples.AutoML
6+
{
7+
public static class MulticlassClassificationExperimentWithExperimentSettings
8+
{
9+
public static void Example()
10+
{
11+
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
12+
// as a catalog of available operations and as the source of randomness.
13+
var mlContext = new MLContext();
14+
15+
// Download and featurize the dataset.
16+
// Create a list of data examples.
17+
var examples = DatasetUtils.GenerateRandomMulticlassClassificationExamples(1000);
18+
19+
// Convert the examples list to an IDataView object, which is consumable by ML.NET API.
20+
var dataView = mlContext.Data.LoadFromEnumerable(examples);
21+
22+
// Run an AutoML experiment
23+
var experimentSettings = new MulticlassExperimentSettings()
24+
{
25+
MaxExperimentTimeInSeconds = 60
26+
};
27+
var experimentResult = mlContext.Auto()
28+
.CreateMulticlassClassificationExperiment(experimentSettings)
29+
.Execute(dataView);
30+
}
31+
}
32+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using Microsoft.ML;
2+
using Microsoft.ML.Auto;
3+
using Microsoft.ML.Data;
4+
5+
namespace Samples.AutoML
6+
{
7+
public static class RegressionExperiment
8+
{
9+
public static void Example()
10+
{
11+
// Downloading a regression dataset from github.com/dotnet/machinelearning
12+
string dataFile = Microsoft.ML.SamplesUtils.DatasetUtils.DownloadHousingRegressionDataset();
13+
14+
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
15+
// as a catalog of available operations and as the source of randomness.
16+
var mlContext = new MLContext();
17+
18+
// Creating a data loader, based on the format of the data
19+
// The data is tab separated with all numeric columns.
20+
// The first column being the label and rest are numeric features
21+
// Here only seven numeric columns are used as features
22+
var dataView = mlContext.Data.LoadFromTextFile(dataFile, new TextLoader.Options
23+
{
24+
Separators = new[] { '\t' },
25+
HasHeader = true,
26+
Columns = new[]
27+
{
28+
new TextLoader.Column("Label", DataKind.Single, 0),
29+
new TextLoader.Column("Features", DataKind.Single, 1, 6)
30+
}
31+
});
32+
33+
// Run an AutoML experiment
34+
var experimentResult = mlContext.Auto()
35+
.CreateRegressionExperiment(60)
36+
.Execute(dataView);
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)