30 writes to Source
Microsoft.ML.AutoML (1)
ColumnInference\TextFileContents.cs (1)
69Source = new[] { new TextLoader.Range(0, null) }
Microsoft.ML.CodeGenerator.Tests (25)
CodeGenTests.cs (25)
145new TextLoader.Column(){ Name = "Label", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind = DataKind.Boolean }, 149new TextLoader.Column(){ Name = "id", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind = DataKind.Single }, 150new TextLoader.Column(){ Name = "country", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind = DataKind.Single }, 151new TextLoader.Column(){ Name = "Country", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind = DataKind.String } 155new TextLoader.Column(){ Name = "id", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind = DataKind.Int32 }, 156new TextLoader.Column(){ Name = "shape", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind = DataKind.Int32 }, 157new TextLoader.Column(){ Name = "Shape", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind = DataKind.String }, 158new TextLoader.Column(){ Name = "color", Source = new TextLoader.Range[]{new TextLoader.Range(3) }, DataKind = DataKind.String }, 159new TextLoader.Column(){ Name = "price", Source = new TextLoader.Range[]{new TextLoader.Range(4) }, DataKind = DataKind.Double }, 163new TextLoader.Column(){ Name = "vin", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind = DataKind.String }, 164new TextLoader.Column(){ Name = "make", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind = DataKind.String }, 165new TextLoader.Column(){ Name = "model", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind = DataKind.String }, 166new TextLoader.Column(){ Name = "color", Source = new TextLoader.Range[]{new TextLoader.Range(3) }, DataKind = DataKind.String }, 167new TextLoader.Column(){ Name = "MSRP", Source = new TextLoader.Range[]{new TextLoader.Range(4) }, DataKind = DataKind.Single }, 168new TextLoader.Column(){ Name = "engine size", Source = new TextLoader.Range[]{new TextLoader.Range(5) }, DataKind = DataKind.Double }, 169new TextLoader.Column(){ Name = "isElectric", Source = new TextLoader.Range[]{new TextLoader.Range(6) }, DataKind = DataKind.Boolean }, 173new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(0) }, DataKind = DataKind.String }, 174new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(1) }, DataKind = DataKind.String }, 175new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(2) }, DataKind = DataKind.Int32 }, 176new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(3) }, DataKind = DataKind.Int32 }, 177new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(4) }, DataKind = DataKind.Int32 }, 178new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(5) }, DataKind = DataKind.String }, 179new TextLoader.Column(){ Name = "var_num", Source = new TextLoader.Range[]{new TextLoader.Range(6) }, DataKind = DataKind.Int32 }, 180new TextLoader.Column(){ Name = "var_text", Source = new TextLoader.Range[]{new TextLoader.Range(7) }, DataKind = DataKind.String }, 181new 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)
99Source = source; 172private bool TryParseSource(string str) => TryParseSourceEx(str, out Source); 1600column.Source = mappingAttr.Sources.ToArray();
DataLoadSave\Text\TextSaver.cs (1)
519return new TextLoader.Column() { Name = name, KeyCount = keyCount, Source = source, Type = kind };
25 references to Source
Microsoft.ML.AutoML.Tests (7)
ColumnInferenceTests.cs (7)
36Assert.False(col.Source.Length > 1 || col.Source[0].Min != col.Source[0].Max); 62var labelCol = result.TextLoaderOptions.Columns.First(c => c.Source[0].Min == 14 && c.Source[0].Max == 14); 72var labelCol = result.TextLoaderOptions.Columns.First(c => c.Source[0].Min == DatasetUtil.IrisDatasetLabelColIndex && 73c.Source[0].Max == DatasetUtil.IrisDatasetLabelColIndex);
Microsoft.ML.CodeGenerator (5)
Utils.cs (5)
268int range = (column.Source[0].Max - column.Source[0].Min).Value; 292result.Add($"[ColumnName(\"{columnName}\"),LoadColumn({column.Source[0].Min}, {column.Source[0].Max}) VectorType({(range + 1)})]"); 297result.Add($"[ColumnName(\"{columnName}\"), LoadColumn({column.Source[0].Min})]");
Microsoft.ML.Data (13)
DataLoadSave\Text\TextLoader.cs (13)
198if (Utils.Size(Source) == 0) 221foreach (var src in Source) 239if (Utils.Size(Source) == 0) 242var sortedRanges = Source.OrderBy(x => x.Min).ToList(); 653Contracts.ExceptUserArg(nameof(Column.Source), "Intervals specified for column '{0}' overlap", name) : 718if (Utils.Size(col.Source) == 0) 719throw ch.ExceptUserArg(nameof(Column.Source), "Must specify some source column indices"); 720if (!needInputSize && col.Source.Any(r => r.AutoEnd && r.Max == null)) 741throw ch.ExceptUserArg(nameof(Column.Source), "Can't determine the number of source columns without valid data"); 744throw ch.ExceptUserArg(nameof(Column.Source), "The size of input lines is not consistent"); 782ch.Assert(Utils.Size(col.Source) > 0); 784var segs = new Segment[col.Source.Length]; 787var range = col.Source[i];