Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoML] Add AutoML XML documentation to all public members; migrate AutoML projects & tests into ML.NET solution; AutoML test fixes #3351

Merged
merged 17 commits into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 0 additions & 91 deletions Microsoft.ML.AutoML.sln

This file was deleted.

60 changes: 60 additions & 0 deletions Microsoft.ML.sln
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.FastTree", "Mi
pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.symbols.nupkgproj = pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.symbols.nupkgproj
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Auto", "src\Microsoft.ML.Auto\Microsoft.ML.Auto.csproj", "{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}"
EndProject
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}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mlnet", "src\mlnet\mlnet.csproj", "{C2F953F9-9825-48AB-88D8-D4538268F017}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mlnet.Tests", "test\mlnet.Tests\mlnet.Tests.csproj", "{73D4685B-94D2-4C28-A434-16ED6CA39BDE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -968,6 +976,54 @@ Global
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release|Any CPU.Build.0 = Release|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release|Any CPU.Build.0 = Release|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
{D48126A1-5334-4575-BC91-4CDAA754C8C8}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release|Any CPU.Build.0 = Release|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
{C2F953F9-9825-48AB-88D8-D4538268F017}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release|Any CPU.Build.0 = Release|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
{73D4685B-94D2-4C28-A434-16ED6CA39BDE}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1055,6 +1111,10 @@ Global
{AD7058C9-5608-49A8-BE23-58C33A74EE91} = {D3D38B03-B557-484D-8348-8BADEE4DF592}
{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
{B1B3F284-FA3D-4D76-A712-FF04495D244B} = {D3D38B03-B557-484D-8348-8BADEE4DF592}
{D57A04E8-1A2B-4A3E-A96A-229C746C2FBE} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
{D48126A1-5334-4575-BC91-4CDAA754C8C8} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
{C2F953F9-9825-48AB-88D8-D4538268F017} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
{73D4685B-94D2-4C28-A434-16ED6CA39BDE} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}
Expand Down
1 change: 0 additions & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

<ItemGroup>
<Project Include="Microsoft.ML.sln" />
<Project Include="Microsoft.ML.AutoML.sln" />
</ItemGroup>

<Import Project="dir.traversal.targets" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.ML;
using Microsoft.ML.Auto;

namespace Samples.AutoML
{
public static class BinaryClassificationExperiment
{
public static void Example()
{
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
// as a catalog of available operations and as the source of randomness.
var mlContext = new MLContext();

// Download and featurize the dataset.
var dataView = Microsoft.ML.SamplesUtils.DatasetUtils.LoadFeaturizedAdultDataset(mlContext);

// Run an AutoML experiment
var experimentResult = mlContext.Auto()
.CreateBinaryClassificationExperiment(60)
.Execute(dataView, "IsOver50K");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Microsoft.ML;
using Microsoft.ML.Auto;

namespace Samples.AutoML
{
public static class BinaryClassificationExperimentWithExperimentSettings
{
public static void Example()
{
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
// as a catalog of available operations and as the source of randomness.
var mlContext = new MLContext();

// Download and featurize the dataset.
var dataView = Microsoft.ML.SamplesUtils.DatasetUtils.LoadFeaturizedAdultDataset(mlContext);

// Run an AutoML experiment
var experimentSettings = new BinaryExperimentSettings()
{
MaxExperimentTimeInSeconds = 60
};
var experimentResult = mlContext.Auto()
.CreateBinaryClassificationExperiment(experimentSettings)
.Execute(dataView, "IsOver50K");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.ML;
using Microsoft.ML.Auto;
using Microsoft.ML.SamplesUtils;

namespace Samples.AutoML
{
public static class MulticlassClassificationExperiment
{
public static void Example()
{
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
// as a catalog of available operations and as the source of randomness.
var mlContext = new MLContext();

// Download and featurize the dataset.
// Create a list of data examples.
var examples = DatasetUtils.GenerateRandomMulticlassClassificationExamples(1000);

// Convert the examples list to an IDataView object, which is consumable by ML.NET API.
var dataView = mlContext.Data.LoadFromEnumerable(examples);

// Run an AutoML experiment
var experimentResult = mlContext.Auto()
.CreateMulticlassClassificationExperiment(60)
.Execute(dataView);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Microsoft.ML;
using Microsoft.ML.Auto;
using Microsoft.ML.SamplesUtils;

namespace Samples.AutoML
{
public static class MulticlassClassificationExperimentWithExperimentSettings
{
public static void Example()
{
// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
// as a catalog of available operations and as the source of randomness.
var mlContext = new MLContext();

// Download and featurize the dataset.
// Create a list of data examples.
var examples = DatasetUtils.GenerateRandomMulticlassClassificationExamples(1000);

// Convert the examples list to an IDataView object, which is consumable by ML.NET API.
var dataView = mlContext.Data.LoadFromEnumerable(examples);

// Run an AutoML experiment
var experimentSettings = new MulticlassExperimentSettings()
{
MaxExperimentTimeInSeconds = 60
};
var experimentResult = mlContext.Auto()
.CreateMulticlassClassificationExperiment(experimentSettings)
.Execute(dataView);
}
}
}
39 changes: 39 additions & 0 deletions docs/samples/Microsoft.ML.Samples/AutoML/RegressionExperiment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Microsoft.ML;
using Microsoft.ML.Auto;
using Microsoft.ML.Data;

namespace Samples.AutoML
{
public static class RegressionExperiment
{
public static void Example()
{
// Downloading a regression dataset from github.com/dotnet/machinelearning
string dataFile = Microsoft.ML.SamplesUtils.DatasetUtils.DownloadHousingRegressionDataset();

// Create a new context for ML.NET operations. It can be used for exception tracking and logging,
// as a catalog of available operations and as the source of randomness.
var mlContext = new MLContext();

// Creating a data loader, based on the format of the data
// The data is tab separated with all numeric columns.
// The first column being the label and rest are numeric features
// Here only seven numeric columns are used as features
var dataView = mlContext.Data.LoadFromTextFile(dataFile, new TextLoader.Options
{
Separators = new[] { '\t' },
HasHeader = true,
Columns = new[]
{
new TextLoader.Column("Label", DataKind.Single, 0),
new TextLoader.Column("Features", DataKind.Single, 1, 6)
}
});

// Run an AutoML experiment
var experimentResult = mlContext.Auto()
.CreateRegressionExperiment(60)
.Execute(dataView);
}
}
}
Loading