642 references to Single
Microsoft.Data.Analysis (3)
DataFrameColumns\VBufferDataFrameColumn.cs (1)
329return new VectorDataViewType(NumberDataViewType.Single);
IDataView.Extension.cs (1)
83else if (type == NumberDataViewType.Single)
PrimitiveDataFrameColumn.cs (1)
815return NumberDataViewType.Single;
Microsoft.ML.AutoML (20)
AutoMLExperiment\ITrialResultManager.cs (4)
46schemaBuilder.AddColumn("loss", NumberDataViewType.Single); 47schemaBuilder.AddColumn("durationInMilliseconds", NumberDataViewType.Single); 48schemaBuilder.AddColumn("peakCpu", NumberDataViewType.Single); 49schemaBuilder.AddColumn("peakMemoryInMegaByte", NumberDataViewType.Single);
ColumnInference\ColumnTypeInference.cs (1)
189col.SuggestedType = NumberDataViewType.Single;
DatasetDimensions\DatasetDimensionsApi.cs (1)
37if (itemType == NumberDataViewType.Single)
Sweepers\SmacSweeper.cs (2)
121dvBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single, targets); 122dvBuilder.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single, features);
TransformInference\TransformInference.cs (2)
353if (column.Type.GetItemType() == NumberDataViewType.Single 438intermediateCol.Type.GetItemType() == NumberDataViewType.Single)
Tuner\SmacTuner.cs (2)
134dvBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single, losses); 135dvBuilder.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single, features);
Utils\UserInputValidationUtil.cs (8)
83if (column.Name == DefaultColumnNames.Features && column.Type.GetItemType() != NumberDataViewType.Single) 85throw new ArgumentException($"{DefaultColumnNames.Features} column must be of data type {NumberDataViewType.Single}", nameof(trainData)); 94column.Type.GetItemType() != NumberDataViewType.Single && 98$"{BooleanDataViewType.Instance}, {NumberDataViewType.Single}, and {TextDataViewType.Instance}. " + 115new DataViewType[] { NumberDataViewType.Single, TextDataViewType.Instance }); 117new DataViewType[] { NumberDataViewType.Single, BooleanDataViewType.Instance }); 319return new DataViewType[] { NumberDataViewType.Single }; 321return new DataViewType[] { NumberDataViewType.Single };
Microsoft.ML.AutoML.Tests (86)
AutoFitTests.cs (2)
290Assert.Equal(NumberDataViewType.Single, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type); 322Assert.Equal(NumberDataViewType.Single, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type);
ColumnInferenceValidationUtilTests.cs (2)
24schemaBuilder.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single); 25schemaBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single);
DatasetDimensionsTests.cs (4)
46dataBuilder.AddColumn("NoNan", NumberDataViewType.Single, new float[] { 0, 1, 0, 1, 0 }); 47dataBuilder.AddColumn("Nan", NumberDataViewType.Single, new float[] { 0, 1, 0, 1, float.NaN }); 72dataBuilder.AddColumn("NoNan", Util.GetKeyValueGetter(slotNames), NumberDataViewType.Single, colValues); 78dataBuilder.AddColumn("Nan", Util.GetKeyValueGetter(slotNames), NumberDataViewType.Single, colValues);
PurposeInferenceTests.cs (1)
27schemaBuilder.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single);
SplitUtilTests.cs (6)
31dataViewBuilder.AddColumn("Number", NumberDataViewType.Single, 0f); 32dataViewBuilder.AddColumn("Label", NumberDataViewType.Single, 0f); 47dataViewBuilder.AddColumn("Number", NumberDataViewType.Single, new float[9]); 48dataViewBuilder.AddColumn("Label", NumberDataViewType.Single, new float[9]); 66dataViewBuilder.AddColumn("Number", NumberDataViewType.Single, new float[10000]); 67dataViewBuilder.AddColumn("Label", NumberDataViewType.Single, new float[10000]);
TransformInferenceTests.cs (33)
26new DatasetColumnInfo("Numeric1", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 81new DatasetColumnInfo(DefaultColumnNames.Features, NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 82new DatasetColumnInfo("Numeric1", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 138new DatasetColumnInfo(DefaultColumnNames.Features, NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 185new DatasetColumnInfo("Numeric", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 207new DatasetColumnInfo("Numeric1", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 208new DatasetColumnInfo("Numeric2", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 230new DatasetColumnInfo(DefaultColumnNames.Features, NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 251new DatasetColumnInfo(DefaultColumnNames.Features, new VectorDataViewType(NumberDataViewType.Single), ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 260new DatasetColumnInfo(DefaultColumnNames.Features, NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 261new DatasetColumnInfo("Numeric", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 283new DatasetColumnInfo("Numeric", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 304new DatasetColumnInfo("Numeric", new VectorDataViewType(NumberDataViewType.Single), ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 357new DatasetColumnInfo(DefaultColumnNames.Features, NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 424new DatasetColumnInfo("Numeric", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 458new DatasetColumnInfo(DefaultColumnNames.Features, NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 492new DatasetColumnInfo("Missing", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, true)), 493new DatasetColumnInfo("Numeric", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, false)), 549new DatasetColumnInfo("Missing1", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, true)), 550new DatasetColumnInfo("Missing2", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, true)), 551new DatasetColumnInfo("Numeric", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, false)), 615new DatasetColumnInfo("Numeric1", NumberDataViewType.Single, ColumnPurpose.Ignore, new ColumnDimensions(null, null)), 616new DatasetColumnInfo("Numeric2", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 637new DatasetColumnInfo(DefaultColumnNames.Features, new VectorDataViewType(NumberDataViewType.Single), ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 638new DatasetColumnInfo(DefaultColumnNames.Label, NumberDataViewType.Single, ColumnPurpose.Label, new ColumnDimensions(null, null)), 647new DatasetColumnInfo(DefaultColumnNames.Features, new VectorDataViewType(NumberDataViewType.Single), ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 648new DatasetColumnInfo("CustomLabel", NumberDataViewType.Single, ColumnPurpose.Label, new ColumnDimensions(null, null)), 673new DatasetColumnInfo(DefaultColumnNames.Features, new VectorDataViewType(NumberDataViewType.Single), ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 684new DatasetColumnInfo(DefaultColumnNames.Features, new VectorDataViewType(NumberDataViewType.Single), ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 706new DatasetColumnInfo("Missing", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, true)), 707new DatasetColumnInfo("Missing_MissingIndicator", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, false)), 708new DatasetColumnInfo("Missing_MissingIndicator0", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, false)), 787Assert.Equal(NumberDataViewType.Single, featuresCol.Value.Type.GetItemType());
TransformPostTrainerInferenceTests.cs (5)
27new DatasetColumnInfo("Numeric1", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 28new DatasetColumnInfo("Label", NumberDataViewType.Single, ColumnPurpose.Label, new ColumnDimensions(null, null)), 50new DatasetColumnInfo("Numeric1", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 51new DatasetColumnInfo("Label", NumberDataViewType.Single, ColumnPurpose.Label, new ColumnDimensions(null, null)), 61new DatasetColumnInfo("Numeric1", NumberDataViewType.Single, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)),
UserInputValidationTests.cs (29)
108trainDataBuilder.AddColumn("0", NumberDataViewType.Single, new float[] { 1 }); 113validDataBuilder.AddColumn("0", NumberDataViewType.Single, new float[] { 1 }); 130trainDataBuilder.AddColumn("0", NumberDataViewType.Single, new float[] { 1 }); 135validDataBuilder.AddColumn("0", NumberDataViewType.Single, new float[] { 1 }); 153trainDataBuilder.AddColumn("0", NumberDataViewType.Single, new float[] { 1 }); 158validDataBuilder.AddColumn("0", NumberDataViewType.Single, new float[] { 1 }); 159validDataBuilder.AddColumn("1", NumberDataViewType.Single, new float[] { 1 }); 204schemaBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single); 217schemaBuilder.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single); 218schemaBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single); 219schemaBuilder.AddColumn(textPurposeColName, NumberDataViewType.Single); 236ValidateLabelTypeTestCore<float>(TaskKind.Regression, NumberDataViewType.Single, true); 245ValidateLabelTypeTestCore<float>(TaskKind.Recommendation, NumberDataViewType.Single, true); 254ValidateLabelTypeTestCore<float>(TaskKind.BinaryClassification, NumberDataViewType.Single, false); 261ValidateLabelTypeTestCore<float>(TaskKind.MulticlassClassification, NumberDataViewType.Single, true); 270ValidateLabelTypeTestCore<float>(TaskKind.Ranking, NumberDataViewType.Single, true); 281dataViewBuilder.AddColumn("Number", NumberDataViewType.Single, 0f); 283dataViewBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single, 0f); 298schemaBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single); 311schemaBuilder.AddColumn("Number", NumberDataViewType.Single); 312schemaBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single); 325dataViewBuilder.AddColumn("Number", NumberDataViewType.Single, 0f); 326dataViewBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single, 0f); 331schemaBuilder.AddColumn("Number", NumberDataViewType.Single); 332schemaBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single); 352trainDataBuilder.AddColumn("Number", NumberDataViewType.Single, 0f); 353trainDataBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single, 0f); 364validationDataBuilder.AddColumn("Number", NumberDataViewType.Single, 0f); 375dataViewBuilder.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single, 0f);
Utils\MLNetUtils\DataViewTestFixture.cs (4)
29if (column.type == NumberDataViewType.Single) 31dataBuilder.AddColumn(column.name, NumberDataViewType.Single, createDummyRow ? new float[] { 0 } : new float[] { }); 49else if (column.type.IsVector() && column.type.GetItemType() == NumberDataViewType.Single) 54NumberDataViewType.Single,
Microsoft.ML.Core (1)
Data\ColumnTypeExtensions.cs (1)
160return NumberDataViewType.Single;
Microsoft.ML.Core.Tests (2)
UnitTests\DataTypes.cs (2)
26var r4ToSB = Conversions.DefaultInstance.GetStringConversion<float>(NumberDataViewType.Single); 29TextDataViewType.Instance, NumberDataViewType.Single, out bool identity2);
Microsoft.ML.Data (158)
Data\ITransposeDataView.cs (1)
38/// field is <see cref="NumberDataViewType.Single"/>. If the i-th column can't be iterated column-wisely, this function may
Data\RowCursorUtils.cs (5)
343if (type == NumberDataViewType.Single || type == NumberDataViewType.Double || type is BooleanDataViewType) 356if (type == NumberDataViewType.Single) 378Contracts.Assert(type != NumberDataViewType.Single && type != NumberDataViewType.Double); 417if (type == NumberDataViewType.Single) 420return GetVecGetterAs<Single>(NumberDataViewType.Single, cursor);
DataLoadSave\DataOperationsCatalog.cs (1)
578if (type != NumberDataViewType.Single && type != NumberDataViewType.Double)
Deprecated\Instances\HeaderSchema.cs (1)
33_colType = new VectorDataViewType(NumberDataViewType.Single, collection.Count);
Evaluators\AnomalyDetectionEvaluator.cs (7)
99if (t != NumberDataViewType.Single) 103if (t != NumberDataViewType.Single && t.GetKeyCount() != 2) 189overallDvBldr.AddColumn(OverallMetrics.ThreshAtK, NumberDataViewType.Single, thresholdAtK.ToArray()); 190overallDvBldr.AddColumn(OverallMetrics.ThreshAtP, NumberDataViewType.Single, thresholdAtP.ToArray()); 191overallDvBldr.AddColumn(OverallMetrics.ThreshAtNumPos, NumberDataViewType.Single, thresholdAtNumAnomalies.ToArray()); 201topKdvBldr.AddColumn(TopKResultsColumns.AnomalyScore, NumberDataViewType.Single, scores.ToArray()); 202topKdvBldr.AddColumn(TopKResultsColumns.Label, NumberDataViewType.Single, labels.ToArray());
Evaluators\BinaryClassifierEvaluator.cs (9)
131if (t != NumberDataViewType.Single) 135if (t != NumberDataViewType.Single && t != NumberDataViewType.Double && t != BooleanDataViewType.Instance && t.GetKeyCount() != 2) 147if (probType != NumberDataViewType.Single) 381dvBldr.AddColumn(Threshold, NumberDataViewType.Single, scores.ToArray()); 1265if (t != NumberDataViewType.Single && t != NumberDataViewType.Double && t != BooleanDataViewType.Instance && t.GetKeyCount() != 2) 1269if (t != NumberDataViewType.Single) 1276if (t != NumberDataViewType.Single) 1349scoreCol.Index, AnnotationUtils.Const.ScoreValueKind.Probability, NumberDataViewType.Single.Equals); 1483scoreCol.Index, AnnotationUtils.Const.ScoreValueKind.Probability, NumberDataViewType.Single.Equals);
Evaluators\ClusteringEvaluator.cs (6)
100if (type != null && type != NumberDataViewType.Single && !(type is KeyDataViewType keyType && keyType.Count > 0)) 108if (!(type is VectorDataViewType vectorType) || !vectorType.IsKnownSize || vectorType.ItemType != NumberDataViewType.Single) 118if (!(t is VectorDataViewType vectorType) || !vectorType.IsKnownSize || vectorType.ItemType != NumberDataViewType.Single) 599_types[SortedClusterScoreCol] = new VectorDataViewType(NumberDataViewType.Single, _numClusters); 618_types[SortedClusterScoreCol] = new VectorDataViewType(NumberDataViewType.Single, _numClusters); 756if (!(type is VectorDataViewType vectorType) || !vectorType.IsKnownSize || vectorType.ItemType != NumberDataViewType.Single)
Evaluators\EvaluatorUtils.cs (3)
247if (type != NumberDataViewType.Single) 248throw ectx.ExceptUserArg(nameof(EvaluateCommand.Arguments.WeightColumn), "Incompatible Weight column. Weight column type must be {0}.", NumberDataViewType.Single); 307if (type == NumberDataViewType.Double || type == NumberDataViewType.Single)
Evaluators\MulticlassClassificationEvaluator.cs (6)
79if (scoreType == null || scoreType.Size < 2 || scoreType.ItemType != NumberDataViewType.Single) 83if (labelType != NumberDataViewType.Single && labelType.GetKeyCount() <= 0) 635_types[SortedScoresCol] = new VectorDataViewType(NumberDataViewType.Single, _numClasses); 664_types[SortedScoresCol] = new VectorDataViewType(NumberDataViewType.Single, _numClasses); 861if (scoreType == null || scoreType.Size < 2 || scoreType.ItemType != NumberDataViewType.Single) 864if (labelType != NumberDataViewType.Single && labelType.GetKeyCount() <= 0)
Evaluators\MultiOutputRegressionEvaluator.cs (6)
62if (t == null || !t.IsKnownSize || t.ItemType != NumberDataViewType.Single) 66if (t == null || !t.IsKnownSize || (t.ItemType != NumberDataViewType.Single && t.ItemType != NumberDataViewType.Double)) 309_labelGetter = RowCursorUtils.GetVecGetterAs<float>(NumberDataViewType.Single, row, schema.Label.Value.Index); 473? RowCursorUtils.GetVecGetterAs<float>(NumberDataViewType.Single, input, LabelIndex) 550if (t == null || !t.IsKnownSize || (t.ItemType != NumberDataViewType.Single && t.ItemType != NumberDataViewType.Double)) 559if (t == null || !t.IsKnownSize || t.ItemType != NumberDataViewType.Single)
Evaluators\QuantileRegressionEvaluator.cs (5)
60if (t == null || t.Size == 0 || (t.ItemType != NumberDataViewType.Single && t.ItemType != NumberDataViewType.Double)) 64if (labelType != NumberDataViewType.Single) 72Host.Assert(scoreType != null && scoreType.Size > 0 && (scoreType.ItemType == NumberDataViewType.Single || scoreType.ItemType == NumberDataViewType.Double)); 448if (t != NumberDataViewType.Single) 452if (scoreType == null || scoreType.Size == 0 || (scoreType.ItemType != NumberDataViewType.Single && scoreType.ItemType != NumberDataViewType.Double))
Evaluators\RankingEvaluator.cs (2)
99if (t != NumberDataViewType.Single && !(t is KeyDataViewType)) 105if (scoreCol.Type != NumberDataViewType.Single)
Evaluators\RegressionEvaluator.cs (4)
59if (t != NumberDataViewType.Single) 63if (t != NumberDataViewType.Single) 329if (t != NumberDataViewType.Single) 333if (t != NumberDataViewType.Single)
Prediction\Calibrator.cs (9)
300DataViewType IValueMapperDist.DistType => NumberDataViewType.Single; 314Host.Check(_mapper.OutputType == NumberDataViewType.Single, "The output type of the predictor is expected to be float"); 716var scoreGetter = RowCursorUtils.GetGetterAs<Single>(NumberDataViewType.Single, input, _scoreCol); 887if (type != NumberDataViewType.Single) 889ch.Info("Not training a calibrator because the predictor output is {0}, but expected to be {1}.", type, NumberDataViewType.Single); 969var scoreGetter = RowCursorUtils.GetGetterAs<Single>(NumberDataViewType.Single, cursor, scoreCol.Index); 971RowCursorUtils.GetGetterAs<Single>(NumberDataViewType.Single, cursor, weightCol.Value.Index); 1307var subNodeOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, "subNodeOutput"); 1312var divNodeOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, "binIndexOutput");
Prediction\CalibratorCatalog.cs (4)
127NumberDataViewType.Single, 206DataViewType ISingleFeaturePredictionTransformer<TICalibrator>.FeatureColumnType => NumberDataViewType.Single; 275probabilityName = ctx.AddIntermediateVariable(NumberDataViewType.Single, probabilityName); 309new DataViewSchema.DetachedColumn(DefaultColumnNames.Probability, NumberDataViewType.Single, builder.ToAnnotations())
Scorers\BinaryClassifierScorer.cs (3)
203var binarizerOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, "BinarizerOutput", false); 211var addOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, "Add", false); 310=> scoreType == NumberDataViewType.Single;
Scorers\ClusteringScorer.cs (1)
144&& vectorType.ItemType == NumberDataViewType.Single;
Scorers\FeatureContributionCalculation.cs (1)
344var featureContributionType = new VectorDataViewType(NumberDataViewType.Single, ((VectorDataViewType)FeatureColumn.Type).Dimensions);
Scorers\MulticlassClassificationScorer.cs (1)
606scoreType is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.ItemType == NumberDataViewType.Single;
Scorers\SchemaBindablePredictorWrapper.cs (10)
130var typeIn = ValueMapper != null ? ValueMapper.InputType : new VectorDataViewType(NumberDataViewType.Single); 477Contracts.Check(ScoreType == NumberDataViewType.Single, "Expected predictor result type to be float"); 486Contracts.Check(distMapper.InputType is VectorDataViewType vectorType && vectorType.ItemType == NumberDataViewType.Single, 488Contracts.Check(distMapper.DistType == NumberDataViewType.Single, 531&& vectorType.ItemType == NumberDataViewType.Single, 648Contracts.CheckParam(ScoreType == NumberDataViewType.Single, nameof(predictor), "Unexpected predictor output type"); 650&& vectorType.ItemType == NumberDataViewType.Single, 667Contracts.CheckDecode(ScoreType == NumberDataViewType.Single); 669&& vectorType.ItemType == NumberDataViewType.Single); 705Contracts.Assert(typeSrc != null && typeSrc.ItemType == NumberDataViewType.Single);
Scorers\ScoreSchemaFactory.cs (2)
54var partialSchema = Create(NumberDataViewType.Single, AnnotationUtils.Const.ScoreColumnKind.BinaryClassification, scoreColumnName); 69schemaBuilder.AddColumn(probabilityColumnName, NumberDataViewType.Single, probabilityMetadataBuilder.ToAnnotations());
Training\TrainerUtils.cs (11)
57if (!(col.Type is VectorDataViewType vecType && vecType.Size > 0 && vecType.ItemType == NumberDataViewType.Single)) 75Contracts.Assert(colType.ItemType == NumberDataViewType.Single); 90if (col.Type != BooleanDataViewType.Instance && col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double && !(col.Type is KeyDataViewType keyType && keyType.Count == 2)) 125if (col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double) 154if (col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double) 195&& vectorType.ItemType == NumberDataViewType.Single)) 207if (col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double) 317return RowCursorUtils.GetGetterAs<float>(NumberDataViewType.Single, row, col.Value.Index); 359=> new SchemaShape.Column(columnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 378=> new SchemaShape.Column(featureColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 388return new SchemaShape.Column(weightColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false);
Transforms\ColumnConcatenatingTransformer.cs (1)
938var vectorizerOutputType = new VectorDataViewType(NumberDataViewType.Single, outVectorSize);
Transforms\FeatureContributionCalculationTransformer.cs (3)
184if (_featureColumnType == null || _featureColumnType.ItemType != NumberDataViewType.Single) 200return new[] { new DataViewSchema.DetachedColumn(DefaultColumnNames.FeatureContributions, new VectorDataViewType(NumberDataViewType.Single, _featureColumnType.Size), builder.ToAnnotations()) }; 345if (col.ItemType != NumberDataViewType.Single || col.Kind != SchemaShape.Column.VectorKind.Vector)
Transforms\GenerateNumberTransform.cs (1)
193return UseCounter[iinfo] ? NumberDataViewType.Int64 : NumberDataViewType.Single;
Transforms\KeyToValue.cs (2)
520labelEncoderOutput = ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, srcShape), "CastNodeOutput"); 542else if (TypeOutput == NumberDataViewType.Single)
Transforms\KeyToVector.cs (4)
260_types[i] = new VectorDataViewType(NumberDataViewType.Single, keyCount); 262_types[i] = new VectorDataViewType(NumberDataViewType.Single, valueCount, keyCount); 719var typeShape = new VectorDataViewType(NumberDataViewType.Single, dim, categoryRange); 840NumberDataViewType.Single, false, new SchemaShape(metadata));
Transforms\LabelConvertTransform.cs (2)
140return NumberDataViewType.Single; 191Interlocked.CompareExchange(ref _slotType, new VectorDataViewType(NumberDataViewType.Single, srcSlotType.Dimensions), null);
Transforms\LabelIndicatorTransform.cs (2)
111if (type.GetKeyCount() > 0 || type == NumberDataViewType.Single || type == NumberDataViewType.Double) 202if (info.TypeSrc == NumberDataViewType.Single)
Transforms\NAFilter.cs (1)
191if (itemType == NumberDataViewType.Single)
Transforms\NormalizeColumn.cs (19)
209if (itemType != NumberDataViewType.Single && itemType != NumberDataViewType.Double) 435if (typeSrc == NumberDataViewType.Single) 442if (vectorType.ItemType == NumberDataViewType.Single) 554if (typeSrc == NumberDataViewType.Single) 561if (vectorType.ItemType == NumberDataViewType.Single) 690if (typeSrc == NumberDataViewType.Single) 697if (vectorType.ItemType == NumberDataViewType.Single) 985if (srcType == NumberDataViewType.Single) 992if (vectorType.ItemType == NumberDataViewType.Single) 1024if (srcType == NumberDataViewType.Single) 1031if (vectorType.ItemType == NumberDataViewType.Single) 1065if (srcType == NumberDataViewType.Single) 1072if (vectorType.ItemType == NumberDataViewType.Single) 1105if (srcType == NumberDataViewType.Single) 1112if (vectorType.ItemType == NumberDataViewType.Single) 1164if (srcType == NumberDataViewType.Single) 1171if (vectorType.ItemType == NumberDataViewType.Single) 1216if (srcType == NumberDataViewType.Single) 1223if (vectorType.ItemType == NumberDataViewType.Single)
Transforms\Normalizer.cs (2)
356if (!col.ItemType.Equals(NumberDataViewType.Single) && !col.ItemType.Equals(NumberDataViewType.Double)) 710if (!itemType.Equals(NumberDataViewType.Single) && !itemType.Equals(NumberDataViewType.Double))
Transforms\RangeFilter.cs (6)
155if (_type != NumberDataViewType.Single && _type != NumberDataViewType.Double && _type.GetKeyCount() == 0) 241if (_type == NumberDataViewType.Single) 264return type == NumberDataViewType.Single || type == NumberDataViewType.Double || type.GetKeyCount() > 0; 357Ch.Assert(Parent._type == NumberDataViewType.Single); 369Ch.Assert(Parent._type == NumberDataViewType.Single); 375Ch.Assert(Parent._type == NumberDataViewType.Single);
Transforms\SlotsDroppingTransformer.cs (2)
503|| type == NumberDataViewType.Single || type == NumberDataViewType.Double || type is TextDataViewType; 918else if (type == NumberDataViewType.Single)
Transforms\TransformBase.cs (3)
948if (type.GetItemType() == NumberDataViewType.Single) 955if (type is VectorDataViewType vectorType && vectorType.ItemType == NumberDataViewType.Single) 965&& vectorType.ItemType == NumberDataViewType.Single)
Transforms\ValueMapping.cs (10)
1094else if (itemType == NumberDataViewType.Single) 1113var labelEncoderOutput = (typeValue == NumberDataViewType.Single || typeValue == TextDataViewType.Instance || typeValue == NumberDataViewType.Int64) ? dstVariableName : 1114(typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) ? ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, (int)srcShape[1]), "LabelEncoderOutput") : 1170else if (typeKey == NumberDataViewType.Single) 1172if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) 1184if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) 1187CastInputTo<double>(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Single); 1198if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) 1209CastInputTo<bool>(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Single); 1248else if (typeValue == NumberDataViewType.Single)
Transforms\ValueToKeyMappingTransformer.cs (2)
804var castOutput = ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, (int)srcShape[1]), "castOutput"); 836else if (type.Equals(NumberDataViewType.Single))
Microsoft.ML.Ensemble (20)
OutputCombiners\BaseStacking.cs (2)
117if (!(ivm.InputType is VectorDataViewType vectorType) || vectorType.ItemType != NumberDataViewType.Single) 209bldr.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single, features);
PipelineEnsemble.cs (4)
234protected override DataViewType ScoreType => NumberDataViewType.Single; 280_scoreType = new VectorDataViewType(NumberDataViewType.Single, classCount); 287_scoreType = new VectorDataViewType(NumberDataViewType.Single, classCount); 294protected override DataViewType ScoreType { get { return NumberDataViewType.Single; } }
Selector\SubModelSelector\BaseSubModelSelector.cs (1)
114scoreCol.Index, AnnotationUtils.Const.ScoreValueKind.Probability, NumberDataViewType.Single.Equals);
Trainer\EnsembleDistributionModelParameters.cs (6)
50DataViewType IValueMapper.OutputType => NumberDataViewType.Single; 51DataViewType IValueMapperDist.DistType => NumberDataViewType.Single; 102return inputType ?? new VectorDataViewType(NumberDataViewType.Single); 108&& mapper.InputType is VectorDataViewType inVectorType && inVectorType.ItemType == NumberDataViewType.Single 109&& mapper.OutputType == NumberDataViewType.Single 110&& mapper.DistType == NumberDataViewType.Single)
Trainer\EnsembleModelParameters.cs (4)
46DataViewType IValueMapper.OutputType => NumberDataViewType.Single; 93return inputType ?? new VectorDataViewType(NumberDataViewType.Single); 99&& mapper.InputType is VectorDataViewType inputVectorType && inputVectorType.ItemType == NumberDataViewType.Single 100&& mapper.OutputType == NumberDataViewType.Single)
Trainer\Multiclass\EnsembleMulticlassModelParameters.cs (3)
91inputType = new VectorDataViewType(NumberDataViewType.Single); 158&& mapper.InputType is VectorDataViewType inVectorType && inVectorType.ItemType == NumberDataViewType.Single 160&& outVectorType.Size > 0 && outVectorType.ItemType == NumberDataViewType.Single)
Microsoft.ML.EntryPoints (1)
FeatureCombiner.cs (1)
297if (labelType == NumberDataViewType.Single || !(labelType is NumberDataViewType))
Microsoft.ML.FastTree (33)
FastTree.cs (6)
1403var copier = GetCopier<float, double>(NumberDataViewType.Single, NumberDataViewType.Double); 1473var copier = GetCopier<float, double>(NumberDataViewType.Single, NumberDataViewType.Double); 2853InputType = new VectorDataViewType(NumberDataViewType.Single, NumFeatures); 2854OutputType = NumberDataViewType.Single; 2891InputType = new VectorDataViewType(NumberDataViewType.Single, NumFeatures); 2892OutputType = NumberDataViewType.Single;
FastTreeClassification.cs (2)
316new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 317new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))),
FastTreeRanking.cs (2)
129if (!labelCol.IsKey && labelCol.ItemType != NumberDataViewType.Single) 489new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeRegression.cs (2)
143return new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 205new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
FastTreeTweedie.cs (2)
211new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) 364new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
GamClassification.cs (2)
187new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 188new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))),
GamModelParameters.cs (6)
112_inputType = new VectorDataViewType(NumberDataViewType.Single, _numInputFeatures); 113_outputType = NumberDataViewType.Single; 162_inputType = new VectorDataViewType(NumberDataViewType.Single, _numInputFeatures); 163_outputType = NumberDataViewType.Single; 680builder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single, _labels); 681builder.AddColumn(DefaultColumnNames.Score, NumberDataViewType.Single, _scores);
GamRegression.cs (1)
139new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
RandomForestClassification.cs (1)
379new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
RandomForestRegression.cs (1)
508new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
TreeEnsembleFeaturizationEstimator.cs (3)
138SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 142SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 146SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
TreeEnsembleFeaturizer.cs (4)
118var treeValueType = new VectorDataViewType(NumberDataViewType.Single, owner._ensemble.TrainedEnsemble.NumTrees); 121var leafIdType = new VectorDataViewType(NumberDataViewType.Single, owner._totalLeafCount); 129var pathIdType = new VectorDataViewType(NumberDataViewType.Single, owner._totalLeafCount - owner._ensemble.TrainedEnsemble.NumTrees); 789return LambdaColumnMapper.Create(env, "Key to Float Mapper", input, col, col, type, NumberDataViewType.Single, mapper);
Utils\RegressionTreeBaseUtils.cs (1)
106builder.AddColumn(nameof(RegressionTreeBase.NumericalSplitThresholds), NumberDataViewType.Single, numericalSplitThresholds.ToArray());
Microsoft.ML.ImageAnalytics (6)
ImagePixelExtractor.cs (3)
470types[i] = new VectorDataViewType(column.OutputAsFloatArray ? NumberDataViewType.Single : NumberDataViewType.Byte, height, width, column.Planes); 472types[i] = new VectorDataViewType(column.OutputAsFloatArray ? NumberDataViewType.Single : NumberDataViewType.Byte, column.Planes, height, width); 820var itemType = colInfo.OutputAsFloatArray ? NumberDataViewType.Single : NumberDataViewType.Byte;
VectorToImageTransform.cs (3)
336if (sourceItemType == NumberDataViewType.Single || sourceItemType == NumberDataViewType.Double) 337return GetterFromType<float>(NumberDataViewType.Single, input, iinfo, ex, needScale); 751if (col.Kind != SchemaShape.Column.VectorKind.Vector || (col.ItemType != NumberDataViewType.Single && col.ItemType != NumberDataViewType.Double && col.ItemType != NumberDataViewType.Byte))
Microsoft.ML.IntegrationTests (2)
ModelFiles.cs (1)
236inputSchemaDefinition[nameof(ModelInput.NumericalFeatures)].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 3);
SchemaDefinitionTests.cs (1)
76outputSchemaDefinition["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, (schema["Features"].Type as VectorDataViewType).Size * 2);
Microsoft.ML.KMeansClustering (9)
KMeansModelParameters.cs (6)
101_inputType = new VectorDataViewType(NumberDataViewType.Single, _dimensionality); 102_outputType = new VectorDataViewType(NumberDataViewType.Single, _k); 143_inputType = new VectorDataViewType(NumberDataViewType.Single, _dimensionality); 144_outputType = new VectorDataViewType(NumberDataViewType.Single, _k); 337var nameX2 = ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, 1), "X2"); 343var dataViewType = new VectorDataViewType(NumberDataViewType.Single, _centroids.Length);
KMeansPlusPlusTrainer.cs (3)
309NumberDataViewType.Single, 974arrDv.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single, clusters); 975arrDv.AddColumn(DefaultColumnNames.Weight, NumberDataViewType.Single, totalWeights);
Microsoft.ML.LightGbm (10)
LightGbmBinaryTrainer.cs (3)
271if (!(labelType is BooleanDataViewType || labelType is KeyDataViewType || labelType == NumberDataViewType.Single)) 286new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 287new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))),
LightGbmMulticlassTrainer.cs (2)
241if (!(labelType is BooleanDataViewType || labelType is KeyDataViewType || labelType == NumberDataViewType.Single)) 370new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))),
LightGbmRankingTrainer.cs (3)
250if (!(labelType is KeyDataViewType || labelType == NumberDataViewType.Single)) 277if (!labelCol.IsKey && labelCol.ItemType != NumberDataViewType.Single) 302new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LightGbmRegressionTrainer.cs (2)
233if (!(labelType is BooleanDataViewType || labelType is KeyDataViewType || labelType == NumberDataViewType.Single)) 250new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.Mkl.Components (11)
OlsLinearRegression.cs (6)
138new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 162if (typeLab != NumberDataViewType.Single) 163throw ch.Except("Incompatible labelColumn column type {0}, must be {1}", typeLab, NumberDataViewType.Single); 168throw ch.Except("Incompatible feature column type {0}, must be known sized vector of {1}", typeFeat, NumberDataViewType.Single); 169if (typeFeat.ItemType != NumberDataViewType.Single) 170throw ch.Except("Incompatible feature column type {0}, must be vector of {1}", typeFeat, NumberDataViewType.Single);
SymSgdClassificationTrainer.cs (3)
257Conversions.DefaultInstance.GetIsDefaultPredicate<float>(NumberDataViewType.Single)); 276new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 277new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))),
VectorWhitening.cs (2)
225|| itemType != NumberDataViewType.Single) 591DataViewType outType = (info.Kind == WhiteningKind.PrincipalComponentAnalysis && info.Rank > 0) ? new VectorDataViewType(NumberDataViewType.Single, info.Rank) : _srcTypes[iinfo];
Microsoft.ML.OnnxTransformer (1)
OnnxTypeParser.cs (1)
148scalarType = NumberDataViewType.Single;
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
357return NumberDataViewType.Single;
Microsoft.ML.PCA (14)
PcaTrainer.cs (7)
202return new SchemaShape.Column(weightColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 207return new SchemaShape.Column(featureColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 378NumberDataViewType.Single, 472_inputType = new VectorDataViewType(NumberDataViewType.Single, _dimension); 516_inputType = new VectorDataViewType(NumberDataViewType.Single, _dimension); 602bldr.AddColumn("VectorData", NumberDataViewType.Single, cols); 614get { return NumberDataViewType.Single; }
PcaTransformer.cs (7)
106public DataViewType OutputType => new VectorDataViewType(NumberDataViewType.Single, Rank); 511if (!(type is VectorDataViewType vectorType && vectorType.Size > 1 && vectorType.ItemType.Equals(NumberDataViewType.Single))) 534Contracts.CheckParam(schema[weightIndex].Type == NumberDataViewType.Single, nameof(weightColumn)); 556new VectorDataViewType(NumberDataViewType.Single, _parent._transformInfos[i].Dimension).ToString(), colSchemaInfo.InputType.ToString()); 638new VectorDataViewType(NumberDataViewType.Single, transformInfo.Dimension); 824if (col.Kind != SchemaShape.Column.VectorKind.Vector || !col.ItemType.Equals(NumberDataViewType.Single)) 828SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
Microsoft.ML.PerformanceTests (3)
HashBench.cs (3)
161InitMapMurmurHashV2(5.0f, NumberDataViewType.Single); 212InitDenseVecMap(new[] { 1f, 2f, 3f, 4f, 5f }, NumberDataViewType.Single); 273InitMapMurmurHashV1(5.0f, NumberDataViewType.Single);
Microsoft.ML.Recommender (7)
MatrixFactorizationPredictor.cs (1)
87private DataViewType OutputType => NumberDataViewType.Single;
MatrixFactorizationTrainer.cs (6)
444if (labelCol.Type != NumberDataViewType.Single && labelCol.Type != NumberDataViewType.Double) 453if (validLabelCol.Type != NumberDataViewType.Single && validLabelCol.Type != NumberDataViewType.Double) 477var labGetter = RowCursorUtils.GetGetterAs<float>(NumberDataViewType.Single, cursor, data.Schema.Label.Value.Index); 495ValueGetter<float> validLabelGetter = RowCursorUtils.GetGetterAs<float>(NumberDataViewType.Single, validCursor, validData.Schema.Label.Value.Index); 569var labelColumn = new SchemaShape.Column(LabelName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 595new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Microsoft.ML.StandardTrainers (109)
FactorizationMachine\FactorizationMachineTrainer.cs (9)
233FeatureColumns[0] = new SchemaShape.Column(options.FeatureColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 237FeatureColumns[i + 1] = new SchemaShape.Column(options.ExtraFeatureColumns[i], SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 240WeightColumn = options.ExampleWeightColumnName != null ? new SchemaShape.Column(options.ExampleWeightColumnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) : default; 266FeatureColumns[i] = new SchemaShape.Column(featureColumnNames[i], SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 269WeightColumn = exampleWeightColumnName != null ? new SchemaShape.Column(exampleWeightColumnName, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false) : default; 425vectorType.ItemType != NumberDataViewType.Single) 492var weightGetter = data.Schema.Weight?.Index is int weightIdx ? RowCursorUtils.GetGetterAs<float>(NumberDataViewType.Single, cursor, weightIdx) : null; 661new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 662new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))),
LdSvm\LdSvmModelParameters.cs (3)
84InputType = new VectorDataViewType(NumberDataViewType.Single, _w[0].Length); 121InputType = new VectorDataViewType(NumberDataViewType.Single, numFeatures); 266public DataViewType OutputType => NumberDataViewType.Single;
LdSvm\LdSvmTrainer.cs (1)
184new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Standard\LinearModelParameters.cs (5)
128_inputType = new VectorDataViewType(NumberDataViewType.Single, Weight.Length); 202_inputType = new VectorDataViewType(NumberDataViewType.Single, Weight.Length); 306get { return NumberDataViewType.Single; } 380var colType = new VectorDataViewType(NumberDataViewType.Single, Weight.Length); 382builder.AddPrimitiveValue("Bias", NumberDataViewType.Single, Bias);
Standard\LogisticRegression\LogisticRegression.cs (2)
173new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 174new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))),
Standard\LogisticRegression\MulticlassLogisticRegression.cs (9)
378new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 478InputType = new VectorDataViewType(NumberDataViewType.Single, NumberOfFeatures); 479OutputType = new VectorDataViewType(NumberDataViewType.Single, NumberOfClasses); 523InputType = new VectorDataViewType(NumberDataViewType.Single, NumberOfFeatures); 524OutputType = new VectorDataViewType(NumberDataViewType.Single, NumberOfClasses); 605InputType = new VectorDataViewType(NumberDataViewType.Single, NumberOfFeatures); 606OutputType = new VectorDataViewType(NumberDataViewType.Single, NumberOfClasses); 1103bldr.AddColumn("Bias", NumberDataViewType.Single, Biases); 1104bldr.AddColumn("Weights", getSlotNames, NumberDataViewType.Single, Weights);
Standard\ModelStatistics.cs (8)
186builder.AddPrimitiveValue("Residual Deviance", NumberDataViewType.Single, Deviance); 187builder.AddPrimitiveValue("Null Deviance", NumberDataViewType.Single, NullDeviance); 188builder.AddPrimitiveValue("AIC", NumberDataViewType.Single, 2 * ParametersCount + Deviance); 566builder.AddPrimitiveValue("BiasEstimate", NumberDataViewType.Single, biasStats.Estimate); 567builder.AddPrimitiveValue("BiasStandardError", NumberDataViewType.Single, biasStats.StandardError); 568builder.AddPrimitiveValue("BiasZScore", NumberDataViewType.Single, biasStats.ZScore); 569builder.AddPrimitiveValue("BiasPValue", NumberDataViewType.Single, biasStats.PValue); 581var colType = new VectorDataViewType(NumberDataViewType.Single, stdErr.Length);
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (1)
177new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single,
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (13)
124new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))), 138Host.Check(labelCol.Type == NumberDataViewType.Single || labelCol.Type is KeyDataViewType, 304_inputType = new VectorDataViewType(NumberDataViewType.Single, _featureCount); 305_outputType = new VectorDataViewType(NumberDataViewType.Single, _labelCount); 351_inputType = new VectorDataViewType(NumberDataViewType.Single, _featureCount); 352_outputType = new VectorDataViewType(NumberDataViewType.Single, _labelCount); 450var typeOne = new VectorDataViewType(NumberDataViewType.Single, 1); 451var typeFea = new VectorDataViewType(NumberDataViewType.Single, _featureHistogram[0].Length); 452var typeLabelByFea = new VectorDataViewType(NumberDataViewType.Single, _labelHistogram.Length, _featureHistogram[0].Length); 453var typeLabelByOne = new VectorDataViewType(NumberDataViewType.Single, _labelHistogram.Length, 1); 466var isFeaturePresent = ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, 1, _featureHistogram[0].Length), "isFeaturePresent"); 531castOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, "CastOutput"); 576var logOutput = ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, _featureHistogram[0].Length), "LogOutput");
Standard\MulticlassClassification\OneVersusAllTrainer.cs (19)
195Host.Assert(label.Type.GetKeyCount() > 0 || label.Type == NumberDataViewType.Single || label.Type == NumberDataViewType.Double); 315ivmd.OutputType != NumberDataViewType.Single || 316ivmd.DistType != NumberDataViewType.Single)) 363DistType = new VectorDataViewType(NumberDataViewType.Single, _impl.Predictors.Length); 395DistType = new VectorDataViewType(NumberDataViewType.Single, _impl.Predictors.Length); 520if (mapper.OutputType != NumberDataViewType.Single) 522if (!(mapper.InputType is VectorDataViewType mapperVectorType) || mapperVectorType.ItemType != NumberDataViewType.Single) 547predictorOutputNames[1] = ctx.AddIntermediateVariable(NumberDataViewType.Single, $"{DefaultColumnNames.Score}_{i}", true); 548predictorOutputNames[2] = ctx.AddIntermediateVariable(NumberDataViewType.Single, $"{DefaultColumnNames.Probability}_{i}", true); 558var clipOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, $"ClipOutput_{i}", true); 668var type = new VectorDataViewType(NumberDataViewType.Single, probabilityOutputs.Length); 707return base.IsValid(mapper, ref inputType) && mapper.DistType == NumberDataViewType.Single; 802var sumOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, "SumOfScores"); 816var castIsZeroSumToFloat = ctx.AddIntermediateVariable(NumberDataViewType.Single, "IsSumZeroAsFloat"); 822var sumOutputNonZero = ctx.AddIntermediateVariable(NumberDataViewType.Single, "SumOfScoresNonZero"); 830divOutputs[i] = ctx.AddIntermediateVariable(NumberDataViewType.Single, $"DivOutput_{i}"); 835var type = new VectorDataViewType(NumberDataViewType.Single, divOutputs.Length); 924var type = new VectorDataViewType(NumberDataViewType.Single, probabilityOutputs.Length); 934var sumOutput = ctx.AddIntermediateVariable(NumberDataViewType.Single, "SumOutput");
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (6)
168Host.Assert(label.Type.GetKeyCount() > 0 || label.Type == NumberDataViewType.Single || label.Type == NumberDataViewType.Double); 283_outputType = new VectorDataViewType(NumberDataViewType.Single, _numClasses); 311_outputType = new VectorDataViewType(NumberDataViewType.Single, _numClasses); 332if (vectorType == null || !vectorType.IsKnownSize || vectorType.ItemType != NumberDataViewType.Single) 338if (mapper.OutputType != NumberDataViewType.Single) 340if (mapper.DistType != NumberDataViewType.Single)
Standard\Online\AveragedPerceptron.cs (1)
201new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Standard\Online\LinearSvm.cs (1)
309new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())),
Standard\Online\OnlineGradientDescent.cs (1)
172new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\PoissonRegression\PoissonRegression.cs (1)
123new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\SdcaBinary.cs (13)
1534Conversions.DefaultInstance.GetIsDefaultPredicate<float>(NumberDataViewType.Single)); 1627NumberDataViewType.Single, 1633NumberDataViewType.Single, 1726NumberDataViewType.Single, 1784NumberDataViewType.Single, 1802NumberDataViewType.Single, 1822Conversions.DefaultInstance.GetIsDefaultPredicate<float>(NumberDataViewType.Single)); 2223Conversions.DefaultInstance.GetIsDefaultPredicate<float>(NumberDataViewType.Single)); 2303new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2304new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 2392new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2446new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 2447new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))),
Standard\SdcaMulticlass.cs (1)
168new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))),
Standard\SdcaRegression.cs (2)
153Conversions.DefaultInstance.GetIsDefaultPredicate<float>(NumberDataViewType.Single)); 197new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Simple\SimpleTrainers.cs (13)
65DataViewType IValueMapper.OutputType => NumberDataViewType.Single; 66DataViewType IValueMapperDist.DistType => NumberDataViewType.Single; 81_inputType = new VectorDataViewType(NumberDataViewType.Single); 98_inputType = new VectorDataViewType(NumberDataViewType.Single); 263if (data.Schema.Weight?.Type == NumberDataViewType.Single) 301=> new SchemaShape.Column(featureColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 304=> new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false); 318new SchemaShape.Column(DefaultColumnNames.Score, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())), 319new SchemaShape.Column(DefaultColumnNames.Probability, SchemaShape.Column.VectorKind.Scalar, NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation(true))), 366_inputType = new VectorDataViewType(NumberDataViewType.Single); 380_inputType = new VectorDataViewType(NumberDataViewType.Single); 442DataViewType IValueMapper.OutputType => NumberDataViewType.Single; 443DataViewType IValueMapperDist.DistType => NumberDataViewType.Single;
Microsoft.ML.Sweeper (2)
Algorithms\SmacSweeper.cs (2)
126dvBuilder.AddColumn(DefaultColumnNames.Label, NumberDataViewType.Single, targets); 127dvBuilder.AddColumn(DefaultColumnNames.Features, NumberDataViewType.Single, features);
Microsoft.ML.TensorFlow (2)
TensorflowUtils.cs (2)
161return NumberDataViewType.Single; 163return NumberDataViewType.Single;
Microsoft.ML.TensorFlow.Tests (2)
TensorFlowEstimatorTests.cs (2)
215Assert.Equal(new VectorDataViewType(NumberDataViewType.Single, 0, 10), schema["Output"].Type); 229Assert.Equal(new VectorDataViewType(NumberDataViewType.Single, 10), schema["Output"].Type);
Microsoft.ML.TestFramework (7)
BaseTestBaseline.cs (1)
717else if (leftType == NumberDataViewType.Single)
DataPipe\TestDataPipe.cs (6)
1070TestHashTransformHelper(_dataFloat, _resultsFloat, NumberDataViewType.Single); 1078TestHashTransformVectorHelper(data, results, NumberDataViewType.Single); 1085TestHashTransformVectorHelper(_dataFloatSparse, results, NumberDataViewType.Single); 1173builder.AddColumn("Foo", NumberDataViewType.Single, values); 1544builder.AddColumn("F1V", NumberDataViewType.Single, data); 1601builder.AddColumn(colName, NumberDataViewType.Single, data);
Microsoft.ML.Tests (49)
CalibratedModelParametersTests.cs (5)
126bldr.AddColumn("X1", NumberDataViewType.Single, x1Array); 127bldr.AddColumn("X2Important", NumberDataViewType.Single, x2Array); 128bldr.AddColumn("X3", NumberDataViewType.Single, x3Array); 129bldr.AddColumn("X4Rand", NumberDataViewType.Single, x4RandArray); 130bldr.AddColumn("Label", NumberDataViewType.Single, yArray);
FakeSchemaTest.cs (3)
24metadataBuilder.Add("M", NumberDataViewType.Single, (ref float v) => v = 484f); 26schemaBuilder.AddColumn("A", new VectorDataViewType(NumberDataViewType.Single, 94)); 39Assert.Equal(NumberDataViewType.Single, columnA.Type.GetItemType());
FeatureContributionTests.cs (4)
306bldr.AddColumn("X1", NumberDataViewType.Single, x1Array); 307bldr.AddColumn("X2VBuffer", NumberDataViewType.Single, vbArray); 308bldr.AddColumn("X3Important", NumberDataViewType.Single, x3Array); 309bldr.AddColumn("Label", NumberDataViewType.Single, yArray);
PermutationFeatureImportanceTests.cs (9)
849bldr.AddColumn("X1", NumberDataViewType.Single, x1Array); 850bldr.AddColumn("X2Important", NumberDataViewType.Single, x2Array); 851bldr.AddColumn("X3", NumberDataViewType.Single, x3Array); 852bldr.AddColumn("X4Rand", NumberDataViewType.Single, x4RandArray); 853bldr.AddColumn("Label", NumberDataViewType.Single, yArray); 930bldr.AddColumn("X1", NumberDataViewType.Single, x1Array); 931bldr.AddColumn("X2VBuffer", NumberDataViewType.Single, vbArray); 932bldr.AddColumn("X3Important", NumberDataViewType.Single, x3Array); 933bldr.AddColumn("Label", NumberDataViewType.Single, yArray);
RangeFilterTests.cs (1)
24builder.AddColumn("Floats", NumberDataViewType.Single, new float[] { 1, 2, 3 });
Scenarios\Api\TestApi.cs (1)
205var coltypeFloat = NumberDataViewType.Single;
SvmLightTests.cs (8)
75schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 5); 104schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 5); 132schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 6); 160schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 3); 211schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 1); 305schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 6); 462schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 6); 489schemaDef["Features"].ColumnType = new VectorDataViewType(NumberDataViewType.Single, 6);
TextLoaderTests.cs (2)
754Assert.Equal(NumberDataViewType.Single, previewIris.Schema[0].Type); 852Assert.Equal(NumberDataViewType.Single, previewIris.Schema[0].Type);
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (3)
63Assert.Equal(NumberDataViewType.Single, treeValuesType.ItemType); 81Assert.Equal(NumberDataViewType.Single, treeLeafIdsType.ItemType); 104Assert.Equal(NumberDataViewType.Single, treePathIdsType.ItemType);
Transformers\ConcatTests.cs (6)
75Assert.True(t is VectorDataViewType vt1 && vt1.ItemType == NumberDataViewType.Single && vt1.Size == 1); 77Assert.True(t is VectorDataViewType vt2 && vt2.ItemType == NumberDataViewType.Single && vt2.Size == 2); 79Assert.True(t is VectorDataViewType vt3 && vt3.ItemType == NumberDataViewType.Single && vt3.Size == 5); 81Assert.True(t is VectorDataViewType vt4 && vt4.ItemType == NumberDataViewType.Single && vt4.Size == 0); 143Assert.True(t is VectorDataViewType vt2 && vt2.ItemType == NumberDataViewType.Single && vt2.Size == 2); 145Assert.True(t is VectorDataViewType vt3 && vt3.ItemType == NumberDataViewType.Single && vt3.Size == 5);
Transformers\ExpressionTransformerTests.cs (2)
52Assert.True(transformed.Schema["Expr2"].Type.GetItemType() == NumberDataViewType.Single); 53Assert.True(transformed.Schema["Expr3"].Type == NumberDataViewType.Single);
Transformers\HashTests.cs (4)
302HashTestCore(1f, NumberDataViewType.Single, 463, 855, 732, 56, 557); 303HashTestCore(-1f, NumberDataViewType.Single, 252, 612, 780, 116, 515); 304HashTestCore(0f, NumberDataViewType.Single, 842, 358, 20, 429, 333); 305HashTestCore(float.NaN, NumberDataViewType.Single, 0, 0, 0, 0, 0);
Transformers\TextFeaturizerTests.cs (1)
728builder.AddColumn("F1V", NumberDataViewType.Single, data);
Microsoft.ML.TimeSeries (25)
AdaptiveSingularSpectrumSequenceModeler.cs (2)
1212if (featureCol.Type != NumberDataViewType.Single) 1557if (data.Schema.Feature.Value.Type != NumberDataViewType.Single)
IidAnomalyDetectionBase.cs (2)
127if (colType != NumberDataViewType.Single) 128throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", InputColumnName, NumberDataViewType.Single.ToString(), colType.ToString());
IidChangePointDetector.cs (1)
267if (col.ItemType != NumberDataViewType.Single)
IidSpikeDetector.cs (1)
243if (col.ItemType != NumberDataViewType.Single)
SequentialAnomalyDetectionTransformBase.cs (1)
320if (colType != NumberDataViewType.Single)
SequentialForecastingTransformBase.cs (6)
64confidenceUpperBoundColumn, inputColumnName, new VectorDataViewType(NumberDataViewType.Single, outputLength)) 117if (colType != NumberDataViewType.Single) 133info[0] = new DetachedColumn(_parent.OutputColumnName, new VectorDataViewType(NumberDataViewType.Single, _parent._outputLength)); 134info[1] = new DetachedColumn(_parent.ConfidenceLowerBoundColumn, new VectorDataViewType(NumberDataViewType.Single, _parent._outputLength)); 135info[2] = new DetachedColumn(_parent.ConfidenceUpperBoundColumn, new VectorDataViewType(NumberDataViewType.Single, _parent._outputLength)); 140info[0] = new DetachedColumn(_parent.OutputColumnName, new VectorDataViewType(NumberDataViewType.Single, _parent._outputLength));
SrCnnAnomalyDetectionBase.cs (2)
118if (colType != NumberDataViewType.Single) 119throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", InputColumnName, NumberDataViewType.Single.ToString(), colType.ToString());
SRCNNAnomalyDetector.cs (1)
275if (col.ItemType != NumberDataViewType.Single)
SrCnnTransformBase.cs (1)
163if (colType != NumberDataViewType.Single)
SsaAnomalyDetectionBase.cs (1)
253if (colType != NumberDataViewType.Single)
SsaChangePointDetector.cs (1)
303if (col.ItemType != NumberDataViewType.Single)
SSaForecasting.cs (4)
336if (col.ItemType != NumberDataViewType.Single) 341_options.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 347NumberDataViewType.Single, false); 351NumberDataViewType.Single, false);
SsaForecastingBase.cs (1)
177if (colType != NumberDataViewType.Single)
SsaSpikeDetector.cs (1)
282if (col.ItemType != NumberDataViewType.Single)
Microsoft.ML.TorchSharp (21)
AutoFormerV2\ObjectDetectionTrainer.cs (9)
468NumberDataViewType.Single, false); 471NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 490new VectorDataViewType(NumberDataViewType.Single).ToString(), boundingBoxCol.GetTypeString()); 529PredictedBoundingBoxColumn = new SchemaShape.Column(Options.PredictedBoundingBoxColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 530ConfidenceColumn = new SchemaShape.Column(Options.ScoreColumnName, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false); 566NumberDataViewType.Single, false); 569NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 769info[1] = new DataViewSchema.DetachedColumn(_parent.Options.ScoreColumnName, new VectorDataViewType(NumberDataViewType.Single), meta.ToAnnotations()); 771info[2] = new DataViewSchema.DetachedColumn(_parent.Options.PredictedBoundingBoxColumnName, new VectorDataViewType(NumberDataViewType.Single));
NasBert\NasBertTrainer.cs (8)
339NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelCol))); 356NumberDataViewType.Single, false); 398if (labelCol.ItemType != NumberDataViewType.Single) 400NumberDataViewType.Single.ToString(), labelCol.GetTypeString()); 444NumberDataViewType.Single, false, new SchemaShape(AnnotationUtils.AnnotationsForMulticlassScoreColumn(labelAnnotationsColumn))); 449NumberDataViewType.Single, false); 536info[1] = new DataViewSchema.DetachedColumn(Parent.Options.ScoreColumnName, new VectorDataViewType(NumberDataViewType.Single, Parent.Options.NumberOfClasses), meta.ToAnnotations()); 556info[0] = new DataViewSchema.DetachedColumn(Parent.Options.ScoreColumnName, NumberDataViewType.Single);
NasBert\SentenceSimilarityTrainer.cs (1)
252var labelCol = new DataViewSchema.DetachedColumn(options.LabelColumnName, NumberDataViewType.Single);
Roberta\QATrainer.cs (3)
523NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 610NumberDataViewType.Single, false, new SchemaShape(scoreMetadata.ToArray())); 748info[1] = new DataViewSchema.DetachedColumn(_parent.Options.ScoreColumnName, new VectorDataViewType(NumberDataViewType.Single), meta.ToAnnotations());
Microsoft.ML.TorchSharp.Tests (4)
QATests.cs (2)
50Assert.Equal(NumberDataViewType.Single, estimatorSchema[5].ItemType); 59Assert.Equal(new VectorDataViewType(NumberDataViewType.Single), transformerSchema[5].Type);
TextClassificationTests.cs (2)
394Assert.Equal(NumberDataViewType.Single, estimatorSchema[3].ItemType); 401Assert.Equal(NumberDataViewType.Single, estimatorSchema[3].ItemType);
Microsoft.ML.Transforms (30)
CountFeatureSelection.cs (1)
350=> type == NumberDataViewType.Single || type == NumberDataViewType.Double || type is TextDataViewType;
Dracula\CountTableTransformer.cs (2)
345result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, meta); 617var type = new VectorDataViewType(NumberDataViewType.Single, valueCount, _parent.Featurizer.NumFeatures);
Expression\LambdaBinder.cs (1)
76node.ResultType = NumberDataViewType.Single;
Expression\Node.cs (1)
670else if (type == NumberDataViewType.Single)
GcnTransform.cs (2)
894return vectorType.ItemType == NumberDataViewType.Single; 901return col.ItemType == NumberDataViewType.Single;
KeyToVectorMapping.cs (3)
182_types[i] = new VectorDataViewType(NumberDataViewType.Single, _bitsPerKey[i]); 185_types[i] = new VectorDataViewType(NumberDataViewType.Single, srcValueCount, _bitsPerKey[i]); 486NumberDataViewType.Single, false, new SchemaShape(metadata));
MissingValueIndicatorTransform.cs (2)
142types[iinfo] = new VectorDataViewType(NumberDataViewType.Single, 2); 145types[iinfo] = new VectorDataViewType(NumberDataViewType.Single, vectorType.Dimensions.Add(2));
MutualInformationFeatureSelection.cs (3)
407type == NumberDataViewType.Single || type == NumberDataViewType.Double || type == NumberDataViewType.Int32; 528else if (labelType == NumberDataViewType.Single) 605if (itemType == NumberDataViewType.Single)
RandomFourierFeaturizing.cs (4)
231if (type is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.ItemType == NumberDataViewType.Single) 250new VectorDataViewType(NumberDataViewType.Single, _transformInfos[col].SrcDim).ToString(), type.ToString()); 489_types[i] = new VectorDataViewType(NumberDataViewType.Single, _parent._transformInfos[i].RotationTerms == null ? 733result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
SvmLight\SvmLightLoader.cs (2)
145_tryFloatParse = Conversions.DefaultInstance.GetTryParseConversion<float>(NumberDataViewType.Single); 722schemaDef[0].ColumnType = new VectorDataViewType(NumberDataViewType.Single, keyCount);
Text\LdaTransform.cs (2)
591result[i] = new DataViewSchema.DetachedColumn(_parent.ColumnPairs[i].outputColumnName, new VectorDataViewType(NumberDataViewType.Single, info.NumberOfTopics), null); 1331result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
Text\NgramHashingTransformer.cs (2)
407_types[i] = new VectorDataViewType(NumberDataViewType.Single, 1 << _parent._columns[i].NumberOfBits); 1229result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(metadata));
Text\NgramTransform.cs (2)
491_types[i] = new VectorDataViewType(NumberDataViewType.Single, _parent._ngramMaps[i].Count); 1090result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false, new SchemaShape(metadata));
Text\TextFeaturizingEstimator.cs (1)
648result[OutputColumn] = new SchemaShape.Column(OutputColumn, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false,
Text\WordEmbeddingsExtractor.cs (2)
324_outputType = new VectorDataViewType(NumberDataViewType.Single, 3 * _parent._currentVocab.Dimension); 941result[colInfo.Name] = new SchemaShape.Column(colInfo.Name, SchemaShape.Column.VectorKind.Vector, NumberDataViewType.Single, false);
Microsoft.ML.Vision (3)
ImageClassificationTrainer.cs (3)
643NumberDataViewType.Single, false), 1386_outputType = new VectorDataViewType(NumberDataViewType.Single, classCount); 1424_outputType = new VectorDataViewType(NumberDataViewType.Single, _classCount);