30 writes to Source
Microsoft.ML.AutoML (1)
ColumnInference\TextFileContents.cs (1)
69
Source
= new[] { new TextLoader.Range(0, null) }
Microsoft.ML.CodeGenerator.Tests (25)
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.Data (4)
DataLoadSave\Text\TextLoader.cs (3)
99
Source
= source;
172
private bool TryParseSource(string str) => TryParseSourceEx(str, out
Source
);
1600
column.
Source
= mappingAttr.Sources.ToArray();
DataLoadSave\Text\TextSaver.cs (1)
519
return new TextLoader.Column() { Name = name, KeyCount = keyCount,
Source
= source, Type = kind };
25 references to Source
Microsoft.ML.AutoML.Tests (7)
ColumnInferenceTests.cs (7)
36
Assert.False(col.
Source
.Length > 1 || col.
Source
[0].Min != col.
Source
[0].Max);
62
var labelCol = result.TextLoaderOptions.Columns.First(c => c.
Source
[0].Min == 14 && c.
Source
[0].Max == 14);
72
var labelCol = result.TextLoaderOptions.Columns.First(c => c.
Source
[0].Min == DatasetUtil.IrisDatasetLabelColIndex &&
73
c.
Source
[0].Max == DatasetUtil.IrisDatasetLabelColIndex);
Microsoft.ML.CodeGenerator (5)
Utils.cs (5)
268
int range = (column.
Source
[0].Max - column.
Source
[0].Min).Value;
292
result.Add($"[ColumnName(\"{columnName}\"),LoadColumn({column.
Source
[0].Min}, {column.
Source
[0].Max}) VectorType({(range + 1)})]");
297
result.Add($"[ColumnName(\"{columnName}\"), LoadColumn({column.
Source
[0].Min})]");
Microsoft.ML.Data (13)
DataLoadSave\Text\TextLoader.cs (13)
198
if (Utils.Size(
Source
) == 0)
221
foreach (var src in
Source
)
239
if (Utils.Size(
Source
) == 0)
242
var sortedRanges =
Source
.OrderBy(x => x.Min).ToList();
653
Contracts.ExceptUserArg(nameof(Column.
Source
), "Intervals specified for column '{0}' overlap", name) :
718
if (Utils.Size(col.
Source
) == 0)
719
throw ch.ExceptUserArg(nameof(Column.
Source
), "Must specify some source column indices");
720
if (!needInputSize && col.
Source
.Any(r => r.AutoEnd && r.Max == null))
741
throw ch.ExceptUserArg(nameof(Column.
Source
), "Can't determine the number of source columns without valid data");
744
throw ch.ExceptUserArg(nameof(Column.
Source
), "The size of input lines is not consistent");
782
ch.Assert(Utils.Size(col.
Source
) > 0);
784
var segs = new Segment[col.
Source
.Length];
787
var range = col.
Source
[i];