10 instantiations of TextLoader
Microsoft.ML.Data (10)
DataLoadSave\Text\TextLoader.cs (4)
1485
return h.Apply("Loading Model", ch => new
TextLoader
(h, ctx));
1492
=> (ILegacyDataLoader)new
TextLoader
(env, options, files).Load(files);
1498
=> new
TextLoader
(env, options, fileSource).Load(fileSource);
1634
return new
TextLoader
(host, options, dataSample: dataSample);
DataLoadSave\Text\TextLoaderSaverCatalog.cs (4)
71
return new
TextLoader
(CatalogUtils.GetEnvironment(catalog), options: options, dataSample: dataSample);
87
=> new
TextLoader
(CatalogUtils.GetEnvironment(catalog), options, dataSample);
181
var loader = new
TextLoader
(CatalogUtils.GetEnvironment(catalog), options: options);
207
return new
TextLoader
(env, options, dataSample: source).Load(source);
Transforms\ValueToKeyMappingTransformer.cs (1)
445
var loader = new
TextLoader
(env, options: options, dataSample: fileSource);
Utilities\ModelFileUtils.cs (1)
299
var loader = new
TextLoader
(env, dataSample: repoStreamWrapper).Load(repoStreamWrapper);
1339 references to TextLoader
Microsoft.ML.AutoML (38)
API\AutoCatalog.cs (9)
214
/// <param name="groupColumns">Whether to group together (when possible) original columns in the dataset file into vector columns in the resulting data structures. See <see cref="
TextLoader
.Range"/> for more information.</param>
219
/// instantiate a <see cref="
TextLoader
" />. The <see cref="
TextLoader
" /> can be used to
242
/// <param name="groupColumns">Whether to group together (when possible) original columns in the dataset file into vector columns in the resulting data structures. See <see cref="
TextLoader
.Range"/> for more information.</param>
247
/// instantiate a <see cref="
TextLoader
" />. The <see cref="
TextLoader
" /> can be used to
272
/// <param name="groupColumns">Whether to group together (when possible) original columns in the dataset file into vector columns in the resulting data structures. See <see cref="
TextLoader
.Range"/> for more information.</param>
277
/// instantiate a <see cref="
TextLoader
" />. The <see cref="
TextLoader
" /> can be used to
API\ColumnInference.cs (3)
18
/// Gets the inferred <see cref="
TextLoader
.Options" /> for the dataset.
21
/// Can be used to instantiate a new <see cref="
TextLoader
" /> to load
25
public
TextLoader
.Options TextLoaderOptions { get; internal set; }
AutoMLExperiment\ITrialResultManager.cs (7)
138
var textLoaderColumns = new
TextLoader
.Column[]
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 (4)
9
using static Microsoft.ML.Data.
TextLoader
;
11
using Range = Microsoft.ML.Data.
TextLoader
.Range;
40
public
TextLoader
.Column GenerateTextLoaderColumn()
42
return new
TextLoader
.Column(SuggestedName, ItemKind, Ranges);
ColumnInference\ColumnInferenceApi.cs (4)
52
var typedLoaderOptions = new
TextLoader
.Options
62
var
textLoader = context.Data.CreateTextLoader(typedLoaderOptions);
71
IEnumerable<
TextLoader
.Column> columnResults = null;
89
var textLoaderOptions = new
TextLoader
.Options()
ColumnInference\ColumnTypeInference.cs (6)
260
var textLoaderOptions = new
TextLoader
.Options
262
Columns = new[] { new
TextLoader
.Column("C", DataKind.String, 0, args.ColumnCount - 1) },
268
var
textLoader = context.Data.CreateTextLoader(textLoaderOptions);
404
public static
TextLoader
.Column[] GenerateLoaderColumns(Column[] columns)
406
var loaderColumns = new List<
TextLoader
.Column>();
409
var loaderColumn = new
TextLoader
.Column(col.SuggestedName, col.ItemType.GetRawKind().ToDataKind(), col.ColumnIndex);
ColumnInference\TextFileContents.cs (5)
64
var options = new
TextLoader
.Options
66
Columns = new[] { new
TextLoader
.Column() {
69
Source = new[] { new
TextLoader
.Range(0, null) }
86
private static bool TryParseFile(MLContext context,
TextLoader
.Options options, IMultiStreamSource source,
93
var
textLoader = context.Data.CreateTextLoader(options, source);
Microsoft.ML.AutoML.Tests (35)
AutoFeaturizerTests.cs (1)
109
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
AutoFitTests.cs (27)
47
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
73
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
100
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
127
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
261
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
335
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
362
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
392
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
418
var
reader = new TextLoader(mlContext, GetLoaderArgsRank(labelColumnName, groupIdColumnName, featuresColumnVectorNameA, featuresColumnVectorNameB));
479
var
reader = new TextLoader(mlContext, GetLoaderArgsRank(labelColumnName, groupIdColumnName,
523
var
reader = new TextLoader(mlContext, GetLoaderArgs(labelColumnName, userColumnName, itemColumnName));
587
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
651
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
691
private
TextLoader
.Options GetLoaderArgs(string labelColumnName, string userIdColumnName, string itemIdColumnName)
693
return new
TextLoader
.Options()
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)),
706
private
TextLoader
.Options GetLoaderArgsRank(string labelColumnName, string groupIdColumnName, string featureColumnVectorNameA, string featureColumnVectorNameB)
708
return new
TextLoader
.Options()
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)
DatasetUtil.cs (6)
59
var
textLoader = context.Data.CreateTextLoader(columnInferenceResult.TextLoaderOptions);
72
var
textLoader = context.Data.CreateTextLoader(columnInferenceResult.TextLoaderOptions);
85
var
textLoader = context.Data.CreateTextLoader(columnInferenceResult.TextLoaderOptions);
98
var
textLoader = context.Data.CreateTextLoader(columnInferenceResult.TextLoaderOptions);
110
var
textLoader = context.Data.CreateTextLoader(columnInferenceResult.TextLoaderOptions);
121
var
textLoader = context.Data.CreateTextLoader(columnInferenceResult.TextLoaderOptions);
TrainValidaionDatasetManagerTest.cs (1)
31
var
textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions);
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
42
var
textLoader = mlContext.Data.CreateTextLoader(columnInference.TextLoaderOptions);
Microsoft.ML.CodeGenerator.Tests (146)
ApprovalTests\ConsoleCodeGeneratorTests.cs (63)
569
var textLoaderArgs = new
TextLoader
.Options()
572
new
TextLoader
.Column("Label", DataKind.String, 0),
573
new
TextLoader
.Column("userId", DataKind.String, 1),
574
new
TextLoader
.Column("movieId", DataKind.String, 2),
608
var textLoaderArgs = new
TextLoader
.Options()
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),
645
var textLoaderArgs = new
TextLoader
.Options()
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),
698
var textLoaderArgs = new
TextLoader
.Options()
701
new
TextLoader
.Column("Label", DataKind.String, 0),
702
new
TextLoader
.Column("ImagePath", DataKind.String, 1), // 0?
736
var textLoaderArgs = new
TextLoader
.Options()
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),
787
var textLoaderArgs = new
TextLoader
.Options()
790
new
TextLoader
.Column("Label", DataKind.String, 0),
791
new
TextLoader
.Column("ImageSource", DataKind.String, 1), // 0?
818
var textLoaderArgs = new
TextLoader
.Options()
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),
993
var textLoaderArgs = new
TextLoader
.Options()
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),
1103
var textLoaderArgs = new
TextLoader
.Options()
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 (83)
100
TextLoaderOptions = new
TextLoader
.Options()
141
public static List<
TextLoader
.Column[]> inputColumns = new List<
TextLoader
.Column[]>
143
new
TextLoader
.Column[]
145
new
TextLoader
.Column(){ Name = "Label", Source = new
TextLoader
.Range[]{new
TextLoader
.Range(0) }, DataKind = DataKind.Boolean },
147
new
TextLoader
.Column[]
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 }
153
new
TextLoader
.Column[]
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 },
161
new
TextLoader
.Column[]
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 },
171
new
TextLoader
.Column[]
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.Tests (33)
UnitTests\TestEntryPoints.cs (31)
53
new
TextLoader
.Column("Label", DataKind.Single, 0),
54
new
TextLoader
.Column("Features", DataKind.Single,
55
new [] { new
TextLoader
.Range(1, 9) })
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) })
1362
new
TextLoader
.Options()
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,
4530
new [] { new
TextLoader
.Range() { Min = 0, VariableEnd=true, ForceVector=true} })
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 (2)
131
env.Data.CreateTextLoader(new
TextLoader
.Options { Columns = new[] { new
TextLoader
.Column("TestColumn", DataKind.Single, 0) } });
Microsoft.ML.Data (131)
Commands\DataCommand.cs (4)
361
return isText ?
TextLoader
.Create(Host, new
TextLoader
.Options(), fileSource) :
365
TextLoader
.Create(Host, new
TextLoader
.Options(), fileSource);
DataLoadSave\Database\DatabaseLoader.cs (1)
333
internal static Range FromTextLoaderRange(
TextLoader
.Range range)
DataLoadSave\Text\LoadColumnAttribute.cs (7)
23
Sources = new List<
TextLoader
.Range>();
24
Sources.Add(new
TextLoader
.Range(fieldIndex));
34
Sources = new List<
TextLoader
.Range>();
35
Sources.Add(new
TextLoader
.Range(start, end));
44
Sources = new List<
TextLoader
.Range>();
46
Sources.Add(new
TextLoader
.Range(col));
49
internal List<
TextLoader
.Range> Sources;
DataLoadSave\Text\TextLoader.cs (23)
16
[assembly: LoadableClass(
TextLoader
.Summary, typeof(ILegacyDataLoader), typeof(
TextLoader
), typeof(
TextLoader
.Options), typeof(SignatureDataLoader),
19
[assembly: LoadableClass(
TextLoader
.Summary, typeof(ILegacyDataLoader), typeof(
TextLoader
), null, typeof(SignatureLoadDataLoader),
20
"Text Loader",
TextLoader
.LoaderSignature)]
22
[assembly: LoadableClass(
TextLoader
.Summary, typeof(
TextLoader
), null, typeof(SignatureLoadModel),
23
"Text Loader",
TextLoader
.LoaderSignature)]
287
/// indicates that the <see cref="
TextLoader
"/> should auto-detect the legnth
310
/// indicates that the <see cref="
TextLoader
"/> should auto-detect the legnth
425
/// The settings for <see cref="
TextLoader
"/>
497
/// <see cref="
TextLoader
.Load(IMultiStreamSource)"/> is called. The sample can be used to infer slot name annotations if present.
511
/// If <see cref="
TextLoader
.Options.AllowQuoting"/> is false, this option is ignored.
704
public Bindings(
TextLoader
parent, Column[] cols, IMultiStreamSource headerFile, IMultiStreamSource dataSample)
905
public Bindings(ModelLoadContext ctx,
TextLoader
parent)
1095
loaderAssemblyName: typeof(
TextLoader
).Assembly.FullName);
1477
internal static
TextLoader
Create(IHostEnvironment env, ModelLoadContext ctx)
1495
/// Convenience method to create a <see cref="
TextLoader
"/> and use it to load a specified file.
1547
internal static
TextLoader
CreateTextLoader<TInput>(IHostEnvironment host,
1567
internal static
TextLoader
CreateTextLoader<TInput>(IHostEnvironment host,
1639
private readonly
TextLoader
_loader;
1643
public BoundLoader(
TextLoader
loader, IMultiStreamSource files)
DataLoadSave\Text\TextLoaderCursor.cs (4)
46
private static void SetupCursor(
TextLoader
parent, bool[] active, int n,
86
private Cursor(
TextLoader
parent, ParseStats stats, bool[] active, LineReader reader, int srcNeeded, int cthd)
138
public static DataViewRowCursor Create(
TextLoader
parent, IMultiStreamSource files, bool[] active)
155
public static DataViewRowCursor[] CreateSet(
TextLoader
parent, IMultiStreamSource files, bool[] active, int n)
DataLoadSave\Text\TextLoaderParser.cs (3)
673
public Parser(
TextLoader
parent)
734
public static void GetInputSize(
TextLoader
parent, List<ReadOnlyMemory<char>> lines, out int minSize, out int maxSize)
771
public static void ParseSlotNames(
TextLoader
parent, ReadOnlyMemory<char> textHeader, ColInfo[] infos, VBuffer<ReadOnlyMemory<char>>[] slotNames)
DataLoadSave\Text\TextLoaderSaverCatalog.cs (59)
20
/// Create a text loader <see cref="
TextLoader
"/>.
23
/// <param name="columns">Array of columns <see cref="
TextLoader
.Column"/> defining the schema.</param>
26
/// indicates that the first line in the <see paramref="dataSample"/> will be used for feature names, and that when <see cref="
TextLoader
.Load(IMultiStreamSource)"/>
28
/// skip the first line when <see cref="
TextLoader
.Load(IMultiStreamSource)"/> is called, but columns will not have slot names annotations. This is
29
/// because the output schema is made when the loader is created, and not when <see cref="
TextLoader
.Load(IMultiStreamSource)"/> is called.</param>
31
/// of slots in a column defined with <see cref="
TextLoader
.Range"/> with <see langword="null"/> maximum index.
52
public static
TextLoader
CreateTextLoader(this DataOperationsCatalog catalog,
53
TextLoader
.Column[] columns,
54
char separatorChar =
TextLoader
.Defaults.Separator,
55
bool hasHeader =
TextLoader
.Defaults.HasHeader,
57
bool allowQuoting =
TextLoader
.Defaults.AllowQuoting,
58
bool trimWhitespace =
TextLoader
.Defaults.TrimWhitespace,
59
bool allowSparse =
TextLoader
.Defaults.AllowSparse)
61
var options = new
TextLoader
.Options
75
/// Create a text loader <see cref="
TextLoader
"/>.
80
/// of slots in <see cref="
TextLoader
.Options.Columns"/> defined with <see cref="
TextLoader
.Range"/> with <see langword="null"/> maximum index.
82
/// it will also contain the schema information in the header that the loader can read even if <see cref="
TextLoader
.Options.Columns"/> are not specified.
83
/// In order to use the schema defined in the file, all other <see cref="
TextLoader
.Options"/> sould be left with their default values.</param>
84
public static
TextLoader
CreateTextLoader(this DataOperationsCatalog catalog,
85
TextLoader
.Options options,
90
/// Create a text loader <see cref="
TextLoader
"/> by inferencing the dataset schema from a data model type.
98
/// indicates that the first line in the <see paramref="dataSample"/> will be used for feature names, and that when <see cref="
TextLoader
.Load(IMultiStreamSource)"/>
100
/// skip the first line when <see cref="
TextLoader
.Load(IMultiStreamSource)"/> is called, but columns will not have slot names annotations. This is
101
/// because the output schema is made when the loader is created, and not when <see cref="
TextLoader
.Load(IMultiStreamSource)"/> is called.</param>
113
public static
TextLoader
CreateTextLoader<TInput>(this DataOperationsCatalog catalog,
114
char separatorChar =
TextLoader
.Defaults.Separator,
115
bool hasHeader =
TextLoader
.Defaults.HasHeader,
117
bool allowQuoting =
TextLoader
.Defaults.AllowQuoting,
118
bool trimWhitespace =
TextLoader
.Defaults.TrimWhitespace,
119
bool allowSparse =
TextLoader
.Defaults.AllowSparse)
120
=>
TextLoader
.CreateTextLoader<TInput>(CatalogUtils.GetEnvironment(catalog), hasHeader, separatorChar, allowQuoting,
124
/// Create a text loader <see cref="
TextLoader
"/> by inferencing the dataset schema from a data model type.
131
public static
TextLoader
CreateTextLoader<TInput>(this DataOperationsCatalog catalog,
132
TextLoader
.Options options,
134
=>
TextLoader
.CreateTextLoader<TInput>(CatalogUtils.GetEnvironment(catalog), options, dataSample);
137
/// Load a <see cref="IDataView"/> from a text file using <see cref="
TextLoader
"/>.
145
/// <see cref="
TextLoader
.Load(IMultiStreamSource)"/> is called.</param>
162
TextLoader
.Column[] columns,
163
char separatorChar =
TextLoader
.Defaults.Separator,
164
bool hasHeader =
TextLoader
.Defaults.HasHeader,
165
bool allowQuoting =
TextLoader
.Defaults.AllowQuoting,
166
bool trimWhitespace =
TextLoader
.Defaults.TrimWhitespace,
167
bool allowSparse =
TextLoader
.Defaults.AllowSparse)
171
var options = new
TextLoader
.Options
181
var
loader = new TextLoader(CatalogUtils.GetEnvironment(catalog), options: options);
186
/// Load a <see cref="IDataView"/> from a text file using <see cref="
TextLoader
"/>.
200
TextLoader
.Options options = null)
211
/// Load a <see cref="IDataView"/> from a text file using <see cref="
TextLoader
"/>.
218
/// <see cref="
TextLoader
.Load(IMultiStreamSource)"/> is called.</param>
235
char separatorChar =
TextLoader
.Defaults.Separator,
236
bool hasHeader =
TextLoader
.Defaults.HasHeader,
237
bool allowQuoting =
TextLoader
.Defaults.AllowQuoting,
238
bool trimWhitespace =
TextLoader
.Defaults.TrimWhitespace,
239
bool allowSparse =
TextLoader
.Defaults.AllowSparse)
245
return
TextLoader
.CreateTextLoader<TInput>(CatalogUtils.GetEnvironment(catalog), hasHeader, separatorChar,
250
/// Load a <see cref="IDataView"/> from a text file using <see cref="
TextLoader
"/>.
259
TextLoader
.Options options)
263
return
TextLoader
.CreateTextLoader<TInput>(CatalogUtils.GetEnvironment(catalog), options)
DataLoadSave\Text\TextSaver.cs (9)
484
var settings = CmdParser.GetSettings(_host, column, new
TextLoader
.Column());
499
private
TextLoader
.Column GetColumn(string name, DataViewType type, int? start)
509
TextLoader
.Range[] source = null;
510
TextLoader
.Range range = null;
513
range = new
TextLoader
.Range { Min = minValue, Max = minValue + vectorType.Size - 1, ForceVector = true };
515
range = new
TextLoader
.Range { Min = minValue, VariableEnd = true };
517
range = new
TextLoader
.Range { Min = minValue };
518
source = new
TextLoader
.Range[1] { range };
519
return new
TextLoader
.Column() { Name = name, KeyCount = keyCount, Source = source, Type = kind };
Transforms\ValueMapping.cs (15)
468
private static
TextLoader
.Column GenerateValueColumn(IHostEnvironment env,
534
TextLoader
.Column valueColumn = new
TextLoader
.Column(valueColumnName, DataKind.UInt32, 1);
635
TextLoader
.Column keyColumn = default;
636
TextLoader
.Column valueColumn = default;
642
keyColumn = new
TextLoader
.Column(keyColumnName, DataKind.String, 0);
643
valueColumn = new
TextLoader
.Column(valueColumnName, DataKind.String, 1);
644
var txtArgs = new
TextLoader
.Options()
646
Columns = new
TextLoader
.Column[]
655
var textLoader =
TextLoader
.LoadFile(env, txtArgs, fileSource);
665
keyColumn = new
TextLoader
.Column(keyColumnName, DataKind.String, 0);
666
valueColumn = new
TextLoader
.Column(valueColumnName, DataKind.Single, 1);
669
loader =
TextLoader
.Create(
671
new
TextLoader
.Options()
673
Columns = new
TextLoader
.Column[]
Transforms\ValueToKeyMappingTransformer.cs (4)
433
"{0} should not be specified when default loader is " + nameof(
TextLoader
) + ". Ignoring {0}={1}",
438
var options = new
TextLoader
.Options()
442
new
TextLoader
.Column("Term", DataKind.String, 0)
445
var
loader = new TextLoader(env, options: options, dataSample: fileSource);
Utilities\TypeParsingUtils.cs (2)
61
Contracts.CheckUserArg(KeyDataViewType.IsValidDataType(rawType), nameof(
TextLoader
.Column.Type), "Bad item type for Key");
74
/// It is used by <see cref="
TextLoader
"/> and <see cref="TypeConvertingEstimator"/>.
Microsoft.ML.EntryPoints (2)
ImportTextData.cs (2)
52
public
TextLoader
.Options Arguments = new
TextLoader
.Options();
Microsoft.ML.IntegrationTests (40)
Datasets\MnistOneClass.cs (3)
17
public static
TextLoader
GetTextLoader(MLContext mlContext, bool hasHeader, char separatorChar)
21
new
TextLoader
.Column("Label", DataKind.Single, 0),
22
new
TextLoader
.Column("Features", DataKind.Single, 1, 1 + _featureLength)
Datasets\TypeTestData.cs (17)
77
public static
TextLoader
GetTextLoader(MLContext mlContext, char separator)
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),
ModelFiles.cs (9)
135
var
loader = mlContext.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
268
var
loader = mlContext.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
325
var
loader = mlContext.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
358
var
loader = mlContext.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
373
Assert.True(loadedLoaderWithTransformer is
TextLoader
);
387
var
loader = mlContext.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
425
var
loader = mlContext.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
445
Assert.IsType<
TextLoader
>(loadedLoaderWithTransformer);
458
var
loader = mlContext.Data.CreateTextLoader<InputData>(hasHeader: true, dataSample: file);
Prediction.cs (1)
40
var options = new
TextLoader
.Options
SchemaDefinitionTests.cs (4)
34
var
loader = _ml.Data.CreateTextLoader(new
TextLoader
.Options(), new MultiFileSource(fileName));
65
var
loader = _ml.Data.CreateTextLoader(new
TextLoader
.Options(), new MultiFileSource(fileName));
Validation.cs (6)
73
var
reader = mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
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.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 (65)
FeaturizeTextBench.cs (4)
33
var columns = new List<
TextLoader
.Column>();
36
columns.Add(new
TextLoader
.Column($"Column{i}", DataKind.String, i));
39
var
textLoader = _mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
KMeansAndLogisticRegressionBench.cs (5)
25
new
TextLoader
.Column("Label", DataKind.Boolean, 0),
26
new
TextLoader
.Column("CatFeatures", DataKind.String,
28
new
TextLoader
.Range() { Min = 1, Max = 8 },
30
new
TextLoader
.Column("NumFeatures", DataKind.Single,
32
new
TextLoader
.Range() { Min = 9, Max = 14 },
Numeric\Ranking.cs (4)
45
var environment = EnvironmentFactory.CreateRankingEnvironment<RankingEvaluator,
TextLoader
, HashingTransformer, FastTreeRankingTrainer, FastTreeRankingModelParameters>();
60
var environment = EnvironmentFactory.CreateRankingEnvironment<RankingEvaluator,
TextLoader
, HashingTransformer, LightGbmMulticlassTrainer, OneVersusAllModelParameters>();
99
var environment = EnvironmentFactory.CreateRankingEnvironment<RankingEvaluator,
TextLoader
, HashingTransformer, FastTreeRankingTrainer, FastTreeRankingModelParameters>();
109
var environment = EnvironmentFactory.CreateRankingEnvironment<RankingEvaluator,
TextLoader
, HashingTransformer, FastTreeRankingTrainer, FastTreeRankingModelParameters>();
PredictionEngineBench.cs (16)
41
var options = new
TextLoader
.Options()
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),
53
var
loader = new TextLoader(env, options: options);
80
var options = new
TextLoader
.Options()
84
new
TextLoader
.Column("Label", DataKind.Boolean, 0),
85
new
TextLoader
.Column("SentimentText", DataKind.String, 1)
89
var
loader = new TextLoader(mlContext, options: options);
115
var options = new
TextLoader
.Options()
119
new
TextLoader
.Column("Label", DataKind.Boolean, 0),
120
new
TextLoader
.Column("Features", DataKind.Single, new[] { new
TextLoader
.Range(1, 9) })
124
var
loader = new TextLoader(env, options: options);
RffTransform.cs (5)
32
var
loader = mlContext.Data.CreateTextLoader(new
TextLoader
.Options
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 (20)
62
var options = new
TextLoader
.Options()
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),
74
var
loader = new TextLoader(_mlContext, options: options);
89
var arguments = new
TextLoader
.Options()
91
Columns = new
TextLoader
.Column[]
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 } })
131
var options = new
TextLoader
.Options()
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),
143
var
loader = new TextLoader(_mlContext, options: options);
Text\MultiClassClassification.cs (6)
40
var environment = EnvironmentFactory.CreateClassificationEnvironment<
TextLoader
, OneHotEncodingTransformer, AveragedPerceptronTrainer, LinearBinaryModelParameters>();
55
var environment = EnvironmentFactory.CreateClassificationEnvironment<
TextLoader
, OneHotEncodingTransformer, LightGbmMulticlassTrainer, OneVersusAllModelParameters>();
71
var environment = EnvironmentFactory.CreateClassificationEnvironment<
TextLoader
, OneHotEncodingTransformer, AveragedPerceptronTrainer, LinearBinaryModelParameters>();
87
var environment = EnvironmentFactory.CreateClassificationEnvironment<
TextLoader
, OneHotEncodingTransformer, SdcaMaximumEntropyMulticlassTrainer, MaximumEntropyModelParameters>();
115
var environment = EnvironmentFactory.CreateClassificationEnvironment<
TextLoader
, OneHotEncodingTransformer, AveragedPerceptronTrainer, LinearBinaryModelParameters>();
126
var environment = EnvironmentFactory.CreateClassificationEnvironment<
TextLoader
, OneHotEncodingTransformer, AveragedPerceptronTrainer, LinearBinaryModelParameters>();
TextLoaderBench.cs (5)
25
private List<
TextLoader
.Column> _columns;
36
_columns = new List<
TextLoader
.Column>();
39
_columns.Add(new
TextLoader
.Column($"Column{i}", DataKind.String, i));
42
var
textLoader = _mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
Microsoft.ML.Predictor.Tests (6)
TestIniModels.cs (6)
520
new
TextLoader
.Options()
525
new
TextLoader
.Column("Label", DataKind.Single, 0),
526
new
TextLoader
.Column("Features", DataKind.Single, 1, 9)
559
new
TextLoader
.Options()
564
new
TextLoader
.Column("Label", DataKind.Boolean, 0),
565
new
TextLoader
.Column("Features", DataKind.Single, 1, 9)
Microsoft.ML.Samples (33)
Dynamic\DataOperations\LoadingText.cs (10)
43
var
loader = mlContext.Data.CreateTextLoader(
46
new
TextLoader
.Column("Features", DataKind.Single, 0, 9)
77
var
loaderWithCustomType =
91
var
loaderWithUnknownLength = mlContext.Data.CreateTextLoader(
94
new
TextLoader
.Column("Features",
96
new[] { new
TextLoader
.Range(0, null) })
138
var
sparseLoader = mlContext.Data.CreateTextLoader(
141
new
TextLoader
.Column("Features", DataKind.Single, 0, 9)
168
var options = new
TextLoader
.Options()
173
var
sparseLoaderWithSchema =
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 (3)
32
new
TextLoader
.Options
38
new
TextLoader
.Column("Label", DataKind.Single, 0),
39
new
TextLoader
.Column("Features", DataKind.Single, 1, 6)
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptionsAdvanced.cs (3)
32
new
TextLoader
.Options
38
new
TextLoader
.Column("Label", DataKind.Single, 0),
39
new
TextLoader
.Column("Features", DataKind.Single, 1, 6)
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScale.cs (3)
34
var data = mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
38
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
39
new
TextLoader
.Column("Name", DataKind.String, 1),
Dynamic\Transforms\ImageAnalytics\DnnFeaturizeImage.cs (3)
33
var data = mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
37
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
38
new
TextLoader
.Column("Name", DataKind.String, 1),
Dynamic\Transforms\ImageAnalytics\ExtractPixels.cs (3)
36
var data = mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
40
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
41
new
TextLoader
.Column("Name", DataKind.String, 1),
Dynamic\Transforms\ImageAnalytics\LoadImages.cs (3)
33
var data = mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
37
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
38
new
TextLoader
.Column("Name", DataKind.String, 1),
Dynamic\Transforms\ImageAnalytics\ResizeImages.cs (3)
33
var data = mlContext.Data.CreateTextLoader(new
TextLoader
.Options()
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 (6)
Program.cs (6)
23
List<
TextLoader
.Column> columns = new List<
TextLoader
.Column>();
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)));
39
var
loader = mlContext.Data.CreateTextLoader(
Microsoft.ML.SamplesUtils (29)
SamplesDatasetUtils.cs (29)
50
var
loader = mlContext.Data.CreateTextLoader(
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),
126
var
loader = mlContext.Data.CreateTextLoader(
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.TensorFlow.Tests (47)
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 (41)
139
var data =
TextLoader
.Create(_mlContext, new
TextLoader
.Options()
143
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
144
new
TextLoader
.Column("Label", DataKind.String, 1),
541
var
reader = _mlContext.Data.CreateTextLoader(
544
new
TextLoader
.Column("ImagePath", DataKind.String , 0),
545
new
TextLoader
.Column("Name", DataKind.String, 1)
654
var
reader = _mlContext.Data.CreateTextLoader(
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) })
698
var
reader = _mlContext.Data.CreateTextLoader(columns: new[]
700
new
TextLoader
.Column("Label", DataKind.Int64, 0),
701
new
TextLoader
.Column("Placeholder", DataKind.Single, new []{ new
TextLoader
.Range(1, 784) })
787
var
reader = _mlContext.Data.CreateTextLoader(new[]
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) })
880
var
reader = _mlContext.Data.CreateTextLoader(columns: new[]
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),
1149
var data =
TextLoader
.Create(_mlContext, new
TextLoader
.Options()
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.TestFramework (4)
DataPipe\TestDataPipe.cs (2)
820
var argsText = new
TextLoader
.Options();
833
IDataView view2 =
TextLoader
.Create(Env, argsText, new MultiFileSource(dataPath));
DataPipe\TestDataPipeBase.cs (1)
415
var args = new
TextLoader
.Options() { AllowSparse = true, AllowQuoting = true };
EnvironmentExtensions.cs (1)
20
env.ComponentCatalog.RegisterAssembly(typeof(
TextLoader
).Assembly); // ML.Data
Microsoft.ML.TestFrameworkCommon (20)
Datasets.cs (20)
28
public Func<
TextLoader
.Column[]> GetLoaderColumns;
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 (660)
AnomalyDetectionTests.cs (3)
239
var
loader = ML.Data.CreateTextLoader(new[]
241
new
TextLoader
.Column(DefaultColumnNames.Label, DataKind.Single, 0),
242
new
TextLoader
.Column(DefaultColumnNames.Features, DataKind.Single, 1, 784)
ImagesTests.cs (64)
34
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
38
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
39
new
TextLoader
.Column("Name", DataKind.String, 1),
42
var invalidData =
TextLoader
.Create(env, new
TextLoader
.Options()
46
new
TextLoader
.Column("ImagePath", DataKind.Single, 0),
65
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
69
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
70
new
TextLoader
.Column("Name", DataKind.String, 1),
109
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
113
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
114
new
TextLoader
.Column("Name", DataKind.String, 1),
141
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
145
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
146
new
TextLoader
.Column("Name", DataKind.String, 1),
178
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
182
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
183
new
TextLoader
.Column("Name", DataKind.String, 1),
337
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
341
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
342
new
TextLoader
.Column("Name", DataKind.String, 1),
412
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
416
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
417
new
TextLoader
.Column("Name", DataKind.String, 1),
488
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
492
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
493
new
TextLoader
.Column("Name", DataKind.String, 1),
563
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
567
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
568
new
TextLoader
.Column("Name", DataKind.String, 1),
638
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
642
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
643
new
TextLoader
.Column("Name", DataKind.String, 1),
713
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
717
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
718
new
TextLoader
.Column("Name", DataKind.String, 1),
789
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
793
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
794
new
TextLoader
.Column("Name", DataKind.String, 1),
864
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
868
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
869
new
TextLoader
.Column("Name", DataKind.String, 1),
940
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
944
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
945
new
TextLoader
.Column("Name", DataKind.String, 1),
1012
var data =
TextLoader
.Create(env, new
TextLoader
.Options()
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 (53)
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)
467
TextLoader
.Column[] columnsVector = new[]
469
new
TextLoader
.Column("Key", valueType, 0, 3)
471
TextLoader
.Column[] columnsScalar = new[]
473
new
TextLoader
.Column("Key", valueType, 0)
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)
943
TextLoader
.Column[] columns = new[]
945
new
TextLoader
.Column("Value", fromKind, 0, 0)
968
new
TextLoader
.Column("label", DataKind.Single, 11),
969
new
TextLoader
.Column("features", DataKind.Single, 0, 10)
1036
new
TextLoader
.Column("Value", keyType, new[]
1038
new
TextLoader
.Range(0)
1075
new
TextLoader
.Column("Value", type, column),
1126
new
TextLoader
.Column("Value", type, columnStart, columnEnd),
1192
TextLoader
.Column[] columnsVector = new[]
1194
new
TextLoader
.Column("Value", valueType, 0, 3)
1196
TextLoader
.Column[] columnsScalar = new[]
1198
new
TextLoader
.Column("Value", valueType, 0)
1230
TextLoader
.Column[] columnsVector = new[]
1232
new
TextLoader
.Column("Keys", keyType, 0, 2)
1234
TextLoader
.Column[] columnsScalar = new[]
1236
new
TextLoader
.Column("Keys", keyType, 0)
1394
TextLoader
.Column[] columnsVector = new[]
1396
new
TextLoader
.Column("Value", valueType, 0, 3)
1398
TextLoader
.Column[] columnsScalar = new[]
1400
new
TextLoader
.Column("Value", valueType, 0)
1604
new
TextLoader
.Column("Label", dataKind, 0),
1605
new
TextLoader
.Column("Thickness", DataKind.Single, 1),
1762
var
loader = mlContext.Data.CreateTextLoader(
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)
1848
new
TextLoader
.Column("Scalar", dataKind, 6),
1849
new
TextLoader
.Column("Vector", dataKind, 1, 6),
1850
new
TextLoader
.Column("Label", DataKind.Boolean, 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 (2)
490
new[] { new
TextLoader
.Column("Label", DataKind.Boolean, 0),
491
new
TextLoader
.Column("Features", DataKind.Single, 1, 9) });
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (58)
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)
504
var
loader = mlContext.Data.CreateTextLoader(new[]
506
new
TextLoader
.Column("IsToxic", DataKind.Boolean, 0),
507
new
TextLoader
.Column("Message", DataKind.String, 1),
573
var
loader = mlContext.Data.CreateTextLoader(new[]
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 (4)
99
var
dataReader = mlContext.Data.CreateTextLoader(
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 (10)
175
var loader =
TextLoader
.Create(mlContext, new
TextLoader
.Options(), new MultiFileSource(dataFile));
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 (6)
22
var
reader = mlContext.Data.CreateTextLoader(columns: new[]
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 (6)
18
var
reader = mlContext.Data.CreateTextLoader(columns: new[]
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 (20)
22
var
reader = new TextLoader(mlContext, new
TextLoader
.Options()
26
new
TextLoader
.Column("Label", DataKind.Single, 0),
27
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(1, 4) }),
55
var
reader = new TextLoader(mlContext, new
TextLoader
.Options()
59
new
TextLoader
.Column("Label", DataKind.Single, 0),
60
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(1, 4) }),
91
var
reader = new TextLoader(mlContext, new
TextLoader
.Options()
95
new
TextLoader
.Column("Label", DataKind.Single, 0),
96
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(1, 4) }),
126
var
reader = new TextLoader(mlContext, new
TextLoader
.Options()
130
new
TextLoader
.Column("Label", DataKind.Single, 0),
131
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(1, 4) }),
ScenariosWithDirectInstantiation\IrisPlantClassificationTests.cs (6)
20
var
reader = mlContext.Data.CreateTextLoader(columns: new[]
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 (2)
506
var
loader = ML.Data.CreateTextLoader(new[] { new
TextLoader
.Column("Column", DataKind.Single, 0) });
TermEstimatorTests.cs (19)
56
var
loader = new TextLoader(ML, new
TextLoader
.Options
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 (61)
611
var
loader = mlContext.Data.CreateTextLoader(new
TextLoader
.Options(), new MultiFileSource(fileName));
746
dataIris = mlContext.Data.CreateTextLoader<Iris>(new
TextLoader
.Options() { Separator = ",", AllowQuoting = false }).Load(dataPath);
767
dataIrisStartEnd = mlContext.Data.CreateTextLoader<IrisStartEnd>(new
TextLoader
.Options() { Separator = ",", AllowQuoting = false }).Load(dataPath);
789
dataIrisColumnIndices = mlContext.Data.CreateTextLoader<IrisColumnIndices>(new
TextLoader
.Options() { Separator = ",", AllowQuoting = false }).Load(dataPath);
894
var
readerDecimalMarkerPeriod = new TextLoader(mlContext, new
TextLoader
.Options()
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) }),
930
TextLoader
.Options options = new
TextLoader
.Options()
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) })
952
var
readerDecimalMarkerComma = new TextLoader(mlContext, options);
989
TextLoader
.Options options = new
TextLoader
.Options()
993
new
TextLoader
.Column("Label", DataKind.UInt32, 0),
994
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(1, 4) })
1007
var
reader = new TextLoader(mlContext, options);
1041
var optionsPeriod = new
TextLoader
.Options()
1045
new
TextLoader
.Column("Label", DataKind.UInt32, 0),
1046
new
TextLoader
.Column("Features", DataKind.Single, new[] { new
TextLoader
.Range(1, 4) })
1051
var optionsComma = new
TextLoader
.Options()
1055
new
TextLoader
.Column("Label", DataKind.UInt32, 0),
1056
new
TextLoader
.Column("Features", DataKind.Single, new[] { new
TextLoader
.Range(1, 4) })
1277
var options = new
TextLoader
.Options()
1283
EscapeChar = useCustomEscapeChar ? '\\' :
TextLoader
.Defaults.EscapeChar,
1286
new
TextLoader
.Column("id", DataKind.Int32, 0),
1287
new
TextLoader
.Column("description", DataKind.String, 1),
1288
new
TextLoader
.Column("animal", DataKind.String, 2),
1389
var options = new
TextLoader
.Options()
1397
new
TextLoader
.Column("id", DataKind.Int32, 0),
1398
new
TextLoader
.Column("description", DataKind.String, 1),
1399
new
TextLoader
.Column("animal", DataKind.String, 2),
1429
var options = new
TextLoader
.Options()
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 (11)
89
private
TextLoader
.Options GetFafmBCLoaderArgs()
91
return new
TextLoader
.Options()
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 (9)
68
var
reader = new TextLoader(mlContext, GetLoaderArgs(labelColumnName, userColumnName, itemColumnName));
156
private
TextLoader
.Options GetLoaderArgs(string labelColumnName, string matrixColumnIndexColumnName, string matrixRowIndexColumnName)
158
return new
TextLoader
.Options()
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\MetalinearEstimators.cs (2)
78
var options = new
TextLoader
.Options()
83
var
loader = new TextLoader(Env, options: options);
TrainerEstimators\OneDalEstimators.cs (10)
40
var
loader = ML.Data.CreateTextLoader(columns: new[] {
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 (6)
17
new
TextLoader
.Options()
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 (2)
22
new
TextLoader
.Column("Label", DataKind.Single, 0),
23
new
TextLoader
.Column("Features", DataKind.Single, 1, 10)
TrainerEstimators\TrainerEstimators.cs (31)
30
var
reader = new TextLoader(Env, new
TextLoader
.Options()
36
new
TextLoader
.Column(featureColumn, DataKind.Single, new [] { new
TextLoader
.Range(1, 784) })
59
var
reader = new TextLoader(Env, new
TextLoader
.Options
65
new
TextLoader
.Column(featureColumn, DataKind.Single, new [] { new
TextLoader
.Range(1, 784) }),
66
new
TextLoader
.Column(weights, DataKind.Single, 0),
192
new
TextLoader
.Options()
199
new
TextLoader
.Column("Label", DataKind.Boolean, 0),
200
new
TextLoader
.Column("SentimentText", DataKind.String, 1),
201
new
TextLoader
.Column("LoggedIn", DataKind.Boolean, 2)
227
var data = new TextLoader(Env, new
TextLoader
.Options
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) })
250
new
TextLoader
.Options()
256
new
TextLoader
.Column("Label", DataKind.Single, 11),
257
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(0, 10) } )
262
private
TextLoader
.Options GetIrisLoaderArgs()
264
return new
TextLoader
.Options()
270
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(0, 3) }),
271
new
TextLoader
.Column("Label", DataKind.String, 4)
278
var data = new TextLoader(Env, new
TextLoader
.Options()
283
new
TextLoader
.Column("Features", DataKind.Single, new [] { new
TextLoader
.Range(0, 3) }),
284
new
TextLoader
.Column("Label", DataKind.String, 4)
Transformers\CategoricalHashTests.cs (4)
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 (2)
158
new
TextLoader
.Column("ScalarString", DataKind.String, 1),
159
new
TextLoader
.Column("VectorString", DataKind.String, 1, 4)
Transformers\ConcatTests.cs (28)
46
var
loader = new TextLoader(ML, new
TextLoader
.Options
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 } })
104
var
loader = new TextLoader(ML, new
TextLoader
.Options
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\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 (22)
56
var
loader = ML.Data.CreateTextLoader(new[] {
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) })
92
var
loader = ML.Data.CreateTextLoader(new[] {
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)
170
var
loader = ML.Data.CreateTextLoader(new[] {
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),
195
var
loader = ML.Data.CreateTextLoader(new[] {
196
new
TextLoader
.Column("Float4", DataKind.Single, 1, 4),
197
new
TextLoader
.Column("Float1", DataKind.Single, 2),
Transformers\ExpressionTransformerTests.cs (10)
24
var
loader = new TextLoader(ML, new
TextLoader
.Options
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 (25)
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 (9)
27
var
reader = new TextLoader(Env, new
TextLoader
.Options
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 (82)
37
var
loader = new TextLoader(Env, new
TextLoader
.Options
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 } }),
106
var
loader = new TextLoader(Env, new
TextLoader
.Options
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 } })
224
var
loader = new TextLoader(context, new
TextLoader
.Options
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 } })
471
var
loader = new TextLoader(Env, new
TextLoader
.Options
474
new
TextLoader
.Column("Label", DataKind.Single, 0),
475
new
TextLoader
.Column("float4", DataKind.Single, new[]{new
TextLoader
.Range(1, 4) }),
575
var
loader = new TextLoader(Env, new
TextLoader
.Options
578
new
TextLoader
.Column("Label", DataKind.Single, 0),
579
new
TextLoader
.Column("float4", DataKind.Single, new[]{new
TextLoader
.Range(1, 4) }),
633
var
loader = new TextLoader(Env, new
TextLoader
.Options
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)
874
var dataView =
TextLoader
.Create(ML, new
TextLoader
.Options(), new MultiFileSource(dataFile));
991
var
loader = new TextLoader(Env, new
TextLoader
.Options
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 (33)
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) },
558
var data =
TextLoader
.Create(ML, new
TextLoader
.Options()
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 (6)
30
new
TextLoader
.Options()
36
new
TextLoader
.Column("Label", DataKind.Boolean, 0),
37
new
TextLoader
.Column("SentimentText", DataKind.String, 1)
65
new
TextLoader
.Options()
71
new
TextLoader
.Column("Label", DataKind.Boolean, 0),
72
new
TextLoader
.Column("SentimentText", DataKind.String, 1)
Microsoft.ML.TimeSeries.Tests (1)
TimeSeriesDirectApi.cs (1)
540
new
TextLoader
.Column("Value", DataKind.Single, 0),
Microsoft.ML.TorchSharp.Tests (27)
NerTests.cs (8)
195
var labels = ML.Data.LoadFromTextFile(labelFilePath, new
TextLoader
.Column[]
197
new
TextLoader
.Column("Key", DataKind.String, 0)
202
var dataView =
TextLoader
.Create(ML, new
TextLoader
.Options()
206
new
TextLoader
.Column("Sentence", DataKind.String, 0),
207
new
TextLoader
.Column("Label", DataKind.String, new
TextLoader
.Range[]
209
new
TextLoader
.Range(1, null) { VariableEnd = true, AutoEnd = false }
ObjectDetectionTests.cs (8)
33
var data =
TextLoader
.Create(ML, new
TextLoader
.Options()
37
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
38
new
TextLoader
.Column("Labels", DataKind.String, 1),
39
new
TextLoader
.Column("Box", DataKind.String, 2)
92
var dataFiltered =
TextLoader
.Create(ML, new
TextLoader
.Options()
96
new
TextLoader
.Column("ImagePath", DataKind.String, 0),
QATests.cs (6)
73
IDataView dataView =
TextLoader
.Create(ML, new
TextLoader
.Options()
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 (5)
417
IDataView dataView =
TextLoader
.Create(ML, new
TextLoader
.Options()
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 (3)
Text\StopWordsRemovingTransformer.cs (3)
812
var options = new
TextLoader
.Options()
816
new
TextLoader
.Column(stopwordsCol, DataKind.String, 0)
820
var
textLoader = new TextLoader(Host, options: options, dataSample: fileSource);
Microsoft.ML.Vision (2)
ImageClassificationTrainer.cs (2)
27
using static Microsoft.ML.Data.
TextLoader
;
30
using Column = Microsoft.ML.Data.
TextLoader
.Column;