Skip to content

Conversion of NAIndicatorTransform to estimator with related pigstensions #1217

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

Merged
merged 21 commits into from
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e0c85cd
started conversion work
artidoro Oct 5, 2018
9e23955
started conversion work
artidoro Oct 5, 2018
11b7dd9
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro Oct 8, 2018
e0e7d3b
wrote a first version of the conversion, need to debug it and make su…
artidoro Oct 10, 2018
593f7d5
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro Oct 10, 2018
9c1e758
finished debugging tests
artidoro Oct 10, 2018
5e20acd
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro Oct 10, 2018
4062bed
cleanup
artidoro Oct 10, 2018
76a893a
fixing an issue
artidoro Oct 11, 2018
8f331fd
fixed review comments
artidoro Oct 16, 2018
fe94d30
fixed some review comments and added a test
artidoro Oct 16, 2018
122d48c
fixed entrypointcatalog test
artidoro Oct 16, 2018
ef8c999
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro Oct 16, 2018
28e9570
propagated metadata
artidoro Oct 17, 2018
f720a75
fixed review comments
artidoro Oct 18, 2018
90784fb
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro Oct 18, 2018
5d4b6bc
fixed review comments
artidoro Oct 18, 2018
dd49b4b
Merge branch 'master' into naindicator
artidoro Oct 19, 2018
0f4507f
removed unused object
artidoro Oct 19, 2018
25c9b9e
Merge branch 'naindicator' of https://github.com/artidoro/machinelear…
artidoro Oct 19, 2018
4a6a5d3
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro Oct 19, 2018
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
3 changes: 2 additions & 1 deletion src/Microsoft.ML.Transforms/NAHandleTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.ML.Runtime.Data.Conversion;
using Microsoft.ML.Runtime.EntryPoints;
using Microsoft.ML.Runtime.Internal.Utilities;
using Microsoft.ML.Transforms;

[assembly: LoadableClass(NAHandleTransform.Summary, typeof(IDataTransform), typeof(NAHandleTransform), typeof(NAHandleTransform.Arguments), typeof(SignatureDataTransform),
NAHandleTransform.FriendlyName, "NAHandleTransform", NAHandleTransform.ShortName, "NA", DocName = "transform/NAHandle.md")]
Expand Down Expand Up @@ -212,7 +213,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV

// Create the indicator columns.
if (naIndicatorCols.Count > 0)
output = new NAIndicatorTransform(h, new NAIndicatorTransform.Arguments() { Column = naIndicatorCols.ToArray() }, input);
output = NAIndicatorTransform.Create(h, new NAIndicatorTransform.Arguments() { Column = naIndicatorCols.ToArray() }, input);

// Convert the indicator columns to the correct type so that they can be concatenated to the NAReplace outputs.
if (naConvCols.Count > 0)
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.ML.Transforms/NAHandling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using Microsoft.ML.Runtime.Data;
using Microsoft.ML.Runtime.EntryPoints;
using Microsoft.ML.Transforms;

[assembly: EntryPointModule(typeof(NAHandling))]

Expand Down Expand Up @@ -71,7 +72,7 @@ public static CommonOutputs.TransformOutput Handle(IHostEnvironment env, NAHandl
public static CommonOutputs.TransformOutput Indicator(IHostEnvironment env, NAIndicatorTransform.Arguments input)
{
var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NAIndicator", input);
var xf = new NAIndicatorTransform(h, input, input.Data);
var xf = new NAIndicatorTransform(h, input).Transform(input.Data);
return new CommonOutputs.TransformOutput()
{
Model = new TransformModel(h, xf, input.Data),
Expand Down
Loading