119 references to Kinds
Microsoft.ML.Core (22)
Data\AnnotationBuilderExtensions.cs (2)
19
=> builder.Add(AnnotationUtils.
Kinds
.SlotNames, new VectorDataViewType(TextDataViewType.Instance, size), getter);
30
=> builder.Add(AnnotationUtils.
Kinds
.KeyValues, new VectorDataViewType(valueType, size), getter);
Data\AnnotationUtils.cs (20)
180
return GetNamesType(size).GetPair(
Kinds
.SlotNames);
189
return GetNamesType(size).GetPair(
Kinds
.KeyValues);
290
var metaColumn = column.Annotations.Schema.GetColumnOrNull(
Kinds
.SlotNames);
307
schema.Schema[list[0].Index].Annotations.GetValue(
Kinds
.SlotNames, ref slotNames);
312
return col.Annotations.TryFindColumn(
Kinds
.KeyValues, out var metaCol)
318
/// Returns whether a column has the <see cref="
Kinds
.IsNormalized"/> annotation indicated by
322
/// <returns>True if and only if the column has the <see cref="
Kinds
.IsNormalized"/> annotation
327
return column.Annotations.TryFindColumn(
Kinds
.IsNormalized, out var metaCol)
333
/// Returns whether a column has the <see cref="
Kinds
.SlotNames"/> annotation indicated by
338
/// <see cref="
Kinds
.SlotNames"/> annotation of definite sized vectors of text.</returns>
343
&& col.Annotations.TryFindColumn(
Kinds
.SlotNames, out var metaCol)
388
var type = schema[colIndex].Annotations.Schema.GetColumnOrNull(
Kinds
.CategoricalSlotRanges)?.Type;
392
schema[colIndex].Annotations.GetValue(
Kinds
.CategoricalSlotRanges, ref catIndices);
428
cols.Add(new SchemaShape.Column(
Kinds
.ScoreColumnSetId, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.UInt32, true));
429
cols.Add(new SchemaShape.Column(
Kinds
.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false));
430
cols.Add(new SchemaShape.Column(
Kinds
.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false));
432
cols.Add(new SchemaShape.Column(
Kinds
.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));
446
if (labelColumn.Value.Annotations.TryFindColumn(
Kinds
.KeyValues, out var metaCol) &&
450
cols.Add(new SchemaShape.Column(
Kinds
.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
451
cols.Add(new SchemaShape.Column(
Kinds
.TrainingLabelValues, SchemaShape.Column.VectorKind.Vector, metaCol.ItemType, false));
Microsoft.ML.Core.Tests (12)
UnitTests\ScoreSchemaTest.cs (5)
61
Assert.Equal(AnnotationUtils.
Kinds
.KeyValues, scoreMetadata.Schema[0].Name);
62
Assert.Equal(AnnotationUtils.
Kinds
.ScoreColumnKind, scoreMetadata.Schema[1].Name);
63
Assert.Equal(AnnotationUtils.
Kinds
.ScoreValueKind, scoreMetadata.Schema[2].Name);
118
Assert.Equal(AnnotationUtils.
Kinds
.ScoreColumnKind, scoreMetadata.Schema[0].Name);
119
Assert.Equal(AnnotationUtils.
Kinds
.ScoreValueKind, scoreMetadata.Schema[1].Name);
UnitTests\TestEntryPoints.cs (7)
1633
var type = binaryScored.Schema[scoreCol.Value.Index].Annotations.Schema.GetColumnOrNull(AnnotationUtils.
Kinds
.ScoreColumnKind)?.Type;
1636
binaryScored.Schema[scoreCol.Value.Index].Annotations.GetValue(AnnotationUtils.
Kinds
.ScoreColumnKind, ref kind);
1642
type = regressionScored.Schema[scoreCol.Value.Index].Annotations.Schema[AnnotationUtils.
Kinds
.ScoreColumnKind].Type;
1644
regressionScored.Schema[scoreCol.Value.Index].Annotations.GetValue(AnnotationUtils.
Kinds
.ScoreColumnKind, ref kind);
1650
type = anomalyScored.Schema[scoreCol.Value.Index].Annotations.Schema[AnnotationUtils.
Kinds
.ScoreColumnKind].Type;
1652
anomalyScored.Schema[scoreCol.Value.Index].Annotations.GetValue(AnnotationUtils.
Kinds
.ScoreColumnKind, ref kind);
5406
var type = schema["Count"].Annotations.Schema[AnnotationUtils.
Kinds
.SlotNames].Type;
Microsoft.ML.Data (3)
DataLoadSave\Text\TextLoader.cs (1)
692
/// <see cref="Infos"/>[i] stores the i-th column's metadata, named <see cref="AnnotationUtils.
Kinds
.SlotNames"/>
Scorers\ScoreSchemaFactory.cs (2)
20
/// <param name="scoreColumnKindValue">The kind of the score column. It's the value of <see cref="AnnotationUtils.
Kinds
.ScoreColumnKind"/> in the score column's metadata.</param>
113
/// <see cref="AnnotationUtils.
Kinds
.ScoreColumnKind"/>.</param>
Microsoft.ML.FastTree (1)
TreeEnsemble\InternalTreeEnsemble.cs (1)
436
/// <seealso cref="AnnotationUtils.
Kinds
.SlotNames"/>
Microsoft.ML.Tests (81)
Scenarios\Api\Estimators\PredictAndMetadata.cs (3)
47
engine.OutputSchema[nameof(IrisPrediction.Score)].Annotations.GetValue(AnnotationUtils.
Kinds
.TrainingLabelValues, ref originalLabels);
92
Assert.NotNull(scoredData.Schema["Score"].Annotations.Schema.GetColumnOrNull(AnnotationUtils.
Kinds
.SlotNames));
126
Assert.Null(scoredData2.Schema["Score"].Annotations.Schema.GetColumnOrNull(AnnotationUtils.
Kinds
.SlotNames));
SvmLightTests.cs (1)
162
AnnotationUtils.
Kinds
.SlotNames, new VBuffer<ReadOnlyMemory<char>>(3, new[] { "aurora".AsMemory(), "beachwood".AsMemory(), "chagrin".AsMemory() }),
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (5)
68
treeValuesColumn.Annotations.GetValue(AnnotationUtils.
Kinds
.SlotNames, ref slotNames);
87
treeLeafIdsColumn.Annotations.GetValue(AnnotationUtils.
Kinds
.IsNormalized, ref leafIdsNormalizedFlag);
91
treeLeafIdsColumn.Annotations.GetValue(AnnotationUtils.
Kinds
.SlotNames, ref leafIdsSlotNames);
110
treePathIdsColumn.Annotations.GetValue(AnnotationUtils.
Kinds
.IsNormalized, ref pathIdsNormalizedFlag);
114
treePathIdsColumn.Annotations.GetValue(AnnotationUtils.
Kinds
.SlotNames, ref pathIdsSlotNames);
Transformers\CategoricalHashTests.cs (19)
143
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
149
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
156
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
162
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
169
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
175
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);
181
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
185
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);
191
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.KeyValues });
197
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.KeyValues });
203
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
208
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
Transformers\CategoricalTests.cs (22)
221
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
227
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
234
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
240
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
247
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
251
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);
257
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
261
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);
267
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.KeyValues });
273
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.KeyValues });
279
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
285
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
292
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
298
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
Transformers\ConvertTests.cs (4)
296
output.Schema["CatA"].Annotations.GetValue(AnnotationUtils.
Kinds
.KeyValues, ref slotNames);
352
Assert.Equal(result.Schema["ConvA"].Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
359
Assert.Equal(result.Schema["ConvB"].Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.KeyValues });
Transformers\HashTests.cs (3)
87
Assert.Equal(AnnotationUtils.
Kinds
.KeyValues, column.Annotations.Schema.Single().Name);
92
Assert.Equal(AnnotationUtils.
Kinds
.KeyValues, column.Annotations.Schema.Single().Name);
97
Assert.Equal(AnnotationUtils.
Kinds
.KeyValues, column.Annotations.Schema.Single().Name);
Transformers\KeyToBinaryVectorEstimatorTest.cs (4)
117
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
123
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
133
Assert.Equal(AnnotationUtils.
Kinds
.IsNormalized, column.Annotations.Schema.Single().Name);
Transformers\KeyToVectorEstimatorTests.cs (20)
136
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
142
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
146
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);
152
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
156
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);
162
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.IsNormalized });
169
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
170
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);
176
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.IsNormalized });
180
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.
Kinds
.SlotNames });
186
Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.
Kinds
.SlotNames, AnnotationUtils.
Kinds
.CategoricalSlotRanges, AnnotationUtils.
Kinds
.IsNormalized });
190
column.Annotations.GetValue(AnnotationUtils.
Kinds
.CategoricalSlotRanges, ref slotRanges);