1 write to Name
Microsoft.ML.DataView (1)
DataViewSchema.cs (1)
112Name = name;
533 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)
33Assert.Equal("Byte", preview.ColumnView[0].Column.Name); 37Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); 41Assert.Equal("Double", preview.ColumnView[2].Column.Name); 45Assert.Equal("Float", preview.ColumnView[3].Column.Name); 49Assert.Equal("Int", preview.ColumnView[4].Column.Name); 53Assert.Equal("Long", preview.ColumnView[5].Column.Name); 57Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); 61Assert.Equal("Short", preview.ColumnView[7].Column.Name); 65Assert.Equal("Uint", preview.ColumnView[8].Column.Name); 69Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); 73Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); 77Assert.Equal("String", preview.ColumnView[11].Column.Name); 81Assert.Equal("Char", preview.ColumnView[12].Column.Name); 85Assert.Equal("DateTime", preview.ColumnView[13].Column.Name); 89Assert.Equal("Bool", preview.ColumnView[14].Column.Name); 93Assert.Equal("ArrowString", preview.ColumnView[15].Column.Name); 97Assert.Equal("VBuffer", preview.ColumnView[16].Column.Name); 120Assert.Equal("Bool", schema[0].Name); 126Assert.Equal("BoolClone", schema[1].Name); 139Assert.Equal("Byte", preview.ColumnView[0].Column.Name); 146Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); 153Assert.Equal("Double", preview.ColumnView[2].Column.Name); 160Assert.Equal("Float", preview.ColumnView[3].Column.Name); 167Assert.Equal("Int", preview.ColumnView[4].Column.Name); 174Assert.Equal("Long", preview.ColumnView[5].Column.Name); 181Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); 188Assert.Equal("Short", preview.ColumnView[7].Column.Name); 195Assert.Equal("Uint", preview.ColumnView[8].Column.Name); 202Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); 209Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); 216Assert.Equal("String", preview.ColumnView[11].Column.Name); 223Assert.Equal("Char", preview.ColumnView[12].Column.Name); 230Assert.Equal("DateTime", preview.ColumnView[13].Column.Name); 237Assert.Equal("Bool", preview.ColumnView[14].Column.Name); 244Assert.Equal("ArrowString", preview.ColumnView[15].Column.Name); 251Assert.Equal("VBuffer", preview.ColumnView[16].Column.Name);
DataFrameTests.cs (12)
668Assert.Equal(First.Name, Second.Name); 672Assert.Equal(First.Name, "Prefix_" + Second.Name); 680Assert.Equal("Prefix_" + First.Name, Second.Name); 687Assert.Equal(First.Name, "Prefix_" + Second.Name); 691Assert.Equal("Prefix_" + First.Name + "_Suffix", Second.Name); 699Assert.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 (198)
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 (6)
100throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString()); 104throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single or a Key with cardinality 2", 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))))) 795yield return schema.Label.Value.Name; 798yield return scoreCol.Name;
Evaluators\BinaryClassifierEvaluator.cs (10)
132throw host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString()); 136throw host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single, Double, Boolean, or a Key with cardinality 2", 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)); 1478yield return schema.Label.Value.Name; 1481yield return scoreCol.Name; 1487yield return probCol.Value.Name;
Evaluators\ClusteringEvaluator.cs (5)
102throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, 109throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "known-size vector of Single", type.ToString()); 120throw Host.ExceptSchemaMismatch(nameof(schema), "features", schema.Feature.Value.Name, 149return new ClusteringPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, numClusters); 827yield return schema.Label.Value.Name;
Evaluators\EvaluatorBase.cs (1)
118list.Add(AggregatorDictionaryBase.Create(schema, stratCol.Name, stratCol.Type, createAgg));
Evaluators\EvaluatorUtils.cs (13)
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; 774var combined = AppendPerInstanceDataViews(env, perInstance[0].Schema.Label?.Name, foldDataViews, out variableSizeVectorColumnNames); 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 (4)
123roles = AnnotationUtils.Prepend(roles, RoleMappedSchema.ColumnRole.Name.Bind(schema.Name.Value.Name)); 139yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name); 242if (perInst.Schema.Name?.Name is string nameName) 257if (perInst.Schema.Weight?.Name is string weightName)
Evaluators\MulticlassClassificationEvaluator.cs (7)
80throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "vector of two or more items of type Single", score.Type.ToString()); 84throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single or Key", labelType.ToString()); 125return new MulticlassPerInstanceEvaluator(Host, schema.Schema, scoreInfo, schema.Label.Value.Name); 615: base(env, schema, scoreColumn.Name, labelCol) 986idv.Schema[col].Name.Equals(MulticlassClassificationEvaluator.PerClassLogLoss)) 1042yield return schema.Label.Value.Name; 1056string labelName = schema.Label.Value.Name;
Evaluators\MultiOutputRegressionEvaluator.cs (7)
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()); 67throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "known-size vector of Single or Double", schema.Label.Value.Type.ToString()); 648yield return schema.Label.Value.Name; 652yield return scoreCol.Name; 756sb.AppendFormat("{0}{1,12}:", isWeighted ? "Weighted " : "", fold.Schema[i].Name);
Evaluators\QuantileRegressionEvaluator.cs (7)
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()); 65throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single", t.ToString()); 519var name = data.Schema[i].Name; 545yield return schema.Label.Value.Name; 548yield return scoreCol.Name;
Evaluators\RankingEvaluator.cs (9)
102"label", schema.Label.Value.Name, "Single or a Key", t.ToString()); 108"score", scoreCol.Name, "Single", t.ToString()); 118"group", schema.Group.Value.Name, "Key", t.ToString()); 142data.Schema.Label.Value.Name, scoreInfo.Name, data.Schema.Group.Value.Name, _truncationLevel, _labelGains); 947yield return schema.Group.Value.Name; 948yield return schema.Label.Value.Name; 951yield return scoreCol.Name;
Evaluators\RegressionEvaluator.cs (6)
60throw Host.ExceptSchemaMismatch(nameof(schema), "score", score.Name, "Single", t.ToString()); 64throw Host.ExceptSchemaMismatch(nameof(schema), "label", schema.Label.Value.Name, "Single", t.ToString()); 77return new RegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Value.Name); 367yield return 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\Calibrator.cs (2)
1024return TrainCalibrator(env, ch, caliTrainer, scored, data.Schema.Label.Value.Name, DefaultColumnNames.Score, data.Schema.Weight?.Name, maxRows);
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)
111string scoreCol = RowMapper.OutputSchema[ScoreColumnIndex].Name; 168ctx.SaveNonEmptyString(RowMapper.OutputSchema[ScoreColumnIndex].Name); 192yield 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 (8)
230yield return RoleMappedSchema.ColumnRole.Feature.Bind(InputRoleMappedSchema.Feature.Value.Name); 333var featureToken = ctx.TokenOrNullForName(schema.Feature.Value.Name); 348string featName = schema.Feature.Value.Name; 440string featureToken = ctx.TokenOrNullForName(schema.Feature.Value.Name); 464var labelColumnName = schema.Label.Value.Name; 468var featName = schema.Feature.Value.Name; 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());
Training\TrainerUtils.cs (17)
58throw Contracts.ExceptParam(nameof(data), "Training feature column '{0}' must be a known-size vector of R4, but has type: {1}.", col.Name, col.Type); 99col.Name); 105col.Name); 110col.Name, col.Type); 128"Training label column '{0}' type isn't suitable for regression: {1}. Type must be Single or Double.", col.Name, col.Type); 155throw Contracts.ExceptParam(nameof(data), "Training label column '{0}' type is not valid for multi-class: {1}. Type must be Single or Double.", col.Name, col.Type); 166"Training label column '{0}' contains invalid values for multi-class: {1}.", col.Name, cursor.Label); 174throw Contracts.ExceptParam(nameof(data), "Training label column '{0}' contains no valid values for multi-class.", col.Name); 196throw Contracts.ExceptParam(nameof(data), "Training label column '{0}' must be a known-size vector of Single, but has type: {1}.", col.Name, col.Type); 208throw Contracts.ExceptParam(nameof(data), "Training weight column '{0}' must be of floating point numeric type, but has type: {1}.", col.Name, col.Type); 221throw Contracts.ExceptParam(nameof(data), "Training group column '{0}' type is invalid: {1}. Must be Key type.", col.Name, col.Type); 429if (tschema.Feature?.Name is string fname && fname != DefaultColumnNames.Features) 431if (tschema.Label?.Name is string lname && lname != DefaultColumnNames.Label) 433if (tschema.Weight?.Name is string wname && wname != DefaultColumnNames.Weight) 435if (tschema.Group?.Name is string gname && gname != DefaultColumnNames.GroupId) 437if (tschema.Group?.Name is string iname && iname != DefaultColumnNames.Item) 439if (tschema.Group?.Name is string uname && uname != DefaultColumnNames.User)
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 (11)
EnsembleUtils.cs (1)
34var name = featCol.Name;
PipelineEnsemble.cs (3)
139var mapperColumns = Mappers[i].OutputSchema.Where(col => col.Name == DefaultColumnNames.Score); 427inputCols.Add(inputSchema[j].Name); 438var name = inputSchema[j].Name;
Selector\SubModelSelector\BaseSubModelSelector.cs (7)
108yield return RoleMappedSchema.CreatePair(RoleMappedSchema.ColumnRole.Label, testSchema.Label.Value.Name); 111yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name); 116yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Probability, probCol.Value.Name); 119yield return RoleMappedSchema.CreatePair(RoleMappedSchema.ColumnRole.Label, testSchema.Label.Value.Name); 122yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name); 125yield return RoleMappedSchema.CreatePair(RoleMappedSchema.ColumnRole.Label, testSchema.Label.Value.Name); 128yield return RoleMappedSchema.CreatePair(AnnotationUtils.Const.ScoreValueKind.Score, scoreCol.Name);
Microsoft.ML.EntryPoints (9)
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 (2)
52var columnName = schema[i].Name; 99var source = input.Data.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 (8)
FastTree.cs (4)
1345var labelName = examples.Schema.Label?.Name; 1354if (examples.Schema.Group?.Name is string groupName) 1618ch.Warning("This is not ranking problem, Group Id '{0}' column will be ignored", examples.Schema.Group.Value.Name); 1832ch.Warning("This is not ranking problem, Group Id '{0}' column will be ignored", _data.Schema.Group.Value.Name);
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.LightGbm (5)
LightGbmBinaryTrainer.cs (1)
274$"Label column '{data.Schema.Label.Value.Name}' is of type '{labelType.RawType}', but must be unsigned int, boolean or float.");
LightGbmMulticlassTrainer.cs (1)
244$"Label column '{data.Schema.Label.Value.Name}' is of type '{labelType.RawType}', but must be of unsigned int, boolean or float.");
LightGbmRankingTrainer.cs (2)
253$"Label column '{labelCol.Name}' is of type '{labelType.RawType}', but must be Key or Single."); 263$"Group column '{groupCol.Name}' is of type '{groupType.RawType}', but must be UInt32 or Key.");
LightGbmRegressionTrainer.cs (1)
236$"Label column '{data.Schema.Label.Value.Name}' is of type '{labelType.RawType}', but must be an unsigned int, boolean or float.");
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 (6)
MatrixFactorizationPredictor.cs (2)
351_matrixColumnIndexColumnName = matrixColumnList[0].Name; 354_matrixRowIndexColumnName = matrixRowList[0].Name;
MatrixFactorizationTrainer.cs (2)
445throw ch.Except("Column '{0}' for label should be floating point, but is instead {1}", labelCol.Name, labelCol.Type); 454throw ch.Except("Column '{0}' for validation label should be floating point, but is instead {1}", validLabelCol.Name, validLabelCol.Type);
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 (14)
FactorizationMachine\FactorizationMachineTrainer.cs (3)
426throw ch.ExceptParam(nameof(data), "Training feature column '{0}' must be a known-size vector of Single, but has type: {1}.", col.Name, col.Type); 446_host.Assert(featCol.Name == validFeatCol.Name);
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (2)
87var inputFeatureColumns = _columns.Select(c => new KeyValuePair<RoleMappedSchema.ColumnRole, string>(RoleMappedSchema.ColumnRole.Feature, c.Name)).ToList(); 153return InputRoleMappedSchema.GetColumnRoles().Select(kvp => new KeyValuePair<RoleMappedSchema.ColumnRole, string>(kvp.Key, kvp.Value.Name));
LdSvm\LdSvmTrainer.cs (4)
591using (var cursor = _data.Data.GetRowCursor(_data.Data.Schema[_data.Schema.Feature.Value.Name])) 593var getter = cursor.GetGetter<VBuffer<float>>(_data.Data.Schema[_data.Schema.Feature.Value.Name]); 632var featureCol = _data.Data.Schema[_data.Schema.Feature.Value.Name]; 633var labelCol = _data.Data.Schema[_data.Schema.Label.Value.Name];
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (3)
102dataView = new NAFilter(Host, data.Data, false, label.Name); 105label.Name, label.Name, type, BooleanDataViewType.Instance,
Standard\MulticlassClassification\OneVersusAllTrainer.cs (1)
167string trainerLabel = data.Schema.Label.Value.Name;
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (1)
149string trainerLabel = data.Schema.Label.Value.Name;
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
645Assert.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 (3)
AdaptiveSingularSpectrumSequenceModeler.cs (2)
1213throw _host.ExceptSchemaMismatch(nameof(data), "feature", featureCol.Name, "Single", featureCol.Type.ToString()); 1558throw _host.ExceptUserArg(nameof(data.Schema.Feature.Value.Name), "The time series input column has " +
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 (20)
Dracula\CountTableTransformer.cs (1)
644inputSlotNames = new VBuffer<ReadOnlyMemory<char>>(1, new[] { inputCol.Name.AsMemory() });
GcnTransform.cs (2)
199throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema[srcCol].Name, LpNormNormalizingEstimatorBase.ExpectedColumnType, inType.ToString()); 613string inputColumnName = InputSchema[_srcCols[iinfo]].Name;
HashJoiningTransform.cs (1)
418var srcColumnName = Source.Schema[Infos[iinfo].Source].Name;
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");
MissingValueIndicatorTransform.cs (1)
189var columnName = Source.Schema[Infos[iinfo].Source].Name;
OptionalColumnTransform.cs (1)
525string inputColumnName = Source.Schema[_bindings.SrcCols[iinfo]].Name;
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 (2)
165var columnNames = columnsNeeded.Select(c => c.Name); 166_appendedRow = appendedDataView.GetRowCursor(appendedDataView.Schema.Where(c => !c.IsHidden && columnNames.Contains(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",