|
2 | 2 | // The .NET Foundation licenses this file to you under the MIT license.
|
3 | 3 | // See the LICENSE file in the project root for more information.
|
4 | 4 |
|
5 |
| -using Microsoft.ML.Data; |
6 | 5 | using Microsoft.ML.Runtime.Api;
|
7 | 6 | using Microsoft.ML.Runtime.Data;
|
8 | 7 | using Microsoft.ML.Runtime.Data.IO;
|
9 | 8 | using Microsoft.ML.Runtime.Model;
|
10 | 9 | using Microsoft.ML.Runtime.RunTests;
|
11 | 10 | using Microsoft.ML.Runtime.Tools;
|
12 |
| -using System; |
13 | 11 | using System.IO;
|
14 |
| -using System.Linq; |
15 | 12 | using Xunit;
|
16 | 13 | using Xunit.Abstractions;
|
17 | 14 |
|
@@ -47,39 +44,13 @@ public void NAIndicatorWorkout()
|
47 | 44 | var dataView = ComponentCreation.CreateDataView(Env, data);
|
48 | 45 | var pipe = new NAIndicatorEstimator(Env,
|
49 | 46 | 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")); |
53 | 50 | TestEstimatorCore(pipe, dataView);
|
54 | 51 | Done();
|
55 | 52 | }
|
56 | 53 |
|
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 |
| - |
83 | 54 | [Fact]
|
84 | 55 | public void NAIndicatorStatic()
|
85 | 56 | {
|
@@ -137,9 +108,9 @@ public void TestOldSavingAndLoading()
|
137 | 108 | var dataView = ComponentCreation.CreateDataView(Env, data);
|
138 | 109 | var pipe = new NAIndicatorEstimator(Env,
|
139 | 110 | 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")); |
143 | 114 |
|
144 | 115 | var result = pipe.Fit(dataView).Transform(dataView);
|
145 | 116 | var resultRoles = new RoleMappedData(result);
|
|
0 commit comments