642 references to Single
Microsoft.Data.Analysis (3)
Microsoft.ML.AutoML (20)
Microsoft.ML.AutoML.Tests (86)
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);
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);
Microsoft.ML.Core (1)
Microsoft.ML.Core.Tests (2)
Microsoft.ML.Data (158)
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());
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");
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\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)
Microsoft.ML.Ensemble (20)
Microsoft.ML.EntryPoints (1)
Microsoft.ML.FastTree (33)
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))),
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))),
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);
Microsoft.ML.ImageAnalytics (6)
Microsoft.ML.IntegrationTests (2)
Microsoft.ML.KMeansClustering (9)
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))),
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))),
Microsoft.ML.OnnxTransformer (1)
Microsoft.ML.Parquet (1)
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; }
Microsoft.ML.PerformanceTests (3)
Microsoft.ML.Recommender (7)
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))),
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\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\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\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)
Microsoft.ML.TensorFlow (2)
Microsoft.ML.TensorFlow.Tests (2)
Microsoft.ML.TestFramework (7)
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);
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);
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);
Microsoft.ML.TimeSeries (25)
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));
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);
Microsoft.ML.TorchSharp.Tests (4)
Microsoft.ML.Transforms (30)
Microsoft.ML.Vision (3)