1 write to Name
Microsoft.ML.DataView (1)
DataViewSchema.cs (1)
112Name = name;
437 references to Name
DnnAnalyzer (1)
DnnAnalyzer.cs (1)
37var name = schema[i].Name;
Microsoft.Data.Analysis (15)
IDataView.Extension.cs (15)
60if (dataViewColumn.IsHidden || (selectColumnsSet != null && !selectColumnsSet.Contains(dataViewColumn.Name))) 69dataFrameColumns.Add(new BooleanDataFrameColumn(dataViewColumn.Name)); 73dataFrameColumns.Add(new DateTimeDataFrameColumn(dataViewColumn.Name)); 77dataFrameColumns.Add(new ByteDataFrameColumn(dataViewColumn.Name)); 81dataFrameColumns.Add(new DoubleDataFrameColumn(dataViewColumn.Name)); 85dataFrameColumns.Add(new SingleDataFrameColumn(dataViewColumn.Name)); 89dataFrameColumns.Add(new Int32DataFrameColumn(dataViewColumn.Name)); 93dataFrameColumns.Add(new Int64DataFrameColumn(dataViewColumn.Name)); 97dataFrameColumns.Add(new SByteDataFrameColumn(dataViewColumn.Name)); 101dataFrameColumns.Add(new Int16DataFrameColumn(dataViewColumn.Name)); 105dataFrameColumns.Add(new UInt32DataFrameColumn(dataViewColumn.Name)); 109dataFrameColumns.Add(new UInt64DataFrameColumn(dataViewColumn.Name)); 113dataFrameColumns.Add(new UInt16DataFrameColumn(dataViewColumn.Name)); 117dataFrameColumns.Add(new StringDataFrameColumn(dataViewColumn.Name)); 121dataFrameColumns.Add(GetVectorDataFrame(vectorType, dataViewColumn.Name));
Microsoft.Data.Analysis.Tests (48)
DataFrameIDataViewTests.cs (36)
27Assert.Equal("Byte", preview.ColumnView[0].Column.Name); 31Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); 35Assert.Equal("Double", preview.ColumnView[2].Column.Name); 39Assert.Equal("Float", preview.ColumnView[3].Column.Name); 43Assert.Equal("Int", preview.ColumnView[4].Column.Name); 47Assert.Equal("Long", preview.ColumnView[5].Column.Name); 51Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); 55Assert.Equal("Short", preview.ColumnView[7].Column.Name); 59Assert.Equal("Uint", preview.ColumnView[8].Column.Name); 63Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); 67Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); 71Assert.Equal("String", preview.ColumnView[11].Column.Name); 75Assert.Equal("Char", preview.ColumnView[12].Column.Name); 79Assert.Equal("DateTime", preview.ColumnView[13].Column.Name); 83Assert.Equal("Bool", preview.ColumnView[14].Column.Name); 87Assert.Equal("ArrowString", preview.ColumnView[15].Column.Name); 91Assert.Equal("VBuffer", preview.ColumnView[16].Column.Name); 114Assert.Equal("Bool", schema[0].Name); 120Assert.Equal("BoolClone", schema[1].Name); 133Assert.Equal("Byte", preview.ColumnView[0].Column.Name); 140Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); 147Assert.Equal("Double", preview.ColumnView[2].Column.Name); 154Assert.Equal("Float", preview.ColumnView[3].Column.Name); 161Assert.Equal("Int", preview.ColumnView[4].Column.Name); 168Assert.Equal("Long", preview.ColumnView[5].Column.Name); 175Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); 182Assert.Equal("Short", preview.ColumnView[7].Column.Name); 189Assert.Equal("Uint", preview.ColumnView[8].Column.Name); 196Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); 203Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); 210Assert.Equal("String", preview.ColumnView[11].Column.Name); 217Assert.Equal("Char", preview.ColumnView[12].Column.Name); 224Assert.Equal("DateTime", preview.ColumnView[13].Column.Name); 231Assert.Equal("Bool", preview.ColumnView[14].Column.Name); 238Assert.Equal("ArrowString", preview.ColumnView[15].Column.Name); 245Assert.Equal("VBuffer", preview.ColumnView[16].Column.Name);
DataFrameTests.cs (12)
666Assert.Equal(First.Name, Second.Name); 670Assert.Equal(First.Name, "Prefix_" + Second.Name); 678Assert.Equal("Prefix_" + First.Name, Second.Name); 685Assert.Equal(First.Name, "Prefix_" + Second.Name); 689Assert.Equal("Prefix_" + First.Name + "_Suffix", Second.Name); 697Assert.Equal("Prefix_" + First.Name + "_Suffix", Second.Name);
Microsoft.ML.AutoML (23)
API\AutoCatalog.cs (5)
828var textFeatureColumnNames = textFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 829var numericFeatureColumnNames = numericFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 830var catalogFeatureColumnNames = catalogFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 831var imagePathColumnNames = imagePathFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 832var booleanFeatureColumnNames = booleanFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray();
ColumnInference\ColumnInferenceApi.cs (1)
86purposeResults = purposeInferenceResult.Select(p => (dataView.Schema[p.ColumnIndex].Name, p.Purpose));
ColumnInference\PurposeInference.cs (2)
74_columnName = new Lazy<string>(() => _data.Schema[_columnId].Name); 260var columnPurpose = columnInfo.GetColumnPurpose(column.Name);
Utils\DatasetColumnInfo.cs (1)
35var col = new DatasetColumnInfo(schemaCol.Name, schemaCol.Type, purposes[i].Purpose, colDimensions[i]);
Utils\SplitUtil.cs (3)
16var originalColumnNames = trainData.Schema.Select(c => c.Name); 52var originalColumnNames = trainData.Schema.Select(c => c.Name); 61var allColumns = data.Schema.Select(c => c.Name);
Utils\UserInputValidationUtil.cs (11)
83if (column.Name == DefaultColumnNames.Features && column.Type.GetItemType() != NumberDataViewType.Single) 88if ((column.Name != columnInformation.LabelColumnName && 89column.Name != columnInformation.UserIdColumnName && 90column.Name != columnInformation.ItemIdColumnName && 91column.Name != columnInformation.GroupIdColumnName) 99$"Please change the feature column {column.Name} of type {column.Type} to one of " + 214var validCol = validationData.Schema.GetColumnOrNull(trainCol.Name); 217throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' exists in train data, but not in validation data.", nameof(validationData)); 222throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' is of type {trainCol.Type} in train data, and type " + 290var editDistance = StringEditDistance.GetLevenshteinDistance(column.Name, columnName); 294closestNamed = column.Name;
Microsoft.ML.AutoML.Tests (12)
AutoFitTests.cs (8)
337var originalColumnNames = trainData.Schema.Select(c => c.Name); 364var originalColumnNames = trainData.Schema.Select(c => c.Name); 465Assert.True(col.Name == expectedOutputNames[col.Index]); 548Assert.True(col.Name == expectedOutputNames[col.Index]); 634Assert.Equal(col.Name, resTrainTest.Schema[col.Index].Name); 635Assert.Equal(col.Name, resCV.Schema[col.Index].Name);
UserInputValidationTests.cs (3)
60var originalColumnName = _data.Schema.First().Name; 401var originalColumnName = _data.Schema.First().Name; 416var originalColumnName = _data.Schema.First().Name;
Utils\MLNetUtils\DataViewTestFixture.cs (1)
20return BuildDummyDataView(schema.Select(c => (c.Name, c.Type)), createDummyRow);
Microsoft.ML.CodeGenerator (3)
Utils.cs (3)
55col => col.Name != columnInference.ColumnInformation.LabelColumnName && 56!columnInference.ColumnInformation.IgnoredColumnNames.Contains(col.Name)); 63List<string> normalizedColumnNames = GenerateColumnNames(featureColumns.Select(column => column.Name).ToList());
Microsoft.ML.Core (4)
Data\IEstimator.cs (2)
192mCols.Add(new Column(annotationColumn.Name, mVecKind, mItemType, mIsKey)); 197cols.Add(new Column(schema[iCol].Name, vecKind, itemType, isKey, annotations));
Data\RoleMappedSchema.cs (2)
279yield return new KeyValuePair<ColumnRole, string>(roleAndList.Key, info.Name); 292yield return new KeyValuePair<ColumnRole, string>(role, info.Name);
Microsoft.ML.Core.Tests (14)
UnitTests\ScoreSchemaTest.cs (7)
48Assert.Equal(AnnotationUtils.Const.ScoreValueKind.PredictedLabel, scoreColumn.Name); 61Assert.Equal(AnnotationUtils.Kinds.KeyValues, scoreMetadata.Schema[0].Name); 62Assert.Equal(AnnotationUtils.Kinds.ScoreColumnKind, scoreMetadata.Schema[1].Name); 63Assert.Equal(AnnotationUtils.Kinds.ScoreValueKind, scoreMetadata.Schema[2].Name); 105Assert.Equal(AnnotationUtils.Const.ScoreValueKind.PredictedLabel, scoreColumn.Name); 118Assert.Equal(AnnotationUtils.Kinds.ScoreColumnKind, scoreMetadata.Schema[0].Name); 119Assert.Equal(AnnotationUtils.Kinds.ScoreValueKind, scoreMetadata.Schema[1].Name);
UnitTests\TestEntryPoints.cs (2)
4849Assert.Equal(expected[i], schema[i].Name); 6575Assert.Equal("Softmax", schema[2].Name);
UnitTests\TestModelLoad.cs (5)
33Assert.Equal("Image", result.Schema[0].Name); 34Assert.Equal("Class", result.Schema[1].Name); 51Assert.Equal("Label", result.Schema[0].Name); 52Assert.Equal("Features", result.Schema[1].Name); 53Assert.Equal("Features", result.Schema[2].Name);
Microsoft.ML.Data (141)
Commands\DataCommand.cs (1)
165var nameOfMetric = "TLC_" + cursor.Schema[currentIndex].Name;
Commands\SaveDataCommand.cs (2)
154ch.Info(MessageSensitivity.Schema, "The column '{0}' will not be written as it has unsavable column type.", data.Schema[i].Name); 216ch.Info(MessageSensitivity.Schema, "The column '{0}' will not be written as it has unsavable column type.", view.Schema[i].Name);
Commands\ScoreCommand.cs (3)
196loader.Schema[i].Name); 222switch (schema[i].Name) 232if (ImplOptions.OutputColumns != null && Array.FindIndex(ImplOptions.OutputColumns, schema[i].Name.Equals) >= 0)
Commands\ShowSchemaCommand.cs (5)
139var name = schema[col].Name; 191foreach (var metaColumn in schema[col].Annotations.Schema.OrderBy(mcol => mcol.Name)) 194itw.Write("Metadata '{0}': {1}", metaColumn.Name, type); 198ShowMetadataValue(itw, schema, col, metaColumn.Name, type); 200ShowMetadataValueVec(itw, schema, col, metaColumn.Name, vectorType);
DataDebuggerPreview.cs (2)
76rowInfo.Values[col] = new KeyValuePair<string, object>(column.Name, value); 105public override string ToString() => $"{Column.Name}: {Column.Type}";
DataLoadSave\Binary\BinarySaver.cs (10)
283_host.Check(!string.IsNullOrEmpty(metaColumn.Name), "Metadata with null or empty kind detected, disallowed"); 285if (!kinds.Add(metaColumn.Name)) 286throw _host.Except("Metadata with duplicate kind '{0}' encountered, disallowed", metaColumn.Name, schema[col].Name); 287args[3] = metaColumn.Name; 294metaColumn.Type, schema[col].Name, col, metaColumn.Name); 299metadataInfos.Add(Tuple.Create(metaColumn.Name, codec, (CompressionKind)args[5])); 515string name = sourceSchema[active.SourceIndex].Name; 721throw _host.Except("Could not get codec for requested column {0} of type {1}", schema[c].Name, type);
DataLoadSave\LegacyCompositeDataLoader.cs (1)
609Schema[col].Name);
DataLoadSave\Text\TextSaver.cs (2)
231_columnName = column.Name; 477string name = schema[src].Name;
DataLoadSave\Transpose\TransposeLoader.cs (1)
644Schema[col].Name);
DataLoadSave\Transpose\TransposeSaver.cs (1)
153viewAction(data.Schema[col].Name, new TransposerUtils.SlotDataView(_host, data, col));
DataView\AppendRowsDataView.cs (2)
117string name = Schema[c].Name; 123_host.Check(schema[c].Name == name, errMsg);
DataView\CacheDataView.cs (1)
151schema[c].Name, type);
DataView\CompositeRowToRowMapper.cs (1)
69throw Contracts.ExceptParam(nameof(input), $"Mapper required column '{input.Schema[c].Name}' active but it was not.");
DataView\DataViewConstructionUtils.cs (3)
70var name = col.Name; 86var info = Utils.MarshalInvoke(_getAnnotationInfoMethodInfo, annotation.Type.RawType, annotation.Name, annotations); 87schemaDefinitionCol.AddAnnotation(annotation.Name, info);
DataView\DataViewExtensions.cs (2)
26Contracts.Assert(dv.Schema[col.Index].Equals(col), $"The requested column named: {col.Name}, with index: {col.Index} and type: {col.Type}" + 41Contracts.Assert(dv.Schema[columnNeeded.Index].Equals(columnNeeded), $"The requested column named: {columnNeeded.Name}, with index: {columnNeeded.Index} and type: {columnNeeded.Type}" +
DataView\RowToRowMapperTransform.cs (1)
260Host.Assert(column.Index < activeArr.Length, $"The columns {activeColumns.Select(c => c.Name)} are not suitable for the OutputSchema.");
DataView\Transposer.cs (10)
114_nameToICol[(_cols[c] = schema[columns[c]]).Name] = c; 141throw ch.ExceptParam(nameof(view), "Column named '{0}' is not serializable by the transposer", _cols[c].Name); 143throw ch.ExceptParam(nameof(view), "Column named '{0}' is vector, but not of known size, and so cannot be transposed", _cols[c].Name); 242throw _host.ExceptParam(nameof(col), "Bad call to GetSlotCursor on untransposable column '{0}'", _tview.Schema[col].Name); 766nameToCol[_input.Schema[toSlice[c]].Name] = outputColumnCount - 1; 1018schemaBuilder.AddColumn(selectedColumn.Name, selectedColumn.Type, selectedColumn.Annotations); 1112schemaBuilder.AddColumn(selectedColumn.Name, _types[c]); 1348throw Contracts.Except("Could not get single value on column '{0}' because there are no slots", view.Schema[col].Name); 1351throw Contracts.Except("Could not get single value on column '{0}' because there is more than one slot", view.Schema[col].Name); 1437builder.AddColumn(_data.Schema[_col].Name, _type);
Dirty\ChooseColumnsByIndexTransform.cs (1)
117schemaBuilder.AddColumn(selectedColumn.Name, selectedColumn.Type, selectedColumn.Annotations);
Evaluators\AnomalyDetectionEvaluator.cs (4)
100throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString()); 726using (var cursor = overall.GetRowCursor(overall.Schema.Where(col => col.Name.Equals(AnomalyDetectionEvaluator.OverallMetrics.NumAnomalies) || 727(hasStrat && col.Name.Equals(MetricKinds.ColumnNames.StratCol))))) 798yield return scoreCol.Name;
Evaluators\BinaryClassifierEvaluator.cs (7)
132throw host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString()); 148throw host.ExceptSchemaMismatch(nameof(schema), "probability", prob[0].Name, "Single", probType.ToString()); 198var probCol = Utils.Size(probInfos) > 0 ? probInfos[0].Name : null; 199return new BinaryPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, probCol, schema.Label.Value.Name, _threshold, _useRaw); 1351cols = AnnotationUtils.Prepend(cols, RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Probability, probCol.Value.Name)); 1481yield return scoreCol.Name; 1487yield return probCol.Value.Name;
Evaluators\ClusteringEvaluator.cs (2)
109throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "known-size vector of Single", type.ToString()); 149return new ClusteringPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, numClusters);
Evaluators\EvaluatorBase.cs (1)
118list.Add(AggregatorDictionaryBase.Create(schema, stratCol.Name, stratCol.Type, createAgg));
Evaluators\EvaluatorUtils.cs (12)
232/// returns its <see cref="DataViewSchema.Column.Name"/>. Otherwise, returns <paramref name="def"/>. 241return info?.Name ?? def; 343yield return new KeyValuePair<string, double>(schema[i].Name, metricVal); 363var colName = schema[i].Name; 403var inputColName = input.Schema[0].Name; 445var inputColName = input.Schema[inputCol].Name; 834var name = dv.Schema[i].Name; 949if (schema[i].IsHidden && schema[i].Name == colName) 1010var metricName = row.Schema[i].Name; 1231var name = schema[i].Name; 1786data = ColumnSelectingTransformer.CreateDrop(env, data, data.Schema[stratCol].Name, data.Schema[stratVal].Name);
Evaluators\MamlEvaluator.cs (1)
139yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name);
Evaluators\MulticlassClassificationEvaluator.cs (3)
80throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "vector of two or more items of type Single", score.Type.ToString()); 615: base(env, schema, scoreColumn.Name, labelCol) 986idv.Schema[col].Name.Equals(MulticlassClassificationEvaluator.PerClassLogLoss))
Evaluators\MultiOutputRegressionEvaluator.cs (4)
55return new MultiOutputRegressionPerInstanceEvaluator(Host, schema.Schema, scoreCol.Name, schema.Label.Value.Name); 63throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "known-size vector of Single", score.Type.ToString()); 652yield return scoreCol.Name; 756sb.AppendFormat("{0}{1,12}:", isWeighted ? "Weighted " : "", fold.Schema[i].Name);
Evaluators\QuantileRegressionEvaluator.cs (4)
53return new QuantileRegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Value.Name, scoreSize, quantiles); 61throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Vector of Single or Double", score.Type.ToString()); 519var name = data.Schema[i].Name; 548yield return scoreCol.Name;
Evaluators\RankingEvaluator.cs (2)
108"score", scoreCol.Name, "Single", t.ToString()); 951yield return scoreCol.Name;
Evaluators\RegressionEvaluator.cs (3)
60throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString()); 77return new RegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Value.Name); 370yield return scoreCol.Name;
Model\Pfa\BoundPfaContext.cs (1)
70string name = schema[c].Name;
Model\Pfa\SavePfaCommand.cs (1)
192var name = end.Schema[i].Name;
Prediction\CalibratorCatalog.cs (4)
268var scoreName = InputSchema[_scoreColIndex].Name; 294builder.Add(setIdCol.Name, setIdType, annotation.GetGetter<uint>(setIdCol)); 301builder.Add(kindCol.Name, kindCol.Type, annotation.GetGetter<ReadOnlyMemory<char>>(kindCol)); 302builder.Add(valueKindCol.Name, valueKindCol.Type, annotation.GetGetter<ReadOnlyMemory<char>>(valueKindCol));
Scorers\BinaryClassifierScorer.cs (1)
199string scoreColumn = Bindings.RowMapper.OutputSchema[Bindings.ScoreColumnIndex].Name;
Scorers\FeatureContributionCalculation.cs (1)
390yield return RoleMappedSchema.ColumnRole.Feature.Bind(FeatureColumn.Name);
Scorers\MulticlassClassificationScorer.cs (1)
333builder.AddColumn(partialSchema[i].Name, partialSchema[i].Type, meta.ToAnnotations());
Scorers\PredictedLabelScorerBase.cs (3)
105string scoreCol = RowMapper.OutputSchema[ScoreColumnIndex].Name; 162ctx.SaveNonEmptyString(RowMapper.OutputSchema[ScoreColumnIndex].Name); 186yield return new KeyValuePair<string, DataViewType>(sch[i].Name, sch[i].Type);
Scorers\RowToRowScorerBase.cs (2)
375res[dst++] = schema[i].Name + suffix; 441foreach (var pair in Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)))
Scorers\SchemaBindablePredictorWrapper.cs (2)
550yield return (InputRoleMappedSchema.Feature.HasValue) ? RoleMappedSchema.ColumnRole.Feature.Bind(InputRoleMappedSchema.Feature?.Name) : RoleMappedSchema.ColumnRole.Label.Bind(InputRoleMappedSchema.Label?.Name);
Scorers\ScoreSchemaFactory.cs (2)
58schemaBuilder.AddColumn(partialSchema[0].Name, partialSchema[0].Type, partialSchema[0].Annotations); 103schemaBuilder.AddColumn(partialSchema[0].Name, partialSchema[0].Type, metadataBuilder.ToAnnotations());
Transforms\ColumnBindingsBase.cs (5)
361var str = input[colHidden].Name; 494return Input[index].Name; 516return Input[index].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)); 691namesUsed.Add(input[i].Name); 708var colName = indices[j] >= 0 ? input[indices[j]].Name : addedColumns[~indices[j]].Name;
Transforms\ColumnConcatenatingTransformer.cs (2)
637var colName = _inputSchema[colSrc].Name; 719input.Schema[SrcIndices[i]].Name, vectorType.Size, tmpBufs[i].Length)
Transforms\ColumnSelecting.cs (8)
475if (!IgnoreMissing && !IsSchemaValid(inputSchema.Select(x => x.Name), 494if (!IgnoreMissing && !IsSchemaValid(inputSchema.Select(x => x.Name), 512if (!IgnoreMissing && !IsSchemaValid(input.Schema.Select(x => x.Name), 572var columnName = inputSchema[colIdx].Name; 605if (selectedColumns.Contains(inputSchema[colIdx].Name)) 743if (!ctx.ContainsColumn(srcCol.Name) || dstCol.IsHidden) 746var srcVariable = ctx.GetVariableName(srcCol.Name); 747var dstVariable = ctx.AddIntermediateVariable(dstCol.Type, dstCol.Name);
Transforms\MetadataDispatcher.cs (1)
236foreach (var kvp in info.SchemaSrc[info.IndexSrc].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)))
Transforms\NAFilter.cs (1)
183ctx.SaveNonEmptyString(Source.Schema[info.Index].Name);
Transforms\RangeFilter.cs (1)
192ctx.SaveNonEmptyString(Source.Schema[_index].Name);
Transforms\TransformBase.cs (5)
425ctx.SaveNonEmptyString(Input[info.Source].Name); 554Source = transform.Source.Schema[x.Source].Name, 584var srcName = Source.Schema[info.Source].Name; 611string inputColumnName = Source.Schema[info.Source].Name; 775OutputSchema[col].Name);
Transforms\ValueMapping.cs (4)
438_dataView = GetBytesFromDataView(Host, lookupMap, lookupKeyColumn.Name, lookupValueColumn.Name); 446column = dataView.Schema.GetColumnOrNull(keyColumn.Name); 454column = dataView.Schema.GetColumnOrNull(valueColumn.Name);
Utilities\ColumnCursor.cs (4)
37Contracts.CheckNonEmpty(column.Name, nameof(column)); 41var colName = column.Name; 45if (data.Schema[colIndex].Name != colName || data.Schema[colIndex].Type != colType) 95column.Name, column.Type, nameof(data), typeof(T)));
Microsoft.ML.DataView (9)
DataViewSchema.cs (8)
122null : $" {{{string.Join(", ", Annotations.Schema.Select(x => x.Name))}}}"; 123return $"{Name}: {Type}{annotationsString}"; 163Name = column.Name; 245public override string ToString() => string.Join(", ", Schema.Select(x => x.Name)); 281if (selector(column.Name)) 282_items.Add((column.Name, column.Type, annotations.GetGetterInternal(column.Index), column.Annotations)); 413AddColumn(column.Name, column.Type, column.Annotations); 457_nameMap[_columns[i].Name] = i;
SchemaDebuggerProxy.cs (1)
44var name = column.Name;
Microsoft.ML.Ensemble (4)
Selector\SubModelSelector\BaseSubModelSelector.cs (4)
111yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name); 116yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Probability, probCol.Value.Name); 122yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name); 128yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name);
Microsoft.ML.EntryPoints (8)
CrossValidationMacro.cs (1)
399idv.Schema[col].Name.Equals(MetricKinds.ColumnNames.Count))
FeatureCombiner.cs (6)
165if (!featNames.Add(col.Name)) 176concatNames.Add(new KeyValuePair<string, string>(col.Name, colName)); 177Utils.Add(ref ktv, new KeyToVectorMappingEstimator.ColumnOptions(colName, col.Name)); 187concatNames.Add(new KeyValuePair<string, string>(col.Name, colName)); 188Utils.Add(ref cvt, new TypeConvertingEstimator.ColumnOptions(colName, DataKind.Single, col.Name)); 193ch.Error("The type of column '{0}' is not valid as a training feature: {1}", col.Name, col.Type);
ScoreColumnSelector.cs (1)
52var columnName = schema[i].Name;
Microsoft.ML.Fairlearn (9)
Metrics\FairlearnMetricCatalog.cs (9)
64return _eval.GetColumn<string>(sensitiveCol.Name); 68var convertToString = _context.Transforms.Conversion.ConvertType(sensitiveCol.Name, sensitiveCol.Name, DataKind.String); 71return data.GetColumn<string>(sensitiveCol.Name); 194var columns = new StringDataFrameColumn(column.Name); 199var primitiveColumn = new BooleanDataFrameColumn(column.Name); 205var primitiveColumn = new Int32DataFrameColumn(column.Name); 211var primitiveColumn = new SingleDataFrameColumn(column.Name); 219var columns = new StringDataFrameColumn(column.Name, 0);
Microsoft.ML.FastTree (4)
TreeEnsembleFeaturizationTransformer.cs (3)
45string nameErrorMessage = $"The column called {inspectedFeatureColumn.Name} does not match the expected " + 49Host.Check(_featureDetachedColumn.Name == inspectedFeatureColumn.Name, nameErrorMessage); 51string typeErrorMessage = $"The column called {inspectedFeatureColumn.Name} has a type {inspectedFeatureColumn.Type}, " +
TreeEnsembleFeaturizer.cs (1)
359yield return RoleMappedSchema.ColumnRole.Feature.Bind(FeatureColumn.Name);
Microsoft.ML.IntegrationTests (8)
Common.cs (5)
49Assert.True(types.ContainsKey(column.Name)); 50Assert.Equal(1, ++counts[column.Name]); 51Assert.Equal(types[column.Name], column.Type.RawType); 110Assert.Equal(schemaPair.Item1.Name, schemaPair.Item2.Name);
Debugging.cs (3)
120columnNames[i++] = column.Name; 140Assert.Equal("Label", column.Name); 142Assert.Equal(HousingRegression.Features[i - 1], column.Name);
Microsoft.ML.OnnxConverter (12)
OnnxExportExtensions.cs (2)
31if (!outputColumnNamesToKeep.Contains(sink.Schema[i].Name)) 33outputColumnNamesToDrop.Add(sink.Schema[i].Name);
SaveOnnxCommand.cs (10)
173string colName = inputData.Schema[i].Name; 196var idataviewColumnName = column.Name; 229string labelEncoderInputName = $"mlnet.{column.Name}.unusedInput"; 230string labelEncoderOutputName = $"mlnet.{column.Name}.unusedOutput"; 231string labelEncoderNodeName = $"mlnet.{column.Name}.SlotNames"; 266inputKeyDataViewTypeColumnsNames.Add(col.Name); 272if (outputColumnNames.Contains(col.Name)) 275passThroughColumnNames.Remove(col.Name); 281passThroughColumnNames.Add(col.Name); 283outputColumnNames.Add(col.Name);
Microsoft.ML.OnnxTransformer (2)
OnnxTransform.cs (2)
852_colName = input.Schema[colIndex].Name; 880_colName = input.Schema[colIndex].Name;
Microsoft.ML.PCA (1)
PcaTransformer.cs (1)
504ValidatePcaInput(Host, inputSchema[srcCol].Name, inputSchema[srcCol].Type);
Microsoft.ML.Predictor.Tests (9)
TestPredictors.cs (6)
700var cols = scored.Schema.Where(c => c.Name.Equals("Score") || c.Name.Equals("Probability") || c.Name.Equals("PredictedLabel")); 881var cols = scored.Schema.Where(c => c.Name.Equals("Score") || c.Name.Equals("Probability") || c.Name.Equals("PredictedLabel"));
TestTransposer.cs (3)
73Assert.Equal(view.Schema[viewCol].Name, trans.Schema[col].Name); 76string desc = string.Format("Column {0} named '{1}'", col, trans.Schema[col].Name);
Microsoft.ML.Recommender (4)
MatrixFactorizationPredictor.cs (2)
351_matrixColumnIndexColumnName = matrixColumnList[0].Name; 354_matrixRowIndexColumnName = matrixRowList[0].Name;
RecommenderUtils.cs (2)
70throw Contracts.ExceptDecode(format, col.Name, role.Value, col.Type); 71throw Contracts.Except(format, col.Name, role.Value, col.Type);
Microsoft.ML.Samples (3)
Dynamic\DataOperations\LoadingSvmLight.cs (1)
85Console.WriteLine($"Column {col.Name} type {col.Type}");
Dynamic\Trainers\Regression\LightGbmAdvanced.cs (1)
36.Select(column => column.Name) // Get the column names
Dynamic\Trainers\Regression\LightGbmWithOptionsAdvanced.cs (1)
37.Select(column => column.Name) // Get the column names
Microsoft.ML.Samples.OneDal (2)
Program.cs (2)
57if (columnsEnumerator.Current.Name != labelName) 58featuresList.Add(columnsEnumerator.Current.Name);
Microsoft.ML.StandardTrainers (1)
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (1)
87var inputFeatureColumns = _columns.Select(c => new KeyValuePair<RoleMappedSchema.ColumnRole, string>(RoleMappedSchema.ColumnRole.Feature, c.Name)).ToList();
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
644Assert.Equal(name.ToString(), schema[i].Name);
Microsoft.ML.TestFramework (8)
DataPipe\TestDataPipe.cs (3)
1193Assert.Equal("Foo", view.Schema[0].Name); 1194Assert.Equal("Bar", view.Schema[1].Name); 1195Assert.Equal("Biz", view.Schema[2].Name);
DataPipe\TestDataPipeBase.cs (5)
482if (metaColumn.Name == null || metaColumn.Type == null) 487if (!hs.Add(metaColumn.Name)) 489Fail("Duplicate metadata type: {0}", metaColumn.Name); 492if (metaColumn.Name == AnnotationUtils.Kinds.SlotNames) 502if (metaColumn.Name == AnnotationUtils.Kinds.KeyValues)
Microsoft.ML.TestFrameworkCommon (2)
TestCommon.cs (2)
94string name1 = sch1[col].Name; 95string name2 = sch2[col].Name;
Microsoft.ML.Tests (61)
FakeSchemaTest.cs (3)
38Assert.Equal("A", columnA.Name); 42Assert.Equal("B", columnB.Name); 46Assert.Equal("C", columnC.Name);
Scenarios\Api\TestApi.cs (5)
232Assert.True(idv.Schema[0].Annotations.Schema[0].Name == kindFloat); 234Assert.True(idv.Schema[0].Annotations.Schema[1].Name == kindString); 238Assert.True(idv.Schema[1].Annotations.Schema[0].Name == kindStringArray); 338Assert.Equal(col.Name, split.Schema[col.Index].Name);
TextLoaderTests.cs (2)
753Assert.Equal("SepalLength", previewIris.Schema[0].Name); 851Assert.Equal("SepalLength", previewIris.Schema[0].Name);
TrainerEstimators\MatrixFactorizationTests.cs (1)
116Assert.True(col.Name == expectedOutputNames[col.Index]);
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (3)
60Assert.Equal(treesColumnName, treeValuesColumn.Name); 78Assert.Equal(leavesColumnName, treeLeafIdsColumn.Name); 101Assert.Equal(pathsColumnName, treePathIdsColumn.Name);
Transformers\CategoricalHashTests.cs (10)
143Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 149Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 156Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 181Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 191Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 197Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 203Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 208Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
Transformers\CategoricalTests.cs (12)
221Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 227Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 234Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 240Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 247Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 257Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 267Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 273Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 279Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 285Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 292Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 298Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
Transformers\ConvertTests.cs (2)
352Assert.Equal(result.Schema["ConvA"].Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 359Assert.Equal(result.Schema["ConvB"].Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues });
Transformers\HashTests.cs (3)
87Assert.Equal(AnnotationUtils.Kinds.KeyValues, column.Annotations.Schema.Single().Name); 92Assert.Equal(AnnotationUtils.Kinds.KeyValues, column.Annotations.Schema.Single().Name); 97Assert.Equal(AnnotationUtils.Kinds.KeyValues, column.Annotations.Schema.Single().Name);
Transformers\KeyToBinaryVectorEstimatorTest.cs (3)
117Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 123Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 133Assert.Equal(AnnotationUtils.Kinds.IsNormalized, column.Annotations.Schema.Single().Name);
Transformers\KeyToVectorEstimatorTests.cs (8)
136Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 142Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 152Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 176Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.IsNormalized }); 180Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 186Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized });
Transformers\SelectColumnsTests.cs (4)
188Assert.Equal("A", result.Schema[0].Name); 189Assert.Equal("B", result.Schema[1].Name); 208Assert.Equal("A", result.Schema[0].Name); 209Assert.Equal("B", result.Schema[1].Name);
Transformers\TextFeaturizerTests.cs (5)
753Assert.Contains("SentimentText", outputSchema.Select(col => col.Name)); 754Assert.Contains("Label", outputSchema.Select(col => col.Name)); 755Assert.Contains("Features", outputSchema.Select(col => col.Name)); 756Assert.Contains("PredictedLabel", outputSchema.Select(col => col.Name)); 757Assert.Contains("Score", outputSchema.Select(col => col.Name));
Microsoft.ML.TimeSeries (1)
PredictionEngine.cs (1)
180throw Contracts.ExceptParam(nameof(input), $"Mapper required column '{input.Schema[c].Name}' active but it was not.");
Microsoft.ML.TorchSharp.Tests (11)
NerTests.cs (3)
83Assert.Equal("outputColumn", transformerSchema[4].Name); 162Assert.Equal("outputColumn", transformerSchema[4].Name); 263Assert.Equal("outputColumn", transformerSchema[4].Name);
QATests.cs (2)
56Assert.Equal("Answer", transformerSchema[4].Name); 57Assert.Equal("Score", transformerSchema[5].Name);
TextClassificationTests.cs (6)
114Assert.Equal("outputColumn", transformerSchema[3].Name); 153var predictedLabel = filteredModel.Transform(dataNoLabel).GetColumn<ReadOnlyMemory<char>>(transformerSchema[3].Name); 250Assert.Equal("outputColumn", transformerSchema[4].Name); 334Assert.Equal("outputColumn", transformerSchema[5].Name); 337var predictedLabel = transformer.Transform(preppedData).GetColumn<ReadOnlyMemory<char>>(transformerSchema[5].Name); 403var score = transformer.Transform(dataView).GetColumn<float>(transformerSchema[3].Name);
Microsoft.ML.Transforms (15)
Dracula\CountTableTransformer.cs (1)
644inputSlotNames = new VBuffer<ReadOnlyMemory<char>>(1, new[] { inputCol.Name.AsMemory() });
GcnTransform.cs (1)
199throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema[srcCol].Name, LpNormNormalizingEstimatorBase.ExpectedColumnType, inType.ToString());
MissingValueDroppingTransformer.cs (3)
135throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema[srcCol].Name, "vector", inType.ToString()); 197throw _parent.Host.Except($"Column '{srcCol.Name}' is not a vector column"); 199throw _parent.Host.Except($"Column '{srcCol.Name}' is of type {srcCol.Type.GetItemType()}, which does not support missing values");
StatefulCustomMappingTransformer.cs (2)
189getters[iinfo] = Utils.MarshalInvoke(GetDstGetter<int>, col.Type.RawType, dstRow, col.Name, refresh); 308_getters[iinfo] = Utils.MarshalInvoke(_parent.GetDstGetter<int>, _parent._bindings.Schema[i].Type.RawType, dstRow, _parent._bindings.Schema[i].Name, refresh);
StatefulFilterTransform.cs (1)
165var columnNames = columnsNeeded.Select(c => c.Name);
SvmLight\SvmLightSaver.cs (5)
118if (column.Name != _labelCol && column.Name != _featureCol && column.Name != _groupCol && column.Name != _weightCol) 119ch.Warning($"Column {column.Name} will not be saved. SVM-light saver saves the label column, feature column, optional group column and optional weight column.");
UngroupTransform.cs (2)
298schemaBuilder.AddColumn(inputSchema[i].Name, inputSchema[i].Type, inputSchema[i].Annotations); 314schemaBuilder.AddColumn(inputSchema[i].Name, inputSchema[i].Type.GetItemType(), metadataBuilder.ToAnnotations());
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
605throw Host.ExceptSchemaMismatch(nameof(input.Schema), "label", (string)labelColumn.Name, "Key",