1143 references to DataKind
Microsoft.ML.AutoML (13)
AutoMLExperiment\ITrialResultManager.cs (6)
140
new TextLoader.Column("id",
DataKind
.Int32, 0),
141
new TextLoader.Column("loss",
DataKind
.Single, 1),
142
new TextLoader.Column("durationInMilliseconds",
DataKind
.Single, 2),
143
new TextLoader.Column("peakCpu",
DataKind
.Single, 3),
144
new TextLoader.Column("peakMemoryInMegaByte",
DataKind
.Single, 4),
145
new TextLoader.Column("parameter",
DataKind
.Double, 5, 5 + _searchSpace.FeatureSpaceDim - 1),
ColumnInference\ColumnGroupingInference.cs (5)
28
public
DataKind
ItemKind;
32
public GroupingColumn(string name,
DataKind
kind, ColumnPurpose purpose, Range[] ranges)
94
private static string GetName(
DataKind
itemKind, ColumnPurpose purpose, List<GroupingColumn> previousColumns)
108
private static string GetPurposeName(ColumnPurpose purpose,
DataKind
itemKind)
113
if (itemKind ==
DataKind
.Boolean)
ColumnInference\ColumnTypeInference.cs (1)
262
Columns = new[] { new TextLoader.Column("C",
DataKind
.String, 0, args.ColumnCount - 1) },
ColumnInference\TextFileContents.cs (1)
68
DataKind =
DataKind
.String,
Microsoft.ML.AutoML.Tests (17)
AutoFitTests.cs (7)
699
new TextLoader.Column(labelColumnName,
DataKind
.Single, new [] { new TextLoader.Range(0) }),
700
new TextLoader.Column(userIdColumnName,
DataKind
.UInt32, new [] { new TextLoader.Range(1) }, new KeyCount(20)),
701
new TextLoader.Column(itemIdColumnName,
DataKind
.UInt32, new [] { new TextLoader.Range(2) }, new KeyCount(40)),
714
new TextLoader.Column(labelColumnName,
DataKind
.Single, 0),
715
new TextLoader.Column(groupIdColumnName,
DataKind
.Int32, 1),
716
new TextLoader.Column(featureColumnVectorNameA,
DataKind
.Single, 2, 9),
717
new TextLoader.Column(featureColumnVectorNameB,
DataKind
.Single, 10, 137)
ColumnInferenceTests.cs (10)
83
Assert.Equal(
DataKind
.Single, emptyColumn.DataKind);
95
Assert.Equal(
DataKind
.Single, boolColumn.DataKind);
96
Assert.Equal(
DataKind
.Boolean, labelColumn.DataKind);
124
Assert.Equal(
DataKind
.String, labelColumn.DataKind);
125
Assert.Equal(
DataKind
.Single, userColumn.DataKind);
126
Assert.Equal(
DataKind
.Single, itemColumn.DataKind);
127
Assert.Equal(
DataKind
.Single, ignoreColumn.DataKind);
141
Assert.Equal(
DataKind
.String, nameColumn.DataKind);
142
Assert.Equal(
DataKind
.Boolean, labelColumn.DataKind);
193
Assert.Equal(
DataKind
.Single, labelCol.DataKind);
Microsoft.ML.CodeGenerator (22)
CodeGenerator\CSharp\AzureCodeGenerator\AzureAttachModelCodeGenerator.cs (1)
56
var
labelType = _columnInferenceResult.TextLoaderOptions.Columns.Where(t => t.Name == _settings.LabelName).First().DataKind;
CodeGenerator\CSharp\CodeGenerator.cs (1)
60
var
labelType = _columnInferenceResult.TextLoaderOptions.Columns.Where(t => t.Name == _settings.LabelName).First().DataKind;
CodeGenerator\CSharp\CodeGeneratorSettings.cs (1)
82
public
DataKind
ColumnType;
Utils.cs (19)
150
internal static Type GetCSharpType(
DataKind
labelType)
154
case Microsoft.ML.Data.
DataKind
.String:
156
case Microsoft.ML.Data.
DataKind
.Boolean:
158
case Microsoft.ML.Data.
DataKind
.Single:
160
case Microsoft.ML.Data.
DataKind
.Double:
162
case Microsoft.ML.Data.
DataKind
.Int32:
164
case Microsoft.ML.Data.
DataKind
.UInt32:
166
case Microsoft.ML.Data.
DataKind
.Int64:
168
case Microsoft.ML.Data.
DataKind
.UInt64:
274
DataKind
dataKind;
341
internal static string GetSymbolOfDataKind(
DataKind
dataKind)
345
case
DataKind
.String:
347
case
DataKind
.Boolean:
349
case
DataKind
.Single:
351
case
DataKind
.Double:
353
case
DataKind
.Int32:
355
case
DataKind
.UInt32:
357
case
DataKind
.Int64:
359
case
DataKind
.UInt64:
Microsoft.ML.CodeGenerator.Tests (102)
ApprovalTests\ConsoleCodeGeneratorTests.cs (77)
572
new TextLoader.Column("Label",
DataKind
.String, 0),
573
new TextLoader.Column("userId",
DataKind
.String, 1),
574
new TextLoader.Column("movieId",
DataKind
.String, 2),
611
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
612
new TextLoader.Column("col1",
DataKind
.Single, 1),
613
new TextLoader.Column("col2",
DataKind
.Single, 0),
614
new TextLoader.Column("col3",
DataKind
.String, 0),
615
new TextLoader.Column("col4",
DataKind
.Int32, 0),
616
new TextLoader.Column("col5",
DataKind
.UInt32, 0),
648
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
649
new TextLoader.Column("col1",
DataKind
.Single, 1),
650
new TextLoader.Column("col2",
DataKind
.Single, 0),
651
new TextLoader.Column("col3",
DataKind
.String, 0),
652
new TextLoader.Column("col4",
DataKind
.Int32, 0),
653
new TextLoader.Column("col5",
DataKind
.UInt32, 0),
701
new TextLoader.Column("Label",
DataKind
.String, 0),
702
new TextLoader.Column("ImagePath",
DataKind
.String, 1), // 0?
739
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
740
new TextLoader.Column("GroupId",
DataKind
.Single, 1),
741
new TextLoader.Column("col1",
DataKind
.Single, 0),
742
new TextLoader.Column("col2",
DataKind
.String, 0),
743
new TextLoader.Column("col3",
DataKind
.Int32, 0),
744
new TextLoader.Column("col4",
DataKind
.UInt32, 0),
790
new TextLoader.Column("Label",
DataKind
.String, 0),
791
new TextLoader.Column("ImageSource",
DataKind
.String, 1), // 0?
821
new TextLoader.Column("Age",
DataKind
.Double, 0),
822
new TextLoader.Column("Workclass",
DataKind
.String, 1), // 0?
823
new TextLoader.Column("Fnlwgt",
DataKind
.Double, 2),
824
new TextLoader.Column("Education",
DataKind
.String, 3),
825
new TextLoader.Column("Education_num",
DataKind
.Double, 4),
826
new TextLoader.Column("Marital_status",
DataKind
.String, 5),
827
new TextLoader.Column("Occupation",
DataKind
.String, 6),
828
new TextLoader.Column("Relationship",
DataKind
.String, 7),
829
new TextLoader.Column("Race",
DataKind
.String, 8),
830
new TextLoader.Column("Sex",
DataKind
.String, 9),
831
new TextLoader.Column("Capital_gain",
DataKind
.Double, 10),
832
new TextLoader.Column("Capital_loss",
DataKind
.Double, 11),
833
new TextLoader.Column("Hours_per_week",
DataKind
.Double, 12),
834
new TextLoader.Column("Native_country",
DataKind
.String, 13),
835
new TextLoader.Column("label",
DataKind
.Boolean, 14),
858
ColumnType =
DataKind
.Int64,
866
ColumnType =
DataKind
.String,
874
ColumnType =
DataKind
.Int64,
882
ColumnType =
DataKind
.String,
890
ColumnType =
DataKind
.Int64,
898
ColumnType =
DataKind
.String,
906
ColumnType =
DataKind
.String,
914
ColumnType =
DataKind
.String,
922
ColumnType =
DataKind
.String,
930
ColumnType =
DataKind
.String,
938
ColumnType =
DataKind
.Int64,
946
ColumnType =
DataKind
.Int64,
954
ColumnType =
DataKind
.Int64,
962
ColumnType =
DataKind
.String,
970
ColumnType =
DataKind
.Boolean,
996
new TextLoader.Column("id",
DataKind
.Int32, 0),
997
new TextLoader.Column("MsAssetNum",
DataKind
.Int32, 1),
998
new TextLoader.Column("Make",
DataKind
.String, 2),
999
new TextLoader.Column("Model",
DataKind
.String, 3),
1000
new TextLoader.Column("model",
DataKind
.Double, 4),
1001
new TextLoader.Column("work category",
DataKind
.String, 5),
1002
new TextLoader.Column("Work category",
DataKind
.Int32, 6),
1003
new TextLoader.Column("IsDetachable",
DataKind
.Boolean, 7),
1026
ColumnType =
DataKind
.Int32,
1034
ColumnType =
DataKind
.Int32,
1042
ColumnType =
DataKind
.String,
1050
ColumnType =
DataKind
.String,
1058
ColumnType =
DataKind
.Double,
1066
ColumnType =
DataKind
.String,
1074
ColumnType =
DataKind
.Int32,
1082
ColumnType =
DataKind
.Boolean,
1106
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
1107
new TextLoader.Column("col1",
DataKind
.Single, 1),
1108
new TextLoader.Column("col2",
DataKind
.Single, 0),
1109
new TextLoader.Column("col3",
DataKind
.String, 0),
1110
new TextLoader.Column("col4",
DataKind
.Int32, 0),
1111
new TextLoader.Column("col5",
DataKind
.UInt32, 0),
CodeGenTests.cs (25)
145
new TextLoader.Column(){ Name = "Label", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind =
DataKind
.Boolean },
149
new TextLoader.Column(){ Name = "id", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind =
DataKind
.Single },
150
new TextLoader.Column(){ Name = "country", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind =
DataKind
.Single },
151
new TextLoader.Column(){ Name = "Country", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind =
DataKind
.String }
155
new TextLoader.Column(){ Name = "id", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind =
DataKind
.Int32 },
156
new TextLoader.Column(){ Name = "shape", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind =
DataKind
.Int32 },
157
new TextLoader.Column(){ Name = "Shape", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind =
DataKind
.String },
158
new TextLoader.Column(){ Name = "color", Source = new TextLoader.Range[]{new TextLoader.Range(3) }, DataKind =
DataKind
.String },
159
new TextLoader.Column(){ Name = "price", Source = new TextLoader.Range[]{new TextLoader.Range(4) }, DataKind =
DataKind
.Double },
163
new TextLoader.Column(){ Name = "vin", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind =
DataKind
.String },
164
new TextLoader.Column(){ Name = "make", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind =
DataKind
.String },
165
new TextLoader.Column(){ Name = "model", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind =
DataKind
.String },
166
new TextLoader.Column(){ Name = "color", Source = new TextLoader.Range[]{new TextLoader.Range(3) }, DataKind =
DataKind
.String },
167
new TextLoader.Column(){ Name = "MSRP", Source = new TextLoader.Range[]{new TextLoader.Range(4) }, DataKind =
DataKind
.Single },
168
new TextLoader.Column(){ Name = "engine size", Source = new TextLoader.Range[]{new TextLoader.Range(5) }, DataKind =
DataKind
.Double },
169
new TextLoader.Column(){ Name = "isElectric", Source = new TextLoader.Range[]{new TextLoader.Range(6) }, DataKind =
DataKind
.Boolean },
173
new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind =
DataKind
.String },
174
new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind =
DataKind
.String },
175
new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind =
DataKind
.Int32 },
176
new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(3) }, DataKind =
DataKind
.Int32 },
177
new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(4) }, DataKind =
DataKind
.Int32 },
178
new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(5) }, DataKind =
DataKind
.String },
179
new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(6) }, DataKind =
DataKind
.Int32 },
180
new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(7) }, DataKind =
DataKind
.String },
181
new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(8) }, DataKind =
DataKind
.Double },
Microsoft.ML.Core (23)
Data\DataKind.cs (23)
75
/// Data type specifier used in command line. <see cref="InternalDataKind"/> is the underlying version of <see cref="
DataKind
"/>
86
I1 =
DataKind
.SByte,
87
U1 =
DataKind
.Byte,
88
I2 =
DataKind
.Int16,
89
U2 =
DataKind
.UInt16,
90
I4 =
DataKind
.Int32,
91
U4 =
DataKind
.UInt32,
92
I8 =
DataKind
.Int64,
93
U8 =
DataKind
.UInt64,
94
R4 =
DataKind
.Single,
95
R8 =
DataKind
.Double,
98
TX =
DataKind
.String,
103
BL =
DataKind
.Boolean,
106
TS =
DataKind
.TimeSpan,
108
DT =
DataKind
.DateTime,
110
DZ =
DataKind
.DateTimeOffset,
147
/// Because <see cref="
DataKind
"/> is a subset of <see cref="InternalDataKind"/>, the conversion is straightforward.
149
public static InternalDataKind ToInternalDataKind(this
DataKind
dataKind) => (InternalDataKind)dataKind;
152
/// This function converts <paramref name="kind"/> to <see cref="
DataKind
"/>.
153
/// Because <see cref="
DataKind
"/> is a subset of <see cref="InternalDataKind"/>, we should check if <paramref name="kind"/>
154
/// can be found in <see cref="
DataKind
"/>.
156
public static
DataKind
ToDataKind(this InternalDataKind kind)
159
return (
DataKind
)kind;
Microsoft.ML.Core.Tests (24)
UnitTests\TestEntryPoints.cs (23)
53
new TextLoader.Column("Label",
DataKind
.Single, 0),
54
new TextLoader.Column("Features",
DataKind
.Single,
74
new TextLoader.Column("Label",
DataKind
.Single, 0),
75
new TextLoader.Column("F1",
DataKind
.String, 1),
76
new TextLoader.Column("F2",
DataKind
.Int32, 2),
77
new TextLoader.Column("Rest",
DataKind
.Single, new [] { new TextLoader.Range(3, 9) })
1369
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
1370
new TextLoader.Column("SentimentText",
DataKind
.String, 1)
1777
new TextLoader.Column("Label",
DataKind
.String, 0),
1778
new TextLoader.Column("Text",
DataKind
.String, 3)
1993
new TextLoader.Column("Label",
DataKind
.Single, 0),
1994
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 4) })
2139
new TextLoader.Column("Label",
DataKind
.Single, 0),
2140
new TextLoader.Column("Features",
DataKind
.Single, new[] { new TextLoader.Range(1, 8) }),
2141
new TextLoader.Column("Cat",
DataKind
.String, 9)
4241
new TextLoader.Column("Label",
DataKind
.Single, 0),
4242
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 9) })
4316
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 784) })
4529
new TextLoader.Column("Text",
DataKind
.String,
4721
new TextLoader.Column("Text",
DataKind
.String, 1, 2),
4722
new TextLoader.Column("Label",
DataKind
.Single, 0)
4763
new TextLoader.Column("Text",
DataKind
.String, 1, 2),
4764
new TextLoader.Column("Label",
DataKind
.Single, 0)
UnitTests\TestHosts.cs (1)
131
env.Data.CreateTextLoader(new TextLoader.Options { Columns = new[] { new TextLoader.Column("TestColumn",
DataKind
.Single, 0) } });
Microsoft.ML.Data (34)
DataLoadSave\DataOperationsCatalog.cs (1)
566
data = new TypeConvertingTransformer(env, splitColumnName,
DataKind
.Int64, samplingKeyColumn).Transform(data);
DataLoadSave\Text\TextLoader.cs (8)
54
/// <param name="dataKind"><see cref="Data.
DataKind
"/> of the items in the column.</param>
56
public Column(string name,
DataKind
dataKind, int index)
65
/// <param name="dataKind"><see cref="Data.
DataKind
"/> of the items in the column.</param>
68
public Column(string name,
DataKind
dataKind, int minIndex, int maxIndex)
77
/// <param name="dataKind"><see cref="Data.
DataKind
"/> of the items in the column.</param>
80
public Column(string name,
DataKind
dataKind, Range[] source, KeyCount keyCount = null)
118
/// <see cref="Data.
DataKind
"/> of the items in the column.
121
public
DataKind
DataKind
DataLoadSave\Text\TextLoaderSaverCatalog.cs (2)
151
/// values by the default missing value for each type documented in <see cref="
DataKind
"/>.</param>
224
/// values by the default missing value for each type documented in <see cref="
DataKind
"/>.</param>
Transforms\ConversionsExtensionsCatalog.cs (2)
83
DataKind
outputKind = ConvertDefaults.DefaultOutputKind)
102
DataKind
outputKind = ConvertDefaults.DefaultOutputKind)
Transforms\KeyToValue.cs (3)
514
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Int64).ToType();
554
t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Double).ToType();
568
t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Boolean).ToType();
Transforms\TypeConverting.cs (8)
192
internal TypeConvertingTransformer(IHostEnvironment env, string outputColumnName,
DataKind
outputKind, string inputColumnName = null, KeyCount outputKeyCount = null)
531
/// <seealso cref="ConversionsExtensionsCatalog.ConvertType(TransformsCatalog.ConversionTransforms, InputOutputColumnPair[],
DataKind
)"/>
532
/// <seealso cref="ConversionsExtensionsCatalog.ConvertType(TransformsCatalog.ConversionTransforms, string, string,
DataKind
)"/>
537
public const
DataKind
DefaultOutputKind =
DataKind
.Single;
557
public readonly
DataKind
OutputKind;
570
public ColumnOptions(string name,
DataKind
outputKind, string inputColumnName, KeyCount outputKeyCount = null)
605
DataKind
outputKind = Defaults.DefaultOutputKind)
Transforms\ValueMapping.cs (7)
534
TextLoader.Column valueColumn = new TextLoader.Column(valueColumnName,
DataKind
.UInt32, 1);
541
valueColumn.Type =
DataKind
.UInt64.ToInternalDataKind();
642
keyColumn = new TextLoader.Column(keyColumnName,
DataKind
.String, 0);
643
valueColumn = new TextLoader.Column(valueColumnName,
DataKind
.String, 1);
665
keyColumn = new TextLoader.Column(keyColumnName,
DataKind
.String, 0);
666
valueColumn = new TextLoader.Column(valueColumnName,
DataKind
.Single, 1);
1202
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.String).ToType();
Transforms\ValueToKeyMappingTransformer.cs (3)
442
new TextLoader.Column("Term",
DataKind
.String, 0)
793
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.String).ToType();
806
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Single).ToType();
Microsoft.ML.EntryPoints (2)
FeatureCombiner.cs (2)
188
Utils.Add(ref cvt, new TypeConvertingEstimator.ColumnOptions(colName,
DataKind
.Single, col.Name));
303
var xf = new TypeConvertingTransformer(host, new TypeConvertingEstimator.ColumnOptions(input.LabelColumn,
DataKind
.Single, input.LabelColumn)).Transform(input.Data);
Microsoft.ML.Fairlearn (1)
Metrics\FairlearnMetricCatalog.cs (1)
68
var convertToString = _context.Transforms.Conversion.ConvertType(sensitiveCol.Name, sensitiveCol.Name,
DataKind
.String);
Microsoft.ML.FastTree (1)
FastTree.cs (1)
1355
data = new TypeConvertingTransformer(Host, new TypeConvertingEstimator.ColumnOptions(groupName,
DataKind
.UInt64, groupName)).Transform(data);
Microsoft.ML.IntegrationTests (23)
Datasets\MnistOneClass.cs (2)
21
new TextLoader.Column("Label",
DataKind
.Single, 0),
22
new TextLoader.Column("Features",
DataKind
.Single, 1, 1 + _featureLength)
Datasets\TypeTestData.cs (17)
12
/// A class containing one property per <see cref="
DataKind
"/>.
81
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
82
new TextLoader.Column("I1",
DataKind
.SByte, 1),
83
new TextLoader.Column("U1",
DataKind
.Byte, 2),
84
new TextLoader.Column("I2",
DataKind
.Int16, 3),
85
new TextLoader.Column("U2",
DataKind
.UInt16, 4),
86
new TextLoader.Column("I4",
DataKind
.Int32, 5),
87
new TextLoader.Column("U4",
DataKind
.UInt32, 6),
88
new TextLoader.Column("I8",
DataKind
.Int64, 7),
89
new TextLoader.Column("U8",
DataKind
.UInt64, 8),
90
new TextLoader.Column("R4",
DataKind
.Single, 9),
91
new TextLoader.Column("R8",
DataKind
.Double, 10),
92
new TextLoader.Column("Tx",
DataKind
.String, 11),
93
new TextLoader.Column("Ts",
DataKind
.TimeSpan, 12),
94
new TextLoader.Column("Dt",
DataKind
.DateTime, 13),
95
new TextLoader.Column("Dz",
DataKind
.DateTimeOffset, 14),
96
new TextLoader.Column("Features",
DataKind
.Single, 15, 15 + _numFeatures - 1),
Validation.cs (4)
79
new TextLoader.Column(labelColumnName,
DataKind
.Single, 0),
80
new TextLoader.Column(groupIdColumnName,
DataKind
.Int32, 1),
81
new TextLoader.Column(featuresColumnVectorNameA,
DataKind
.Single, 2, 9),
82
new TextLoader.Column(featuresColumnVectorNameB,
DataKind
.Single, 10, 137)
Microsoft.ML.KMeansClustering (1)
KMeansModelParameters.cs (1)
367
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.UInt32).ToType();
Microsoft.ML.OnnxTransformerTest (8)
DnnImageFeaturizerTest.cs (2)
105
new TextLoader.Column("imagePath",
DataKind
.String, 0),
106
new TextLoader.Column("name",
DataKind
.String, 1)
OnnxTransformTests.cs (6)
250
new TextLoader.Column("imagePath",
DataKind
.String, 0),
251
new TextLoader.Column("name",
DataKind
.String, 1)
301
new TextLoader.Column("imagePath",
DataKind
.String, 0),
302
new TextLoader.Column("name",
DataKind
.String, 1)
1130
new TextLoader.Column("imagePath",
DataKind
.String, 0),
1131
new TextLoader.Column("name",
DataKind
.String, 1)
Microsoft.ML.PerformanceTests (28)
FeaturizeTextBench.cs (1)
36
columns.Add(new TextLoader.Column($"Column{i}",
DataKind
.String, i));
KMeansAndLogisticRegressionBench.cs (3)
25
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
26
new TextLoader.Column("CatFeatures",
DataKind
.String,
30
new TextLoader.Column("NumFeatures",
DataKind
.Single,
PredictionEngineBench.cs (9)
45
new TextLoader.Column("Label",
DataKind
.Single, 0),
46
new TextLoader.Column("SepalLength",
DataKind
.Single, 1),
47
new TextLoader.Column("SepalWidth",
DataKind
.Single, 2),
48
new TextLoader.Column("PetalLength",
DataKind
.Single, 3),
49
new TextLoader.Column("PetalWidth",
DataKind
.Single, 4),
84
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
85
new TextLoader.Column("SentimentText",
DataKind
.String, 1)
119
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
120
new TextLoader.Column("Features",
DataKind
.Single, new[] { new TextLoader.Range(1, 9) })
RffTransform.cs (2)
36
new TextLoader.Column("Label",
DataKind
.Single, 64),
37
new TextLoader.Column("Features",
DataKind
.Single, new[] {new TextLoader.Range() {Min = 0, Max = 63}})
StochasticDualCoordinateAscentClassifierBench.cs (12)
66
new TextLoader.Column("Label",
DataKind
.Single, 0),
67
new TextLoader.Column("SepalLength",
DataKind
.Single, 1),
68
new TextLoader.Column("SepalWidth",
DataKind
.Single, 2),
69
new TextLoader.Column("PetalLength",
DataKind
.Single, 3),
70
new TextLoader.Column("PetalWidth",
DataKind
.Single, 4),
93
new TextLoader.Column("Label",
DataKind
.Single, new[] { new TextLoader.Range() { Min = 0, Max = 0 } }),
94
new TextLoader.Column("SentimentText",
DataKind
.String, new[] { new TextLoader.Range() { Min = 1, Max = 1 } })
135
new TextLoader.Column("Label",
DataKind
.Single, 0),
136
new TextLoader.Column("SepalLength",
DataKind
.Single, 1),
137
new TextLoader.Column("SepalWidth",
DataKind
.Single, 2),
138
new TextLoader.Column("PetalLength",
DataKind
.Single, 3),
139
new TextLoader.Column("PetalWidth",
DataKind
.Single, 4),
TextLoaderBench.cs (1)
39
_columns.Add(new TextLoader.Column($"Column{i}",
DataKind
.String, i));
Microsoft.ML.Predictor.Tests (4)
TestIniModels.cs (4)
525
new TextLoader.Column("Label",
DataKind
.Single, 0),
526
new TextLoader.Column("Features",
DataKind
.Single, 1, 9)
564
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
565
new TextLoader.Column("Features",
DataKind
.Single, 1, 9)
Microsoft.ML.Samples (22)
Dynamic\DataOperations\LoadingText.cs (3)
46
new TextLoader.Column("Features",
DataKind
.Single, 0, 9)
95
DataKind
.Single,
141
new TextLoader.Column("Features",
DataKind
.Single, 0, 9)
Dynamic\TensorFlow\TextClassification.cs (2)
50
new TextLoader.Column("Words",
DataKind
.String, 0),
51
new TextLoader.Column("Ids",
DataKind
.Int32, 1),
Dynamic\Trainers\Regression\OrdinaryLeastSquaresAdvanced.cs (2)
38
new TextLoader.Column("Label",
DataKind
.Single, 0),
39
new TextLoader.Column("Features",
DataKind
.Single, 1, 6)
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptionsAdvanced.cs (2)
38
new TextLoader.Column("Label",
DataKind
.Single, 0),
39
new TextLoader.Column("Features",
DataKind
.Single, 1, 6)
Dynamic\Transforms\Concatenate.cs (1)
50
outputKind:
DataKind
.Single)
Dynamic\Transforms\Conversion\ConvertType.cs (1)
24
"SurvivedInt32", "Survived",
DataKind
.Int32);
Dynamic\Transforms\Conversion\ConvertTypeMultiColumn.cs (1)
47
DataKind
.Single);
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScale.cs (2)
38
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
39
new TextLoader.Column("Name",
DataKind
.String, 1),
Dynamic\Transforms\ImageAnalytics\DnnFeaturizeImage.cs (2)
37
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
38
new TextLoader.Column("Name",
DataKind
.String, 1),
Dynamic\Transforms\ImageAnalytics\ExtractPixels.cs (2)
40
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
41
new TextLoader.Column("Name",
DataKind
.String, 1),
Dynamic\Transforms\ImageAnalytics\LoadImages.cs (2)
37
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
38
new TextLoader.Column("Name",
DataKind
.String, 1),
Dynamic\Transforms\ImageAnalytics\ResizeImages.cs (2)
37
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
38
new TextLoader.Column("Name",
DataKind
.String, 1),
Microsoft.ML.Samples.GPU (2)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (2)
50
new TextLoader.Column("Words",
DataKind
.String, 0),
51
new TextLoader.Column("Ids",
DataKind
.Int32, 1),
Microsoft.ML.Samples.OneDal (3)
Program.cs (3)
29
columns.Add(new TextLoader.Column(column,
DataKind
.Boolean, Array.IndexOf(headerArray, column)));
31
columns.Add(new TextLoader.Column(column,
DataKind
.Single, Array.IndexOf(headerArray, column)));
35
columns.Add(new TextLoader.Column(column,
DataKind
.Single, Array.IndexOf(headerArray, column)));
Microsoft.ML.SamplesUtils (27)
SamplesDatasetUtils.cs (27)
53
new TextLoader.Column("MedianHomeValue",
DataKind
.Single, 0),
54
new TextLoader.Column("CrimesPerCapita",
DataKind
.Single, 1),
55
new TextLoader.Column("PercentResidental",
DataKind
.Single, 2),
56
new TextLoader.Column("PercentNonRetail",
DataKind
.Single, 3),
57
new TextLoader.Column("CharlesRiver",
DataKind
.Single, 4),
58
new TextLoader.Column("NitricOxides",
DataKind
.Single, 5),
59
new TextLoader.Column("RoomsPerDwelling",
DataKind
.Single, 6),
60
new TextLoader.Column("PercentPre40s",
DataKind
.Single, 7),
61
new TextLoader.Column("EmploymentDistance",
DataKind
.Single, 8),
62
new TextLoader.Column("HighwayDistance",
DataKind
.Single, 9),
63
new TextLoader.Column("TaxRate",
DataKind
.Single, 10),
64
new TextLoader.Column("TeacherRatio",
DataKind
.Single, 11),
129
new TextLoader.Column("age",
DataKind
.Single, 0),
130
new TextLoader.Column("workclass",
DataKind
.String, 1),
131
new TextLoader.Column("fnlwgt",
DataKind
.Single, 2),
132
new TextLoader.Column("education",
DataKind
.String, 3),
133
new TextLoader.Column("education-num",
DataKind
.Single, 4),
134
new TextLoader.Column("marital-status",
DataKind
.String, 5),
135
new TextLoader.Column("occupation",
DataKind
.String, 6),
136
new TextLoader.Column("relationship",
DataKind
.String, 7),
137
new TextLoader.Column("ethnicity",
DataKind
.String, 8),
138
new TextLoader.Column("sex",
DataKind
.String, 9),
139
new TextLoader.Column("capital-gain",
DataKind
.Single, 10),
140
new TextLoader.Column("capital-loss",
DataKind
.Single, 11),
141
new TextLoader.Column("hours-per-week",
DataKind
.Single, 12),
142
new TextLoader.Column("native-country",
DataKind
.String, 13),
143
new TextLoader.Column("IsOver50K",
DataKind
.Boolean, 14),
Microsoft.ML.StandardTrainers (9)
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
1006
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.UInt32).ToType();
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (4)
462
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Single).ToType();
533
t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Single).ToType();
557
t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Single).ToType();
567
t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.UInt32).ToType();
Standard\MulticlassClassification\OneVersusAllTrainer.cs (3)
589
var t2 = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.UInt32).ToType();
808
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Boolean).ToType();
818
var t1 = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Single).ToType();
Standard\Simple\SimpleTrainers.cs (1)
427
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.Single).ToType();
Microsoft.ML.TensorFlow.Tests (31)
TensorFlowEstimatorTests.cs (6)
157
new TextLoader.Column("imagePath",
DataKind
.String, 0),
158
new TextLoader.Column("name",
DataKind
.String, 1)
199
new TextLoader.Column("imagePath",
DataKind
.String, 0),
200
new TextLoader.Column("name",
DataKind
.String, 1)
250
new TextLoader.Column("imagePath",
DataKind
.String, 0),
251
new TextLoader.Column("name",
DataKind
.String, 1)
TensorflowTests.cs (25)
143
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
144
new TextLoader.Column("Label",
DataKind
.String, 1),
544
new TextLoader.Column("ImagePath",
DataKind
.String , 0),
545
new TextLoader.Column("Name",
DataKind
.String, 1)
657
new TextLoader.Column("Label",
DataKind
.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)),
658
new TextLoader.Column("Placeholder",
DataKind
.Single, new []{ new TextLoader.Range(1, 784) })
700
new TextLoader.Column("Label",
DataKind
.Int64, 0),
701
new TextLoader.Column("Placeholder",
DataKind
.Single, new []{ new TextLoader.Range(1, 784) })
789
new TextLoader.Column("Label",
DataKind
.UInt32, new []{ new TextLoader.Range(0) }, new KeyCount(10)),
790
new TextLoader.Column("TfLabel",
DataKind
.Int64, 0),
791
new TextLoader.Column("Placeholder",
DataKind
.Single, new []{ new TextLoader.Range(1, 784) })
882
new TextLoader.Column("Label",
DataKind
.UInt32 , new [] { new TextLoader.Range(0) }, new KeyCount(10)),
883
new TextLoader.Column("Placeholder",
DataKind
.Single, new []{ new TextLoader.Range(1, 784) })
1014
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
1015
new TextLoader.Column("Name",
DataKind
.String, 1),
1072
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
1073
new TextLoader.Column("Name",
DataKind
.String, 1),
1153
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
1154
new TextLoader.Column("Label",
DataKind
.String, 1),
1226
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
1227
new TextLoader.Column("Name",
DataKind
.String, 1),
1269
new TextLoader.Column("Words",
DataKind
.String, 0),
1270
new TextLoader.Column("Ids",
DataKind
.Int32, 1),
2054
new TextLoader.Column("imagePath",
DataKind
.String, 0),
2055
new TextLoader.Column("name",
DataKind
.String, 1)
Microsoft.ML.TestFrameworkCommon (19)
Datasets.cs (19)
180
new TextLoader.Column("MedianHomeValue",
DataKind
.Single, 0),
181
new TextLoader.Column("CrimesPerCapita",
DataKind
.Single, 1),
182
new TextLoader.Column("PercentResidental",
DataKind
.Single, 2),
183
new TextLoader.Column("PercentNonRetail",
DataKind
.Single, 3),
184
new TextLoader.Column("CharlesRiver",
DataKind
.Single, 4),
185
new TextLoader.Column("NitricOxides",
DataKind
.Single, 5),
186
new TextLoader.Column("RoomsPerDwelling",
DataKind
.Single, 6),
187
new TextLoader.Column("PercentPre40s",
DataKind
.Single, 7),
188
new TextLoader.Column("EmploymentDistance",
DataKind
.Single, 8),
189
new TextLoader.Column("HighwayDistance",
DataKind
.Single, 9),
190
new TextLoader.Column("TaxRate",
DataKind
.Single, 10),
191
new TextLoader.Column("TeacherRatio",
DataKind
.Single, 11),
233
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
234
new TextLoader.Column("SentimentText",
DataKind
.String, 1)
416
new TextLoader.Column("SepalLength",
DataKind
.Single, 0),
417
new TextLoader.Column("SepalWidth",
DataKind
.Single, 1),
418
new TextLoader.Column("PetalLength",
DataKind
.Single, 2),
419
new TextLoader.Column("PetalWidth",
DataKind
.Single, 3),
420
new TextLoader.Column("Label",
DataKind
.String, 4)
Microsoft.ML.Tests (705)
AnomalyDetectionTests.cs (2)
241
new TextLoader.Column(DefaultColumnNames.Label,
DataKind
.Single, 0),
242
new TextLoader.Column(DefaultColumnNames.Features,
DataKind
.Single, 1, 784)
CalibratedModelParametersTests.cs (1)
136
return pipeline.Append(ML.Transforms.Conversion.ConvertType("Label", outputKind:
DataKind
.Boolean))
FeatureContributionTests.cs (1)
318
return pipeline.Append(ML.Transforms.Conversion.ConvertType("Label", outputKind:
DataKind
.Boolean))
ImagesTests.cs (32)
38
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
39
new TextLoader.Column("Name",
DataKind
.String, 1),
46
new TextLoader.Column("ImagePath",
DataKind
.Single, 0),
69
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
70
new TextLoader.Column("Name",
DataKind
.String, 1),
113
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
114
new TextLoader.Column("Name",
DataKind
.String, 1),
145
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
146
new TextLoader.Column("Name",
DataKind
.String, 1),
182
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
183
new TextLoader.Column("Name",
DataKind
.String, 1),
341
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
342
new TextLoader.Column("Name",
DataKind
.String, 1),
416
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
417
new TextLoader.Column("Name",
DataKind
.String, 1),
492
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
493
new TextLoader.Column("Name",
DataKind
.String, 1),
567
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
568
new TextLoader.Column("Name",
DataKind
.String, 1),
642
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
643
new TextLoader.Column("Name",
DataKind
.String, 1),
717
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
718
new TextLoader.Column("Name",
DataKind
.String, 1),
793
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
794
new TextLoader.Column("Name",
DataKind
.String, 1),
868
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
869
new TextLoader.Column("Name",
DataKind
.String, 1),
944
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
945
new TextLoader.Column("Name",
DataKind
.String, 1),
1016
new TextLoader.Column("ImagePath",
DataKind
.String, 0)
1131
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
1132
new TextLoader.Column("Label",
DataKind
.String, 1),
OnnxConversionTest.cs (271)
263
new TextLoader.Column("label",
DataKind
.Single, 11),
264
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
387
new TextLoader.Column("label",
DataKind
.Boolean, 0),
388
new TextLoader.Column("text",
DataKind
.String, 1)
460
public void KeyToVectorTest([CombinatorialValues(
DataKind
.Single,
DataKind
.Int64,
DataKind
.Int32,
DataKind
.Int16,
DataKind
.UInt64,
461
DataKind
.UInt32,
DataKind
.UInt16,
DataKind
.Double,
DataKind
.String,
DataKind
.Boolean)]
DataKind
valueType,
465
string filePath = (valueType ==
DataKind
.Boolean) ? GetDataPath("type-conversion-boolean.txt") : GetDataPath("type-conversion.txt");
770
new TextLoader.Column("VectorDouble2",
DataKind
.Double, 1),
771
new TextLoader.Column("VectorDouble1",
DataKind
.Double, 4, 8),
772
new TextLoader.Column("Label",
DataKind
.Boolean, 0)
871
new TextLoader.Column("label",
DataKind
.Boolean, 0),
872
new TextLoader.Column("text",
DataKind
.String, 1)
887
[InlineData(
DataKind
.SByte,
DataKind
.SByte)]
888
[InlineData(
DataKind
.SByte,
DataKind
.Int16)]
889
[InlineData(
DataKind
.SByte,
DataKind
.Int32)]
890
[InlineData(
DataKind
.SByte,
DataKind
.Int64)]
891
[InlineData(
DataKind
.SByte,
DataKind
.Single)]
892
[InlineData(
DataKind
.SByte,
DataKind
.Double)]
893
[InlineData(
DataKind
.Byte,
DataKind
.Byte)]
894
[InlineData(
DataKind
.Byte,
DataKind
.UInt16)]
895
[InlineData(
DataKind
.Byte,
DataKind
.UInt32)]
896
[InlineData(
DataKind
.Byte,
DataKind
.UInt64)]
897
[InlineData(
DataKind
.Byte,
DataKind
.Single)]
898
[InlineData(
DataKind
.Byte,
DataKind
.Double)]
899
[InlineData(
DataKind
.Int16,
DataKind
.Int16)]
900
[InlineData(
DataKind
.Int16,
DataKind
.Int32)]
901
[InlineData(
DataKind
.Int16,
DataKind
.Int64)]
902
[InlineData(
DataKind
.Int16,
DataKind
.Single)]
903
[InlineData(
DataKind
.Int16,
DataKind
.Double)]
904
[InlineData(
DataKind
.UInt16,
DataKind
.UInt16)]
905
[InlineData(
DataKind
.UInt16,
DataKind
.UInt32)]
906
[InlineData(
DataKind
.UInt16,
DataKind
.UInt64)]
907
[InlineData(
DataKind
.UInt16,
DataKind
.Single)]
908
[InlineData(
DataKind
.UInt16,
DataKind
.Double)]
909
[InlineData(
DataKind
.Int32,
DataKind
.Int16)]
910
[InlineData(
DataKind
.Int32,
DataKind
.Int32)]
911
[InlineData(
DataKind
.Int32,
DataKind
.Int64)]
912
[InlineData(
DataKind
.Int32,
DataKind
.Single)]
913
[InlineData(
DataKind
.Int32,
DataKind
.Double)]
914
[InlineData(
DataKind
.Int64,
DataKind
.Int16)]
915
[InlineData(
DataKind
.Int64,
DataKind
.Int32)]
916
[InlineData(
DataKind
.Int64,
DataKind
.Int64)]
917
[InlineData(
DataKind
.Int64,
DataKind
.Single)]
918
[InlineData(
DataKind
.Int64,
DataKind
.Double)]
919
[InlineData(
DataKind
.UInt64,
DataKind
.UInt16)]
920
[InlineData(
DataKind
.UInt64,
DataKind
.UInt32)]
921
[InlineData(
DataKind
.UInt64,
DataKind
.UInt64)]
922
[InlineData(
DataKind
.UInt64,
DataKind
.Single)]
923
[InlineData(
DataKind
.UInt64,
DataKind
.Double)]
924
[InlineData(
DataKind
.Single,
DataKind
.Single)]
925
[InlineData(
DataKind
.Single,
DataKind
.Double)]
926
[InlineData(
DataKind
.Double,
DataKind
.Single)]
927
[InlineData(
DataKind
.Double,
DataKind
.Double)]
928
[InlineData(
DataKind
.String,
DataKind
.Double)]
929
[InlineData(
DataKind
.String,
DataKind
.Single)]
930
[InlineData(
DataKind
.String,
DataKind
.UInt64)]
931
[InlineData(
DataKind
.String,
DataKind
.UInt32)]
932
[InlineData(
DataKind
.String,
DataKind
.UInt16)]
933
[InlineData(
DataKind
.String,
DataKind
.Byte)]
934
[InlineData(
DataKind
.String,
DataKind
.Int64)]
935
[InlineData(
DataKind
.String,
DataKind
.Int32)]
936
[InlineData(
DataKind
.String,
DataKind
.Int16)]
937
[InlineData(
DataKind
.String,
DataKind
.SByte)]
938
public void OnnxTypeConversionTest(
DataKind
fromKind,
DataKind
toKind)
968
new TextLoader.Column("label",
DataKind
.Single, 11),
969
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
1023
[CombinatorialValues(
DataKind
.Byte,
DataKind
.UInt16,
DataKind
.UInt32,
DataKind
.UInt64)]
DataKind
keyType)
1054
[CombinatorialValues(
DataKind
.SByte,
DataKind
.Int16,
DataKind
.Int32,
DataKind
.Int64,
DataKind
.Byte,
1055
DataKind
.UInt16,
DataKind
.UInt32,
DataKind
.UInt64,
DataKind
.Single,
DataKind
.Double,
DataKind
.String,
DataKind
.Boolean)]
DataKind
type,
1062
var column = (type ==
DataKind
.SByte) ? 0 :
1063
(type ==
DataKind
.Byte) ? 2 :
1064
(type ==
DataKind
.Int16) ? 4 :
1065
(type ==
DataKind
.UInt16) ? 6 :
1066
(type ==
DataKind
.Int32) ? 8 :
1067
(type ==
DataKind
.UInt32) ? 10 :
1068
(type ==
DataKind
.Int64) ? 12 :
1069
(type ==
DataKind
.UInt64) ? 14 :
1070
(type ==
DataKind
.Single) ? 16 :
1071
(type ==
DataKind
.Double) ? 18 :
1072
(type ==
DataKind
.String) ? 20 : 22;
1093
[CombinatorialValues(
DataKind
.SByte,
DataKind
.Int16,
DataKind
.Int32,
DataKind
.Int64,
DataKind
.Byte,
1094
DataKind
.UInt16,
DataKind
.UInt32,
DataKind
.UInt64,
DataKind
.Single,
DataKind
.Double,
DataKind
.String,
DataKind
.Boolean)]
DataKind
type,
1101
var columnStart = (type ==
DataKind
.SByte) ? 0 :
1102
(type ==
DataKind
.Byte) ? 2 :
1103
(type ==
DataKind
.Int16) ? 4 :
1104
(type ==
DataKind
.UInt16) ? 6 :
1105
(type ==
DataKind
.Int32) ? 8 :
1106
(type ==
DataKind
.UInt32) ? 10 :
1107
(type ==
DataKind
.Int64) ? 12 :
1108
(type ==
DataKind
.UInt64) ? 14 :
1109
(type ==
DataKind
.Single) ? 16 :
1110
(type ==
DataKind
.Double) ? 18 :
1111
(type ==
DataKind
.String) ? 20 : 22;
1113
var columnEnd = (type ==
DataKind
.SByte) ? 1 :
1114
(type ==
DataKind
.Byte) ? 3 :
1115
(type ==
DataKind
.Int16) ? 5 :
1116
(type ==
DataKind
.UInt16) ? 7 :
1117
(type ==
DataKind
.Int32) ? 9 :
1118
(type ==
DataKind
.UInt32) ? 11 :
1119
(type ==
DataKind
.Int64) ? 13 :
1120
(type ==
DataKind
.UInt64) ? 15 :
1121
(type ==
DataKind
.Single) ? 17 :
1122
(type ==
DataKind
.Double) ? 19 :
1123
(type ==
DataKind
.String) ? 21 : 23;
1168
.Append(mlContext.Transforms.Conversion.ConvertType("MissingIndicator", outputKind:
DataKind
.Int32));
1183
[CombinatorialValues(
DataKind
.Single,
DataKind
.Int64,
DataKind
.Int32,
DataKind
.Int16,
DataKind
.UInt64,
1184
DataKind
.UInt32,
DataKind
.UInt16,
DataKind
.Double,
DataKind
.String,
DataKind
.Boolean)]
DataKind
valueType,
1189
string filePath = (valueType ==
DataKind
.Boolean) ? GetDataPath("type-conversion-boolean.txt")
1222
public void ValueMappingOnnxConversionTest([CombinatorialValues(
DataKind
.Int64,
DataKind
.Int32,
DataKind
.UInt32,
DataKind
.UInt64,
1223
DataKind
.UInt16,
DataKind
.Int16,
DataKind
.Double,
DataKind
.String,
DataKind
.Boolean)]
1224
DataKind
keyType, [CombinatorialValues(true, false)] bool treatValuesAsKeyType)
1227
string filePath = (keyType ==
DataKind
.Boolean) ? GetDataPath("type-conversion-boolean.txt")
1245
if (keyType ==
DataKind
.Single)
1258
else if (keyType ==
DataKind
.Double)
1270
else if (keyType ==
DataKind
.Boolean)
1283
else if (keyType ==
DataKind
.String)
1295
else if (keyType ==
DataKind
.Int32)
1307
else if (keyType ==
DataKind
.Int16)
1319
else if (keyType ==
DataKind
.Int64)
1331
else if (keyType ==
DataKind
.UInt32)
1343
else if (keyType ==
DataKind
.UInt16)
1355
else if (keyType ==
DataKind
.UInt64)
1379
[InlineData(
DataKind
.Single)]
1380
[InlineData(
DataKind
.Int64)]
1381
[InlineData(
DataKind
.Int32)]
1382
[InlineData(
DataKind
.Int16)]
1383
[InlineData(
DataKind
.UInt64)]
1384
[InlineData(
DataKind
.UInt32)]
1385
[InlineData(
DataKind
.UInt16)]
1386
[InlineData(
DataKind
.Double)]
1387
[InlineData(
DataKind
.String)]
1388
[InlineData(
DataKind
.Boolean)]
1389
public void KeyToValueMappingOnnxConversionTest(
DataKind
valueType)
1392
string filePath = (valueType ==
DataKind
.Boolean) ? GetDataPath("type-conversion-boolean.txt") : GetDataPath("type-conversion.txt");
1585
[InlineData(
DataKind
.Boolean)]
1586
[InlineData(
DataKind
.SByte)]
1587
[InlineData(
DataKind
.Byte)]
1588
[InlineData(
DataKind
.Int16)]
1589
[InlineData(
DataKind
.UInt16)]
1590
[InlineData(
DataKind
.Int32)]
1591
[InlineData(
DataKind
.UInt32)]
1592
[InlineData(
DataKind
.Int64)]
1593
[InlineData(
DataKind
.UInt64)]
1594
[InlineData(
DataKind
.Single)]
1595
[InlineData(
DataKind
.Double)]
1596
[InlineData(
DataKind
.String)]
1597
public void OptionalColumnOnnxTest(
DataKind
dataKind)
1605
new TextLoader.Column("Thickness",
DataKind
.Single, 1),
1765
new TextLoader.Column("Label",
DataKind
.String, 0),
1766
new TextLoader.Column("SepalLength",
DataKind
.Single, 1),
1767
new TextLoader.Column("SepalWidth",
DataKind
.Single, 2),
1768
new TextLoader.Column("PetalLength",
DataKind
.Single, 3),
1769
new TextLoader.Column("PetalWidth",
DataKind
.Single, 4)
1838
[InlineData(
DataKind
.String)]
1839
[InlineData(
DataKind
.Single)]
1840
[InlineData(
DataKind
.Double)]
1841
public void FeatureSelectionOnnxTest(
DataKind
dataKind)
1850
new TextLoader.Column("Label",
DataKind
.Boolean, 0)
1869
if (dataKind ==
DataKind
.String && i > 0)
1887
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
1888
new TextLoader.Column("Thickness",
DataKind
.Double, 1),
1889
new TextLoader.Column("Size",
DataKind
.Single, 2),
1890
new TextLoader.Column("Shape",
DataKind
.Int32, 3),
1891
new TextLoader.Column("Adhesion",
DataKind
.Int32, 4),
1892
new TextLoader.Column("EpithelialSize",
DataKind
.Int32, 5),
1893
new TextLoader.Column("BlandChromatin",
DataKind
.Int32, 7),
1894
new TextLoader.Column("NormalNucleoli",
DataKind
.Int32, 8),
1895
new TextLoader.Column("Mitoses",
DataKind
.Int32, 9),
PermutationFeatureImportanceTests.cs (4)
490
new[] { new TextLoader.Column("Label",
DataKind
.Boolean, 0),
491
new TextLoader.Column("Features",
DataKind
.Single, 1, 9) });
861
return pipeline.Append(ML.Transforms.Conversion.ConvertType("Label", outputKind:
DataKind
.Boolean))
942
return pipeline.Append(ML.Transforms.Conversion.ConvertType("Label", outputKind:
DataKind
.Boolean))
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (56)
336
new TextLoader.Column("Label",
DataKind
.Single, 0),
337
new TextLoader.Column("CrimesPerCapita",
DataKind
.Single, 1),
338
new TextLoader.Column("PercentResidental",
DataKind
.Single, 2),
339
new TextLoader.Column("PercentNonRetail",
DataKind
.Single, 3),
340
new TextLoader.Column("CharlesRiver",
DataKind
.Single, 4),
341
new TextLoader.Column("NitricOxides",
DataKind
.Single, 5),
342
new TextLoader.Column("RoomsPerDwelling",
DataKind
.Single, 6),
343
new TextLoader.Column("PercentPre40s",
DataKind
.Single, 7),
344
new TextLoader.Column("EmploymentDistance",
DataKind
.Single, 8),
345
new TextLoader.Column("HighwayDistance",
DataKind
.Single, 9),
346
new TextLoader.Column("TaxRate",
DataKind
.Single, 10),
347
new TextLoader.Column("TeacherRatio",
DataKind
.Single, 11)
376
new TextLoader.Column("Label",
DataKind
.Single, 0),
377
new TextLoader.Column("CrimesPerCapita",
DataKind
.Single, 1),
378
new TextLoader.Column("PercentResidental",
DataKind
.Single, 2),
379
new TextLoader.Column("PercentNonRetail",
DataKind
.Single, 3),
380
new TextLoader.Column("CharlesRiver",
DataKind
.Single, 4),
381
new TextLoader.Column("NitricOxides",
DataKind
.Single, 5),
382
new TextLoader.Column("RoomsPerDwelling",
DataKind
.Single, 6),
383
new TextLoader.Column("PercentPre40s",
DataKind
.Single, 7),
384
new TextLoader.Column("EmploymentDistance",
DataKind
.Single, 8),
385
new TextLoader.Column("HighwayDistance",
DataKind
.Single, 9),
386
new TextLoader.Column("TaxRate",
DataKind
.Single, 10),
387
new TextLoader.Column("TeacherRatio",
DataKind
.Single, 11)
411
new TextLoader.Column("Label",
DataKind
.Single, 0),
412
new TextLoader.Column("CrimesPerCapita",
DataKind
.Single, 1),
413
new TextLoader.Column("PercentResidental",
DataKind
.Single, 2),
414
new TextLoader.Column("PercentNonRetail",
DataKind
.Single, 3),
415
new TextLoader.Column("CharlesRiver",
DataKind
.Single, 4),
416
new TextLoader.Column("NitricOxides",
DataKind
.Single, 5),
417
new TextLoader.Column("RoomsPerDwelling",
DataKind
.Single, 6),
418
new TextLoader.Column("PercentPre40s",
DataKind
.Single, 7),
419
new TextLoader.Column("EmploymentDistance",
DataKind
.Single, 8),
420
new TextLoader.Column("HighwayDistance",
DataKind
.Single, 9),
421
new TextLoader.Column("TaxRate",
DataKind
.Single, 10),
422
new TextLoader.Column("TeacherRatio",
DataKind
.Single, 11)
447
new TextLoader.Column("MedianHomeValue",
DataKind
.Single, 0),
448
new TextLoader.Column("CrimesPerCapita",
DataKind
.Single, 1),
449
new TextLoader.Column("PercentResidental",
DataKind
.Single, 2),
450
new TextLoader.Column("PercentNonRetail",
DataKind
.Single, 3),
451
new TextLoader.Column("CharlesRiver",
DataKind
.Single, 4),
452
new TextLoader.Column("NitricOxides",
DataKind
.Single, 5),
453
new TextLoader.Column("RoomsPerDwelling",
DataKind
.Single, 6),
454
new TextLoader.Column("PercentPre40s",
DataKind
.Single, 7),
455
new TextLoader.Column("EmploymentDistance",
DataKind
.Single, 8),
456
new TextLoader.Column("HighwayDistance",
DataKind
.Single, 9),
457
new TextLoader.Column("TaxRate",
DataKind
.Single, 10),
458
new TextLoader.Column("TeacherRatio",
DataKind
.Single, 11)
506
new TextLoader.Column("IsToxic",
DataKind
.Boolean, 0),
507
new TextLoader.Column("Message",
DataKind
.String, 1),
575
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
577
new TextLoader.Column("CategoricalFeatures",
DataKind
.String, 1, 8),
579
new TextLoader.Column("NumericalFeatures",
DataKind
.Single, 9, 14),
581
new TextLoader.Column("Workclass",
DataKind
.String, 1),
708
new TextLoader.Column("Income",
DataKind
.Single, 10),
709
new TextLoader.Column("Features",
DataKind
.Single, 12, 14)
Scenarios\Api\Estimators\PredictAndMetadata.cs (2)
102
new TextLoader.Column("Label",
DataKind
.Single, 0), //notice the label being loaded as a float
103
new TextLoader.Column("Features",
DataKind
.Single, new[]{ new TextLoader.Range(1,4) })
Scenarios\Api\TestApi.cs (9)
180
xf = mlContext.Transforms.Conversion.ConvertType("Label", outputKind:
DataKind
.Boolean).Fit(xf).Transform(xf);
302
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
303
new TextLoader.Column("Workclass",
DataKind
.String, 1),
304
new TextLoader.Column("Education",
DataKind
.String,2),
305
new TextLoader.Column("Age",
DataKind
.Single,9)
350
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
351
new TextLoader.Column("Workclass",
DataKind
.String, 1),
352
new TextLoader.Column("Education",
DataKind
.String,2),
353
new TextLoader.Column("Age",
DataKind
.Single,9)
Scenarios\GetColumnTests.cs (11)
30
new TextLoader.Column("floatScalar",
DataKind
.Single, 1),
31
new TextLoader.Column("floatVector",
DataKind
.Single, 2, 6),
32
new TextLoader.Column("stringScalar",
DataKind
.String, 4),
33
new TextLoader.Column("stringVector",
DataKind
.String, 5, 7)
53
new TextLoader.Column("floatScalar",
DataKind
.String, 1),
54
new TextLoader.Column("anotherFloatVector",
DataKind
.Single, 2, 6),
55
new TextLoader.Column("stringVector",
DataKind
.String, 5, 7)
72
new TextLoader.Column("floatScalar",
DataKind
.Single, 1),
73
new TextLoader.Column("floatVector",
DataKind
.Single, 2, 6),
74
new TextLoader.Column("stringScalar",
DataKind
.String, 4),
75
new TextLoader.Column("stringVector",
DataKind
.String, 5, 7)
Scenarios\IrisPlantClassificationTests.cs (5)
24
new TextLoader.Column("Label",
DataKind
.Single, 0),
25
new TextLoader.Column("SepalLength",
DataKind
.Single, 1),
26
new TextLoader.Column("SepalWidth",
DataKind
.Single, 2),
27
new TextLoader.Column("PetalLength",
DataKind
.Single, 3),
28
new TextLoader.Column("PetalWidth",
DataKind
.Single, 4)
Scenarios\IrisPlantClassificationWithStringLabelTests.cs (5)
20
new TextLoader.Column("SepalLength",
DataKind
.Single, 0),
21
new TextLoader.Column("SepalWidth",
DataKind
.Single, 1),
22
new TextLoader.Column("PetalLength",
DataKind
.Single, 2),
23
new TextLoader.Column("PetalWidth",
DataKind
.Single, 3),
24
new TextLoader.Column("IrisPlantType",
DataKind
.String, 4),
Scenarios\OvaTest.cs (8)
26
new TextLoader.Column("Label",
DataKind
.Single, 0),
27
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 4) }),
59
new TextLoader.Column("Label",
DataKind
.Single, 0),
60
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 4) }),
95
new TextLoader.Column("Label",
DataKind
.Single, 0),
96
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 4) }),
130
new TextLoader.Column("Label",
DataKind
.Single, 0),
131
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 4) }),
ScenariosWithDirectInstantiation\IrisPlantClassificationTests.cs (5)
22
new TextLoader.Column("Label",
DataKind
.Single, 0),
23
new TextLoader.Column("SepalLength",
DataKind
.Single, 1),
24
new TextLoader.Column("SepalWidth",
DataKind
.Single, 2),
25
new TextLoader.Column("PetalLength",
DataKind
.Single, 3),
26
new TextLoader.Column("PetalWidth",
DataKind
.Single, 4)
SvmLightTests.cs (1)
506
var loader = ML.Data.CreateTextLoader(new[] { new TextLoader.Column("Column",
DataKind
.Single, 0) });
TermEstimatorTests.cs (7)
59
new TextLoader.Column("float1",
DataKind
.Single, 9),
60
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }),
61
new TextLoader.Column("double1",
DataKind
.Double, 9),
62
new TextLoader.Column("double4",
DataKind
.Double, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }),
63
new TextLoader.Column("int1",
DataKind
.Int32, 9),
64
new TextLoader.Column("text1",
DataKind
.String, 1),
65
new TextLoader.Column("text2",
DataKind
.String, new[]{new TextLoader.Range(1), new TextLoader.Range(2)}),
TextLoaderTests.cs (33)
898
new TextLoader.Column("Label",
DataKind
.UInt32, 0),
899
new TextLoader.Column("Features", typeof(T) == typeof(double) ?
DataKind
.Double :
DataKind
.Single, new [] { new TextLoader.Range(1, 4) }),
934
new TextLoader.Column("Label",
DataKind
.UInt32, 0),
935
new TextLoader.Column("Features", typeof(T) == typeof(double) ?
DataKind
.Double :
DataKind
.Single, new [] { new TextLoader.Range(1, 4) })
993
new TextLoader.Column("Label",
DataKind
.UInt32, 0),
994
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(1, 4) })
1045
new TextLoader.Column("Label",
DataKind
.UInt32, 0),
1046
new TextLoader.Column("Features",
DataKind
.Single, new[] { new TextLoader.Range(1, 4) })
1055
new TextLoader.Column("Label",
DataKind
.UInt32, 0),
1056
new TextLoader.Column("Features",
DataKind
.Single, new[] { new TextLoader.Range(1, 4) })
1286
new TextLoader.Column("id",
DataKind
.Int32, 0),
1287
new TextLoader.Column("description",
DataKind
.String, 1),
1288
new TextLoader.Column("animal",
DataKind
.String, 2),
1397
new TextLoader.Column("id",
DataKind
.Int32, 0),
1398
new TextLoader.Column("description",
DataKind
.String, 1),
1399
new TextLoader.Column("animal",
DataKind
.String, 2),
1436
new TextLoader.Column("id",
DataKind
.Int32, 0),
1437
new TextLoader.Column("description",
DataKind
.String, 1),
1438
new TextLoader.Column("date",
DataKind
.DateTime, 4),
1439
new TextLoader.Column("sing1",
DataKind
.Single, 2),
1440
new TextLoader.Column("sing2",
DataKind
.Single, 3),
1441
new TextLoader.Column("singFt1",
DataKind
.Single, new [] { new TextLoader.Range(2,3) } ),
1442
new TextLoader.Column("sing3",
DataKind
.Single, 5),
1443
new TextLoader.Column("sing4",
DataKind
.Single, 6),
1444
new TextLoader.Column("singFt2",
DataKind
.Single, new [] { new TextLoader.Range(2,3), new TextLoader.Range(5,6) } ),
1445
new TextLoader.Column("doub1",
DataKind
.Double, 2),
1446
new TextLoader.Column("doub2",
DataKind
.Double, 3),
1447
new TextLoader.Column("doubFt1",
DataKind
.Double, new [] { new TextLoader.Range(2,3) } ),
1448
new TextLoader.Column("doub3",
DataKind
.Double, 5),
1449
new TextLoader.Column("doub4",
DataKind
.Double, 6),
1450
new TextLoader.Column("doubFt2",
DataKind
.Double, new [] { new TextLoader.Range(2,3), new TextLoader.Range(5,6) } )
TrainerEstimators\FAFMEstimator.cs (5)
97
new TextLoader.Column("Feature1",
DataKind
.Single, new [] { new TextLoader.Range(1, 2) }),
98
new TextLoader.Column("Feature2",
DataKind
.Single, new [] { new TextLoader.Range(3, 4) }),
99
new TextLoader.Column("Feature3",
DataKind
.Single, new [] { new TextLoader.Range(5, 6) }),
100
new TextLoader.Column("Feature4",
DataKind
.Single, new [] { new TextLoader.Range(7, 9) }),
101
new TextLoader.Column("Label",
DataKind
.Boolean, 0)
TrainerEstimators\MatrixFactorizationTests.cs (3)
164
new TextLoader.Column(labelColumnName,
DataKind
.Single, new [] { new TextLoader.Range(0) }),
165
new TextLoader.Column(matrixColumnIndexColumnName,
DataKind
.UInt32, new [] { new TextLoader.Range(1) }, new KeyCount(20)),
166
new TextLoader.Column(matrixRowIndexColumnName,
DataKind
.UInt32, new [] { new TextLoader.Range(2) }, new KeyCount(40)),
TrainerEstimators\OneDalEstimators.cs (9)
41
new TextLoader.Column("f0",
DataKind
.Single, 0),
42
new TextLoader.Column("f1",
DataKind
.Single, 1),
43
new TextLoader.Column("f2",
DataKind
.Single, 2),
44
new TextLoader.Column("f3",
DataKind
.Single, 3),
45
new TextLoader.Column("f4",
DataKind
.Single, 4),
46
new TextLoader.Column("f5",
DataKind
.Single, 5),
47
new TextLoader.Column("f6",
DataKind
.Single, 6),
48
new TextLoader.Column("f7",
DataKind
.Single, 7),
49
new TextLoader.Column("target",
DataKind
.Boolean,8)},
TrainerEstimators\OnlineLinearTests.cs (4)
21
new TextLoader.Column("Label",
DataKind
.Single, 0),
22
new TextLoader.Column("Features",
DataKind
.Single, 1, 10)
35
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
36
new TextLoader.Column("Features",
DataKind
.Single, 1, 10)
TrainerEstimators\PriorRandomTests.cs (4)
22
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
23
new TextLoader.Column("F1",
DataKind
.String, 1),
24
new TextLoader.Column("F2",
DataKind
.Int32, 2),
25
new TextLoader.Column("Rest",
DataKind
.Single, new [] { new TextLoader.Range(3, 9) })
TrainerEstimators\SdcaTests.cs (3)
22
new TextLoader.Column("Label",
DataKind
.Single, 0),
23
new TextLoader.Column("Features",
DataKind
.Single, 1, 10)
28
var binaryData = ML.Transforms.Conversion.ConvertType("Label", outputKind:
DataKind
.Boolean)
TrainerEstimators\TrainerEstimators.cs (15)
36
new TextLoader.Column(featureColumn,
DataKind
.Single, new [] { new TextLoader.Range(1, 784) })
65
new TextLoader.Column(featureColumn,
DataKind
.Single, new [] { new TextLoader.Range(1, 784) }),
66
new TextLoader.Column(weights,
DataKind
.Single, 0),
199
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
200
new TextLoader.Column("SentimentText",
DataKind
.String, 1),
201
new TextLoader.Column("LoggedIn",
DataKind
.Boolean, 2)
233
new TextLoader.Column("Label",
DataKind
.Single, 0),
234
new TextLoader.Column("Workclass",
DataKind
.String, 1),
235
new TextLoader.Column("NumericFeatures",
DataKind
.Single, new [] { new TextLoader.Range(9, 14) })
256
new TextLoader.Column("Label",
DataKind
.Single, 11),
257
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(0, 10) } )
270
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(0, 3) }),
271
new TextLoader.Column("Label",
DataKind
.String, 4)
283
new TextLoader.Column("Features",
DataKind
.Single, new [] { new TextLoader.Range(0, 3) }),
284
new TextLoader.Column("Label",
DataKind
.String, 4)
Transformers\CategoricalHashTests.cs (3)
82
new TextLoader.Column("ScalarString",
DataKind
.String, 1),
83
new TextLoader.Column("VectorString",
DataKind
.String, 1, 4),
84
new TextLoader.Column("SingleVectorString",
DataKind
.String, new[] { new TextLoader.Range(1, 1) })
Transformers\CategoricalTests.cs (4)
109
var pipe = mlContext.Transforms.Conversion.ConvertType("A", outputKind:
DataKind
.Single)
110
.Append(mlContext.Transforms.Conversion.ConvertType("B", outputKind:
DataKind
.Single))
158
new TextLoader.Column("ScalarString",
DataKind
.String, 1),
159
new TextLoader.Column("VectorString",
DataKind
.String, 1, 4)
Transformers\ConcatTests.cs (7)
49
new TextLoader.Column("float1",
DataKind
.Single, 9),
50
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }),
51
new TextLoader.Column("float6",
DataKind
.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, 14) }),
52
new TextLoader.Column("vfloat",
DataKind
.Single, new[]{new TextLoader.Range(14, null) { AutoEnd = false, VariableEnd = true } })
107
new TextLoader.Column("float1",
DataKind
.Single, 9),
108
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) }),
109
new TextLoader.Column("vfloat",
DataKind
.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12, null) { AutoEnd = false, VariableEnd = true } })
Transformers\ConvertTests.cs (24)
130
var pipe = ML.Transforms.Conversion.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnOptions("ConvA",
DataKind
.Single, "A"),
131
new TypeConvertingEstimator.ColumnOptions("ConvB",
DataKind
.Single, "B")});
170
new TypeConvertingEstimator.ColumnOptions("ConvA",
DataKind
.Single, "AA"),
171
new TypeConvertingEstimator.ColumnOptions("ConvB",
DataKind
.Single, "AB"),
172
new TypeConvertingEstimator.ColumnOptions("ConvC",
DataKind
.Single, "AC"),
173
new TypeConvertingEstimator.ColumnOptions("ConvD",
DataKind
.Single, "AD"),
174
new TypeConvertingEstimator.ColumnOptions("ConvE",
DataKind
.Single, "AE"),
175
new TypeConvertingEstimator.ColumnOptions("ConvF",
DataKind
.Single, "AF"),
176
new TypeConvertingEstimator.ColumnOptions("ConvG",
DataKind
.Single, "AG"),
177
new TypeConvertingEstimator.ColumnOptions("ConvH",
DataKind
.Single, "AH"),
178
new TypeConvertingEstimator.ColumnOptions("ConvK",
DataKind
.Single, "AK"),
179
new TypeConvertingEstimator.ColumnOptions("ConvL",
DataKind
.Single, "AL"),
180
new TypeConvertingEstimator.ColumnOptions("ConvM",
DataKind
.Single, "AM"),
181
new TypeConvertingEstimator.ColumnOptions("ConvN",
DataKind
.Single, "AN"),
182
new TypeConvertingEstimator.ColumnOptions("ConvBI",
DataKind
.Int32, "AB") // verify Boolean -> Int32 conversion
254
var allInputTypesDataPipe = ML.Transforms.Conversion.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnOptions("A1",
DataKind
.String, "A"),
255
new TypeConvertingEstimator.ColumnOptions("B1",
DataKind
.String, "B"),
256
new TypeConvertingEstimator.ColumnOptions("C1",
DataKind
.String, "C"),
257
new TypeConvertingEstimator.ColumnOptions("D1",
DataKind
.String, "D"),
258
new TypeConvertingEstimator.ColumnOptions("E1",
DataKind
.String, "E"),
259
new TypeConvertingEstimator.ColumnOptions("F1",
DataKind
.String, "F"),
342
new TypeConvertingEstimator.ColumnOptions("ConvA",
DataKind
.Double, "CatA"),
343
new TypeConvertingEstimator.ColumnOptions("ConvB",
DataKind
.UInt16, "CatB")
401
DataKind
.UInt64, "key", new KeyCount(4)) }).Fit(dataView);
Transformers\CountTargetEncodingTests.cs (14)
27
new TextLoader.Column("ScalarString",
DataKind
.String, 1),
28
new TextLoader.Column("VectorString",
DataKind
.String, 1, 9),
29
new TextLoader.Column("Label",
DataKind
.Single, 0)
42
var data = ML.Data.LoadFromTextFile(dataPath, new[] { new TextLoader.Column("Label",
DataKind
.Single, 0),
43
new TextLoader.Column("Text",
DataKind
.String, 1,9)});
58
new TextLoader.Column("ScalarString",
DataKind
.String, 1),
59
new TextLoader.Column("VectorString",
DataKind
.String, 1, 9),
60
new TextLoader.Column("Label",
DataKind
.Single, 0)
78
new TextLoader.Column("ScalarString",
DataKind
.String, 1),
79
new TextLoader.Column("VectorString",
DataKind
.String, 2, 9),
80
new TextLoader.Column("Label",
DataKind
.Boolean, 0)
163
new TextLoader.Column("ScalarString",
DataKind
.String, 1),
164
new TextLoader.Column("VectorString",
DataKind
.String, 1, 9),
165
new TextLoader.Column("Label",
DataKind
.Single, 0)
Transformers\CustomMappingTests.cs (10)
57
new TextLoader.Column("Float1",
DataKind
.Single, 9),
58
new TextLoader.Column("Float4",
DataKind
.Single, new[]{new TextLoader.Range(9), new TextLoader.Range(10), new TextLoader.Range(11), new TextLoader.Range(12) })
93
new TextLoader.Column("Float1",
DataKind
.Single, 0),
94
new TextLoader.Column("Float4",
DataKind
.Single, new[]{new TextLoader.Range(0), new TextLoader.Range(2), new TextLoader.Range(4), new TextLoader.Range(10) }),
95
new TextLoader.Column("Text1",
DataKind
.String, 0)
171
new TextLoader.Column("Features",
DataKind
.Single, 1, 9),
172
new TextLoader.Column("Label",
DataKind
.String, 0),
173
new TextLoader.Column("Value",
DataKind
.Single, 2),
196
new TextLoader.Column("Float4",
DataKind
.Single, 1, 4),
197
new TextLoader.Column("Float1",
DataKind
.Single, 2),
Transformers\ExpressionTransformerTests.cs (8)
27
new TextLoader.Column("Float",
DataKind
.Single, 9),
28
new TextLoader.Column("FloatVector",
DataKind
.Single, 9, 14),
29
new TextLoader.Column("Double",
DataKind
.Double, 9),
30
new TextLoader.Column("DoubleVector",
DataKind
.Double, 9, 14),
31
new TextLoader.Column("Int",
DataKind
.Int32, 9),
32
new TextLoader.Column("IntVector",
DataKind
.Int32, 9, 14),
33
new TextLoader.Column("Text",
DataKind
.String, 1),
34
new TextLoader.Column("TextVector",
DataKind
.String, 2, 8),
Transformers\FeatureSelectionTests.cs (22)
32
new TextLoader.Column("label",
DataKind
.Boolean, 0),
33
new TextLoader.Column("text",
DataKind
.String, 1) },
37
new TextLoader.Column("label",
DataKind
.Boolean, 0),
38
new TextLoader.Column("text",
DataKind
.Single, 1) },
66
new TextLoader.Column("ScalarFloat",
DataKind
.Single, 1),
67
new TextLoader.Column("ScalarDouble",
DataKind
.Double, 1),
68
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 4),
69
new TextLoader.Column("VectorDouble",
DataKind
.Double, 4, 8),
108
new TextLoader.Column("ScalarFloat",
DataKind
.Single, 6),
109
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 4),
110
new TextLoader.Column("VectorDouble",
DataKind
.Double, 4, 8),
149
new TextLoader.Column("Label",
DataKind
.UInt32, new[]{ new TextLoader.Range(0) }, new KeyCount(3)),
150
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 4)
171
new TextLoader.Column("Label",
DataKind
.UInt32, new[] { new TextLoader.Range(0) }, new KeyCount(3)),
172
new TextLoader.Column("ScalarFloat",
DataKind
.Single, 6),
173
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 4),
174
new TextLoader.Column("VectorDouble",
DataKind
.Double, 4, 8),
209
new TextLoader.Column("Label",
DataKind
.UInt32, new[]{ new TextLoader.Range(0) }, new KeyCount(3)),
210
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 4)
231
new TextLoader.Column("BadLabel",
DataKind
.UInt32, 0),
232
new TextLoader.Column("Label",
DataKind
.Single, 0),
233
new TextLoader.Column("Features",
DataKind
.String, 1, 9),
Transformers\HashTests.cs (1)
359
new TextLoader.Column("Features",
DataKind
.Single, 1, 9)
Transformers\KeyToBinaryVectorEstimatorTest.cs (2)
64
new TextLoader.Column("ScalarString",
DataKind
.String, 0),
65
new TextLoader.Column("VectorString",
DataKind
.String, 1, 4),
Transformers\KeyToValueTests.cs (5)
31
new TextLoader.Column("ScalarString",
DataKind
.String, 1),
32
new TextLoader.Column("VectorString",
DataKind
.String, new[] {new TextLoader.Range(1, 4) }),
33
new TextLoader.Column("BareKey",
DataKind
.UInt32, new[] { new TextLoader.Range(0) }, new KeyCount(6))
69
new TextLoader.Column("ScalarString",
DataKind
.String, 0),
70
new TextLoader.Column("VectorString",
DataKind
.String, 1, 4),
Transformers\KeyToVectorEstimatorTests.cs (2)
74
new TextLoader.Column("ScalarString",
DataKind
.String, 0),
75
new TextLoader.Column("VectorString",
DataKind
.String, 1, 4),
Transformers\NAIndicatorTests.cs (4)
96
new TextLoader.Column("ScalarFloat",
DataKind
.Single, 1),
97
new TextLoader.Column("ScalarDouble",
DataKind
.Double, 1),
98
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 4),
99
new TextLoader.Column("VectorDoulbe",
DataKind
.Double, 1, 4)
Transformers\NAReplaceTests.cs (4)
126
new TextLoader.Column("ScalarFloat",
DataKind
.Single, 1),
127
new TextLoader.Column("ScalarDouble",
DataKind
.Double, 1),
128
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 4),
129
new TextLoader.Column("VectorDouble",
DataKind
.Double, 1, 4)
Transformers\NormalizerTests.cs (52)
40
new TextLoader.Column("float1",
DataKind
.Single, 1),
41
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(1, 4) }),
42
new TextLoader.Column("double1",
DataKind
.Double, 1),
43
new TextLoader.Column("double4",
DataKind
.Double, new[]{new TextLoader.Range(1, 4) }),
44
new TextLoader.Column("int1",
DataKind
.Int32, 0),
45
new TextLoader.Column("float0",
DataKind
.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }),
109
new TextLoader.Column("float1",
DataKind
.Single, 1),
110
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(1, 4) }),
111
new TextLoader.Column("double1",
DataKind
.Double, 1),
112
new TextLoader.Column("double4",
DataKind
.Double, new[]{new TextLoader.Range(1, 4) }),
113
new TextLoader.Column("int1",
DataKind
.Int32, 0),
114
new TextLoader.Column("float0",
DataKind
.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } })
227
new TextLoader.Column("Label",
DataKind
.Single, 0),
228
new TextLoader.Column("float1",
DataKind
.Single, 1),
229
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(1, 4) }),
230
new TextLoader.Column("double1",
DataKind
.Double, 1),
231
new TextLoader.Column("double4",
DataKind
.Double, new[]{new TextLoader.Range(1, 4) }),
232
new TextLoader.Column("int1",
DataKind
.Int32, 0),
233
new TextLoader.Column("float0",
DataKind
.Single, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } })
474
new TextLoader.Column("Label",
DataKind
.Single, 0),
475
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(1, 4) }),
578
new TextLoader.Column("Label",
DataKind
.Single, 0),
579
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(1, 4) }),
636
new TextLoader.Column("Label",
DataKind
.Single, 0),
637
new TextLoader.Column("input",
DataKind
.Single, new[]{new TextLoader.Range(1, 4) }),
657
new TextLoader.Column("label",
DataKind
.Single, 11),
658
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
662
new TextLoader.Column("label",
DataKind
.Single, 11),
663
new TextLoader.Column("features",
DataKind
.String, 0, 10)
691
new TextLoader.Column("label",
DataKind
.Single, 11),
692
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
696
new TextLoader.Column("label",
DataKind
.Single, 11),
697
new TextLoader.Column("features",
DataKind
.String, 0, 10)
733
new TextLoader.Column("label",
DataKind
.Single, 11),
734
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
755
new TextLoader.Column("label",
DataKind
.Single, 11),
756
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
760
new TextLoader.Column("label",
DataKind
.Single, 11),
761
new TextLoader.Column("features",
DataKind
.String, 0, 10)
794
new TextLoader.Column("label",
DataKind
.Single, 11),
795
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
815
new TextLoader.Column("label",
DataKind
.Single, 11),
816
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
820
new TextLoader.Column("label",
DataKind
.Single, 11),
821
new TextLoader.Column("features",
DataKind
.String, 0, 10)
854
new TextLoader.Column("label",
DataKind
.Single, 11),
855
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
994
new TextLoader.Column("float1",
DataKind
.Single, 1),
995
new TextLoader.Column("float4",
DataKind
.Single, new[]{new TextLoader.Range(1, 4) }),
996
new TextLoader.Column("double1",
DataKind
.Double, 1),
997
new TextLoader.Column("double4",
DataKind
.Double, new[]{new TextLoader.Range(1, 4) }),
998
new TextLoader.Column("int1",
DataKind
.Int32, 0),
Transformers\PcaTests.cs (8)
30
new TextLoader.Column("label",
DataKind
.Single, 11),
31
new TextLoader.Column("weight",
DataKind
.Single, 0),
32
new TextLoader.Column("features",
DataKind
.Single, 1, 10)
36
new TextLoader.Column("label",
DataKind
.Single, 11),
37
new TextLoader.Column("weight",
DataKind
.Single, 0),
38
new TextLoader.Column("features",
DataKind
.String, 1, 10)
54
new TextLoader.Column("label",
DataKind
.Single, 11),
55
new TextLoader.Column("features",
DataKind
.Single, 0, 10)
Transformers\RffTests.cs (2)
68
new TextLoader.Column("VectorFloat",
DataKind
.Single, 1, 8),
69
new TextLoader.Column("Label",
DataKind
.Single, 0)
Transformers\TextFeaturizerTests.cs (31)
427
new TextLoader.Column("label",
DataKind
.Boolean, 0),
428
new TextLoader.Column("text",
DataKind
.String, 1) },
432
new TextLoader.Column("label",
DataKind
.Boolean, 0),
433
new TextLoader.Column("text",
DataKind
.Single, 1) },
460
new TextLoader.Column("label",
DataKind
.Boolean, 0),
461
new TextLoader.Column("text",
DataKind
.String, 1) },
465
new TextLoader.Column("label",
DataKind
.Boolean, 0),
466
new TextLoader.Column("text",
DataKind
.Single, 1) },
490
new TextLoader.Column("label",
DataKind
.Boolean, 0),
491
new TextLoader.Column("text",
DataKind
.String, 1) },
527
new TextLoader.Column("label",
DataKind
.Boolean, 0),
528
new TextLoader.Column("text",
DataKind
.String, 1) },
532
new TextLoader.Column("label",
DataKind
.Boolean, 0),
533
new TextLoader.Column("text",
DataKind
.Single, 1) },
562
new TextLoader.Column("Text",
DataKind
.String, 1)
590
new TextLoader.Column("label",
DataKind
.Boolean, 0),
591
new TextLoader.Column("text",
DataKind
.String, 1) },
595
new TextLoader.Column("label",
DataKind
.Boolean, 0),
596
new TextLoader.Column("text",
DataKind
.Single, 1) },
620
new TextLoader.Column("label",
DataKind
.Boolean, 0),
621
new TextLoader.Column("text",
DataKind
.String, 1) },
625
new TextLoader.Column("label",
DataKind
.Boolean, 0),
626
new TextLoader.Column("text",
DataKind
.Single, 1) },
657
new TextLoader.Column("Sentiment",
DataKind
.Boolean, 0),
658
new TextLoader.Column("SentimentText",
DataKind
.String, 1) },
674
new TextLoader.Column("label",
DataKind
.Boolean, 0),
675
new TextLoader.Column("text",
DataKind
.String, 1) },
679
new TextLoader.Column("label",
DataKind
.Boolean, 0),
680
new TextLoader.Column("text",
DataKind
.Single, 1) },
778
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
779
new TextLoader.Column("Features",
DataKind
.String, 1, 9)
Transformers\TextNormalizer.cs (2)
52
new TextLoader.Column("label",
DataKind
.Boolean, 0),
53
new TextLoader.Column("text",
DataKind
.String, 1)
Transformers\WordEmbeddingsTests.cs (4)
36
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
37
new TextLoader.Column("SentimentText",
DataKind
.String, 1)
71
new TextLoader.Column("Label",
DataKind
.Boolean, 0),
72
new TextLoader.Column("SentimentText",
DataKind
.String, 1)
Microsoft.ML.TimeSeries.Tests (3)
TimeSeriesDirectApi.cs (3)
304
.Append(ml.Transforms.Conversion.ConvertType("Value", "Value",
DataKind
.Single))
450
.Append(ml.Transforms.Conversion.ConvertType("Value", "Value",
DataKind
.Single))
540
new TextLoader.Column("Value",
DataKind
.Single, 0),
Microsoft.ML.TorchSharp.Tests (14)
NerTests.cs (3)
197
new TextLoader.Column("Key",
DataKind
.String, 0)
206
new TextLoader.Column("Sentence",
DataKind
.String, 0),
207
new TextLoader.Column("Label",
DataKind
.String, new TextLoader.Range[]
ObjectDetectionTests.cs (4)
37
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
38
new TextLoader.Column("Labels",
DataKind
.String, 1),
39
new TextLoader.Column("Box",
DataKind
.String, 2)
96
new TextLoader.Column("ImagePath",
DataKind
.String, 0),
QATests.cs (4)
77
new TextLoader.Column("Context",
DataKind
.String,0),
78
new TextLoader.Column("Question",
DataKind
.String,1),
79
new TextLoader.Column("TrainingAnswer",
DataKind
.String,2),
80
new TextLoader.Column("AnswerIndex",
DataKind
.Int32,3)
TextClassificationTests.cs (3)
421
new TextLoader.Column("search_term",
DataKind
.String,3),
422
new TextLoader.Column("relevance",
DataKind
.Single,4),
423
new TextLoader.Column("product_description",
DataKind
.String,5)
Microsoft.ML.Transforms (5)
Text\NgramTransform.cs (3)
790
var
dataKind = _srcTypes[iinfo] == NumberDataViewType.UInt32 ?
DataKind
.Int32 :
DataKind
.Int64;
Text\StopWordsRemovingTransformer.cs (1)
816
new TextLoader.Column(stopwordsCol,
DataKind
.String, 0)
Text\TokenizingByCharacters.cs (1)
267
var t = InternalDataKindExtensions.ToInternalDataKind(
DataKind
.UInt16).ToType();