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