252 references to Instance
Microsoft.Data.Analysis (4)
DataFrameColumns\ArrowStringDataFrameColumn.cs (1)
584builder.AddColumn(Name, TextDataViewType.Instance);
DataFrameColumns\StringDataFrameColumn.cs (1)
496builder.AddColumn(Name, TextDataViewType.Instance);
DataFrameColumns\VBufferDataFrameColumn.cs (1)
369return new VectorDataViewType(TextDataViewType.Instance);
IDataView.Extension.cs (1)
115else if (type == TextDataViewType.Instance)
Microsoft.ML.AutoML (5)
ColumnInference\ColumnTypeInference.cs (1)
206col.SuggestedType = TextDataViewType.Instance;
Utils\UserInputValidationUtil.cs (4)
95column.Type.GetItemType() != TextDataViewType.Instance) 98$"{BooleanDataViewType.Instance}, {NumberDataViewType.Single}, and {TextDataViewType.Instance}. " + 115new DataViewType[] { NumberDataViewType.Single, TextDataViewType.Instance }); 119new DataViewType[] { TextDataViewType.Instance });
Microsoft.ML.AutoML.Tests (23)
AutoFitTests.cs (3)
353Assert.Equal(TextDataViewType.Instance, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type); 376Assert.Equal(TextDataViewType.Instance, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type); 404Assert.Equal(TextDataViewType.Instance, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type);
TransformInferenceTests.cs (14)
27new DatasetColumnInfo("Categorical1", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(7, null)), 28new DatasetColumnInfo("Categorical2", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(7, null)), 29new DatasetColumnInfo("LargeCat1", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(500, null)), 30new DatasetColumnInfo("LargeCat2", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(500, null)), 83new DatasetColumnInfo("Categorical1", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(7, null)), 84new DatasetColumnInfo("Categorical2", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(7, null)), 85new DatasetColumnInfo("LargeCat1", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(500, null)), 86new DatasetColumnInfo("LargeCat2", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(500, null)), 139new DatasetColumnInfo("Categorical1", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(7, null)), 140new DatasetColumnInfo("LargeCat1", TextDataViewType.Instance, ColumnPurpose.CategoricalFeature, new ColumnDimensions(500, null)), 325new DatasetColumnInfo("Text", TextDataViewType.Instance, ColumnPurpose.TextFeature, new ColumnDimensions(null, null)), 358new DatasetColumnInfo("Text", TextDataViewType.Instance, ColumnPurpose.TextFeature, new ColumnDimensions(null, null)), 674new DatasetColumnInfo("CustomName", TextDataViewType.Instance, columnPurpose, new ColumnDimensions(null, null)), 685new DatasetColumnInfo("CustomLabel", TextDataViewType.Instance, ColumnPurpose.Label, new ColumnDimensions(null, null)),
UserInputValidationTests.cs (5)
239ValidateLabelTypeTestCore<string>(TaskKind.Regression, TextDataViewType.Instance, false); 248ValidateLabelTypeTestCore<string>(TaskKind.Recommendation, TextDataViewType.Instance, false); 264ValidateLabelTypeTestCore<string>(TaskKind.MulticlassClassification, TextDataViewType.Instance, true); 273ValidateLabelTypeTestCore<string>(TaskKind.Ranking, TextDataViewType.Instance, false); 376if (labelType == TextDataViewType.Instance)
Utils\MLNetUtils\DataViewTestFixture.cs (1)
45else if (column.type == TextDataViewType.Instance)
Microsoft.ML.Core (8)
Data\AnnotationBuilderExtensions.cs (1)
19=> builder.Add(AnnotationUtils.Kinds.SlotNames, new VectorDataViewType(TextDataViewType.Instance, size), getter);
Data\AnnotationUtils.cs (5)
145return new VectorDataViewType(TextDataViewType.Instance, size); 345&& metaCol.ItemType == TextDataViewType.Instance; 429cols.Add(new SchemaShape.Column(Kinds.ScoreColumnKind, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false)); 430cols.Add(new SchemaShape.Column(Kinds.ScoreValueKind, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false)); 450cols.Add(new SchemaShape.Column(Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
Data\ColumnTypeExtensions.cs (2)
98return TextDataViewType.Instance; 115return TextDataViewType.Instance;
Microsoft.ML.Core.Tests (10)
UnitTests\ColumnTypes.cs (1)
29TextDataViewType.Instance, BooleanDataViewType.Instance, DateTimeDataViewType.Instance, DateTimeOffsetDataViewType.Instance, TimeSpanDataViewType.Instance };
UnitTests\DataTypes.cs (3)
29TextDataViewType.Instance, NumberDataViewType.Single, out bool identity2); 53TextDataViewType.Instance, NumberDataViewType.Double, out bool identity2); 256TextDataViewType.Instance, dstType, out bool identity);
UnitTests\ScoreSchemaTest.cs (5)
68Assert.Equal(TextDataViewType.Instance, (scoreMetadata.Schema[0].Type as VectorDataViewType).ItemType); 69Assert.Equal(TextDataViewType.Instance, scoreColumn.Annotations.Schema[1].Type); 70Assert.Equal(TextDataViewType.Instance, scoreColumn.Annotations.Schema[2].Type); 122Assert.Equal(TextDataViewType.Instance, scoreColumn.Annotations.Schema[0].Type); 123Assert.Equal(TextDataViewType.Instance, scoreColumn.Annotations.Schema[1].Type);
UnitTests\TestEntryPoints.cs (1)
1794TextDataViewType.Instance, BooleanDataViewType.Instance, labelToBinary);
Microsoft.ML.Data (93)
Commands\ScoreCommand.cs (1)
312mapper.OutputSchema.TryGetAnnotation(TextDataViewType.Instance, AnnotationUtils.Kinds.ScoreColumnKind, 0, ref scoreKind) &&
Data\SchemaAnnotationsExtensions.cs (3)
45/// though not universal, type to provide is <see cref="TextDataViewType.Instance"/>, so if left unspecified 46/// this will be assumed to have the value <see cref="TextDataViewType.Instance"/>.</param> 55keyValueItemType = TextDataViewType.Instance;
DataLoadSave\Binary\BinaryLoader.cs (1)
636/// should contains a <see cref="DataViewSchema.Column"/> with <see cref="TextDataViewType.Instance"/> as its <see cref="DataViewType"/>.
DataLoadSave\Binary\Codecs.cs (1)
299: base(factory, TextDataViewType.Instance)
DataView\ArrayDataViewBuilder.cs (2)
227meta.AddKeyValues(_columns[i].Type.GetKeyCountAsInt32(_host), TextDataViewType.Instance, keyValueGetter); 441: base(TextDataViewType.Instance, values)
DataView\LambdaColumnMapper.cs (2)
127bldr.AddGetter(AnnotationUtils.Kinds.KeyValues, new VectorDataViewType(TextDataViewType.Instance, _typeDst.GetItemType().GetKeyCountAsInt32(Host)), mdGetter); 135bldr.AddGetter(AnnotationUtils.Kinds.SlotNames, new VectorDataViewType(TextDataViewType.Instance, vectorSize), mdGetter);
Deprecated\Instances\HeaderSchema.cs (1)
34_slotNamesType = new VectorDataViewType(TextDataViewType.Instance, collection.Count);
Evaluators\AnomalyDetectionEvaluator.cs (3)
183overallDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray()); 198topKdvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, topKStratVal.ToArray()); 200topKdvBldr.AddColumn(TopKResultsColumns.Instance, TextDataViewType.Instance, names.ToArray());
Evaluators\BinaryClassifierEvaluator.cs (5)
179vecType.Size > 0 && vecType.ItemType == TextDataViewType.Instance) 338overallDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray()); 359confDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, confStratVal.ToArray()); 379dvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, prStratVal.ToArray()); 1552schemaBuilder.AddColumn(MetricKinds.ColumnNames.WarningText, TextDataViewType.Instance);
Evaluators\ClusteringEvaluator.cs (2)
205overallDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray()); 724var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _numClusters);
Evaluators\EvaluatorBase.cs (1)
310dvBldr.AddColumn(MetricKinds.ColumnNames.WarningText, TextDataViewType.Instance,
Evaluators\EvaluatorUtils.cs (9)
142if (col.Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreValueKind)?.Type == TextDataViewType.Instance) 203if (col.Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreValueKind)?.Type == TextDataViewType.Instance) 379return LambdaColumnMapper.Create(env, registrationName, input, inputColName, outputColName, typeSrc, TextDataViewType.Instance, 895ReconcileKeyValues(env, views, keyCol, TextDataViewType.Instance); 901ReconcileVectorKeyValues(env, views, vectorKeyCol, TextDataViewType.Instance); 1259dvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVals); 1260weightedDvBldr?.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVals); 1271dvBldr.AddColumn(MetricKinds.ColumnNames.FoldIndex, TextDataViewType.Instance, foldVals); 1272weightedDvBldr?.AddColumn(MetricKinds.ColumnNames.FoldIndex, TextDataViewType.Instance, foldVals);
Evaluators\MulticlassClassificationEvaluator.cs (4)
212overallDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray()); 236confDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, confStratVal.ToArray()); 813assignedColKeyValues.AddKeyValues(_numClasses, TextDataViewType.Instance, CreateKeyValueGetter()); 823sortedClasses.AddKeyValues(_numClasses, TextDataViewType.Instance, CreateKeyValueGetter());
Evaluators\MultiOutputRegressionEvaluator.cs (4)
149overallDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray()); 553var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, t.Size); 566builder.Add(AnnotationUtils.Kinds.ScoreColumnKind, TextDataViewType.Instance, getter); 568builder.Add(AnnotationUtils.Kinds.ScoreValueKind, TextDataViewType.Instance, getter);
Evaluators\QuantileRegressionEvaluator.cs (1)
355var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _scoreSize);
Evaluators\RankingEvaluator.cs (4)
217overallDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray()); 228groupDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, groupStratVal.ToArray()); 232groupDvBldr.AddColumn(GroupId, TextDataViewType.Instance, groupName.ToArray()); 643_slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _truncationLevel);
Evaluators\RegressionEvaluatorBase.cs (1)
98overallDvBldr.AddColumn(MetricKinds.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
Scorers\FeatureContributionCalculation.cs (1)
329builder.AddColumn(DefaultColumnNames.FeatureContributions, TextDataViewType.Instance, null);
Scorers\MulticlassClassificationScorer.cs (1)
481return labelNameType is VectorDataViewType vectorType && vectorType.Size == scoreType.GetVectorSize() && vectorType.ItemType == TextDataViewType.Instance;
Scorers\PredictedLabelScorerBase.cs (4)
178yield return TextDataViewType.Instance.GetPair(AnnotationUtils.Kinds.ScoreColumnKind); 181yield return TextDataViewType.Instance.GetPair(AnnotationUtils.Kinds.ScoreValueKind); 201return TextDataViewType.Instance; 203return TextDataViewType.Instance;
Scorers\ScoreSchemaFactory.cs (7)
30metadataBuilder.Add(AnnotationUtils.Kinds.ScoreColumnKind, TextDataViewType.Instance, 32metadataBuilder.Add(AnnotationUtils.Kinds.ScoreValueKind, TextDataViewType.Instance, 63probabilityMetadataBuilder.Add(AnnotationUtils.Kinds.ScoreColumnKind, TextDataViewType.Instance, 65probabilityMetadataBuilder.Add(AnnotationUtils.Kinds.ScoreValueKind, TextDataViewType.Instance, 125metadataBuilder.AddKeyValues(keyNames.Length, TextDataViewType.Instance, 127metadataBuilder.Add(AnnotationUtils.Kinds.ScoreColumnKind, TextDataViewType.Instance, 129metadataBuilder.Add(AnnotationUtils.Kinds.ScoreValueKind, TextDataViewType.Instance,
Transforms\ColumnConcatenatingEstimator.cs (1)
136meta.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
Transforms\Hashing.cs (3)
254_kvTypes[invertIinfos[i]] = new VectorDataViewType(TextDataViewType.Instance, _keyValues[invertIinfos[i]].Length); 445Host.Assert(srcType.ItemType == TextDataViewType.Instance); 1967metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
Transforms\InvertHashUtils.cs (3)
393var result = factory.TryGetCodec(new VectorDataViewType(TextDataViewType.Instance), out codec); 397ch.Assert(vectorType.ItemType == TextDataViewType.Instance); 469kvTypesLocal[iinfo] = new VectorDataViewType(TextDataViewType.Instance, keyValuesLocal[iinfo].Length);
Transforms\KeyToValue.cs (2)
524labelEncoderOutput = ctx.AddIntermediateVariable(new VectorDataViewType(TextDataViewType.Instance, srcShape), "CastNodeOutput"); 557else if (TypeOutput == TextDataViewType.Instance)
Transforms\KeyToVector.cs (2)
327var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _types[iinfo].Dimensions); 339var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _types[iinfo].Dimensions);
Transforms\SlotsDroppingTransformer.cs (2)
847builder.Add(AnnotationUtils.Kinds.SlotNames, new VectorDataViewType(TextDataViewType.Instance, dstLength), slotNamesGetter); 916if (type == TextDataViewType.Instance)
Transforms\ValueMapping.cs (15)
870TextDataViewType.Instance, 1092if (itemType == TextDataViewType.Instance) 1113var labelEncoderOutput = (typeValue == NumberDataViewType.Single || typeValue == TextDataViewType.Instance || typeValue == NumberDataViewType.Int64) ? dstVariableName : 1126CastInputTo<Int64>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1140CastInputTo<Int32>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1147CastInputTo<Int16>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1154CastInputTo<UInt64>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1161CastInputTo<UInt32>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1168CastInputTo<UInt16>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1174CastInputTo<float>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1185CastInputTo<double>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); 1189else if (typeKey == TextDataViewType.Instance) 1191if (typeValue == TextDataViewType.Instance) 1200var castOutput = ctx.AddIntermediateVariable(new VectorDataViewType(TextDataViewType.Instance, (int)srcShape[1]), "castOutput"); 1258else if (typeValue == TextDataViewType.Instance)
Transforms\ValueToKeyMappingEstimator.cs (1)
196colInfo.AddKeyValueAnnotationsAsText ? TextDataViewType.Instance : col.ItemType, col.IsKey);
Transforms\ValueToKeyMappingTransformer.cs (2)
791var castOutput = ctx.AddIntermediateVariable(new VectorDataViewType(TextDataViewType.Instance, (int)srcShape[1]), "castOutput"); 825if (type.Equals(TextDataViewType.Instance))
Transforms\ValueToKeyMappingTransformerImpl.cs (4)
105: base(TextDataViewType.Instance) 587: base(TextDataViewType.Instance, pool.Count) 1060builder.AddKeyValues(TypedMap.OutputType.GetCountAsInt32(_host), TextDataViewType.Instance, getter); 1158builder.AddKeyValues(keyCount, TextDataViewType.Instance, mgetter);
Microsoft.ML.DataView (1)
DataViewType.cs (1)
87/// Note this can have only one possible value, accessible by the singleton static property <see cref="Instance"/>.
Microsoft.ML.EntryPoints (2)
CrossValidationMacro.cs (1)
378dvBldr.AddColumn(MetricKinds.ColumnNames.WarningText, TextDataViewType.Instance, warn.AsMemory());
ScoreColumnSelector.cs (1)
93if (input.Data.Schema.TryGetAnnotation(TextDataViewType.Instance, AnnotationUtils.Kinds.ScoreValueKind, i,
Microsoft.ML.Fairlearn (1)
Metrics\FairlearnMetricCatalog.cs (1)
62if (sensitiveCol.Type == TextDataViewType.Instance)
Microsoft.ML.FastTree (1)
Utils\RegressionTreeBaseUtils.cs (1)
102builder.AddColumn("IsLeaf", TextDataViewType.Instance, isLeaf.ToArray());
Microsoft.ML.ImageAnalytics (2)
ImageLoader.cs (2)
161throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName, TextDataViewType.Instance.ToString(), inputSchema[srcCol].Type.ToString()); 446throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputColumnName, TextDataViewType.Instance.ToString(), col.GetTypeString());
Microsoft.ML.IntegrationTests (1)
ModelFiles.cs (1)
235inputSchemaDefinition[nameof(ModelInput.CategoricalFeatures)].ColumnType = new VectorDataViewType(TextDataViewType.Instance, 5);
Microsoft.ML.OnnxTransformer (1)
OnnxTypeParser.cs (1)
154scalarType = TextDataViewType.Instance;
Microsoft.ML.Parquet (3)
ParquetLoader.cs (2)
355return TextDataViewType.Instance; 367return TextDataViewType.Instance;
PartitionedFileLoader.cs (1)
629var conv = Conversions.DefaultInstance.GetStandardConversion(TextDataViewType.Instance, type) as ValueMapper<ReadOnlyMemory<char>, TValue>;
Microsoft.ML.PerformanceTests (3)
HashBench.cs (3)
149InitMapMurmurHashV2("Hello".AsMemory(), TextDataViewType.Instance); 200InitDenseVecMap(tokens, TextDataViewType.Instance); 249InitMapMurmurHashV1("Hello".AsMemory(), TextDataViewType.Instance);
Microsoft.ML.Samples (1)
Dynamic\SimpleDataViewImplementation.cs (1)
165builder.AddColumn("Text", TextDataViewType.Instance);
Microsoft.ML.StandardTrainers (1)
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
183if (!(labelMetadataType is VectorDataViewType vecType && vecType.ItemType == TextDataViewType.Instance && vecType.Size == _numClasses))
Microsoft.ML.TensorFlow (3)
TensorflowUtils.cs (3)
64metadataBuilder.Add(TensorflowOperatorTypeKind, TextDataViewType.Instance, (ref ReadOnlyMemory<char> value) => value = op.OpType.AsMemory()); 75metadataBuilder.Add(TensorflowUpstreamOperatorsKind, new VectorDataViewType(TextDataViewType.Instance, op.NumInputs), 185return TextDataViewType.Instance;
Microsoft.ML.TestFramework (1)
BaseTestBaseline.cs (1)
723else if (leftType == TextDataViewType.Instance)
Microsoft.ML.Tests (6)
Scenarios\Api\TestApi.cs (2)
208var coltypeString = TextDataViewType.Instance; 235Assert.True(idv.Schema[0].Annotations.Schema[1].Type == TextDataViewType.Instance);
SvmLightTests.cs (1)
163new VectorDataViewType(TextDataViewType.Instance, 3));
Transformers\ExpressionTransformerTests.cs (1)
57Assert.True(transformed.Schema["Expr6"].Type.GetItemType() == TextDataViewType.Instance);
Transformers\HashTests.cs (2)
295HashTestCore("".AsMemory(), TextDataViewType.Instance, 0, 0, 0, 0, 0); 296HashTestCore("hello".AsMemory(), TextDataViewType.Instance, 940, 951, 857, 770, 0);
Microsoft.ML.TimeSeries (5)
IidChangePointDetector.cs (1)
271new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)
IidSpikeDetector.cs (1)
247new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)
SRCNNAnomalyDetector.cs (1)
279new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)
SsaChangePointDetector.cs (1)
307new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)
SsaSpikeDetector.cs (1)
286new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)
Microsoft.ML.TorchSharp (37)
AutoFormerV2\ObjectDetectionTrainer.cs (9)
448TextDataViewType.Instance, false)); 453TextDataViewType.Instance, false)); 455TextDataViewType.Instance, false)); 459TextDataViewType.Instance, false)); 554TextDataViewType.Instance, false)); 556TextDataViewType.Instance, false)); 560TextDataViewType.Instance, false)); 759meta.Add(AnnotationUtils.Kinds.ScoreColumnKind, TextDataViewType.Instance, (ref ReadOnlyMemory<char> value) => { value = AnnotationUtils.Const.ScoreColumnKind.MulticlassClassification.AsMemory(); }); 761meta.Add(AnnotationUtils.Kinds.ScoreValueKind, TextDataViewType.Instance, (ref ReadOnlyMemory<char> value) => { value = AnnotationUtils.Const.ScoreValueKind.Score.AsMemory(); });
NasBert\NasBertTrainer.cs (12)
330TextDataViewType.Instance, false)); 345TextDataViewType.Instance, false)); 367if (sentenceCol.ItemType != TextDataViewType.Instance) 369TextDataViewType.Instance.ToString(), sentenceCol.GetTypeString()); 385if (sentenceCol2.ItemType != TextDataViewType.Instance) 387TextDataViewType.Instance.ToString(), sentenceCol2.GetTypeString()); 404if (sentenceCol2.ItemType != TextDataViewType.Instance) 406TextDataViewType.Instance.ToString(), sentenceCol2.GetTypeString()); 423SentenceColumn = new SchemaShape.Column(options.Sentence1ColumnName, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false); 424SentenceColumn2 = options.Sentence2ColumnName == default ? default : new SchemaShape.Column(options.Sentence2ColumnName, SchemaShape.Column.VectorKind.Scalar, TextDataViewType.Instance, false); 525meta.Add(AnnotationUtils.Kinds.ScoreColumnKind, TextDataViewType.Instance, (ref ReadOnlyMemory<char> value) => { value = AnnotationUtils.Const.ScoreColumnKind.MulticlassClassification.AsMemory(); }); 527meta.Add(AnnotationUtils.Kinds.ScoreValueKind, TextDataViewType.Instance, (ref ReadOnlyMemory<char> value) => { value = AnnotationUtils.Const.ScoreValueKind.Score.AsMemory(); });
Roberta\QATrainer.cs (16)
513TextDataViewType.Instance, false)); 515TextDataViewType.Instance, false)); 520TextDataViewType.Instance, false); 535TextDataViewType.Instance.ToString(), contextCol.GetTypeString()); 541TextDataViewType.Instance.ToString(), questionCol.GetTypeString()); 547TextDataViewType.Instance.ToString(), answerCol.GetTypeString()); 599TextDataViewType.Instance, false), 601TextDataViewType.Instance, false), 607TextDataViewType.Instance, false); 619if (contextCol.ItemType != TextDataViewType.Instance) 621TextDataViewType.Instance.ToString(), contextCol.GetTypeString()); 625if (questionCol.ItemType != TextDataViewType.Instance) 627TextDataViewType.Instance.ToString(), questionCol.GetTypeString()); 741meta.Add(AnnotationUtils.Kinds.ScoreColumnKind, TextDataViewType.Instance, (ref ReadOnlyMemory<char> value) => { value = AnnotationUtils.Const.ScoreColumnKind.MulticlassClassification.AsMemory(); }); 743meta.Add(AnnotationUtils.Kinds.ScoreValueKind, TextDataViewType.Instance, (ref ReadOnlyMemory<char> value) => { value = AnnotationUtils.Const.ScoreValueKind.Score.AsMemory(); }); 746info[0] = new DataViewSchema.DetachedColumn(_parent.Options.PredictedAnswerColumnName, new VectorDataViewType(TextDataViewType.Instance));
Microsoft.ML.TorchSharp.Tests (11)
NerTests.cs (3)
77Assert.Equal(TextDataViewType.Instance, estimatorSchema[2].ItemType); 156Assert.Equal(TextDataViewType.Instance, estimatorSchema[2].ItemType); 230Assert.Equal(TextDataViewType.Instance, estimatorSchema[2].ItemType);
QATests.cs (2)
49Assert.Equal(TextDataViewType.Instance, estimatorSchema[4].ItemType); 58Assert.Equal(new VectorDataViewType(TextDataViewType.Instance), transformerSchema[4].Type);
TextClassificationTests.cs (6)
106Assert.Equal(TextDataViewType.Instance, estimatorSchema[3].ItemType); 115Assert.Equal(TextDataViewType.Instance, transformerSchema[3].Type); 244Assert.Equal(TextDataViewType.Instance, estimatorSchema[3].ItemType); 251Assert.Equal(TextDataViewType.Instance, transformerSchema[4].Type); 328Assert.Equal(TextDataViewType.Instance, estimatorSchema[3].ItemType); 335Assert.Equal(TextDataViewType.Instance, transformerSchema[5].Type);
Microsoft.ML.Transforms (28)
Dracula\CountTableTransformer.cs (1)
341newMetadataKinds.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
Expression\LambdaBinder.cs (1)
82node.ResultType = TextDataViewType.Instance;
HashJoiningTransform.cs (1)
403new VectorDataViewType(TextDataViewType.Instance, ex.SlotMap.Length), GetSlotNames);
KeyToVectorMapping.cs (2)
244var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _types[iinfo].Dimensions); 262var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _types[iinfo].Dimensions);
MissingValueReplacing.cs (1)
418var strToT = Data.Conversion.Conversions.DefaultInstance.GetStandardConversion<ReadOnlyMemory<char>, T>(TextDataViewType.Instance, dstType.GetItemType(), out bool identity);
SvmLight\SvmLightLoader.cs (1)
413bldr.AddColumn("Text", TextDataViewType.Instance);
Text\NgramHashingTransformer.cs (2)
852types[iinfo] = new VectorDataViewType(TextDataViewType.Instance, vec.Length); 1228metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
Text\NgramTransform.cs (2)
519var slotNamesType = new VectorDataViewType(TextDataViewType.Instance, _parent._ngramMaps[iinfo].Count); 1089metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
Text\StopWordsRemovingTransformer.cs (5)
377_types[i] = new VectorDataViewType(TextDataViewType.Instance); 679result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.VariableVector, TextDataViewType.Instance, false); 773private static readonly DataViewType _outputType = new VectorDataViewType(TextDataViewType.Instance); 1080_types[i] = new VectorDataViewType(TextDataViewType.Instance); 1247result[colInfo.outputColumnName] = new SchemaShape.Column(colInfo.outputColumnName, SchemaShape.Column.VectorKind.VariableVector, TextDataViewType.Instance, false);
Text\TextFeaturizingEstimator.cs (2)
644metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false)); 654result[name] = new SchemaShape.Column(name, SchemaShape.Column.VectorKind.VariableVector, TextDataViewType.Instance, false);
Text\TextNormalizing.cs (1)
212_types[i] = srcType is VectorDataViewType ? new VectorDataViewType(TextDataViewType.Instance) : srcType;
Text\TokenizingByCharacters.cs (4)
240dataViewType = new VectorDataViewType(TextDataViewType.Instance, _sourceVectorLength[iinfo]); 242dataViewType = TextDataViewType.Instance; 291builder.AddKeyValues(CharsCount, TextDataViewType.Instance, getter); 695metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.KeyValues, SchemaShape.Column.VectorKind.Vector, TextDataViewType.Instance, false));
Text\WordBagTransform.cs (2)
191if (!inputSchema.TryFindColumn(_columnName, out SchemaShape.Column outCol) && outCol.ItemType != TextDataViewType.Instance) 296new DataViewSchema.DetachedColumn(_parent._columnName, TextDataViewType.Instance)
Text\WordEmbeddingsExtractor.cs (1)
939throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.InputColumnName, new VectorDataViewType(TextDataViewType.Instance).ToString(), col.GetTypeString());
Text\WordTokenizing.cs (2)
212_type = new VectorDataViewType(TextDataViewType.Instance); 420var reshapeOutput = ctx.AddIntermediateVariable(new VectorDataViewType(TextDataViewType.Instance, 1), column.Name);
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
638TextDataViewType.Instance, false));