2 types derived from DataViewType
Microsoft.ML.DataView (2)
DataViewType.cs (2)
63public abstract class StructuredDataViewType : DataViewType 75public abstract class PrimitiveDataViewType : DataViewType
1035 references to DataViewType
DnnAnalyzer (3)
DnnAnalyzer.cs (3)
29private static IEnumerable<(string, string, DataViewType, string[])> GetModelNodes(string modelPath) 38var type = schema[i].Type; 40var metadataType = schema[i].Annotations.Schema.GetColumnOrNull("TensorflowOperatorType")?.Type;
Microsoft.Data.Analysis (2)
IDataView.Extension.cs (1)
66DataViewType type = dataViewColumn.Type;
PrimitiveDataFrameColumn.cs (1)
795private static DataViewType GetDataViewType()
Microsoft.ML.AutoML (22)
ColumnInference\ColumnTypeInference.cs (1)
278var colType = column.Type;
ColumnInference\PurposeInference.cs (3)
49private readonly Lazy<DataViewType> _type; 65public DataViewType Type { get { return _type.Value; } } 73_type = new Lazy<DataViewType>(() => _data.Schema[_columnId].Type);
TransformInference\TransformInference.cs (2)
71public readonly DataViewType Type; 75public IntermediateColumn(string name, DataViewType type, ColumnPurpose purpose, ColumnDimensions dimensions)
Utils\ColumnTypeExtensions.cs (5)
11public static bool IsNumber(this DataViewType columnType) 16public static bool IsText(this DataViewType columnType) 21public static bool IsBool(this DataViewType columnType) 26public static bool IsVector(this DataViewType columnType) 31public static bool IsKey(this DataViewType columnType)
Utils\DatasetColumnInfo.cs (2)
12public readonly DataViewType Type; 16public DatasetColumnInfo(string name, DataViewType type, ColumnPurpose purpose, ColumnDimensions dimensions)
Utils\UserInputValidationUtil.cs (9)
115new DataViewType[] { NumberDataViewType.Single, TextDataViewType.Instance }); 117new DataViewType[] { NumberDataViewType.Single, BooleanDataViewType.Instance }); 119new DataViewType[] { TextDataViewType.Instance }); 229IEnumerable<DataViewType> allowedTypes = null) 242private static void ValidateTrainDataColumn(IDataView trainData, string columnName, string columnPurpose, IEnumerable<DataViewType> allowedTypes = null) 307private static IEnumerable<DataViewType> GetAllowedLabelTypes(TaskKind task) 312return new DataViewType[] { BooleanDataViewType.Instance }; 319return new DataViewType[] { NumberDataViewType.Single }; 321return new DataViewType[] { NumberDataViewType.Single };
Microsoft.ML.AutoML.Tests (1)
Utils\MLNetUtils\DataViewTestFixture.cs (1)
23public static IDataView BuildDummyDataView(IEnumerable<(string name, DataViewType type)> columns, bool createDummyRow = true)
Microsoft.ML.Core (33)
Data\AnnotationUtils.cs (10)
178public static KeyValuePair<string, DataViewType> GetSlotNamesPair(int size) 187public static KeyValuePair<string, DataViewType> GetKeyNamesPair(int size) 196public static KeyValuePair<string, DataViewType> GetPair(this DataViewType type, string kind) 199return new KeyValuePair<string, DataViewType>(kind, type); 226var columnType = schema[col].Annotations.Schema.GetColumnOrNull(annotationKind)?.Type; 250var columnType = schema[col].Annotations.Schema.GetColumnOrNull(annotationKind)?.Type; 269var columnType = schema[col].Annotations.Schema.GetColumnOrNull(annotationKind)?.Type; 363var annotationType = schema[col].Annotations.Schema.GetColumnOrNull(kind)?.Type; 388var type = schema[colIndex].Annotations.Schema.GetColumnOrNull(Kinds.CategoricalSlotRanges)?.Type;
Data\ColumnTypeExtensions.cs (12)
17/// Whether this type is a standard scalar type completely determined by its <see cref="DataViewType.RawType"/> 20public static bool IsStandardScalar(this DataViewType columnType) => 28public static ulong GetKeyCount(this DataViewType columnType) => (columnType as KeyDataViewType)?.Count ?? 0; 34public static int GetKeyCountAsInt32(this DataViewType columnType, IExceptionContext ectx = null) 45public static DataViewType GetItemType(this DataViewType columnType) => (columnType as VectorDataViewType)?.ItemType ?? columnType; 50public static int GetVectorSize(this DataViewType columnType) => (columnType as VectorDataViewType)?.Size ?? 0; 56public static int GetValueCount(this DataViewType columnType) => (columnType as VectorDataViewType)?.Size ?? 1; 62public static bool IsKnownSizeVector(this DataViewType columnType) => columnType.GetVectorSize() > 0; 69public static InternalDataKind GetRawKind(this DataViewType columnType) 79public static bool SameSizeAndItemType(this DataViewType columnType, DataViewType other)
Data\IEstimator.cs (7)
16/// and also since it doesn't specify exact <see cref="DataViewType"/>'s for vectors and keys. 50public readonly DataViewType ItemType; 62internal Column(string name, VectorKind vecKind, DataViewType itemType, bool isKey, SchemaShape annotations = null) 145internal static void GetColumnTypeShape(DataViewType type, 147out DataViewType itemType, 191GetColumnTypeShape(annotationColumn.Type, out var mVecKind, out var mItemType, out var mIsKey); 196GetColumnTypeShape(schema[iCol].Type, out var vecKind, out var itemType, out var isKey);
Data\IValueMapper.cs (3)
30DataViewType InputType { get; } 31DataViewType OutputType { get; } 50DataViewType DistType { get; }
EntryPoints\PredictorModel.cs (1)
61internal abstract string[] GetLabelInfo(IHostEnvironment env, out DataViewType labelType);
Microsoft.ML.Core.Tests (9)
UnitTests\ColumnTypes.cs (1)
23var dict = new Dictionary<DataViewType, string>();
UnitTests\CoreBaseTestClass.cs (5)
83protected Func<bool> GetColumnComparer(DataViewRow r1, DataViewRow r2, int col, DataViewType type, bool exactDoubles) 258var type1 = curs1.Schema[col].Type; 259var type2 = curs2.Schema[col].Type; 347var type1 = curs1.Schema[col].Type; 348var type2 = cursors[col].Schema[col].Type;
UnitTests\DataTypes.cs (1)
251private static ValueMapper<TSrc, TDst> GetMapper<TSrc, TDst>(DataViewType dstType)
UnitTests\TestCustomTypeRegister.cs (1)
123public override bool Equals(DataViewType other)
UnitTests\TestEntryPoints.cs (1)
5406var type = schema["Count"].Annotations.Schema[AnnotationUtils.Kinds.SlotNames].Type;
Microsoft.ML.Data (537)
Commands\CrossValidationCommand.cs (1)
302var type = schema[index].Type;
Commands\DataCommand.cs (1)
166var type = cursor.Schema[currentIndex].Type;
Commands\SaveDataCommand.cs (2)
150var type = data.Schema[i].Type; 212var type = view.Schema[i].Type;
Commands\ScoreCommand.cs (1)
190var type = loader.Schema[i].Type;
Commands\ShowSchemaCommand.cs (6)
140var type = schema[col].Type; 155DataViewType typeNames; 193var type = metaColumn.Type; 207private static void ShowMetadataValue(IndentedTextWriter itw, DataViewSchema schema, int col, string kind, DataViewType type) 222Action<IndentedTextWriter, DataViewSchema, int, string, DataViewType> del = ShowMetadataValue<int>; 227private static void ShowMetadataValue<T>(IndentedTextWriter itw, DataViewSchema schema, int col, string kind, DataViewType type)
Data\Conversion.cs (20)
367public ValueMapper<TSrc, TDst> GetStandardConversion<TSrc, TDst>(DataViewType typeSrc, DataViewType typeDst, 381public bool TryGetStandardConversion<TSrc, TDst>(DataViewType typeSrc, DataViewType typeDst, 403public Delegate GetStandardConversion(DataViewType typeSrc, DataViewType typeDst) 416public bool TryGetStandardConversion(DataViewType typeSrc, DataViewType typeDst, 470public ValueMapper<TSrc, SB> GetStringConversion<TSrc>(DataViewType type) 486public bool TryGetStringConversion<TSrc>(DataViewType type, out ValueMapper<TSrc, SB> conv) 538public TryParseMapper<TDst> GetTryParseConversion<TDst>(DataViewType typeDst) 620public InPredicate<T> GetIsDefaultPredicate<T>(DataViewType type) 626var t = type; 634public InPredicate<T> GetIsNAPredicate<T>(DataViewType type) 642public bool TryGetIsNAPredicate<T>(DataViewType type, out InPredicate<T> pred) 659public bool TryGetIsNAPredicate(DataViewType type, out Delegate del) 664var t = type; 705public T GetNAOrDefault<T>(DataViewType type) 723public T GetNAOrDefault<T>(DataViewType type, out bool isDefault) 753public ValueGetter<T> GetNAOrDefaultGetter<T>(DataViewType type)
Data\DataViewTypeManager.cs (16)
15/// A singleton class for managing the map between ML.NET <see cref="DataViewType"/> and C# <see cref="Type"/>. 17/// should be registered with a class derived from <see cref="DataViewType"/>. 37/// Mapping from a <see cref="Type"/> plus its <see cref="Attribute"/>s to a <see cref="DataViewType"/>. 39private static readonly Dictionary<TypeWithAttributes, DataViewType> _rawTypeToDataViewTypeMap = new Dictionary<TypeWithAttributes, DataViewType>(); 42/// Mapping from a <see cref="DataViewType"/> to a <see cref="Type"/> plus its <see cref="Attribute"/>s. 44private static readonly Dictionary<DataViewType, TypeWithAttributes> _dataViewTypeToRawTypeMap = new Dictionary<DataViewType, TypeWithAttributes>(); 52/// Returns the <see cref="DataViewType"/> registered for <paramref name="type"/> and its <paramref name="typeAttributes"/>. 54internal static DataViewType GetDataViewType(Type type, IEnumerable<Attribute> typeAttributes = null) 77if (!_rawTypeToDataViewTypeMap.TryGetValue(rawType, out DataViewType dataViewType)) 86/// If <paramref name="type"/> has been registered with a <see cref="DataViewType"/>, this function returns <see langword="true"/>. 124internal static bool Knows(DataViewType dataViewType) 145public static void Register(DataViewType dataViewType, Type type, IEnumerable<Attribute> typeAttributes) 176public static void Register(DataViewType dataViewType, Type type, DataViewTypeAttribute typeAttribute = null) 196var associatedDataViewType = _rawTypeToDataViewTypeMap[rawType];
Data\DataViewUtils.cs (11)
185var type = schema[col].Type; 214public static bool IsCacheable(this DataViewType type) 355DataViewType type = schema[c].Type; 483private static object GetPool(DataViewType type, object[] pools, int poolIdx) 699public abstract OutPipe CreateOutPipe(DataViewType type); 734public override OutPipe CreateOutPipe(DataViewType type) 861public static OutPipe Create(DataViewType type, object pool) 1250var type = Schema[col].Type; 1338var colType = cursor.Schema[srcColIndex].Type; 1356public static ValueGetter<ReadOnlyMemory<char>> GetSingleValueGetter<T>(DataViewRow cursor, int i, DataViewType colType) 1386public static ValueGetter<ReadOnlyMemory<char>> GetVectorFlatteningGetter<T>(DataViewRow cursor, int colIndex, DataViewType colType)
Data\ILegacyDataLoader.cs (1)
71bool IsColumnSavable(DataViewType type);
Data\RowCursorUtils.cs (18)
53public static Delegate GetGetterAs(DataViewType typeDst, DataViewRow row, int col) 61var typeSrc = row.Schema[col].Type; 64Func<DataViewType, DataViewType, DataViewRow, int, ValueGetter<int>> del = GetGetterAsCore<int, int>; 73public static ValueGetter<TDst> GetGetterAs<TDst>(DataViewType typeDst, DataViewRow row, int col) 82var typeSrc = row.Schema[col].Type; 85Func<DataViewType, DataViewType, DataViewRow, int, ValueGetter<TDst>> del = GetGetterAsCore<int, TDst>; 90private static ValueGetter<TDst> GetGetterAsCore<TSrc, TDst>(DataViewType typeSrc, DataViewType typeDst, DataViewRow row, int col) 115/// <see cref="Conversions.GetStringConversion{TSrc}(DataViewType)"/> on the input 127var typeSrc = row.Schema[col].Type; 132private static ValueGetter<StringBuilder> GetGetterAsStringBuilderCore<TSrc>(DataViewType typeSrc, DataViewRow row, int col) 308DataViewType type = cursor.Schema[col].Type; 336public static string TestGetLabelGetter(DataViewType type) 341public static string TestGetLabelGetter(DataViewType type, bool allowKeys) 354var type = cursor.Schema[labelIndex].Type; 376var type = cursor.Schema[labelIndex].Type;
Data\SchemaAnnotationsExtensions.cs (1)
67/// key values are of <see cref="VectorDataViewType.ItemType"/> whose <see cref="DataViewType.RawType"/> matches
Data\SchemaDefinition.cs (4)
229public DataViewType ColumnType { get; set; } 238internal Column(string memberName, DataViewType columnType, 257public void AddAnnotation<T>(string kind, T value, DataViewType annotationType) 433DataViewType columnType;
DataLoadSave\Binary\BinaryLoader.cs (6)
78public readonly DataViewType Type; 175public TableOfContentsEntry(BinaryLoader parent, string name, DataViewType type, Delegate valueMapper) 215/// <typeparamref name="T"/> is the same type as <see cref="DataViewType.RawType"/>. 505var type = codec.Type; 636/// should contains a <see cref="DataViewSchema.Column"/> with <see cref="TextDataViewType.Instance"/> as its <see cref="DataViewType"/>. 2051private Delegate GetNoRowGetter(DataViewType type)
DataLoadSave\Binary\BinarySaver.cs (8)
348private delegate IValueCodec WriteMetadataCoreDelegate(Stream stream, DataViewSchema schema, int col, string kind, DataViewType type, out CompressionKind compression); 350private IValueCodec WriteMetadataCore<T>(Stream stream, DataViewSchema schema, int col, string kind, DataViewType type, out CompressionKind compressionKind) 637public bool IsColumnSavable(DataViewType type) 718DataViewType type = schema[colIndices[c]].Type; 805public bool TryWriteTypeDescription(Stream stream, DataViewType type, out int bytesWritten) 829public DataViewType LoadTypeDescriptionOrNull(Stream stream) 847public bool TryWriteTypeAndValue<T>(Stream stream, DataViewType type, ref T value, out int bytesWritten) 882public bool TryLoadTypeAndValue(Stream stream, out DataViewType type, out object value)
DataLoadSave\Binary\CodecFactory.cs (2)
33private delegate bool GetCodecFromTypeDelegate(DataViewType type, out IValueCodec codec); 100public bool TryGetCodec(DataViewType type, out IValueCodec codec)
DataLoadSave\Binary\Codecs.cs (9)
116public DataViewType Type { get; } 121public SimpleCodec(CodecFactory factory, DataViewType type) 160private static DataViewType UnsafeColumnType(Type type) 163type == typeof(DataViewRowId) ? (DataViewType)RowIdDataViewType.Instance : 784public DataViewType Type { get { return _type; } } 1158DataViewType itemType = type.ItemType; 1184public DataViewType Type { get { return _type; } } 1281public DataViewType Type { get { return _type; } } 1357private bool GetKeyCodec(DataViewType type, out IValueCodec codec)
DataLoadSave\Binary\IValueCodec.cs (1)
40DataViewType Type { get; }
DataLoadSave\Database\DatabaseLoader.cs (3)
391public readonly DataViewType ColType; 397private ColInfo(string name, DataViewType colType, Segment[] segs, int sizeBase) 417DataViewType type = itemType;
DataLoadSave\DataOperationsCatalog.cs (3)
230var type = input.Schema[columnName].Type; 264var type = input.Schema[columnName].Type; 558var type = data.Schema[samplingColIndex].Type;
DataLoadSave\FakeSchema.cs (3)
34var metaColumnType = MakeColumnType(partialAnnotations[j]); 47private static DataViewType MakeColumnType(SchemaShape.Column column) 49DataViewType curType = column.ItemType;
DataLoadSave\Text\TextLoader.cs (3)
610public readonly DataViewType ColType; 618private ColInfo(string name, DataViewType colType, Segment[] segs, int isegVar, int sizeBase) 675DataViewType type = itemType;
DataLoadSave\Text\TextLoaderParser.cs (1)
712DataViewType itemType = vectorType?.ItemType ?? info.ColType;
DataLoadSave\Text\TextSaver.cs (7)
64DataViewType type = cursor.Schema[col].Type; 326public bool IsColumnSavable(DataViewType type) 402DataViewType itemType = data.Schema[cols[i]].Type.GetItemType(); 414var type = data.Schema[cols[i]].Type; 478var type = schema[src].Type; 499private TextLoader.Column GetColumn(string name, DataViewType type, int? start) 503DataViewType itemType = vectorType?.ItemType ?? type;
DataLoadSave\Transpose\TransposeLoader.cs (7)
297var ttype = schema[0].Type; 312var type = _parent.Schema[_col].Type; 649DataViewType cursorType = ((ITransposeDataView)this).GetSlotType(col).ItemType; 798var type = Schema[col].Type; 801DataViewType itemType = type; 813var type = Schema[col].Type; 833var type = Schema[col].Type;
DataLoadSave\Transpose\TransposeSaver.cs (1)
65public bool IsColumnSavable(DataViewType type)
DataView\AppendRowsDataView.cs (2)
118DataViewType type = Schema[c].Type; 182DataViewType colType = Schema[col].Type;
DataView\ArrayDataViewBuilder.cs (5)
363public readonly DataViewType Type; 367public Column(DataViewType type) 380public Column(DataViewType type) 393public Column(DataViewType type, TIn[] values) 462private static DataViewType InferType(PrimitiveDataViewType itemType, TIn[] values, Func<TIn, int> lengthFunc)
DataView\CacheDataView.cs (3)
134var type = schema[c].Type; 1287var type = input.Schema[srcCol].Type; 1350var type = input.Schema[srcCol].Type;
DataView\DataViewConstructionUtils.cs (9)
204private static readonly FuncInstanceMethodInfo1<InputRowBase<TRow>, Delegate, DataViewType, Delegate> _createKeyGetterDelegateMethodInfo 205= FuncInstanceMethodInfo1<InputRowBase<TRow>, Delegate, DataViewType, Delegate>.Create(target => target.CreateKeyGetterDelegate<int>); 234private Delegate CreateGetter(DataViewType colType, InternalSchemaDefinition.Column column, Delegate peek) 375private Delegate CreateKeyGetterDelegate<TDst>(Delegate peekDel, DataViewType colType) 831public DataViewType AnnotationType; 842private protected AnnotationInfo(string kind, DataViewType annotationType) 875public AnnotationInfo(string kind, T value, DataViewType annotationType = null) 887annotationType = isVector ? new VectorDataViewType(primitiveItemType) : (DataViewType)primitiveItemType; 900DataViewType annotationItemType = annotationVectorType?.ItemType ?? annotationType;
DataView\InternalSchemaDefinition.cs (9)
27public readonly DataViewType ColumnType; 35public Column(string columnName, DataViewType columnType, MemberInfo memberInfo) : 39public Column(string columnName, DataViewType columnType, MemberInfo memberInfo, 44public Column(string columnName, DataViewType columnType, Delegate generator) : 48public Column(string columnName, DataViewType columnType, Delegate generator, 53private Column(string columnName, DataViewType columnType, MemberInfo memberInfo = null, 264DataViewType colType; 269colType = isVector ? new VectorDataViewType(itemType) : (DataViewType)itemType; 281DataViewType itemType = columnVectorType?.ItemType ?? col.ColumnType;
DataView\LambdaColumnMapper.cs (8)
21string src, string dst, DataViewType typeSrc, DataViewType typeDst, ValueMapper<TSrc, TDst> mapper, 49var typeOrig = input.Schema[colSrc].Type; 72Func<IHostEnvironment, string, IDataView, Column, DataViewType, ValueMapper<int, int>, 85DataViewType typeDst, ValueMapper<T1, T2> map1, ValueMapper<T2, T3> map2, 102private readonly DataViewType _typeDst; 107DataViewType typeDst, ValueMapper<T1, T2> map1, ValueMapper<T2, T3> map2 = null, 148protected override DataViewType GetColumnTypeCore(int iinfo)
DataView\LambdaFilter.cs (2)
21string src, DataViewType typeSrc, InPredicate<TSrc> predicate) 40var typeOrig = input.Schema[colSrc].Type;
DataView\Transposer.cs (6)
139var type = schema[_cols[c].Index].Type; 517var type = _view.Schema[_colCurr].Type; 518DataViewType itemType = type.GetItemType(); 924var type = view.Schema[col].Type; 1418private readonly DataViewType _type; 1443var type = _data.Schema[_col].Type;
DataView\TypedCursor.cs (4)
110var realColType = _data.Schema[colIndex].Type; 141private static bool IsCompatibleType(DataViewType colType, MemberInfo memberInfo) 252DataViewType expectedType = data.Schema[colIndex].Type; 358var colType = input.Schema[index].Type;
Dirty\PredictorInterfaces.cs (1)
177string[] GetLabelNamesOrNull(out DataViewType labelType);
EntryPoints\PredictorModelImpl.cs (1)
109internal override string[] GetLabelInfo(IHostEnvironment env, out DataViewType labelType)
Evaluators\AnomalyDetectionEvaluator.cs (2)
98var t = score.Type; 733var type = cursor.Schema[stratCol].Type;
Evaluators\BinaryClassifierEvaluator.cs (6)
130var t = score.Type; 146var probType = prob[0].Type; 1058private readonly DataViewType[] _types; 1075_types = new DataViewType[2]; 1101_types = new DataViewType[2]; 1264var t = schema[(int)LabelIndex].Type;
Evaluators\ClusteringEvaluator.cs (7)
99DataViewType type = schema.Label?.Type; 587private readonly DataViewType[] _types; 595_types = new DataViewType[3]; 614_types = new DataViewType[3]; 755var type = schema[(int)ScoreIndex].Type; 840var type = perInst.Schema[index].Type; 847var type = perInst.Schema[index].Type;
Evaluators\EvaluatorBase.cs (3)
364internal static AggregatorDictionaryBase Create(RoleMappedSchema schema, string stratCol, DataViewType stratType, 379DataViewType stratType, Func<string, TAgg> createAgg) 406public GenericAggregatorDictionary(RoleMappedSchema schema, string stratCol, DataViewType stratType, Func<string, TAgg> createAgg)
Evaluators\EvaluatorUtils.cs (23)
164int colScore, string valueKind, Func<DataViewType, bool> testType) 244public static void CheckWeightType(IExceptionContext ectx, DataViewType type) 288var type = cursor.Schema[stratCol].Type; 306var type = schema[i].Type; 376DataViewType typeSrc, string value, string registrationName) 404var inputColType = input.Schema[0].Type; 410DataViewType typeSrc, int keyCount, int value, string registrationName, ValueGetter<VBuffer<ReadOnlyMemory<char>>> keyValueGetter) 446var inputColType = input.Schema[inputCol].Type; 469var typeSrc = new DataViewType[numIdvs]; 478var type = typeSrc[i] = idv.Schema[col].Type; 568var type = schema[indices[i]].Type; 574DataViewType keyValueItemType = (keyValueType as VectorDataViewType)?.ItemType ?? keyValueType; 577DataViewType typeItemType = vectorType?.ItemType ?? type; 602public static void ReconcileKeyValues(IHostEnvironment env, IDataView[] views, string columnName, DataViewType keyValueType) 672public static void ReconcileVectorKeyValues(IHostEnvironment env, IDataView[] views, string columnName, DataViewType keyValueType) 725var type = views[i].Schema[columnIndices[i]].Type; 815DataViewType labelColKeyValuesType = null; 833var type = dv.Schema[i].Type; 1009var type = schema[i].Type; 1115var type = cursor.Schema[stratCol].Type; 1230var type = schema[i].Type; 1484var stratType = cursor.Schema[stratCol].Type; 1775var type = data.Schema[stratCol].Type;
Evaluators\MulticlassClassificationEvaluator.cs (7)
612private readonly DataViewType[] _types; 620_types = new DataViewType[4]; 660_types = new DataViewType[4]; 863var labelType = schema[LabelIndex].Type; 1060var labelType = labelCol.Type; 1071var type = perInstSchema[sortedClassesIndex].Type; 1080var type = perInst.Schema[sortedScoresIndex].Type;
Evaluators\MultiOutputRegressionEvaluator.cs (1)
691var type = cursor.Schema[stratCol].Type;
Evaluators\QuantileRegressionEvaluator.cs (3)
282private readonly DataViewType _outputType; 447var t = schema[(int)LabelIndex].Type; 516var type = data.Schema[i].Type;
Evaluators\RankingEvaluator.cs (5)
632private readonly DataViewType _outputType; 633private readonly DataViewType _slotNamesType; 647protected override DataViewType GetColumnTypeCore(int iinfo) 653protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 661protected override DataViewType GetAnnotationTypeCore(string kind, int iinfo)
Evaluators\RegressionEvaluator.cs (2)
58var t = score.Type; 328var t = schema[(int)LabelIndex].Type;
Model\Onnx\OnnxContext.cs (4)
57/// variable is created through <see cref="AddIntermediateVariable(DataViewType, string, bool)"/>before realizing 97public abstract string AddIntermediateVariable(DataViewType type, string colName, bool skip = false); 105/// which ought to have been something returned from <see cref="AddIntermediateVariable(DataViewType, string, bool)"/></param> 119/// which ought to have been something returned from <see cref="OnnxContext.AddIntermediateVariable(DataViewType, string, bool)"/></param>
Model\Pfa\BoundPfaContext.cs (1)
170DataViewType type = schema[col].Type;
Model\Pfa\PfaUtils.cs (2)
158public static JToken PfaTypeOrNullForColumnType(DataViewType type) 173private static JToken PfaTypeOrNullCore(DataViewType itemType)
Prediction\Calibrator.cs (6)
298DataViewType IValueMapper.InputType => _mapper.InputType; 299DataViewType IValueMapper.OutputType => _mapper.OutputType; 300DataViewType IValueMapperDist.DistType => NumberDataViewType.Single; 668var scoreType = _predictor.OutputSchema[_scoreCol].Type; 702var type = predictorRow.Schema[column.Index].Type; 886var type = outputSchema[scoreCol].Type;
Prediction\CalibratorCatalog.cs (1)
206DataViewType ISingleFeaturePredictionTransformer<TICalibrator>.FeatureColumnType => NumberDataViewType.Single;
Prediction\IPredictionTransformer.cs (1)
35DataViewType FeatureColumnType { get; }
Scorers\BinaryClassifierScorer.cs (4)
87private static bool CanWrap(ISchemaBoundMapper mapper, DataViewType labelNameType) 301private static DataViewType GetPredColType(DataViewType scoreType, ISchemaBoundRowMapper mapper) 309private static bool OutputTypeMatches(DataViewType scoreType)
Scorers\ClusteringScorer.cs (3)
135private static DataViewType GetPredColType(DataViewType scoreType, ISchemaBoundRowMapper mapper) 140private static bool OutputTypeMatches(DataViewType scoreType)
Scorers\FeatureContributionCalculation.cs (2)
195var typeSrc = input.Schema[colSrc].Type; 207var typeSrc = input.Schema[colSrc].Type;
Scorers\MulticlassClassificationScorer.cs (16)
85private readonly Func<ISchemaBoundMapper, DataViewType, bool> _canWrap; 108string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap) 114string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap) 139DataViewType type; 239string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap) 262private readonly Func<ISchemaBoundMapper, DataViewType, bool> _canWrap; 283string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap) 437internal static bool CanWrapTrainingLabels(ISchemaBoundMapper mapper, DataViewType labelNameType) 439if (GetTypesForWrapping(mapper, labelNameType, AnnotationUtils.Kinds.TrainingLabelValues, out var scoreType)) 445internal static bool GetTypesForWrapping(ISchemaBoundMapper mapper, DataViewType labelNameType, string metaKind, out DataViewType scoreType) 477internal static bool CanWrapSlotNames(ISchemaBoundMapper mapper, DataViewType labelNameType) 479if (GetTypesForWrapping(mapper, labelNameType, AnnotationUtils.Kinds.SlotNames, out var scoreType)) 603private static DataViewType GetPredColType(DataViewType scoreType, ISchemaBoundRowMapper mapper) => new KeyDataViewType(typeof(uint), scoreType.GetVectorSize()); 605private static bool OutputTypeMatches(DataViewType scoreType) =>
Scorers\PredictedLabelScorerBase.cs (20)
40public readonly DataViewType PredColType; 48bool user, int scoreColIndex, DataViewType predColType, string predictedLabelColumnName = DefaultColumnNames.PredictedLabel) 88string scoreColKind, int scoreColIndex, DataViewType predColType, string predictedLabelColumnName = DefaultColumnNames.PredictedLabel) 121Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType) 145var scoreType = mapper.OutputSchema[scoreColIndex].Type; 147var predColType = getPredColType(scoreType, rowMapper); 165protected override DataViewType GetColumnTypeCore(int iinfo) 173protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 186yield return new KeyValuePair<string, DataViewType>(sch[i].Name, sch[i].Type); 196protected override DataViewType GetAnnotationTypeCore(string kind, int iinfo) 278Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType, string predictedLabelColumnName = DefaultColumnNames.PredictedLabel) 294var scoreType = mapper.OutputSchema[scoreColIndex].Type; 296var predColType = getPredColType(scoreType, rowMapper); 312Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType)
Scorers\PredictionTransformer.cs (1)
218public DataViewType FeatureColumnType { get; }
Scorers\RowToRowScorerBase.cs (5)
210var type = row.Schema[col].Type; 428protected override DataViewType GetColumnTypeCore(int iinfo) 434protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 441foreach (var pair in Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type))) 445protected override DataViewType GetAnnotationTypeCore(string kind, int iinfo)
Scorers\SchemaBindablePredictorWrapper.cs (7)
45protected readonly DataViewType ScoreType; 59private static DataViewType GetScoreType(IPredictor predictor, out IValueMapper valueMapper) 127if (schema.Feature?.Type is DataViewType type) 136DataViewType typeItemType = typeVectorType?.ItemType ?? type; 137DataViewType typeInItemType = typeInVectorType?.ItemType ?? typeIn; 162var typeSrc = input.Schema[colSrc].Type; 527if (schema.Feature?.Type is DataViewType typeSrc)
Scorers\ScoreSchemaFactory.cs (4)
23public static DataViewSchema Create(DataViewType scoreType, string scoreColumnKindValue, string scoreColumnName = AnnotationUtils.Const.ScoreValueKind.Score) 75/// This is very similar to <see cref="Create(DataViewType, string, string)"/> but adds one extra metadata field to the only score column. 80public static DataViewSchema CreateQuantileRegressionSchema(DataViewType scoreType, double[] quantiles) 117public static DataViewSchema CreateSequencePredictionSchema(DataViewType scoreType, string scoreColumnKindValue, VBuffer<ReadOnlyMemory<char>> keyNames = default)
Transforms\ColumnBindingsBase.cs (8)
498public DataViewType GetColumnType(int col) 509public IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypes(int col) 516return Input[index].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)); 521public DataViewType GetAnnotationTypeOrNull(string kind, int col) 562protected abstract DataViewType GetColumnTypeCore(int iinfo); 564protected virtual IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 567return Enumerable.Empty<KeyValuePair<string, DataViewType>>(); 570protected virtual DataViewType GetAnnotationTypeCore(string kind, int iinfo)
Transforms\ColumnConcatenatingEstimator.cs (1)
102DataViewType itemType = null;
Transforms\ColumnConcatenatingTransformer.cs (7)
445DataViewType itemType = null; 470var curType = inputSchema[srcCol].Type; 473DataViewType currentItemType = curVectorType?.ItemType ?? curType; 533private readonly DataViewType[] _srcTypes; 544private readonly DataViewType _categoricalRangeType; 635var typeSrc = _srcTypes[i]; 712var type = _srcTypes[i];
Transforms\ColumnCopying.cs (1)
220var type = input.Schema[colIndex].Type;
Transforms\GenerateNumberTransform.cs (3)
190protected override DataViewType GetColumnTypeCore(int iinfo) 196protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 205protected override DataViewType GetAnnotationTypeCore(string kind, int iinfo)
Transforms\Hashing.cs (16)
150var type = inputSchema[srcCol].Type; 161private DataViewType GetOutputType(DataViewSchema inputSchema, HashingEstimator.ColumnOptions column) 166var srcType = inputSchema[srcCol].Type; 196var types = new DataViewType[_columns.Length]; 267var srcType = input.Schema[srcCol].Type; 350private ValueGetter<uint> ComposeGetterOne(DataViewRow input, int iinfo, int srcCol, DataViewType srcType) 1302public readonly DataViewType TypeSrc; 1304public ColInfo(string outputColumnName, string inputColumnName, DataViewType type) 1312private readonly DataViewType[] _srcTypes; 1313private readonly DataViewType[] _dstTypes; 1320_srcTypes = new DataViewType[_parent._columns.Length]; 1321_dstTypes = new DataViewType[_parent._columns.Length]; 1484private readonly DataViewType _srcType; 1511DataViewType typeSrc = row.Schema[srcCol].Type; 1515DataViewType itemType = vectorTypeSrc?.ItemType ?? typeSrc; 1891internal static bool IsColumnTypeValid(DataViewType type)
Transforms\KeyToValue.cs (14)
159private readonly DataViewType[] _types; 221private void ComputeKvMaps(DataViewSchema schema, out DataViewType[] types, out KeyToValueMap[] kvMaps) 223types = new DataViewType[_parent.ColumnPairs.Length]; 229var typeSrc = schema[ColMapNewToOld[iinfo]].Type; 232DataViewType valsItemType = typeVals.GetItemType(); 233DataViewType srcItemType = typeSrc.GetItemType(); 241Func<int, DataViewType, DataViewType, KeyToValueMap> func = GetKeyMetadata<int, int>; 248private KeyToValueMap GetKeyMetadata<TKey, TValue>(int iinfo, DataViewType typeKey, DataViewType typeVal) 253DataViewType keyItemType = typeKey.GetItemType(); 254DataViewType valItemType = typeVal.GetItemType(); 325DataViewType outputItemType = TypeOutput.GetItemType(); 488var srcType = Parent.InputSchema[Parent.ColMapNewToOld[InfoIndex]].Type;
Transforms\KeyToVector.cs (8)
107private string TestIsKey(DataViewType type) 116var type = inputSchema[srcCol].Type; 229public readonly DataViewType TypeSrc; 231public ColInfo(string outputColumnName, string inputColumnName, DataViewType type) 282var type = inputSchema[colSrc].Type; 308var srcType = _infos[iinfo].TypeSrc; 668DataViewType srcType = info.TypeSrc; 669DataViewType srcItemType = srcType.GetItemType();
Transforms\LabelConvertTransform.cs (2)
137protected override DataViewType GetColumnTypeCore(int iinfo) 178var typeSrc = input.Schema[col].Type;
Transforms\LabelIndicatorTransform.cs (2)
109private static string TestIsMulticlassLabel(DataViewType type) 161protected override DataViewType GetColumnTypeCore(int iinfo)
Transforms\MetadataDispatcher.cs (13)
73public readonly DataViewType Type; 75protected GetterInfo(string kind, DataViewType type) 89protected GetterInfo(string kind, DataViewType type) 104public GetterInfoDelegate(string kind, DataViewType type, AnnotationUtils.AnnotationGetter<TValue> getter) 126public GetterInfoPrimitive(string kind, DataViewType type, TValue value) 204public IEnumerable<KeyValuePair<string, DataViewType>> GetMetadataTypes(int index) 210return Enumerable.Empty<KeyValuePair<string, DataViewType>>(); 214private IEnumerable<KeyValuePair<string, DataViewType>> GetTypesCore(int index, ColInfo info) 226yield return new KeyValuePair<string, DataViewType>(g.Kind, g.Type); 236foreach (var kvp in info.SchemaSrc[info.IndexSrc].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type))) 250public DataViewType GetMetadataTypeOrNull(string kind, int index) 406public void AddGetter<TValue>(string kind, DataViewType type, 423public void AddPrimitive<TValue>(string kind, DataViewType type, TValue value)
Transforms\NAFilter.cs (6)
48public readonly DataViewType Type; 50public ColInfo(int index, DataViewType type) 114var type = schema[index].Type; 150var type = schema[index].Type; 186private static bool TestType(DataViewType type) 190var itemType = (type as VectorDataViewType)?.ItemType ?? type;
Transforms\NormalizeColumn.cs (27)
197public string TestType(DataViewType type) 199DataViewType itemType = type; 426public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc); 430public static AffineColumnFunction Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 461public override void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc) 494public override void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc) 546public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc); 549public static CdfColumnFunction Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 583public override void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc) 614public override void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc) 678public void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc) 685public static BinColumnFunction Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 812var type = row.Schema[col].Type; 967int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 980int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1004int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1018int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1044int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1057int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1084int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1098int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1124int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1132var labelColumnType = cursor.Schema[labelColumnId].Type; 1151string labelColumn, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1158int labelColumnId, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1196int icol, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 1211int srcIndex, DataViewType srcType, DataViewRowCursor cursor)
Transforms\NormalizeColumnDbl.cs (8)
665public static new ImplOne Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 990public static new ImplOne Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 1173public static new ImplOne Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 1551public static IColumnFunctionBuilder Create(NormalizingEstimator.MinMaxColumnOptions column, IHost host, DataViewType srcType, 1665public static IColumnFunctionBuilder Create(NormalizingEstimator.MeanVarianceColumnOptions column, IHost host, DataViewType srcType, 1672public static IColumnFunctionBuilder Create(NormalizingEstimator.LogMeanVarianceColumnOptions column, IHost host, DataViewType srcType, 1867public static IColumnFunctionBuilder Create(NormalizingEstimator.BinningColumnOptions column, IHost host, DataViewType srcType, 2084public static IColumnFunctionBuilder Create(NormalizingEstimator.RobustScalingColumnOptions column, IHost host, DataViewType srcType,
Transforms\NormalizeColumnSng.cs (8)
823public static new ImplOne Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 1150public static new ImplOne Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 1334public static new ImplOne Create(ModelLoadContext ctx, IHost host, DataViewType typeSrc) 1714public static IColumnFunctionBuilder Create(NormalizingEstimator.MinMaxColumnOptions column, IHost host, DataViewType srcType, 1828public static IColumnFunctionBuilder Create(NormalizingEstimator.MeanVarianceColumnOptions column, IHost host, DataViewType srcType, 1835public static IColumnFunctionBuilder Create(NormalizingEstimator.LogMeanVarianceColumnOptions column, IHost host, DataViewType srcType, 2030public static IColumnFunctionBuilder Create(NormalizingEstimator.BinningColumnOptions column, IHost host, DataViewType srcType, 2248public static IColumnFunctionBuilder Create(NormalizingEstimator.RobustScalingColumnOptions column, IHost host, DataViewType srcType,
Transforms\Normalizer.cs (18)
144internal abstract IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor); 187internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 205internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 223internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 239internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 263internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 283internal override IColumnFunctionBuilder MakeBuilder(IHost host, int srcIndex, DataViewType srcType, DataViewRowCursor cursor) 413internal readonly DataViewType InputType; 416internal ColumnOptions(string name, string inputColumnName, DataViewType inputType, IColumnFunction columnFunction) 425internal static DataViewType LoadType(ModelLoadContext ctx) 442return isVectorOld ? (DataViewType)(new VectorDataViewType(itemTypeOld, vectorSize)) : itemTypeOld; 462internal static void SaveType(ModelSaveContext ctx, DataViewType type) 475DataViewType itemType = vectorType?.ItemType ?? type; 540var srcTypes = new DataViewType[columns.Length]; 626var typeSrc = ColumnOptions.LoadType(ctx); 647var typeSrc = input.Schema[ColumnPairs[iinfo].inputColumnName].Type; 705var colType = inputSchema[srcCol].Type; 709DataViewType itemType = vectorType?.ItemType ?? colType;
Transforms\NormalizeUtils.cs (2)
24internal delegate void SignatureLoadColumnFunction(ModelLoadContext ctx, IHost host, DataViewType typeSrc); 62void AttachMetadata(MetadataDispatcher.Builder bldr, DataViewType typeSrc);
Transforms\RangeFilter.cs (2)
74private readonly DataViewType _type; 260public static bool IsValidRangeFilterColumnType(IExceptionContext ectx, DataViewType type)
Transforms\RowShufflingTransformer.cs (3)
195var type = schema[c].Type; 215var type = schema[c].Type; 372public static ShufflePipe Create(int bufferSize, DataViewType type, Delegate getter)
Transforms\SlotsDroppingTransformer.cs (11)
462private readonly DataViewType[] _srcTypes; 463private readonly DataViewType[] _dstTypes; 474_srcTypes = new DataViewType[_parent.ColumnPairs.Length]; 475_dstTypes = new DataViewType[_parent.ColumnPairs.Length]; 487var rawType = srcVectorType?.ItemType ?? _srcTypes[i]; 501private static bool IsValidColumnType(DataViewType type) 517out bool suppressed, out DataViewType type, out int[] categoricalRanges) 529var typeSrc = _srcTypes[iinfo]; 725var typeSrc = _srcTypes[iinfo]; 793var typeDst = _dstTypes[iinfo]; 816private Delegate GetSrcGetter(DataViewType typeDst, DataViewRow row, int iinfo)
Transforms\TransformBase.cs (22)
277public readonly DataViewType TypeSrc; 280public ColInfo(string name, int colSrc, DataViewType typeSrc, VectorDataViewType slotTypeSrc) 328ITransposeDataView transposedInput, Func<DataViewType, string> testType) 349var type = inputSchema[colSrc].Type; 365ITransposeDataView transposeInput, Func<DataViewType, string> testType) 398var type = inputSchema[colSrc].Type; 452protected override DataViewType GetColumnTypeCore(int iinfo) 457protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 462protected override DataViewType GetAnnotationTypeCore(string kind, int iinfo) 499IDataView input, Func<DataViewType, string> testType) 513IDataView input, Func<DataViewType, string> testType) 527IDataView input, Func<DataViewType, string> testType) 544IDataView newInput, Func<DataViewType, string> checkType) 666protected abstract DataViewType GetColumnTypeCore(int iinfo); 703protected Delegate GetSrcGetter(DataViewType typeDst, DataViewRow row, int iinfo) 925protected static string TestIsText(DataViewType type) 932protected static string TestIsTextItem(DataViewType type) 939protected static string TestIsTextVector(DataViewType type) 946protected static string TestIsFloatItem(DataViewType type) 953protected static string TestIsFloatVector(DataViewType type) 961protected static string TestIsKnownSizeFloatVector(DataViewType type) 971protected static string TestIsKey(DataViewType type)
Transforms\TypeConverting.cs (10)
330var srcType = input.Schema[item.Source ?? item.Name].Type; 353internal static bool GetNewType(IExceptionContext ectx, DataViewType srcType, InternalDataKind kind, KeyCount keyCount, out PrimitiveDataViewType itemType) 358DataViewType srcItemType = srcType.GetItemType(); 387private readonly DataViewType[] _types; 396_types = new DataViewType[_parent._columns.Length]; 412private static bool CanConvertToType(IExceptionContext ectx, DataViewType srcType, InternalDataKind kind, KeyCount keyCount, 413out PrimitiveDataViewType itemType, out DataViewType typeDst) 440var srcType = InputSchema[_srcCols[i]].Type; 444DataViewType srcItemType = srcType.GetItemType(); 445DataViewType currentItemType = _types[i].GetItemType();
Transforms\ValueMapping.cs (6)
365internal DataViewType ValueColumnType => _valueMap.ValueColumn.Type; 1070var type = _inputSchema[colSrc].Type; 1071DataViewType colType; 1109var typeValue = _valueMap.ValueColumn.Type; 1110var typeKey = _valueMap.KeyColumn.Type; 1285var colType = _valueMap.ValueColumn.Type;
Transforms\ValueToKeyMappingTransformer.cs (11)
144public readonly DataViewType TypeSrc; 146public ColInfo(string name, string inputColumnName, DataViewType type) 218private string TestIsKnownDataKind(DataViewType type) 221DataViewType itemType = vectorType?.ItemType ?? type; 236var type = inputSchema[colSrc].Type; 479var typeSrc = keyData.Schema[0].Type; 707private readonly DataViewType[] _types; 721_types = new DataViewType[_parent.ColumnPairs.Length]; 724var type = _infos[i].TypeSrc; 726DataViewType colType; 962DataViewType itemType = vectorType?.ItemType ?? info.TypeSrc;
Transforms\ValueToKeyMappingTransformerImpl.cs (5)
42public static Builder Create(DataViewType type, ValueToKeyMappingEstimator.KeyOrdinality sortOrder) 292var type = schema[col].Type; 1080private static readonly FuncInstanceMethodInfo1<KeyImpl<T>, DataViewType, DataViewSchema.Annotations.Builder, bool> _addMetadataCoreMethodInfo 1081= FuncInstanceMethodInfo1<KeyImpl<T>, DataViewType, DataViewSchema.Annotations.Builder, bool>.Create(target => target.AddMetadataCore<int>); 1107private bool AddMetadataCore<TMeta>(DataViewType srcMetaType, DataViewSchema.Annotations.Builder builder)
Utilities\ColumnCursor.cs (1)
40var colType = column.Type;
Microsoft.ML.DataView (34)
DataViewSchema.cs (12)
98public DataViewType Type { get; } 105internal Column(string name, int index, bool isHidden, DataViewType type, Annotations annotations) 139public DataViewType Type { get; } 148public DetachedColumn(string name, DataViewType type, Annotations annotations = null) 258private readonly List<(string Name, DataViewType Type, Delegate Getter, Annotations Annotations)> _items; 262_items = new List<(string Name, DataViewType Type, Delegate Getter, Annotations Annotations)>(); 295public void Add<TValue>(string name, DataViewType type, ValueGetter<TValue> getter, Annotations annotations = null) 318public void Add(string name, DataViewType type, Delegate getter, Annotations annotations = null) 361private void AddDelegate<TValue>(string name, DataViewType type, Delegate getter, Annotations annotations) 380private readonly List<(string Name, DataViewType Type, Annotations Annotations)> _items; 387_items = new List<(string Name, DataViewType Type, Annotations Annotations)>(); 396public void AddColumn(string name, DataViewType type, Annotations annotations = null)
DataViewType.cs (15)
19public abstract class DataViewType : IEquatable<DataViewType> 30/// The raw <see cref="Type"/> for this <see cref="DataViewType"/>. Note that this is the raw representation type 31/// and not the complete information content of the <see cref="DataViewType"/>. 34/// Code should not assume that a <see cref="RawType"/> uniquely identifiers a <see cref="DataViewType"/>. 47/// <param name="other">Another <see cref="DataViewType"/> to be compared with <see langword="this"/>.</param> 48public abstract bool Equals(DataViewType other); 110public override bool Equals(DataViewType other) 272public override bool Equals(DataViewType other) 308public override bool Equals(DataViewType other) 347public override bool Equals(DataViewType other) 386public override bool Equals(DataViewType other) 422public override bool Equals(DataViewType other) 458public override bool Equals(DataViewType other) 471/// The function <see cref="Register"/> will be called to register a <see cref="DataViewType"/> for a <see cref="Type"/> with its <see cref="Attribute"/>s. 473/// in <see cref="IDataView"/> would be the associated <see cref="DataViewType"/>.
KeyDataViewType.cs (5)
129/// Determine if this <see cref="KeyDataViewType"/> object is equal to another <see cref="DataViewType"/> instance. 130/// Checks if the other item is the type of <see cref="KeyDataViewType"/>, if the <see cref="DataViewType.RawType"/> 135public override bool Equals(DataViewType other) 151/// Checks if any object is the type of <see cref="KeyDataViewType"/>, if the <see cref="DataViewType.RawType"/> 157=> other is DataViewType tmp && Equals(tmp);
VectorType.cs (2)
121public override bool Equals(DataViewType other) 143return other is DataViewType tmp && Equals(tmp);
Microsoft.ML.Ensemble (13)
PipelineEnsemble.cs (6)
234protected override DataViewType ScoreType => NumberDataViewType.Single; 262protected override DataViewType ScoreType { get { return _scoreType; } } 294protected override DataViewType ScoreType { get { return NumberDataViewType.Single; } } 397protected abstract DataViewType ScoreType { get; } 618private static int CheckNonKeyLabelColumnCore(IHostEnvironment env, IPredictor pred, PredictorModel[] models, bool isBinary, DataViewType labelType) 756string[] ICanGetTrainingLabelNames.GetLabelNamesOrNull(out DataViewType labelType)
Trainer\EnsembleDistributionModelParameters.cs (3)
49DataViewType IValueMapper.InputType => _inputType; 50DataViewType IValueMapper.OutputType => NumberDataViewType.Single; 51DataViewType IValueMapperDist.DistType => NumberDataViewType.Single;
Trainer\EnsembleModelParameters.cs (2)
45DataViewType IValueMapper.InputType => _inputType; 46DataViewType IValueMapper.OutputType => NumberDataViewType.Single;
Trainer\Multiclass\EnsembleMulticlassModelParameters.cs (2)
40DataViewType IValueMapper.InputType => _inputType; 41DataViewType IValueMapper.OutputType => _outputType;
Microsoft.ML.EntryPoints (1)
ScoreColumnSelector.cs (1)
75DataViewType labelType;
Microsoft.ML.FastTree (10)
FastTree.cs (6)
1298private ValueMapper<VBuffer<T1>, VBuffer<T2>> GetCopier<T1, T2>(DataViewType itemType1, DataViewType itemType2) 2810internal readonly DataViewType InputType; 2811DataViewType IValueMapper.InputType => InputType; 2814internal readonly DataViewType OutputType; 2815DataViewType IValueMapper.OutputType => OutputType;
GamModelParameters.cs (3)
44private readonly DataViewType _outputType; 53DataViewType IValueMapper.InputType => _inputType; 54DataViewType IValueMapper.OutputType => _outputType;
TreeEnsembleFeaturizer.cs (1)
803DataViewType labelType = col.Value.Type;
Microsoft.ML.ImageAnalytics (4)
ImageLoader.cs (1)
360private DataViewType GetDataViewType()
ImageResizer.cs (2)
434/// <summary>The type of column, <see cref="DataViewType"/>.</summary> 435public readonly DataViewType Type;
ImageType.cs (1)
90public override bool Equals(DataViewType other)
Microsoft.ML.KMeansClustering (4)
KMeansModelParameters.cs (4)
53private readonly DataViewType _inputType; 54private readonly DataViewType _outputType; 55DataViewType IValueMapper.InputType => _inputType; 56DataViewType IValueMapper.OutputType => _outputType;
Microsoft.ML.Mkl.Components (12)
VectorWhitening.cs (12)
213var inType = inputSchema[srcCol].Type; 220internal static string TestColumn(DataViewType type) 223DataViewType itemType = vectorType?.ItemType ?? type; 235private static void ValidateModel(IExceptionContext ectx, float[] model, DataViewType col) 270GetColTypesAndIndex(env, inputData, columns, out DataViewType[] srcTypes, out int[] cols); 278private static void GetColTypesAndIndex(IHostEnvironment env, IDataView inputData, VectorWhiteningEstimator.ColumnOptions[] columns, out DataViewType[] srcTypes, out int[] cols) 281srcTypes = new DataViewType[columns.Length]; 300DataViewType[] srcTypes, int[] cols, params VectorWhiteningEstimator.ColumnOptions[] columns) 367ref float[][] models, ref float[][] invModels, DataViewType[] srcTypes, params VectorWhiteningEstimator.ColumnOptions[] columns) 554private readonly DataViewType[] _srcTypes; 561_srcTypes = new DataViewType[_parent.ColumnPairs.Length]; 591DataViewType outType = (info.Kind == WhiteningKind.PrincipalComponentAnalysis && info.Rank > 0) ? new VectorDataViewType(NumberDataViewType.Single, info.Rank) : _srcTypes[iinfo];
Microsoft.ML.OnnxConverter (4)
OnnxContextImpl.cs (3)
228public override string AddIntermediateVariable(DataViewType type, string colName, bool skip = false) 243public void AddOutputVariable(DataViewType type, string variableName, List<long> dim = null) 253public void AddInputVariable(DataViewType type, string colName)
OnnxUtils.cs (1)
339public static ModelArgs GetModelArgs(DataViewType type, string colName,
Microsoft.ML.OnnxTransformer (22)
OnnxMapType.cs (2)
21/// Create the corresponding <see cref="DataViewType"/> for ONNX map. 30public override bool Equals(DataViewType other)
OnnxSequenceType.cs (2)
28/// Create the corresponding <see cref="DataViewType"/> for ONNX sequence. 36public override bool Equals(DataViewType other)
OnnxTransform.cs (3)
133internal DataViewType[] OutputTypes { get; } 291OutputTypes = new DataViewType[Outputs.Length]; 537var type = inputSchema[_inputColIndices[i]].Type;
OnnxTypeParser.cs (7)
111/// Derive the corresponding <see cref="DataViewType"/> for ONNX tensor's element type specified by <paramref name="elementType"/>. 114public static DataViewType GetScalarDataViewType(int elementType) 117DataViewType scalarType = null; 218/// Derive the corresponding <see cref="DataViewType"/> for ONNX variable typed to <paramref name="typeProto"/>. 219/// The returned <see cref="DataViewType.RawType"/> should match the type system in ONNXRuntime's C# APIs. 222public static DataViewType GetDataViewType(OnnxCSharpToProtoWrapper.TypeProto typeProto) 283/// The returned <see cref="DataViewType.RawType"/> should match the type system in ONNXRuntime's C# APIs.
OnnxUtils.cs (8)
122/// The <see cref="Data.DataViewType"/> that this ONNX variable corresponds 125public DataViewType DataViewType { get; } 132public OnnxVariableInfo(string name, OnnxShape shape, Type typeInOnnxRuntime, DataViewType mlnetType, Func<NamedOnnxValue, object> caster) 262var inputTypePool = new Dictionary<string, DataViewType>(); 266var initializerTypePool = new Dictionary<string, DataViewType>(); 270var outputTypePool = new Dictionary<string, DataViewType>(); 298Dictionary<string, DataViewType> typePool, 307var dataViewType = typePool[name];
Microsoft.ML.Parquet (11)
ParquetLoader.cs (3)
53public readonly DataViewType ColType; 65public Column(string name, DataViewType colType, DataField dataField, DataType dataType) 326private DataViewType ConvertFieldType(DataType parquetType)
PartitionedFileLoader.cs (8)
370private static readonly FuncInstanceMethodInfo1<Cursor, int, DataViewType, Delegate> _createGetterDelegateCoreMethodInfo 371= FuncInstanceMethodInfo1<Cursor, int, DataViewType, Delegate>.Create(target => target.CreateGetterDelegateCore<int>); 550var type = _subCursor.Schema[i].Type; 585var type = Schema[i].Type; 619private Delegate CreateGetterDelegateCore<TValue>(int col, DataViewType type) 624private ValueGetter<TValue> GetterDelegateCore<TValue>(int col, DataViewType type) 670var type1 = schema1[col].Type; 671var type2 = schema2[col].Type;
Microsoft.ML.PCA (7)
PcaTrainer.cs (3)
441private readonly DataViewType _inputType; 607DataViewType IValueMapper.InputType 612DataViewType IValueMapper.OutputType
PcaTransformer.cs (4)
106public DataViewType OutputType => new VectorDataViewType(NumberDataViewType.Single, Rank); 507internal static void ValidatePcaInput(IExceptionContext ectx, string name, DataViewType type) 519public DataViewType InputType { get; } 636DataViewType inputType = (_parent._schemaInfos != null) ?
Microsoft.ML.PerformanceTests (4)
HashBench.cs (4)
56public static RowImpl Create<T>(DataViewType type, ValueGetter<T> getter) 63private RowImpl(DataViewType type, Delegate getter) 80private void InitMapMurmurHashV2<T>(T val, DataViewType type, int numberOfBits = 20, ValueGetter<T> getter = null) 97private void InitMapMurmurHashV1<T>(T val, DataViewType type, ValueGetter<T> getter = null)
Microsoft.ML.Predictor.Tests (4)
TestTransposer.cs (4)
26var type = view.Schema[col].Type; 29var itemType = vecType?.ItemType ?? type; 72DataViewType colType = trans.Schema[col].Type; 74DataViewType expectedType = view.Schema[viewCol].Type;
Microsoft.ML.Recommender (7)
MatrixFactorizationPredictor.cs (6)
87private DataViewType OutputType => NumberDataViewType.Single; 89internal DataViewType MatrixColumnIndexType { get; } 90internal DataViewType MatrixRowIndexType { get; } 382var type = schema[matrixColumnIndexCol].Type; 430internal DataViewType MatrixColumnIndexColumnType { get; } 431internal DataViewType MatrixRowIndexColumnType { get; }
RecommenderUtils.cs (1)
33private static bool TryMarshalGoodRowColumnType(DataViewType type, out KeyDataViewType keyType)
Microsoft.ML.Samples (1)
Dynamic\Transforms\CustomMappingWithInMemoryCustomType.cs (1)
172public override bool Equals(DataViewType other)
Microsoft.ML.StandardTrainers (33)
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (3)
299private IReadOnlyList<DataViewType> FeatureColumnTypes { get; } 314var featureColumnTypes = new DataViewType[featureColumns.Length]; 345var featureColumnTypes = new DataViewType[featCount];
LdSvm\LdSvmModelParameters.cs (2)
264public DataViewType InputType { get; } 266public DataViewType OutputType => NumberDataViewType.Single;
Standard\LinearModelParameters.cs (3)
100private readonly DataViewType _inputType; 299DataViewType IValueMapper.InputType 304DataViewType IValueMapper.OutputType
Standard\LogisticRegression\MulticlassLogisticRegression.cs (4)
448internal readonly DataViewType InputType; 449internal readonly DataViewType OutputType; 450DataViewType IValueMapper.InputType => InputType; 451DataViewType IValueMapper.OutputType => OutputType;
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (1)
91private protected IDataView MapLabelsCore<T>(DataViewType type, InPredicate<T> equalsTarget, RoleMappedData data)
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (2)
254DataViewType IValueMapper.InputType => _inputType; 256DataViewType IValueMapper.OutputType => _outputType;
Standard\MulticlassClassification\OneVersusAllTrainer.cs (7)
293private DataViewType DistType { get; } 439DataViewType IValueMapper.InputType 444DataViewType IValueMapper.OutputType 503public abstract DataViewType InputType { get; } 599public override DataViewType InputType { get; } 683public override DataViewType InputType { get; } 848public override DataViewType InputType { get; }
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (3)
258private readonly DataViewType _outputType; 259DataViewType IValueMapper.InputType => _inputType; 260DataViewType IValueMapper.OutputType => _outputType;
Standard\Simple\SimpleTrainers.cs (8)
63private readonly DataViewType _inputType; 64DataViewType IValueMapper.InputType => _inputType; 65DataViewType IValueMapper.OutputType => NumberDataViewType.Single; 66DataViewType IValueMapperDist.DistType => NumberDataViewType.Single; 440private readonly DataViewType _inputType; 441DataViewType IValueMapper.InputType => _inputType; 442DataViewType IValueMapper.OutputType => NumberDataViewType.Single; 443DataViewType IValueMapperDist.DistType => NumberDataViewType.Single;
Microsoft.ML.TensorFlow (6)
TensorflowTransform.cs (5)
51internal readonly DataViewType[] OutputTypes; 381internal static (TF_DataType[] tfOutputTypes, DataViewType[] outputTypes, (Operation, int)[]) GetOutputInfo(IHost host, Session session, string[] outputs, bool treatOutputAsBatched) 384var outputTypes = new DataViewType[outputs.Length]; 555var type = inputSchema[_inputColIndices[i]].Type; 982private readonly DataViewType[] _outputTypes;
TensorflowUtils.cs (1)
90DataViewType columnType = new VectorDataViewType(mlType);
Microsoft.ML.TensorFlow.Tests (5)
TensorflowTests.cs (5)
586var metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowOperatorTypeKind].Type; 1575var labelTypeFirst = labelColumnFirst.Type; 1578var labelTypeSecond = labelColumnSecond.Type; 1734var labelTypeFirst = labelColumnFirst.Type; 1737var labelTypeSecond = labelColumnSecond.Type;
Microsoft.ML.TestFramework (10)
DataPipe\TestDataPipeBase.cs (10)
386DataViewType type = schema[c].Type; 533DataViewType type = schema[c].Type; 579DataViewType type = schema[c].Type; 644protected bool EqualTypes(DataViewType type1, DataViewType type2, bool exactTypes) 715var type1 = curs1.Schema[col].Type; 716var type2 = curs2.Schema[col].Type; 805var type1 = curs1.Schema[col].Type; 806var type2 = cursors[col].Schema[col].Type; 881protected Func<bool> GetColumnComparer(DataViewRow r1, DataViewRow r2, int col, DataViewType type, bool exactDoubles)
Microsoft.ML.TestFrameworkCommon (11)
TestCommon.cs (11)
98var type1 = sch1[col].Type; 99var type2 = sch2[col].Type; 198public static bool EqualTypes(DataViewType type1, DataViewType type2, bool exactTypes) 210private static bool SameSizeAndItemType(this DataViewType columnType, DataViewType other) 237var t1 = sch1[col].Annotations.Schema.GetColumnOrNull(kind)?.Type; 238var t2 = sch2[col].Annotations.Schema.GetColumnOrNull(kind)?.Type; 287private static DataViewType GetItemType(this DataViewType columnType) => (columnType as VectorDataViewType)?.ItemType ?? columnType; 289private static int GetVectorSize(this DataViewType columnType) => (columnType as VectorDataViewType)?.Size ?? 0;
Microsoft.ML.Tests (15)
ExpressionLanguageTests\ExpressionLanguageTests.cs (6)
224private DataViewType[] ParseTypes(string text, ref int ichMin, int ichLim) 229var res = new DataViewType[toks.Length]; 241private void Evaluate(IndentedTextWriter wrt, Delegate del, DataViewType typeRes, DataViewType[] types, 285private Func<ReadOnlyMemory<char>, bool> GetGetter(int i, DataViewType dst, object[] args) 347private Action<object> GetPrinter(DataViewType dst, StringBuilder sb)
TermEstimatorTests.cs (2)
146var type1 = result.Schema[termIndex].Type; 147var itemType1 = (type1 as VectorDataViewType)?.ItemType ?? type1;
Transformers\ConcatTests.cs (4)
59static DataViewType GetType(DataViewSchema schema, string name) 73DataViewType t; 116static DataViewType GetType(DataViewSchema schema, string name) 141DataViewType t;
Transformers\CopyColumnEstimatorTests.cs (3)
147var type1 = result.Schema[termIndex].Type; 148var itemType1 = (type1 as VectorDataViewType)?.ItemType ?? type1; 153var type2 = result.Schema[copyIndex].Type;
Microsoft.ML.TimeSeries (17)
IidAnomalyDetectionBase.cs (1)
126var colType = inputSchema[col].Type;
SequentialAnomalyDetectionTransformBase.cs (1)
319var colType = inputSchema[_inputColumnIndex].Type;
SequentialForecastingTransformBase.cs (1)
116var colType = inputSchema[_inputColumnIndex].Type;
SequentialTransformBase.cs (4)
237Action<TState> initFunction, bool hasBuffer, DataViewType outputColTypeOverride) 269string name, IHostEnvironment env, IDataView input, DataViewType outputColTypeOverride = null) 275IHost host, IDataView input, DataViewType outputColTypeOverride = null) 321DataViewType ct = bs.LoadTypeDescriptionOrNull(ctx.Reader.BaseStream);
SequentialTransformerBase.cs (4)
340private protected DataViewType OutputColumnType; 357string outputColumnName, string inputColumnName, DataViewType outputColType) 376string confidenceUpperBoundColumn, string inputColumnName, DataViewType outputColType) : 494string forecastingConfidenceIntervalMaxOutputColumnName, Action<TState> initFunction, bool hasBuffer, DataViewType outputColTypeOverride)
SlidingWindowTransformBase.cs (1)
102DataViewType col = sch[index].Type;
SrCnnAnomalyDetectionBase.cs (1)
117var colType = inputSchema[col].Type;
SrCnnEntireAnomalyDetector.cs (1)
157protected override DataViewType GetColumnTypeCore(int iinfo)
SrCnnTransformBase.cs (1)
162var colType = inputSchema[_inputColumnIndex].Type;
SsaAnomalyDetectionBase.cs (1)
252var colType = inputSchema[col].Type;
SsaForecastingBase.cs (1)
176var colType = inputSchema[col].Type;
Microsoft.ML.TorchSharp (3)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
695DataViewType type;
NasBert\NerTrainer.cs (1)
341DataViewType type;
NasBert\TextClassificationTrainer.cs (1)
278DataViewType type;
Microsoft.ML.Transforms (181)
CountFeatureSelection.cs (7)
303var colTypes = new DataViewType[size]; 312var colType = schema[colSrc].Type; 349public static bool IsValidColumnType(DataViewType type) 352private static CountAggregator GetOneAggregator(DataViewRow row, DataViewType colType, int colSrc) 354Func<DataViewRow, DataViewType, int, CountAggregator> del = GetOneAggregator<int>; 359private static CountAggregator GetOneAggregator<T>(DataViewRow row, DataViewType colType, int colSrc) 390public CountAggregator(DataViewType type, ValueGetter<T> getter)
CustomMappingTransformer.cs (1)
265SchemaShape.GetColumnTypeShape(col.ColumnType, out var vecKind, out var itemType, out var isKey);
Dracula\CountTableTransformer.cs (2)
137var labelColumnType = labelCol.GetValueOrDefault().Type; 225var type = col.Type;
Expression\LambdaParser.cs (4)
92private DataViewType[] _types; 152public static LambdaNode Parse(out List<Error> errors, out List<int> lineMap, CharCursor chars, int[] perm, params DataViewType[] types) 163private LambdaNode ParseCore(out List<Error> errors, out List<int> lineMap, CharCursor chars, int[] perm, DataViewType[] types) 412DataViewType type;
Expression\Node.cs (3)
605public DataViewType ResultType; 647public readonly DataViewType Type; 650public ParamNode(Token tok, string name, int index, DataViewType type)
ExpressionTransformer.cs (15)
87internal static LambdaNode ParseAndBindLambda(IHostEnvironment env, string expression, int ivec, DataViewType[] inputTypes, out int[] perm) 114private static int FindVectorInputColumn(IHostEnvironment env, IReadOnlyList<string> inputColumnNames, SchemaShape inputSchema, DataViewType[] inputTypes) 134private static int FindVectorInputColumn(IHostEnvironment env, IReadOnlyList<string> inputColumnNames, DataViewSchema inputSchema, DataViewType[] inputTypes) 161var inputTypes = new DataViewType[_columns[i].InputColumnNames.Length]; 182var inputTypes = new DataViewType[_columns[i].InputColumnNames.Length]; 186var typeRes = node.ResultType; 258public ColumnInfo(IExceptionContext ectx, string[] inputColumnNames, DataViewType[] inputTypes, string expression, string outputColumnName, int vectorInputColumn, LambdaNode node, int[] perm) 371var inputTypes = new DataViewType[inputSize]; 568Func<IExceptionContext, DataViewRow, DataViewSchema.Column[], int[], Delegate, DataViewType, ValueGetter<VBuffer<int>>> d; 601private ValueGetter<VBuffer<TDst>> GetGetterVec<T0, TDst>(IExceptionContext ectx, DataViewRow input, DataViewSchema.Column[] inputColumns, int[] perm, Delegate del, DataViewType outputColumnItemType) 666private ValueGetter<VBuffer<TDst>> GetGetterVec<T0, T1, TDst>(IExceptionContext ectx, DataViewRow input, DataViewSchema.Column[] inputColumns, int[] perm, Delegate del, DataViewType outputColumnItemType) 726private ValueGetter<VBuffer<TDst>> GetGetterVec<T0, T1, T2, TDst>(IExceptionContext ectx, DataViewRow input, DataViewSchema.Column[] inputColumns, int[] perm, Delegate del, DataViewType outputColumnItemType) 789private ValueGetter<VBuffer<TDst>> GetGetterVec<T0, T1, T2, T3, TDst>(IExceptionContext ectx, DataViewRow input, DataViewSchema.Column[] inputColumns, int[] perm, Delegate del, DataViewType outputColumnItemType) 855private ValueGetter<VBuffer<TDst>> GetGetterVec<T0, T1, T2, T3, T4, TDst>(IExceptionContext ectx, DataViewRow input, DataViewSchema.Column[] inputColumns, int[] perm, Delegate del, DataViewType outputColumnItemType) 952DataViewType type;
GcnTransform.cs (6)
197var inType = inputSchema[srcCol].Type; 319private readonly DataViewType[] _srcTypes; 321private readonly DataViewType[] _types; 330_types = new DataViewType[_parent.ColumnPairs.Length]; 331_srcTypes = new DataViewType[_parent.ColumnPairs.Length]; 890internal static bool IsColumnTypeValid(DataViewType type)
GroupTransform.cs (3)
357var colType = retrievedColumn.Value.Type; 429var type = row.Schema[col].Type; 451var colType = row.Schema[col].Type;
HashJoiningTransform.cs (4)
115public readonly DataViewType OutputColumnType; 384private static string TestColumnType(DataViewType type) 477DataViewType itemType; 653protected override DataViewType GetColumnTypeCore(int iinfo)
KeyToVectorMapping.cs (7)
64private string TestIsKey(DataViewType type) 73var type = inputSchema[srcCol].Type; 152public readonly DataViewType TypeSrc; 154public ColInfo(string name, string inputColumnName, DataViewType type) 196var type = inputSchema[colSrc].Type; 222var srcType = _infos[iinfo].TypeSrc; 285var typeSrc = _infos[iinfo].TypeSrc;
MissingValueDroppingTransformer.cs (5)
133var inType = inputSchema[srcCol].Type; 179private readonly DataViewType[] _srcTypes; 181private readonly DataViewType[] _types; 188_types = new DataViewType[_parent.ColumnPairs.Length]; 189_srcTypes = new DataViewType[_parent.ColumnPairs.Length];
MissingValueHandlingTransformer.cs (1)
164var replaceType = input.Schema[inputCol].Type;
MissingValueIndicatorTransform.cs (1)
169protected override DataViewType GetColumnTypeCore(int iinfo)
MissingValueIndicatorTransformer.cs (13)
146private static readonly FuncStaticMethodInfo1<DataViewType, Delegate> _getIsNADelegateMethodInfo 147= new FuncStaticMethodInfo1<DataViewType, Delegate>(GetIsNADelegate<int>); 162public readonly DataViewType OutputType; 163public readonly DataViewType InputType; 166public ColInfo(string name, string inputColumnName, DataViewType inType, DataViewType outType) 192var inType = inputSchema[colSrc].Type; 193DataViewType outType; 225private static Delegate GetIsNADelegate(DataViewType type) 230private static Delegate GetIsNADelegate<T>(DataViewType type) 468var inputType = _infos[iinfo].InputType; 546DataViewType type = !(col.ItemType is VectorDataViewType vectorType) ? 547(DataViewType)BooleanDataViewType.Instance :
MissingValueReplacing.cs (32)
41private static readonly FuncInstanceMethodInfo1<MissingValueReplacingTransformer, DataViewType, Array, BitArray> _computeDefaultSlotsMethodInfo 42= FuncInstanceMethodInfo1<MissingValueReplacingTransformer, DataViewType, Array, BitArray>.Create(target => target.ComputeDefaultSlots<int>); 129private static readonly FuncStaticMethodInfo1<DataViewType, string> _testTypeMethodInfo 130= new FuncStaticMethodInfo1<DataViewType, string>(TestType<int>); 132private static readonly FuncInstanceMethodInfo1<MissingValueReplacingTransformer, DataViewType, Delegate> _getIsNADelegateMethodInfo 133= FuncInstanceMethodInfo1<MissingValueReplacingTransformer, DataViewType, Delegate>.Create(target => target.GetIsNADelegate<int>); 156internal static string TestType(DataViewType type) 163private static string TestType<T>(DataViewType type) 188private readonly DataViewType[] _replaceTypes; 204var type = inputSchema[srcCol].Type; 229_replaceTypes = new DataViewType[columnsLength]; 233if (!saver.TryLoadTypeAndValue(ctx.Reader.BaseStream, out DataViewType savedType, out object repValue)) 277private void GetReplacementValues(IDataView input, MissingValueReplacingEstimator.ColumnOptions[] columns, out object[] repValues, out BitArray[] slotIsDefault, out DataViewType[] types) 281types = new DataViewType[columns.Length]; 293var type = input.Schema[colSrc].Type; 367private BitArray ComputeDefaultSlots<T>(DataViewType type, Array values) 381private object GetDefault(DataViewType type) 393private Delegate GetIsNADelegate(DataViewType type) 398private Delegate GetIsNADelegate<T>(DataViewType type) 404private object GetSpecifiedValue(string srcStr, DataViewType dstType, Delegate isNA) 406Func<string, DataViewType, InPredicate<int>, object> func = GetSpecifiedValue<int>; 411private object GetSpecifiedValue<T>(string srcStr, DataViewType dstType, InPredicate<T> isNA) 485private void WriteTypeAndValue<T>(Stream stream, BinarySaver saver, DataViewType type, T rep) 518Action<Stream, BinarySaver, DataViewType, int> func = WriteTypeAndValue<int>; 533public readonly DataViewType TypeSrc; 535public ColInfo(string outputColumnName, string inputColumnName, DataViewType type) 551private readonly DataViewType[] _types; 561_types = new DataViewType[_parent.ColumnPairs.Length]; 565var type = _infos[i].TypeSrc; 602var type = inputSchema[colSrc].Type; 876var type = _infos[iinfo].TypeSrc; 1050var type = !(col.ItemType is VectorDataViewType vectorType) ?
MissingValueReplacingUtils.cs (1)
17private static StatAggregator CreateStatAggregator(IChannel ch, DataViewType type, ReplacementKind? kind, bool bySlot, DataViewRowCursor cursor, int col)
MutualInformationFeatureSelection.cs (11)
401internal static bool IsValidColumnType(DataViewType type) 412private static readonly FuncStaticMethodInfo1<DataViewType, Delegate> _makeKeyMapperMethodInfo 413= new FuncStaticMethodInfo1<DataViewType, Delegate>(MakeKeyMapper<int>); 448var labelType = schema[labelCol].Type; 466var colType = schema[colSrc].Type; 515private void GetLabels(Transposer trans, DataViewType labelType, int labelCol) 577private delegate VBuffer<int> KeyLabelGetter<T>(Transposer trans, int labelCol, DataViewType labeColumnType); 579private VBuffer<int> GetKeyLabels<T>(Transposer trans, int labelCol, DataViewType labelColumnType) 595var type = trans.Schema[col].Type; 643private static Mapper<T> MakeKeyMapper<T>(DataViewType type) 767private static ValueMapper<VBuffer<T>, VBuffer<int>> BinKeys<T>(DataViewType colType)
OptionalColumnTransform.cs (12)
43public readonly DataViewType[] ColumnTypes; 54private Bindings(OptionalColumnTransform parent, DataViewType[] columnTypes, int[] srcCols, 74var columnTypes = new DataViewType[args.Columns.Length]; 113var columnTypes = new DataViewType[size]; 160var columnType = ColumnTypes[i]; 180protected override DataViewType GetColumnTypeCore(int iinfo) 186protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 191protected override DataViewType GetAnnotationTypeCore(string kind, int iinfo) 411var columnType = _bindings.ColumnTypes[iinfo]; 499var columnType = _bindings.ColumnTypes[iinfo]; 524var columnType = _bindings.ColumnTypes[iinfo]; 541private bool SaveAsOnnxCore(OnnxContext ctx, string srcVariableName, DataViewType columnType)
ProduceIdTransform.cs (1)
45protected override DataViewType GetColumnTypeCore(int iinfo)
RandomFourierFeaturizing.cs (9)
229private static string TestColumnType(DataViewType type) 244var type = inputSchema[srcCol].Type; 261var typeSrc = input.Schema[srcCol].Type; 289var type = input.Schema[srcCol].Type; 302var srcType = input.Schema[srcCols[i]].Type; 471private readonly DataViewType[] _srcTypes; 473private readonly DataViewType[] _types; 480_types = new DataViewType[_parent.ColumnPairs.Length]; 481_srcTypes = new DataViewType[_parent.ColumnPairs.Length];
StatefulCustomMappingTransformer.cs (1)
398SchemaShape.GetColumnTypeShape(col.ColumnType, out var vecKind, out var itemType, out var isKey);
SvmLight\SvmLightSaver.cs (1)
77public bool IsColumnSavable(DataViewType type)
Text\NgramHashingTransformer.cs (7)
216var columnType = input.Schema[srcCol].Type; 379private readonly DataViewType[][] _srcTypes; 389_srcTypes = new DataViewType[_parent._columns.Length][]; 393_srcTypes[i] = new DataViewType[_parent._columns[i].InputColumnNamesArray.Length]; 399var columnType = inputSchema[srcCol].Type; 402var srcType = inputSchema[srcCol].Type; 1182internal static bool IsColumnTypeValid(DataViewType type)
Text\NgramTransform.cs (8)
202var type = inputSchema[srcCol].Type; 214var typeSrc = input.Schema[srcCol].Type; 232var srcTypes = new DataViewType[columns.Length]; 477private readonly DataViewType[] _srcTypes; 479private readonly DataViewType[] _types; 486_types = new DataViewType[_parent.ColumnPairs.Length]; 487_srcTypes = new DataViewType[_parent.ColumnPairs.Length]; 958internal static bool IsColumnTypeValid(DataViewType type)
Text\StopWordsRemovingTransformer.cs (9)
189var type = inputSchema[srcCol].Type; 349private readonly DataViewType[] _types; 361_types = new DataViewType[_parent.ColumnPairs.Length]; 630internal static bool IsColumnTypeValid(DataViewType type) => 773private static readonly DataViewType _outputType = new VectorDataViewType(TextDataViewType.Instance); 870var typeSrc = loader.Schema[colSrcIndex].Type; 1063private readonly DataViewType[] _types; 1072_types = new DataViewType[_parent.ColumnPairs.Length]; 1076var srcType = inputSchema[srcCol].Type;
Text\TextNormalizing.cs (6)
118var type = inputSchema[srcCol].Type; 200private readonly DataViewType[] _types; 207_types = new DataViewType[_parent.ColumnPairs.Length]; 211var srcType = inputSchema[srcCol].Type; 332var srcType = input.Schema[_parent.ColumnPairs[iinfo].inputColumnName].Type; 527internal static bool IsColumnTypeValid(DataViewType type) => (type.GetItemType() is TextDataViewType);
Text\TokenizingByCharacters.cs (5)
122var type = inputSchema[srcCol].Type; 190private readonly DataViewType _type; 208var type = inputSchema[_parent.ColumnPairs[i].inputColumnName].Type; 238DataViewType dataViewType; 646internal static bool IsColumnTypeValid(DataViewType type) => type.GetItemType() is TextDataViewType;
Text\WordEmbeddingsExtractor.cs (1)
303var colType = inputSchema[srcCol].Type;
Text\WordTokenizing.cs (5)
124var type = inputSchema[srcCol].Type; 202private readonly DataViewType _type; 217var srcType = inputSchema[srcCol].Type; 241var srcType = input.Schema[srcCol].Type; 454internal static bool IsColumnTypeValid(DataViewType type) => type.GetItemType() is TextDataViewType;
Microsoft.ML.Vision (9)
DnnRetrainTransform.cs (6)
50private readonly DataViewType[] _outputTypes; 233var type = inputSchema[inputColIndex].Type; 624internal static (TF_DataType[] tfOutputTypes, DataViewType[] outputTypes, (Operation, int)[]) GetOutputInfo(IHost host, Session session, string[] outputs) 627var outputTypes = new DataViewType[outputs.Length]; 779var type = inputSchema[_inputColIndices[i]].Type; 1226private readonly DataViewType[] _outputTypes;
ImageClassificationTrainer.cs (3)
601var labelType = labelColumn.Type; 1398DataViewType IValueMapper.InputType => _inputType; 1400DataViewType IValueMapper.OutputType => _outputType;