3 writes to ItemType
Microsoft.ML.DataView (3)
VectorType.cs (3)
47
ItemType
= itemType;
65
ItemType
= itemType;
83
ItemType
= itemType;
305 references to ItemType
Microsoft.Data.Analysis (1)
IDataView.Extension.cs (1)
153
var itemType = vectorType.
ItemType
;
Microsoft.ML.AutoML (1)
API\AutoCatalog.cs (1)
824
&& !(data.Schema[c.ColumnIndex].Type is VectorDataViewType vt && vt.
ItemType
== BooleanDataViewType.Instance)).ToArray();
Microsoft.ML.Core (5)
Data\AnnotationUtils.cs (1)
295
&& vectorType.
ItemType
is TextDataViewType;
Data\ColumnTypeExtensions.cs (3)
45
public static DataViewType GetItemType(this DataViewType columnType) => (columnType as VectorDataViewType)?.
ItemType
?? columnType;
90
if (!vectorType.
ItemType
.Equals(otherVectorType.
ItemType
))
Data\IEstimator.cs (1)
161
itemType = vectorType.
ItemType
;
Microsoft.ML.Core.Tests (3)
UnitTests\CoreBaseTestClass.cs (1)
89
var result = vecType.
ItemType
.RawType.TryGetDataKind(out var kind);
UnitTests\ScoreSchemaTest.cs (1)
68
Assert.Equal(TextDataViewType.Instance, (scoreMetadata.Schema[0].Type as VectorDataViewType).
ItemType
);
UnitTests\TestEntryPoints.cs (1)
5407
Assert.True(type is VectorDataViewType vecType && vecType.
ItemType
is TextDataViewType && vecType.Size == 10);
Microsoft.ML.Data (192)
Commands\ShowSchemaCommand.cs (5)
255
if (!type.
ItemType
.IsStandardScalar() && !(type.
ItemType
is KeyDataViewType))
262
var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.
ItemType
.RawType);
273
Contracts.Assert(type.
ItemType
.RawType == typeof(T));
275
var conv = Conversions.DefaultInstance.GetStringConversion<T>(type.
ItemType
);
Data\Conversion.cs (2)
684
Contracts.CheckParam(type.
ItemType
.RawType == typeof(T), nameof(type));
686
var t = type.
ItemType
;
Data\DataViewUtils.cs (3)
868
pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.
ItemType
.RawType);
1341
getter = Utils.MarshalInvoke(GetVectorFlatteningGetter<int>, vectorType.
ItemType
.RawType,
1342
cursor, srcColIndex, vectorType.
ItemType
);
Data\ITransposeDataView.cs (1)
37
/// <see cref="GetSlotType"/> with col=i may return a <see cref="VectorDataViewType"/> whose <see cref="VectorDataViewType.
ItemType
"/>
Data\RowCursorUtils.cs (6)
164
var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.
ItemType
.RawType, typeDst.RawType);
184
var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.
ItemType
.RawType, typeof(TDst));
201
var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(typeSrc.
ItemType
.RawType, typeof(TDst));
257
Contracts.Assert(typeof(TSrc) == typeSrc.
ItemType
.RawType);
263
var conv = Conversions.DefaultInstance.GetStandardConversion<TSrc, TDst>(typeSrc.
ItemType
, typeDst, out identity);
416
var type = cursor.GetSlotType().
ItemType
;
Data\SchemaAnnotationsExtensions.cs (4)
16
/// <c>SlotNames</c> annotation of a <see cref="VectorDataViewType"/> whose <see cref="VectorDataViewType.
ItemType
"/>
39
/// <c>SlotNames</c> annotation of a <see cref="VectorDataViewType"/> whose <see cref="VectorDataViewType.
ItemType
"/>
62
&& keyValueItemType.Equals(vectorType.
ItemType
);
67
/// key values are of <see cref="VectorDataViewType.
ItemType
"/> whose <see cref="DataViewType.RawType"/> matches
DataLoadSave\Binary\Codecs.cs (2)
792
Contracts.Assert(innerCodec.Type == type.
ItemType
);
1158
DataViewType itemType = type.
ItemType
;
DataLoadSave\FakeSchema.cs (1)
37
del = Utils.MarshalInvoke(_getDefaultVectorGetterMethodInfo, vectorType.
ItemType
.RawType);
DataLoadSave\Text\TextLoaderParser.cs (2)
706
if (vectorType?.
ItemType
is KeyDataViewType vectorKeyType)
712
DataViewType itemType = vectorType?.
ItemType
?? info.ColType;
DataLoadSave\Text\TextSaver.cs (5)
67
writePipeType = typeof(VecValueWriter<>).MakeGenericType(vectorType.
ItemType
.RawType);
162
: base(type.
ItemType
, source, sep)
168
&& typeNames.Size == type.Size && typeNames.
ItemType
is TextDataViewType)
423
if (typeNames != null && typeNames.Size == vectorType.Size && typeNames.
ItemType
is TextDataViewType)
503
DataViewType itemType = vectorType?.
ItemType
?? type;
DataLoadSave\Transpose\TransposeLoader.cs (3)
315
Host.CheckDecode(type.GetItemType().Equals(vectorType.
ItemType
));
649
DataViewType cursorType = ((ITransposeDataView)this).GetSlotType(col).
ItemType
;
805
itemType = vectorType.
ItemType
;
DataView\CacheDataView.cs (1)
1290
pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.
ItemType
.RawType);
DataView\DataViewConstructionUtils.cs (8)
248
Host.Assert(vectorType.
ItemType
is TextDataViewType);
254
Host.Assert(Nullable.GetUnderlyingType(outputType.GetElementType()) == vectorType.
ItemType
.RawType);
256
Host.Assert(outputType.GetElementType() == vectorType.
ItemType
.RawType);
266
Host.Assert(outputType.GetGenericArguments()[0] == vectorType.
ItemType
.RawType);
268
genericType = vectorType.
ItemType
.RawType;
900
DataViewType annotationItemType = annotationVectorType?.
ItemType
?? annotationType;
947
Contracts.Assert(itemType == annotationVectorType.
ItemType
.RawType);
950
return Utils.MarshalInvoke(_getVBufferGetterMethodInfo, this, annotationVectorType.
ItemType
.RawType) as ValueGetter<TDst>;
DataView\InternalSchemaDefinition.cs (1)
281
DataViewType itemType = columnVectorType?.
ItemType
?? col.ColumnType;
DataView\Transposer.cs (6)
244
var type = ((ITransposeDataView)this).GetSlotType(col).
ItemType
.RawType;
272
elementType = vectorDataViewType.
ItemType
;
1099
Contracts.Assert(type.
ItemType
.RawType == typeof(T));
1105
_types[0] = new VectorDataViewType(type.
ItemType
, _lims[0]);
1107
_types[c] = new VectorDataViewType(type.
ItemType
, _lims[c] - _lims[c - 1]);
1399
return Utils.MarshalInvoke(_getRowCursorShimCoreMethodInfo, cursor.GetSlotType().
ItemType
.RawType, provider, cursor);
DataView\TypedCursor.cs (3)
145
return colType is VectorDataViewType vectorType && vectorType.
ItemType
.RawType == itemType;
386
Ch.Assert(fieldType.GetGenericArguments()[0] == vectorType.
ItemType
.RawType);
388
genericType = vectorType.
ItemType
.RawType;
Evaluators\BinaryClassifierEvaluator.cs (1)
179
vecType.Size > 0 && vecType.
ItemType
== TextDataViewType.Instance)
Evaluators\ClusteringEvaluator.cs (3)
108
if (!(type is VectorDataViewType vectorType) || !vectorType.IsKnownSize || vectorType.
ItemType
!= NumberDataViewType.Single)
118
if (!(t is VectorDataViewType vectorType) || !vectorType.IsKnownSize || vectorType.
ItemType
!= NumberDataViewType.Single)
756
if (!(type is VectorDataViewType vectorType) || !vectorType.IsKnownSize || vectorType.
ItemType
!= NumberDataViewType.Single)
Evaluators\EvaluatorUtils.cs (12)
311
&& vectorType.
ItemType
== NumberDataViewType.Double
354
if (slotNamesType != null && slotNamesType.Size == size && slotNamesType.
ItemType
is TextDataViewType)
574
DataViewType keyValueItemType = (keyValueType as VectorDataViewType)?.
ItemType
?? keyValueType;
577
DataViewType typeItemType = vectorType?.
ItemType
?? type;
933
idv = Utils.MarshalInvoke(AddVarLengthColumn<int>, vectorType.
ItemType
.RawType, env, idv,
987
variableSizeVectorColumnName + "_VarLength", typeSrc, new VectorDataViewType((PrimitiveDataViewType)typeSrc.
ItemType
),
1017
else if (type is VectorDataViewType vectorType && vectorType.
ItemType
== NumberDataViewType.Double)
1028
if (slotNamesType != null && slotNamesType.Size == vectorType.Size && slotNamesType.
ItemType
is TextDataViewType)
1237
if (keyValuesType == null || !(keyValuesType.
ItemType
is TextDataViewType) ||
1280
else if (type is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
== NumberDataViewType.Double)
1394
host.Assert(type != null && type.IsKnownSize && type.
ItemType
is TextDataViewType);
1479
Contracts.Check(type != null && type.IsKnownSize && type.
ItemType
== NumberDataViewType.Double);
Evaluators\MulticlassClassificationEvaluator.cs (3)
79
if (scoreType == null || scoreType.Size < 2 || scoreType.
ItemType
!= NumberDataViewType.Single)
103
if (mdType != null && mdType.IsKnownSize && mdType.
ItemType
is TextDataViewType)
861
if (scoreType == null || scoreType.Size < 2 || scoreType.
ItemType
!= NumberDataViewType.Single)
Evaluators\MultiOutputRegressionEvaluator.cs (9)
62
if (t == null || !t.IsKnownSize || t.
ItemType
!= NumberDataViewType.Single)
66
if (t == null || !t.IsKnownSize || (t.
ItemType
!= NumberDataViewType.Single && t.
ItemType
!= NumberDataViewType.Double))
550
if (t == null || !t.IsKnownSize || (t.
ItemType
!= NumberDataViewType.Single && t.
ItemType
!= NumberDataViewType.Double))
552
labelType = new VectorDataViewType((PrimitiveDataViewType)t.
ItemType
, t.Size);
559
if (t == null || !t.IsKnownSize || t.
ItemType
!= NumberDataViewType.Single)
561
scoreType = new VectorDataViewType((PrimitiveDataViewType)t.
ItemType
, t.Size);
708
if (type != null && type.IsKnownSize && type.
ItemType
== NumberDataViewType.Double)
Evaluators\QuantileRegressionEvaluator.cs (9)
48
Host.Check(type != null && type.IsKnownSize && type.
ItemType
is TextDataViewType, "Quantile regression score column must have slot names");
60
if (t == null || t.Size == 0 || (t.
ItemType
!= NumberDataViewType.Single && t.
ItemType
!= NumberDataViewType.Double))
72
Host.Assert(scoreType != null && scoreType.Size > 0 && (scoreType.
ItemType
== NumberDataViewType.Single || scoreType.
ItemType
== NumberDataViewType.Double));
75
if (slotNamesType != null && slotNamesType.Size == scoreType.Size && slotNamesType.
ItemType
is TextDataViewType)
452
if (scoreType == null || scoreType.Size == 0 || (scoreType.
ItemType
!= NumberDataViewType.Single && scoreType.
ItemType
!= NumberDataViewType.Double))
517
if (type is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
== NumberDataViewType.Double)
Model\Pfa\PfaUtils.cs (1)
165
var itemType = PfaTypeOrNullCore(vectorType.
ItemType
);
Scorers\BinaryClassifierScorer.cs (1)
72
return Utils.MarshalInvoke(WrapCore<int>, keyType.
ItemType
.RawType, env, mapper, trainSchema);
Scorers\ClusteringScorer.cs (1)
144
&& vectorType.
ItemType
== NumberDataViewType.Single;
Scorers\MulticlassClassificationScorer.cs (8)
145
_getter = Utils.MarshalInvoke(_decodeInitMethodInfo, this, _type.
ItemType
.RawType, value);
187
Utils.MarshalActionInvoke(SaveCore<int>, _type.
ItemType
.RawType, ctx);
193
Contracts.Assert(_type.
ItemType
.RawType == typeof(T));
203
throw _host.Except("We do not know how to serialize label names of type '{0}'", _type.
ItemType
);
235
return Utils.MarshalInvoke(CreateBound<int>, _type.
ItemType
.RawType, env, (ISchemaBoundRowMapper)innerBound, _type, _getter, _metadataKind, _canWrap);
422
return Utils.MarshalInvoke(WrapCore<int>, keyType.
ItemType
.RawType, env, mapper, trainSchema);
481
return labelNameType is VectorDataViewType vectorType && vectorType.Size == scoreType.GetVectorSize() && vectorType.
ItemType
== TextDataViewType.Instance;
606
scoreType is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
== NumberDataViewType.Single;
Scorers\SchemaBindablePredictorWrapper.cs (7)
136
DataViewType typeItemType = typeVectorType?.
ItemType
?? type;
137
DataViewType typeInItemType = typeInVectorType?.
ItemType
?? typeIn;
486
Contracts.Check(distMapper.InputType is VectorDataViewType vectorType && vectorType.
ItemType
== NumberDataViewType.Single,
531
&& vectorType.
ItemType
== NumberDataViewType.Single,
650
&& vectorType.
ItemType
== NumberDataViewType.Single,
669
&& vectorType.
ItemType
== NumberDataViewType.Single);
705
Contracts.Assert(typeSrc != null && typeSrc.
ItemType
== NumberDataViewType.Single);
Training\TrainerUtils.cs (3)
57
if (!(col.Type is VectorDataViewType vecType && vecType.Size > 0 && vecType.
ItemType
== NumberDataViewType.Single))
75
Contracts.Assert(colType.
ItemType
== NumberDataViewType.Single);
195
&& vectorType.
ItemType
== NumberDataViewType.Single))
Transforms\ColumnConcatenatingTransformer.cs (5)
473
DataViewType currentItemType = curVectorType?.
ItemType
?? curType;
652
if (typeNames != null && typeNames.Size == vectorTypeSrc.Size && typeNames.
ItemType
is TextDataViewType)
680
return Utils.MarshalInvoke(_makeGetterMethodInfo, this, OutputType.
ItemType
.RawType, input);
824
var itemColumnType = OutputType.
ItemType
;
948
castNode.AddAttribute("to", outColType.
ItemType
.RawType);
Transforms\FeatureContributionCalculationTransformer.cs (1)
184
if (_featureColumnType == null || _featureColumnType.
ItemType
!= NumberDataViewType.Single)
Transforms\Hashing.cs (9)
404
Host.Assert(HashingEstimator.IsColumnTypeValid(srcType.
ItemType
));
406
Type rawType = srcType.
ItemType
.RawType;
407
if (srcType.
ItemType
is KeyDataViewType)
445
Host.Assert(srcType.
ItemType
== TextDataViewType.Instance);
452
Host.Assert(srcType.
ItemType
.RawType == typeof(T));
471
Type rawType = srcType.
ItemType
.RawType;
472
if (srcType.
ItemType
is KeyDataViewType)
1351
builder.AddKeyValues(_parent._kvTypes[i].Size, (PrimitiveDataViewType)_parent._kvTypes[i].
ItemType
, getter);
1515
DataViewType itemType = vectorTypeSrc?.
ItemType
?? typeSrc;
Transforms\InvertHashUtils.cs (2)
362
ch.CheckDecode(vectorType.
ItemType
is TextDataViewType);
397
ch.Assert(vectorType.
ItemType
== TextDataViewType.Instance);
Transforms\KeyToVector.cs (5)
316
if (typeNames == null || !typeNames.IsKnownSize || !(typeNames.
ItemType
is TextDataViewType) ||
380
if (typeSlotSrc != null && typeSlotSrc.Size == typeSrc.Size && typeSlotSrc.
ItemType
is TextDataViewType)
388
int keyCount = typeSrc.
ItemType
.GetKeyCountAsInt32(Host);
507
KeyDataViewType keyTypeSrc = srcVectorType.
ItemType
as KeyDataViewType;
553
KeyDataViewType keyTypeSrc = srcVectorType.
ItemType
as KeyDataViewType;
Transforms\NAFilter.cs (2)
190
var itemType = (type as VectorDataViewType)?.
ItemType
?? type;
281
genericArgument = vecType.
ItemType
.RawType;
Transforms\NormalizeColumn.cs (28)
206
itemType = vectorType.
ItemType
;
440
else if (typeSrc is VectorDataViewType vectorType && vectorType.
ItemType
is NumberDataViewType)
442
if (vectorType.
ItemType
== NumberDataViewType.Single)
444
if (vectorType.
ItemType
== NumberDataViewType.Double)
559
else if (typeSrc is VectorDataViewType vectorType && vectorType.
ItemType
is NumberDataViewType)
561
if (vectorType.
ItemType
== NumberDataViewType.Single)
563
if (vectorType.
ItemType
== NumberDataViewType.Double)
695
if (typeSrc is VectorDataViewType vectorType && vectorType.
ItemType
is NumberDataViewType)
697
if (vectorType.
ItemType
== NumberDataViewType.Single)
699
if (vectorType.
ItemType
== NumberDataViewType.Double)
990
if (srcType is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
is NumberDataViewType)
992
if (vectorType.
ItemType
== NumberDataViewType.Single)
994
if (vectorType.
ItemType
== NumberDataViewType.Double)
1029
if (srcType is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
is NumberDataViewType)
1031
if (vectorType.
ItemType
== NumberDataViewType.Single)
1033
if (vectorType.
ItemType
== NumberDataViewType.Double)
1070
if (srcType is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
is NumberDataViewType)
1072
if (vectorType.
ItemType
== NumberDataViewType.Single)
1074
if (vectorType.
ItemType
== NumberDataViewType.Double)
1110
if (srcType is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
is NumberDataViewType)
1112
if (vectorType.
ItemType
== NumberDataViewType.Single)
1114
if (vectorType.
ItemType
== NumberDataViewType.Double)
1169
if (srcType is VectorDataViewType vectorType && vectorType.
ItemType
is NumberDataViewType)
1171
if (vectorType.
ItemType
== NumberDataViewType.Single)
1173
if (vectorType.
ItemType
== NumberDataViewType.Double)
1221
if (srcType is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
is NumberDataViewType)
1223
if (vectorType.
ItemType
== NumberDataViewType.Single)
1225
if (vectorType.
ItemType
== NumberDataViewType.Double)
Transforms\NormalizeColumnDbl.cs (3)
731
host.Check(typeSrc.
ItemType
.RawType == typeof(TFloat), "The column type must be vector of Double.");
1057
host.Check(typeSrc.
ItemType
.RawType == typeof(TFloat), "The column type must be vector of Double.");
1260
host.Check(typeSrc.
ItemType
.RawType == typeof(TFloat), "The column type must be vector of Double.");
Transforms\NormalizeColumnSng.cs (3)
888
host.Check(typeSrc.
ItemType
.RawType == typeof(TFloat), "The column type must be vector of Single.");
1217
host.Check(typeSrc.
ItemType
.RawType == typeof(TFloat), "The column type must be vector of Single.");
1421
host.Check(typeSrc.
ItemType
.RawType == typeof(TFloat), "The column type must be vector of Single.");
Transforms\Normalizer.cs (2)
475
DataViewType itemType = vectorType?.
ItemType
?? type;
709
DataViewType itemType = vectorType?.
ItemType
?? colType;
Transforms\RowShufflingTransformer.cs (1)
380
pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.
ItemType
.RawType);
Transforms\SlotsDroppingTransformer.cs (5)
487
var rawType = srcVectorType?.
ItemType
?? _srcTypes[i];
545
type = new VectorDataViewType(vectorType.
ItemType
, Math.Max(dstLength, 1));
766
return Utils.MarshalInvoke(_makeVecTrivialGetterMethodInfo, this, vectorType.
ItemType
.RawType);
787
return Utils.MarshalInvoke(_makeVecGetterMethodInfo, this, vectorType.
ItemType
.RawType, input, iinfo);
841
var type = new VectorDataViewType(vectorType.
ItemType
, Math.Max(dstLength, 1));
Transforms\TransformBase.cs (4)
286
Contracts.Assert(slotTypeSrc == null || typeSrc.GetItemType().Equals(slotTypeSrc.
ItemType
));
941
if (type is VectorDataViewType vectorType && vectorType.
ItemType
is TextDataViewType)
955
if (type is VectorDataViewType vectorType && vectorType.
ItemType
== NumberDataViewType.Single)
965
&& vectorType.
ItemType
== NumberDataViewType.Single)
Transforms\TypeConverting.cs (1)
474
return RowCursorUtils.GetVecGetterAs(vectorType.
ItemType
, input, _srcCols[iinfo]);
Transforms\ValueMapping.cs (1)
901
return Utils.MarshalInvoke(_getVectorMethodInfo, vectorType.
ItemType
.RawType, _mapping[key]);
Transforms\ValueToKeyMappingTransformer.cs (2)
221
DataViewType itemType = vectorType?.
ItemType
?? type;
962
DataViewType itemType = vectorType?.
ItemType
?? info.TypeSrc;
Transforms\ValueToKeyMappingTransformerImpl.cs (4)
1100
TypedMap.ItemType.GetKeyCountAsInt32(_host) == 0 || !Utils.MarshalInvoke(_addMetadataCoreMethodInfo, this, srcMetaType.
ItemType
.RawType, srcMetaType.
ItemType
, builder))
1181
TypedMap.ItemType.GetKeyCountAsInt32(_host) == 0 || !Utils.MarshalInvoke(_writeTextTermsCoreMethodInfo, this, srcMetaType.
ItemType
.RawType, srcMetaType.
ItemType
, writer))
Utilities\ColumnCursor.cs (3)
76
if (elementType == colVectorType.
ItemType
.RawType)
83
else if (elementType == typeof(string) && colVectorType.
ItemType
is TextDataViewType)
88
var meth = del.Method.GetGenericMethodDefinition().MakeGenericMethod(elementType, colVectorType.
ItemType
.RawType);
Microsoft.ML.DataView (5)
VectorType.cs (5)
16
/// where the type parameter is in <see cref="
ItemType
"/>.
127
if (!
ItemType
.Equals(tmp.
ItemType
))
148
int hash = Hashing.CombineHash(
ItemType
.GetHashCode(), Size);
158
sb.Append("Vector<").Append(
ItemType
);
Microsoft.ML.Ensemble (7)
OutputCombiners\BaseStacking.cs (1)
117
if (!(ivm.InputType is VectorDataViewType vectorType) || vectorType.
ItemType
!= NumberDataViewType.Single)
PipelineEnsemble.cs (2)
612
return Utils.MarshalInvoke(CheckKeyLabelColumnCore<int>, mdType.
ItemType
.RawType, env, models, (KeyDataViewType)labelType, schema, labelCol.Index, mdType);
648
env.Assert(keyValuesType.
ItemType
.RawType == typeof(T));
Trainer\EnsembleDistributionModelParameters.cs (1)
108
&& mapper.InputType is VectorDataViewType inVectorType && inVectorType.
ItemType
== NumberDataViewType.Single
Trainer\EnsembleModelParameters.cs (1)
99
&& mapper.InputType is VectorDataViewType inputVectorType && inputVectorType.
ItemType
== NumberDataViewType.Single
Trainer\Multiclass\EnsembleMulticlassModelParameters.cs (2)
158
&& mapper.InputType is VectorDataViewType inVectorType && inVectorType.
ItemType
== NumberDataViewType.Single
160
&& outVectorType.Size > 0 && outVectorType.
ItemType
== NumberDataViewType.Single)
Microsoft.ML.EntryPoints (2)
FeatureCombiner.cs (1)
124
if (type == null || !type.IsKnownSize || !(type.
ItemType
is TextDataViewType))
PermutationFeatureImportance.cs (1)
324
var type = ((VectorDataViewType)schema[metricName].ColumnType).
ItemType
;
Microsoft.ML.ImageAnalytics (1)
VectorToImageTransform.cs (1)
307
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputColName, new VectorDataViewType(vectorType.
ItemType
, _columns[col].ImageHeight, _columns[col].ImageWidth, _columns[col].Planes).ToString(), vectorType.ToString());
Microsoft.ML.Mkl.Components (2)
OlsLinearRegression.cs (1)
169
if (typeFeat.
ItemType
!= NumberDataViewType.Single)
VectorWhitening.cs (1)
223
DataViewType itemType = vectorType?.
ItemType
?? type;
Microsoft.ML.OnnxConverter (1)
OnnxUtils.cs (1)
347
rawType = vectorType.
ItemType
.RawType;
Microsoft.ML.OnnxTransformer (5)
OnnxTransform.cs (3)
626
var elemRawType = vectorType.
ItemType
.RawType;
628
if (vectorType.
ItemType
is TextDataViewType)
1078
var expectedType = ((VectorDataViewType)inputNodeInfo.DataViewType).
ItemType
;
OnnxUtils.cs (2)
327
dataViewType = new VectorDataViewType(vectorType.
ItemType
, shapeDictionary[name]);
329
dataViewType = new VectorDataViewType(vectorType.
ItemType
);
Microsoft.ML.PCA (1)
PcaTransformer.cs (1)
511
if (!(type is VectorDataViewType vectorType && vectorType.Size > 1 && vectorType.
ItemType
.Equals(NumberDataViewType.Single)))
Microsoft.ML.Predictor.Tests (2)
TestTransposer.cs (2)
29
var itemType = vecType?.
ItemType
?? type;
78
Assert.True(typeof(T) == type.
ItemType
.RawType, $"{desc} had wrong type for slot cursor");
Microsoft.ML.Samples (3)
Dynamic\DataOperations\LoadFromEnumerable.cs (1)
76
.
ItemType
;
Dynamic\TensorFlow\TextClassification.cs (2)
68
featuresType.
ItemType
.RawType, featuresType.Dimensions[0]);
73
"Prediction/Softmax", predictionType.
ItemType
.RawType,
Microsoft.ML.Samples.GPU (2)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (2)
68
featuresType.
ItemType
.RawType, featuresType.Dimensions[0]);
73
"Prediction/Softmax", predictionType.
ItemType
.RawType,
Microsoft.ML.StandardTrainers (4)
FactorizationMachine\FactorizationMachineTrainer.cs (1)
425
vectorType.
ItemType
!= NumberDataViewType.Single)
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
183
if (!(labelMetadataType is VectorDataViewType vecType && vecType.
ItemType
== TextDataViewType.Instance && vecType.Size == _numClasses))
Standard\MulticlassClassification\OneVersusAllTrainer.cs (1)
522
if (!(mapper.InputType is VectorDataViewType mapperVectorType) || mapperVectorType.
ItemType
!= NumberDataViewType.Single)
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (1)
332
if (vectorType == null || !vectorType.IsKnownSize || vectorType.
ItemType
!= NumberDataViewType.Single)
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipeBase.cs (1)
935
Type itemType = vectorType.
ItemType
.RawType;
Microsoft.ML.TestFrameworkCommon (3)
TestCommon.cs (3)
221
if (!vectorType.
ItemType
.Equals(otherVectorType.
ItemType
))
287
private static DataViewType GetItemType(this DataViewType columnType) => (columnType as VectorDataViewType)?.
ItemType
?? columnType;
Microsoft.ML.Tests (12)
Scenarios\Api\TestApi.cs (1)
239
Assert.True(idv.Schema[1].Annotations.Schema[0].Type is VectorDataViewType vectorType && vectorType.
ItemType
is TextDataViewType);
TermEstimatorTests.cs (1)
147
var itemType1 = (type1 as VectorDataViewType)?.
ItemType
?? type1;
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (3)
63
Assert.Equal(NumberDataViewType.Single, treeValuesType.
ItemType
);
81
Assert.Equal(NumberDataViewType.Single, treeLeafIdsType.
ItemType
);
104
Assert.Equal(NumberDataViewType.Single, treePathIdsType.
ItemType
);
Transformers\ConcatTests.cs (6)
75
Assert.True(t is VectorDataViewType vt1 && vt1.
ItemType
== NumberDataViewType.Single && vt1.Size == 1);
77
Assert.True(t is VectorDataViewType vt2 && vt2.
ItemType
== NumberDataViewType.Single && vt2.Size == 2);
79
Assert.True(t is VectorDataViewType vt3 && vt3.
ItemType
== NumberDataViewType.Single && vt3.Size == 5);
81
Assert.True(t is VectorDataViewType vt4 && vt4.
ItemType
== NumberDataViewType.Single && vt4.Size == 0);
143
Assert.True(t is VectorDataViewType vt2 && vt2.
ItemType
== NumberDataViewType.Single && vt2.Size == 2);
145
Assert.True(t is VectorDataViewType vt3 && vt3.
ItemType
== NumberDataViewType.Single && vt3.Size == 5);
Transformers\CopyColumnEstimatorTests.cs (1)
148
var itemType1 = (type1 as VectorDataViewType)?.
ItemType
?? type1;
Microsoft.ML.TorchSharp (12)
AutoFormerV2\ObjectDetectionTrainer.cs (4)
626
Microsoft.ML.Internal.Utilities.Utils.MarshalActionInvoke(SaveLabelValues<int>, labelColType.
ItemType
.RawType, ctx);
644
throw Host.Except("We do not know how to serialize label names of type '{0}'", labelColType.
ItemType
);
701
var labelGetter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_decodeInitMethodInfo, vecType.
ItemType
.RawType, value);
756
var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.
ItemType
.RawType, _parent.LabelColumn);
NasBert\NasBertTrainer.cs (2)
521
var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.
ItemType
.RawType, Parent.LabelColumn);
543
var getter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_makeLabelAnnotationGetter, this, keyType.
ItemType
.RawType, Parent.LabelColumn);
NasBert\NerTrainer.cs (3)
282
Microsoft.ML.Internal.Utilities.Utils.MarshalActionInvoke(SaveLabelValues<int>, labelColType.
ItemType
.RawType, ctx);
295
throw Host.Except("We do not know how to serialize label names of type '{0}'", labelColType.
ItemType
);
347
var labelGetter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_decodeInitMethodInfo, vecType.
ItemType
.RawType, value);
NasBert\TextClassificationTrainer.cs (3)
219
Microsoft.ML.Internal.Utilities.Utils.MarshalActionInvoke(SaveLabelValues<int>, labelColType.
ItemType
.RawType, ctx);
232
throw Host.Except("We do not know how to serialize label names of type '{0}'", labelColType.
ItemType
);
284
var labelGetter = Microsoft.ML.Internal.Utilities.Utils.MarshalInvoke(_decodeInitMethodInfo, vecType.
ItemType
.RawType, value);
Microsoft.ML.Transforms (40)
CountFeatureSelection.cs (3)
367
var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(colType.
ItemType
.RawType);
413
_isDefault = Data.Conversion.Conversions.DefaultInstance.GetIsDefaultPredicate<T>(type.
ItemType
);
414
if (!Data.Conversion.Conversions.DefaultInstance.TryGetIsNAPredicate<T>(type.
ItemType
, out _isMissing))
GcnTransform.cs (1)
894
return vectorType.
ItemType
== NumberDataViewType.Single;
HashJoiningTransform.cs (1)
486
itemType = vectorType.
ItemType
;
KeyToVectorMapping.cs (3)
229
if (typeNames == null || !typeNames.IsKnownSize || !(typeNames.
ItemType
is TextDataViewType) ||
296
if (typeSlotSrc != null && typeSlotSrc.Size == srcVectorSize && typeSlotSrc.
ItemType
is TextDataViewType)
385
Host.Assert(typeSrc.
ItemType
is KeyDataViewType);
MissingValueIndicatorTransform.cs (2)
152
!(typeNames.
ItemType
is TextDataViewType))
200
if (typeNames == null || typeNames.Size != srcVectorType.Size || !(typeNames.
ItemType
is TextDataViewType))
MissingValueIndicatorTransformer.cs (1)
469
Type rawType = (inputType is VectorDataViewType vectorType) ? vectorType.
ItemType
.RawType : inputType.RawType;
MissingValueReplacing.cs (6)
243
var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(savedVectorType.
ItemType
.RawType);
258
InPredicate<T> defaultPred = Data.Conversion.Conversions.DefaultInstance.GetIsDefaultPredicate<T>(srcType.
ItemType
);
295
type = new VectorDataViewType(vectorType.
ItemType
, vectorType.Dimensions);
569
vectorType = new VectorDataViewType(vectorType.
ItemType
, vectorType.Dimensions);
878
rawType = vectorType.
ItemType
.RawType;
1052
new VectorDataViewType(vectorType.
ItemType
, vectorType.Dimensions);
MissingValueReplacingUtils.cs (12)
54
if (vectorType.
ItemType
.RawType == typeof(float))
56
else if (vectorType.
ItemType
.RawType == typeof(double))
61
if (vectorType.
ItemType
.RawType == typeof(float))
63
else if (vectorType.
ItemType
.RawType == typeof(double))
68
if (vectorType.
ItemType
.RawType == typeof(float))
70
else if (vectorType.
ItemType
.RawType == typeof(double))
79
if (vectorType.
ItemType
.RawType == typeof(float))
81
else if (vectorType.
ItemType
.RawType == typeof(double))
86
if (vectorType.
ItemType
.RawType == typeof(float))
88
else if (vectorType.
ItemType
.RawType == typeof(double))
93
if (vectorType.
ItemType
.RawType == typeof(float))
95
else if (vectorType.
ItemType
.RawType == typeof(double))
OptionalColumnTransform.cs (2)
413
return Utils.MarshalInvoke(_makeGetterVecMethodInfo, this, vectorType.
ItemType
.RawType, vectorType.Size);
501
return Utils.MarshalInvoke(_makeGetterVecMethodInfo, this, vectorType.
ItemType
.RawType, vectorType.Size);
RandomFourierFeaturizing.cs (1)
231
if (type is VectorDataViewType vectorType && vectorType.IsKnownSize && vectorType.
ItemType
== NumberDataViewType.Single)
Text\LdaTransform.cs (2)
580
if (srcType == null || !srcType.IsKnownSize || !(srcType.
ItemType
is NumberDataViewType))
842
if (srcColType == null || !srcColType.IsKnownSize || !(srcColType.
ItemType
is NumberDataViewType))
Text\NgramHashingTransformer.cs (1)
1186
if (!(vectorType.
ItemType
is KeyDataViewType itemKeyType))
Text\NgramTransform.cs (2)
245
env.Assert(srcTypes[iinfo] is VectorDataViewType vectorType && vectorType.
ItemType
is KeyDataViewType);
962
if (!(vectorType.
ItemType
is KeyDataViewType itemKeyType))
Text\StopWordsRemovingTransformer.cs (1)
631
type is VectorDataViewType vectorType && vectorType.
ItemType
is TextDataViewType;
Text\WordEmbeddingsExtractor.cs (1)
304
if (!(colType is VectorDataViewType vectorType && vectorType.
ItemType
is TextDataViewType))
UngroupTransform.cs (1)
339
infos[i] = new PivotColumnOptions(name, col, colType.Size, colType.
ItemType
);