126 references to Instance
Microsoft.Data.Analysis (3)
DataFrameColumns\VBufferDataFrameColumn.cs (1)
317return new VectorDataViewType(BooleanDataViewType.Instance);
IDataView.Extension.cs (1)
67if (type == BooleanDataViewType.Instance)
PrimitiveDataFrameColumn.cs (1)
799return BooleanDataViewType.Instance;
Microsoft.ML.AutoML (8)
API\AutoCatalog.cs (2)
823&& data.Schema[c.ColumnIndex].Type != BooleanDataViewType.Instance 824&& !(data.Schema[c.ColumnIndex].Type is VectorDataViewType vt && vt.ItemType == BooleanDataViewType.Instance)).ToArray();
ColumnInference\ColumnTypeInference.cs (2)
164col.SuggestedType = BooleanDataViewType.Instance; 365labelColumn.SuggestedType = BooleanDataViewType.Instance;
Utils\UserInputValidationUtil.cs (4)
93column.Type.GetItemType() != BooleanDataViewType.Instance && 98$"{BooleanDataViewType.Instance}, {NumberDataViewType.Single}, and {TextDataViewType.Instance}. " + 117new DataViewType[] { NumberDataViewType.Single, BooleanDataViewType.Instance }); 312return new DataViewType[] { BooleanDataViewType.Instance };
Microsoft.ML.AutoML.Tests (13)
PurposeInferenceTests.cs (1)
26schemaBuilder.AddColumn(DefaultColumnNames.Label, BooleanDataViewType.Instance);
TransformInferenceTests.cs (3)
392new DatasetColumnInfo("Bool", BooleanDataViewType.Instance, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 425new DatasetColumnInfo("Bool", BooleanDataViewType.Instance, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)), 459new DatasetColumnInfo("Bool", BooleanDataViewType.Instance, ColumnPurpose.NumericFeature, new ColumnDimensions(null, null)),
UserInputValidationTests.cs (7)
237ValidateLabelTypeTestCore<bool>(TaskKind.Regression, BooleanDataViewType.Instance, false); 246ValidateLabelTypeTestCore<bool>(TaskKind.Recommendation, BooleanDataViewType.Instance, false); 255ValidateLabelTypeTestCore<bool>(TaskKind.BinaryClassification, BooleanDataViewType.Instance, true); 262ValidateLabelTypeTestCore<bool>(TaskKind.MulticlassClassification, BooleanDataViewType.Instance, true); 271ValidateLabelTypeTestCore<bool>(TaskKind.Ranking, BooleanDataViewType.Instance, false); 280dataViewBuilder.AddColumn("Boolean", BooleanDataViewType.Instance, false); 365validationDataBuilder.AddColumn(DefaultColumnNames.Label, BooleanDataViewType.Instance, false);
Utils\MLNetUtils\DataViewTestFixture.cs (2)
41else if (column.type == BooleanDataViewType.Instance) 43dataBuilder.AddColumn(column.name, BooleanDataViewType.Instance, createDummyRow ? new bool[] { false } : new bool[] { });
Microsoft.ML.Core (4)
Data\AnnotationUtils.cs (2)
329&& metaCol.ItemType == BooleanDataViewType.Instance; 432cols.Add(new SchemaShape.Column(Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));
Data\ColumnTypeExtensions.cs (2)
100return BooleanDataViewType.Instance; 117return BooleanDataViewType.Instance;
Microsoft.ML.Core.Tests (2)
UnitTests\ColumnTypes.cs (1)
29TextDataViewType.Instance, BooleanDataViewType.Instance, DateTimeDataViewType.Instance, DateTimeOffsetDataViewType.Instance, TimeSpanDataViewType.Instance };
UnitTests\TestEntryPoints.cs (1)
1794TextDataViewType.Instance, BooleanDataViewType.Instance, labelToBinary);
Microsoft.ML.Data (43)
DataLoadSave\Binary\Codecs.cs (2)
409: base(factory, BooleanDataViewType.Instance) 513: base(factory, BooleanDataViewType.Instance)
Evaluators\BinaryClassifierEvaluator.cs (5)
135if (t != NumberDataViewType.Single && t != NumberDataViewType.Double && t != BooleanDataViewType.Instance && t.GetKeyCount() != 2) 341overallDvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray()); 1077_types[AssignedCol] = BooleanDataViewType.Instance; 1103_types[AssignedCol] = BooleanDataViewType.Instance; 1265if (t != NumberDataViewType.Single && t != NumberDataViewType.Double && t != BooleanDataViewType.Instance && t.GetKeyCount() != 2)
Evaluators\ClusteringEvaluator.cs (1)
208overallDvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
Evaluators\EvaluatorUtils.cs (2)
1265dvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, foldCol >= 0 ? new[] { false, false } : new[] { false }); 1266weightedDvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, foldCol >= 0 ? new[] { true, true } : new[] { true });
Evaluators\MulticlassClassificationEvaluator.cs (1)
215overallDvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
Evaluators\MultiOutputRegressionEvaluator.cs (1)
152overallDvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
Evaluators\RankingEvaluator.cs (1)
220overallDvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
Evaluators\RegressionEvaluatorBase.cs (1)
101overallDvBldr.AddColumn(MetricKinds.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
Prediction\CalibratorCatalog.cs (2)
109SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 305builder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, (ref bool value) => value = true);
Scorers\BinaryClassifierScorer.cs (1)
305return BooleanDataViewType.Instance;
Scorers\ScoreSchemaFactory.cs (1)
62probabilityMetadataBuilder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, (ref bool value) => { value = true; });
Training\TrainerUtils.cs (2)
90if (col.Type != BooleanDataViewType.Instance && col.Type != NumberDataViewType.Single && col.Type != NumberDataViewType.Double && !(col.Type is KeyDataViewType keyType && keyType.Count == 2)) 352=> new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false);
Transforms\ColumnConcatenatingEstimator.cs (1)
132meta.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));
Transforms\ColumnConcatenatingTransformer.cs (1)
581metadata.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, (ValueGetter<bool>)GetIsNormalized);
Transforms\GenerateNumberTransform.cs (2)
201items = items.Prepend(BooleanDataViewType.Instance.GetPair(AnnotationUtils.Kinds.IsNormalized)); 209return BooleanDataViewType.Instance;
Transforms\Hashing.cs (1)
1383var isGreaterThanZeroOutputBool = ctx.AddIntermediateVariable(BooleanDataViewType.Instance, "isGreaterThanZeroOutputBool");
Transforms\KeyToValue.cs (2)
519if (TypeOutput == NumberDataViewType.Double || TypeOutput == BooleanDataViewType.Instance) 562else if (TypeOutput == BooleanDataViewType.Instance)
Transforms\KeyToVector.cs (2)
359builder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, getter); 836metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));
Transforms\LabelIndicatorTransform.cs (1)
164return BooleanDataViewType.Instance;
Transforms\NormalizeColumn.cs (2)
590bldr.AddPrimitive("CdfUseLog", BooleanDataViewType.Instance, UseLog); 622bldr.AddPrimitive("CdfUseLog", BooleanDataViewType.Instance, UseLog);
Transforms\Normalizer.cs (2)
360BooleanDataViewType.Instance, false); 746builder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, (ValueGetter<bool>)IsNormalizedGetter);
Transforms\TypeConverting.cs (2)
460builder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, getter); 636metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));
Transforms\ValueMapping.cs (6)
1114(typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) ? ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, (int)srcShape[1]), "LabelEncoderOutput") : 1172if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) 1184if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) 1196else if (typeKey == BooleanDataViewType.Instance) 1198if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) 1262else if (typeValue == BooleanDataViewType.Instance)
Transforms\ValueToKeyMappingTransformer.cs (1)
831else if (type.Equals(BooleanDataViewType.Instance))
Microsoft.ML.DataView (1)
DataViewType.cs (1)
324/// Note this can have only one possible value, accessible by the singleton static property <see cref="Instance"/>.
Microsoft.ML.FastTree (6)
FastTreeClassification.cs (1)
318new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
GamClassification.cs (1)
189new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
RandomForestClassification.cs (1)
380new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
TreeEnsembleFeaturizer.cs (2)
153leafIdMetadataBuilder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, (ref bool value) => value = true); 166pathIdMetadataBuilder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, (ref bool value) => value = true);
Utils\RegressionTreeBaseUtils.cs (1)
107builder.AddColumn(nameof(RegressionTreeBase.CategoricalSplitFlags), BooleanDataViewType.Instance, categoricalSplitFlags.ToArray());
Microsoft.ML.LightGbm (1)
LightGbmBinaryTrainer.cs (1)
288new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.Mkl.Components (1)
SymSgdClassificationTrainer.cs (1)
278new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.OnnxTransformer (1)
OnnxTypeParser.cs (1)
121scalarType = BooleanDataViewType.Instance;
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
331return BooleanDataViewType.Instance;
Microsoft.ML.PCA (1)
PcaTrainer.cs (1)
384BooleanDataViewType.Instance,
Microsoft.ML.Samples (1)
Dynamic\SimpleDataViewImplementation.cs (1)
164builder.AddColumn("Label", BooleanDataViewType.Instance);
Microsoft.ML.StandardTrainers (19)
FactorizationMachine\FactorizationMachineTrainer.cs (3)
239LabelColumn = new SchemaShape.Column(options.LabelColumnName, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false); 268LabelColumn = new SchemaShape.Column(labelColumnName, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false); 663new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
LdSvm\LdSvmTrainer.cs (1)
185new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\LogisticRegression\LogisticRegression.cs (1)
175new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (1)
105label.Name, label.Name, type, BooleanDataViewType.Instance,
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (1)
455var greaterOutput = ctx.AddIntermediateVariable(new VectorDataViewType(BooleanDataViewType.Instance, _featureHistogram[0].Length), "greaterOutput");
Standard\MulticlassClassification\OneVersusAllTrainer.cs (2)
806var castOutput = ctx.AddIntermediateVariable(BooleanDataViewType.Instance, "CastOutput"); 812var notOutput = ctx.AddIntermediateVariable(BooleanDataViewType.Instance, "IsSumZero");
Standard\Online\AveragedPerceptron.cs (1)
202new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Online\LinearSvm.cs (1)
310new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\SdcaBinary.cs (6)
1639BooleanDataViewType.Instance, 1733BooleanDataViewType.Instance, 1791BooleanDataViewType.Instance, 2305new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2393new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation())) 2448new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Standard\Simple\SimpleTrainers.cs (2)
257_host.CheckParam(labelCol.Type == BooleanDataViewType.Instance, nameof(data), "Invalid type for Label column"); 320new SchemaShape.Column(DefaultColumnNames.PredictedLabel, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false, new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation()))
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
183return BooleanDataViewType.Instance;
Microsoft.ML.TestFramework (2)
BaseTestBaseline.cs (1)
721else if (leftType == BooleanDataViewType.Instance)
DataPipe\TestDataPipe.cs (1)
1187builder.AddColumn("Biz", BooleanDataViewType.Instance, bizValues);
Microsoft.ML.Tests (2)
Transformers\HashTests.cs (2)
317HashTestCore(false, BooleanDataViewType.Instance, 842, 358, 20, 429, 333); 318HashTestCore(true, BooleanDataViewType.Instance, 502, 537, 746, 847, 711);
Microsoft.ML.Transforms (16)
Dracula\CountTableTransformer.cs (1)
300if (data.Schema.Label.Value.Type == BooleanDataViewType.Instance)
Expression\LambdaBinder.cs (1)
67node.ResultType = BooleanDataViewType.Instance;
GcnTransform.cs (2)
354builder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, getter); 923metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));
KeyToVectorMapping.cs (2)
252builder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, normalizeGetter); 483metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));
MissingValueHandlingTransformer.cs (2)
166if (!Data.Conversion.Conversions.DefaultInstance.TryGetStandardConversion(BooleanDataViewType.Instance, replaceItemType, out Delegate conv, out bool identity)) 169BooleanDataViewType.Instance, replaceItemType);
MissingValueIndicatorTransformer.cs (7)
195outType = BooleanDataViewType.Instance; 197outType = new VectorDataViewType(BooleanDataViewType.Instance, vectorType.Dimensions); 216builder.Add(AnnotationUtils.Kinds.IsNormalized, BooleanDataViewType.Instance, getter); 476var isNaNOutput = ctx.AddIntermediateVariable(BooleanDataViewType.Instance, "IsNaNOutput", true); 545metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false)); 547(DataViewType)BooleanDataViewType.Instance : 548new VectorDataViewType(BooleanDataViewType.Instance, vectorType.Dimensions);
Text\TextFeaturizingEstimator.cs (1)
646metadata.Add(new SchemaShape.Column(AnnotationUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BooleanDataViewType.Instance, false));