Skip to content

Commit 4062bed

Browse files
committed
cleanup
1 parent 5e20acd commit 4062bed

File tree

2 files changed

+6
-36
lines changed

2 files changed

+6
-36
lines changed

src/Microsoft.ML.Transforms/NAIndicatorTransform.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using Microsoft.ML.Runtime.EntryPoints;
1515
using Microsoft.ML.Runtime.Internal.Utilities;
1616
using Microsoft.ML.Runtime.Model;
17-
using Microsoft.ML.Runtime.Model.Onnx;
1817
using Microsoft.ML.StaticPipe;
1918
using Microsoft.ML.StaticPipe.Runtime;
2019

test/Microsoft.ML.Tests/Transformers/NAIndicatorTests.cs

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using Microsoft.ML.Data;
65
using Microsoft.ML.Runtime.Api;
76
using Microsoft.ML.Runtime.Data;
87
using Microsoft.ML.Runtime.Data.IO;
98
using Microsoft.ML.Runtime.Model;
109
using Microsoft.ML.Runtime.RunTests;
1110
using Microsoft.ML.Runtime.Tools;
12-
using System;
1311
using System.IO;
14-
using System.Linq;
1512
using Xunit;
1613
using Xunit.Abstractions;
1714

@@ -47,39 +44,13 @@ public void NAIndicatorWorkout()
4744
var dataView = ComponentCreation.CreateDataView(Env, data);
4845
var pipe = new NAIndicatorEstimator(Env,
4946
new NAIndicatorTransform.ColumnInfo("A", "NAA"),
50-
new NAIndicatorTransform.ColumnInfo("B", "NAC"),
51-
new NAIndicatorTransform.ColumnInfo("C", "NAD"),
52-
new NAIndicatorTransform.ColumnInfo("D", "NAE"));
47+
new NAIndicatorTransform.ColumnInfo("B", "NAB"),
48+
new NAIndicatorTransform.ColumnInfo("C", "NAC"),
49+
new NAIndicatorTransform.ColumnInfo("D", "NAD"));
5350
TestEstimatorCore(pipe, dataView);
5451
Done();
5552
}
5653

57-
//[Fact]
58-
//public void NAIndicatorSimpleWorkout()
59-
//{
60-
// var data = new[] {
61-
// new TestClass() { A = 1, B = 3, C = new float[2]{ 1, 2 } , D = new double[2]{ 3,4} },
62-
// new TestClass() { A = float.NaN, B = double.NaN, C = new float[2]{ float.NaN, float.NaN } , D = new double[2]{ double.NaN,double.NaN}},
63-
// new TestClass() { A = float.NegativeInfinity, B = double.NegativeInfinity, C = new float[2]{ float.NegativeInfinity, float.NegativeInfinity } , D = new double[2]{ double.NegativeInfinity, double.NegativeInfinity}},
64-
// new TestClass() { A = float.PositiveInfinity, B = double.PositiveInfinity, C = new float[2]{ float.PositiveInfinity, float.PositiveInfinity, } , D = new double[2]{ double.PositiveInfinity, double.PositiveInfinity}},
65-
// new TestClass() { A = 2, B = 1, C = new float[2]{ 3, 4 } , D = new double[2]{ 5,6}},
66-
// };
67-
68-
// var dataView = ComponentCreation.CreateDataView(Env, data);
69-
// var pipe = new NAIndicatorEstimator(Env,
70-
// new NAIndicatorTransform.ColumnInfo("A", "AA"));
71-
// var transform = pipe.Fit(dataView);
72-
// var outDataView = transform.Transform(dataView);
73-
// var col = outDataView.GetColumn<bool>(Env, "AA").ToArray();
74-
// // write a simple test with one NAindicatortransform and try to inspect the columns using pete's code. might be easier!
75-
// //TestEstimatorCore(pipe, dataView);
76-
// foreach(bool c in col)
77-
// {
78-
// Console.WriteLine(c.ToString());
79-
// }
80-
// Done();
81-
//}
82-
8354
[Fact]
8455
public void NAIndicatorStatic()
8556
{
@@ -137,9 +108,9 @@ public void TestOldSavingAndLoading()
137108
var dataView = ComponentCreation.CreateDataView(Env, data);
138109
var pipe = new NAIndicatorEstimator(Env,
139110
new NAIndicatorTransform.ColumnInfo("A", "NAA"),
140-
new NAIndicatorTransform.ColumnInfo("B", "NAC"),
141-
new NAIndicatorTransform.ColumnInfo("C", "NAD"),
142-
new NAIndicatorTransform.ColumnInfo("D", "NAE"));
111+
new NAIndicatorTransform.ColumnInfo("B", "NAB"),
112+
new NAIndicatorTransform.ColumnInfo("C", "NAC"),
113+
new NAIndicatorTransform.ColumnInfo("D", "NAD"));
143114

144115
var result = pipe.Fit(dataView).Transform(dataView);
145116
var resultRoles = new RoleMappedData(result);

0 commit comments

Comments
 (0)