8 types derived from PrimitiveDataViewType
Microsoft.ML.DataView (8)
DataViewType.cs (7)
89
public sealed class TextDataViewType :
PrimitiveDataViewType
125
public sealed class NumberDataViewType :
PrimitiveDataViewType
287
public sealed class RowIdDataViewType :
PrimitiveDataViewType
326
public sealed class BooleanDataViewType :
PrimitiveDataViewType
365
public sealed class DateTimeDataViewType :
PrimitiveDataViewType
401
public sealed class DateTimeOffsetDataViewType :
PrimitiveDataViewType
437
public sealed class TimeSpanDataViewType :
PrimitiveDataViewType
KeyDataViewType.cs (1)
33
public sealed class KeyDataViewType :
PrimitiveDataViewType
197 references to PrimitiveDataViewType
Microsoft.Data.Analysis (1)
IDataView.Extension.cs (1)
153
var
itemType = vectorType.ItemType;
Microsoft.ML.AutoML (4)
ColumnInference\ColumnTypeInference.cs (4)
47
private
PrimitiveDataViewType
_suggestedType;
55
public
PrimitiveDataViewType
SuggestedType
99
public
PrimitiveDataViewType
ItemType;
102
public Column(int columnIndex, string suggestedName,
PrimitiveDataViewType
itemType)
Microsoft.ML.AutoML.Tests (1)
UserInputValidationTests.cs (1)
372
private static void ValidateLabelTypeTestCore<TLabelRawType>(TaskKind task,
PrimitiveDataViewType
labelType, bool labelTypeShouldBeValid)
Microsoft.ML.Core (4)
Data\AnnotationBuilderExtensions.cs (1)
29
public static void AddKeyValues<TValue>(this DataViewSchema.Annotations.Builder builder, int size,
PrimitiveDataViewType
valueType, ValueGetter<VBuffer<TValue>> getter)
Data\AnnotationUtils.cs (1)
358
public static bool TryGetAnnotation<T>(this DataViewSchema schema,
PrimitiveDataViewType
type, string kind, int col, ref T value)
Data\ColumnTypeExtensions.cs (2)
95
public static
PrimitiveDataViewType
PrimitiveTypeFromType(Type type)
112
public static
PrimitiveDataViewType
PrimitiveTypeFromKind(InternalDataKind kind)
Microsoft.ML.Core.Tests (3)
UnitTests\ColumnTypes.cs (3)
27
var types = new
PrimitiveDataViewType
[] { NumberDataViewType.SByte, NumberDataViewType.Int16, NumberDataViewType.Int32, NumberDataViewType.Int64,
31
foreach (
var
type in types)
33
var
tmp = type;
Microsoft.ML.Data (142)
Commands\TypeInfoCommand.cs (3)
22
private static readonly FuncInstanceMethodInfo1<TypeInfoCommand, IChannel,
PrimitiveDataViewType
, TypeNaInfo> _kindReportMethodInfo
23
= FuncInstanceMethodInfo1<TypeInfoCommand, IChannel,
PrimitiveDataViewType
, TypeNaInfo>.Create(target => target.KindReport<int>);
140
private TypeNaInfo KindReport<T>(IChannel ch,
PrimitiveDataViewType
type)
Data\Conversion.cs (1)
686
var
t = type.ItemType;
Data\DataViewUtils.cs (2)
215
=> type != null && (type is
PrimitiveDataViewType
|| type is VectorDataViewType);
871
Contracts.Assert(type is
PrimitiveDataViewType
);
Data\RowCursorUtils.cs (14)
56
Contracts.CheckParam(typeDst is
PrimitiveDataViewType
, nameof(typeDst));
62
Contracts.Check(typeSrc is
PrimitiveDataViewType
, "Source column type must be primitive");
76
Contracts.CheckParam(typeDst is
PrimitiveDataViewType
, nameof(typeDst));
83
Contracts.Check(typeSrc is
PrimitiveDataViewType
, "Source column type must be primitive");
128
Contracts.Check(typeSrc is
PrimitiveDataViewType
, "Source column type must be primitive");
151
/// <see cref="GetVecGetterAs{TDst}(
PrimitiveDataViewType
, DataViewRow, int)"/>.
153
public static Delegate GetVecGetterAs(
PrimitiveDataViewType
typeDst, DataViewRow row, int col)
163
Func<VectorDataViewType,
PrimitiveDataViewType
, GetterFactory, ValueGetter<VBuffer<int>>> del = GetVecGetterAsCore<int, int>;
172
public static ValueGetter<VBuffer<TDst>> GetVecGetterAs<TDst>(
PrimitiveDataViewType
typeDst, DataViewRow row, int col)
183
Func<VectorDataViewType,
PrimitiveDataViewType
, GetterFactory, ValueGetter<VBuffer<TDst>>> del = GetVecGetterAsCore<int, TDst>;
193
internal static ValueGetter<VBuffer<TDst>> GetVecGetterAs<TDst>(
PrimitiveDataViewType
typeDst, SlotCursor cursor)
200
Func<VectorDataViewType,
PrimitiveDataViewType
, GetterFactory, ValueGetter<VBuffer<TDst>>> del = GetVecGetterAsCore<int, TDst>;
255
private static ValueGetter<VBuffer<TDst>> GetVecGetterAsCore<TSrc, TDst>(VectorDataViewType typeSrc,
PrimitiveDataViewType
typeDst, GetterFactory getterFact)
416
var
type = cursor.GetSlotType().ItemType;
Data\SchemaAnnotationsExtensions.cs (1)
48
public static bool HasKeyValues(this DataViewSchema.Column column,
PrimitiveDataViewType
keyValueItemType = null)
Data\SchemaDefinition.cs (1)
436
PrimitiveDataViewType
itemType;
DataLoadSave\Binary\Codecs.cs (6)
1128
var
itemType = innerCodec.Type as
PrimitiveDataViewType
;
1241
var
itemType = innerCodec.Type as
PrimitiveDataViewType
;
1338
var
itemType = innerCodec.Type as
PrimitiveDataViewType
;
DataLoadSave\Database\DatabaseLoader.cs (3)
410
public static ColInfo Create(string name,
PrimitiveDataViewType
itemType, Segment[] segs, bool user)
492
PrimitiveDataViewType
itemType;
568
PrimitiveDataViewType
itemType;
DataLoadSave\FakeSchema.cs (3)
51
curType = new KeyDataViewType(((
PrimitiveDataViewType
)curType).RawType, AllKeySizes);
53
curType = new VectorDataViewType((
PrimitiveDataViewType
)curType, 0);
55
curType = new VectorDataViewType((
PrimitiveDataViewType
)curType, AllVectorSizes);
DataLoadSave\Text\TextLoader.cs (4)
634
public static ColInfo Create(string name,
PrimitiveDataViewType
itemType, Segment[] segs, bool user)
750
PrimitiveDataViewType
typeOther = null;
768
PrimitiveDataViewType
itemType;
933
PrimitiveDataViewType
itemType;
DataLoadSave\Text\TextLoaderParser.cs (11)
28
private static readonly FuncInstanceMethodInfo1<ValueCreatorCache,
PrimitiveDataViewType
, Func<RowSet, ColumnPipe>> _getCreatorOneCoreMethodInfo
29
= FuncInstanceMethodInfo1<ValueCreatorCache,
PrimitiveDataViewType
, Func<RowSet, ColumnPipe>>.Create(target => target.GetCreatorOneCore<int>);
31
private static readonly FuncInstanceMethodInfo1<ValueCreatorCache,
PrimitiveDataViewType
, Func<RowSet, ColumnPipe>> _getCreatorVecCoreMethodInfo
32
= FuncInstanceMethodInfo1<ValueCreatorCache,
PrimitiveDataViewType
, Func<RowSet, ColumnPipe>>.Create(target => target.GetCreatorVecCore<int>);
73
var
type = ColumnTypeExtensions.PrimitiveTypeFromKind(kind);
79
private Func<RowSet, ColumnPipe> GetCreatorOneCore(
PrimitiveDataViewType
type)
84
private Func<RowSet, ColumnPipe> GetCreatorOneCore<T>(
PrimitiveDataViewType
type)
92
private Func<RowSet, ColumnPipe> GetCreatorVecCore(
PrimitiveDataViewType
type)
97
private Func<RowSet, ColumnPipe> GetCreatorVecCore<T>(
PrimitiveDataViewType
type)
258
public PrimitivePipe(RowSet rows,
PrimitiveDataViewType
type, TryParseMapper<TResult> conv)
441
public VectorPipe(RowSet rows,
PrimitiveDataViewType
type, TryParseMapper<TItem> conv)
DataLoadSave\Text\TextSaver.cs (2)
97
protected ValueWriterBase(
PrimitiveDataViewType
type, int source, char sep)
226
public ValueWriter(DataViewRowCursor cursor,
PrimitiveDataViewType
type, int source, char sep)
DataLoadSave\Transpose\TransposeSaver.cs (2)
75
var
primitiveType = itemType as
PrimitiveDataViewType
;
DataView\ArrayDataViewBuilder.cs (13)
67
public void AddColumn<T>(string name,
PrimitiveDataViewType
type, params T[] values)
97
public void AddColumn<T>(string name, ValueGetter<VBuffer<ReadOnlyMemory<char>>> getNames,
PrimitiveDataViewType
itemType, params T[][] values)
111
public void AddColumn<T>(string name,
PrimitiveDataViewType
itemType, params T[][] values)
122
public void AddColumn<T>(string name, ValueGetter<VBuffer<ReadOnlyMemory<char>>> getNames,
PrimitiveDataViewType
itemType, Combiner<T> combiner, params T[][] values)
136
public void AddColumn<T>(string name,
PrimitiveDataViewType
itemType, Combiner<T> combiner, params T[][] values)
147
public void AddColumn<T>(string name,
PrimitiveDataViewType
itemType, params VBuffer<T>[] values)
158
public void AddColumn<T>(string name, ValueGetter<VBuffer<ReadOnlyMemory<char>>> getNames,
PrimitiveDataViewType
itemType, params VBuffer<T>[] values)
424
public AssignmentColumn(
PrimitiveDataViewType
type, T[] values)
453
public VectorColumn(
PrimitiveDataViewType
itemType, TIn[] values, Func<TIn, int> lengthFunc)
462
private static DataViewType InferType(
PrimitiveDataViewType
itemType, TIn[] values, Func<TIn, int> lengthFunc)
489
public VBufferColumn(
PrimitiveDataViewType
itemType, VBuffer<T>[] values)
502
public ArrayToVBufferColumn(
PrimitiveDataViewType
itemType, T[][] values)
517
public ArrayToSparseVBufferColumn(
PrimitiveDataViewType
itemType, Combiner<T> combiner, T[][] values)
DataView\CacheDataView.cs (1)
1293
host.Assert(type is
PrimitiveDataViewType
);
DataView\DataViewConstructionUtils.cs (3)
270
else if (colType is
PrimitiveDataViewType
)
886
var
primitiveItemType = ColumnTypeExtensions.PrimitiveTypeFromType(itemType);
952
if (AnnotationType is
PrimitiveDataViewType
)
DataView\InternalSchemaDefinition.cs (3)
142
/// The corresponding <see cref="
PrimitiveDataViewType
"/> RawType of the type, or items of this type if vector.
192
/// The corresponding <see cref="
PrimitiveDataViewType
"/> RawType of the type, or items of this type if vector.
268
PrimitiveDataViewType
itemType = ColumnTypeExtensions.PrimitiveTypeFromType(dataItemType);
DataView\Transposer.cs (4)
268
PrimitiveDataViewType
elementType = null;
269
if (transposedColumn.Type is
PrimitiveDataViewType
primitiveDataViewType)
361
Ch.Assert(_view.Schema[_col].Type is
PrimitiveDataViewType
);
926
Contracts.Assert(type is
PrimitiveDataViewType
|| vectorSize > 0);
DataView\TypedCursor.cs (1)
390
else if (colType is
PrimitiveDataViewType
)
Evaluators\EvaluatorUtils.cs (2)
459
public static void ReconcileSlotNames<T>(IHostEnvironment env, IDataView[] views, string columnName,
PrimitiveDataViewType
itemType, T def = default(T))
987
variableSizeVectorColumnName + "_VarLength", typeSrc, new VectorDataViewType((
PrimitiveDataViewType
)typeSrc.ItemType),
Evaluators\MultiOutputRegressionEvaluator.cs (2)
552
labelType = new VectorDataViewType((
PrimitiveDataViewType
)t.ItemType, t.Size);
561
scoreType = new VectorDataViewType((
PrimitiveDataViewType
)t.ItemType, t.Size);
Model\Pfa\PfaUtils.cs (2)
177
if (!(itemType is
PrimitiveDataViewType
))
225
public static JToken DefaultTokenOrNull(
PrimitiveDataViewType
itemType)
Scorers\ScoreSchemaFactory.cs (3)
77
/// <param name="scoreType">Output element's type of quantile regressor. Note that a quantile regressor can produce an array of <see cref="
PrimitiveDataViewType
"/>.</param>
83
Contracts.CheckValue(scoreType as
PrimitiveDataViewType
, nameof(scoreType));
87
var partialSchema = Create(new VectorDataViewType(scoreType as
PrimitiveDataViewType
, quantiles.Length), AnnotationUtils.Const.ScoreColumnKind.QuantileRegression);
Transforms\ColumnConcatenatingTransformer.cs (4)
515
return new BoundColumn(InputSchema, _parent._columns[iinfo], sources, new VectorDataViewType((
PrimitiveDataViewType
)itemType, totalSize),
821
srcPrimitive[i] = _srcTypes[i] is
PrimitiveDataViewType
;
824
var
itemColumnType = OutputType.ItemType;
945
var dstVectorType = new VectorDataViewType(outColType.GetItemType() as
PrimitiveDataViewType
, outVectorSize);
Transforms\Hashing.cs (1)
1351
builder.AddKeyValues(_parent._kvTypes[i].Size, (
PrimitiveDataViewType
)_parent._kvTypes[i].ItemType, getter);
Transforms\KeyToValue.cs (5)
238
types[iinfo] = new VectorDataViewType((
PrimitiveDataViewType
)valsItemType, vectorType.Dimensions);
263
return new KeyToValueMap<TKey, TValue>(this, (KeyDataViewType)keyItemType, (
PrimitiveDataViewType
)valItemType, keyMetadata, iinfo);
276
protected readonly
PrimitiveDataViewType
TypeOutput;
288
protected KeyToValueMap(Mapper mapper,
PrimitiveDataViewType
typeVal, int iinfo)
316
public KeyToValueMap(Mapper parent, KeyDataViewType typeKey,
PrimitiveDataViewType
typeVal, VBuffer<TValue> values, int iinfo)
Transforms\KeyToVector.cs (2)
322
if (_parent._columns[iinfo].OutputCountVector || srcType is
PrimitiveDataViewType
)
353
if (!_parent._columns[iinfo].OutputCountVector || srcType is
PrimitiveDataViewType
)
Transforms\MetadataDispatcher.cs (1)
429
Contracts.CheckParam(type is
PrimitiveDataViewType
, nameof(type), "Must be a primitive type");
Transforms\Normalizer.cs (2)
441
var
itemTypeOld = ColumnTypeExtensions.PrimitiveTypeFromKind(itemKindOld);
455
var
itemType = ColumnTypeExtensions.PrimitiveTypeFromKind(itemKind);
Transforms\RowShufflingTransformer.cs (1)
383
Contracts.Assert(type is
PrimitiveDataViewType
);
Transforms\TypeConverting.cs (5)
353
internal static bool GetNewType(IExceptionContext ectx, DataViewType srcType, InternalDataKind kind, KeyCount keyCount, out
PrimitiveDataViewType
itemType)
403
out
PrimitiveDataViewType
itemType, out _types[i]))
413
out
PrimitiveDataViewType
itemType, out DataViewType typeDst)
515
/// <see cref="
PrimitiveDataViewType
"/>
630
if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputKind.ToInternalDataKind(), colInfo.OutputKeyCount, out
PrimitiveDataViewType
newType))
Transforms\ValueMapping.cs (12)
38
/// <see cref="
PrimitiveDataViewType
"/>
137
/// <see cref="
PrimitiveDataViewType
"/>
191
internal static
PrimitiveDataViewType
GetPrimitiveType(Type rawType, out bool isVectorType)
226
internal static void AddColumnWrapper<T>(ArrayDataViewBuilder builder, string columnName,
PrimitiveDataViewType
primitiveType, T[] values)
237
internal static void AddColumnWrapper<T>(ArrayDataViewBuilder builder, string columnName,
PrimitiveDataViewType
primitiveType, T[][] values)
263
var
keyType = GetPrimitiveType(typeof(TKey), out bool isKeyVectorType);
264
var
valueType = GetPrimitiveType(typeof(TValue), out bool isValueVectorType);
281
var
keyType = GetPrimitiveType(typeof(TKey), out bool isKeyVectorType);
282
var
valueType = GetPrimitiveType(typeof(TValue), out bool isValueVectorType);
767
private protected static
PrimitiveDataViewType
GetPrimitiveType(Type rawType, out bool isVectorType)
1073
colType = new VectorDataViewType((
PrimitiveDataViewType
)_parent.ValueColumnType, vectorType.Dimensions);
1085
private void CastInputTo<T>(OnnxContext ctx, out OnnxNode node, string srcVariableName, string opType, string labelEncoderOutput,
PrimitiveDataViewType
itemType)
Transforms\ValueToKeyMappingTransformerImpl.cs (22)
23
private static readonly FuncStaticMethodInfo1<
PrimitiveDataViewType
, bool, Builder> _createCoreMethodInfo
24
= new FuncStaticMethodInfo1<
PrimitiveDataViewType
, bool, Builder>(CreateCore<int>);
29
public readonly
PrimitiveDataViewType
ItemType;
36
protected Builder(
PrimitiveDataViewType
type)
45
Contracts.Assert(type is VectorDataViewType || type is
PrimitiveDataViewType
);
53
PrimitiveDataViewType
itemType = type.GetItemType() as
PrimitiveDataViewType
;
60
private static Builder CreateCore<T>(
PrimitiveDataViewType
type, bool sorted)
164
public Impl(
PrimitiveDataViewType
type, InPredicate<T> mapsToMissing, bool sort)
191
protected Builder(
PrimitiveDataViewType
type)
485
public readonly
PrimitiveDataViewType
ItemType;
501
protected TermMap(
PrimitiveDataViewType
type, int count)
533
ectx.CheckDecode(codec.Type is
PrimitiveDataViewType
);
550
ectx.Assert(codec.Type is
PrimitiveDataViewType
);
573
return new HashArrayImpl<T>((
PrimitiveDataViewType
)codec.Type, values);
684
public HashArrayImpl(
PrimitiveDataViewType
itemType, HashArray<T> values)
705
host.Assert(codec.Type is
PrimitiveDataViewType
);
764
protected TermMap(
PrimitiveDataViewType
type, int count)
1083
private static readonly FuncInstanceMethodInfo1<KeyImpl<T>,
PrimitiveDataViewType
, TextWriter, bool> _writeTextTermsCoreMethodInfo
1084
= FuncInstanceMethodInfo1<KeyImpl<T>,
PrimitiveDataViewType
, TextWriter, bool>.Create(target => target.WriteTextTermsCore<int>);
1168
builder.AddKeyValues(keyCount, (
PrimitiveDataViewType
)srcMetaType.GetItemType(), mgetter);
1188
private bool WriteTextTermsCore<TMeta>(
PrimitiveDataViewType
srcMetaType, TextWriter writer)
Microsoft.ML.DataView (10)
DataViewSchema.cs (1)
338
public void AddPrimitiveValue<TValue>(string name,
PrimitiveDataViewType
type, TValue value, Annotations annotations = null)
DataViewType.cs (4)
17
/// the more specific abstract classes <see cref="StructuredDataViewType"/> or <see cref="
PrimitiveDataViewType
"/>.
22
/// Constructor for extension types, which must be either <see cref="
PrimitiveDataViewType
"/> or <see cref="StructuredDataViewType"/>.
55
/// This class stands in constrast to <see cref="
PrimitiveDataViewType
"/>. As that class is defined
81
throw new ArgumentException("A " + nameof(
PrimitiveDataViewType
) + " cannot have a disposable " + nameof(RawType), nameof(rawType));
VectorType.cs (5)
42
public VectorDataViewType(
PrimitiveDataViewType
itemType, int size = 0)
59
public VectorDataViewType(
PrimitiveDataViewType
itemType, params int[] dimensions)
77
public VectorDataViewType(
PrimitiveDataViewType
itemType, ImmutableArray<int> dimensions)
88
private static Type GetRawType(
PrimitiveDataViewType
itemType)
111
public
PrimitiveDataViewType
ItemType { get; }
Microsoft.ML.Ensemble (1)
OutputCombiners\BaseStacking.cs (1)
208
bldr.AddColumn(DefaultColumnNames.Label, data.Schema.Label.Value.Type as
PrimitiveDataViewType
, labels);
Microsoft.ML.EntryPoints (1)
PermutationFeatureImportance.cs (1)
324
var
type = ((VectorDataViewType)schema[metricName].ColumnType).ItemType;
Microsoft.ML.ImageAnalytics (1)
VectorToImageTransform.cs (1)
344
private ValueGetter<MLImage> GetterFromType<TValue>(
PrimitiveDataViewType
srcType, DataViewRow input, int iinfo,
Microsoft.ML.OnnxTransformer (4)
OnnxTransform.cs (1)
1078
var
expectedType = ((VectorDataViewType)inputNodeInfo.DataViewType).ItemType;
OnnxTypeParser.cs (2)
239
return new VectorDataViewType((
PrimitiveDataViewType
)GetScalarDataViewType(typeProto.TensorType.ElemType), shape.ToArray());
242
return new VectorDataViewType((
PrimitiveDataViewType
)GetScalarDataViewType(typeProto.TensorType.ElemType), 0);
OnnxUtils.cs (1)
579
public static
PrimitiveDataViewType
OnnxToMlNetType(Type type)
Microsoft.ML.PerformanceTests (1)
HashBench.cs (1)
127
private void InitDenseVecMap<T>(T[] vals,
PrimitiveDataViewType
itemType, int numberOfBits = 20)
Microsoft.ML.Samples (1)
Dynamic\DataOperations\LoadFromEnumerable.cs (1)
75
var
vectorItemType = ((VectorDataViewType)definedSchema[0].ColumnType)
Microsoft.ML.TensorFlow (8)
TensorflowTransform.cs (4)
224
var
type = Tf2MlNetType(tfType);
420
var
type = Tf2MlNetType(tfOutputType);
560
var
expectedType = Tf2MlNetType(_parent.TFInputTypes[i]);
1040
var
expectedType = Tf2MlNetType(_tfInputTypes[i]);
TensorflowUtils.cs (4)
45
var
mlType = Tf2MlNetTypeOrNull(tfType);
148
internal static
PrimitiveDataViewType
Tf2MlNetType(TF_DataType type)
150
var
mlNetType = Tf2MlNetTypeOrNull(type);
156
internal static
PrimitiveDataViewType
Tf2MlNetTypeOrNull(TF_DataType type)
Microsoft.ML.Tests (1)
Transformers\HashTests.cs (1)
129
private void HashTestCore<T>(T val,
PrimitiveDataViewType
type, uint expected, uint expectedOrdered, uint expectedOrdered3, uint expectedCombined, uint expectedCombinedSparse)
Microsoft.ML.Transforms (14)
CountFeatureSelection.cs (1)
392
Contracts.Assert(type is
PrimitiveDataViewType
);
ExpressionTransformer.cs (3)
187
_host.Assert(typeRes is
PrimitiveDataViewType
);
251
public readonly
PrimitiveDataViewType
OutputColumnItemType;
268
OutputColumnItemType = node.ResultType as
PrimitiveDataViewType
;
GroupTransform.cs (4)
296
var
aggregatedValueType = sourceSchema[groupValueColumnName].Type as
PrimitiveDataViewType
;
359
_ectx.Check(colType is
PrimitiveDataViewType
, errorMessage);
452
Contracts.Assert(colType is
PrimitiveDataViewType
);
KeyToVectorMapping.cs (2)
235
if (_infos[iinfo].TypeSrc is
PrimitiveDataViewType
)
475
if (!(col.ItemType is VectorDataViewType || col.ItemType is
PrimitiveDataViewType
))
MissingValueDroppingTransformer.cs (1)
201
_types[i] = new VectorDataViewType((
PrimitiveDataViewType
)srcCol.Type.GetItemType());
UngroupTransform.cs (3)
225
public readonly
PrimitiveDataViewType
ItemType;
227
public PivotColumnOptions(string name, int index, int size,
PrimitiveDataViewType
itemType)
627
private ValueGetter<T> MakeGetter<T>(int col,
PrimitiveDataViewType
itemType)