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