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