117 references to InternalDataKind
Microsoft.ML.Core (109)
Data\ColumnTypeExtensions.cs (24)
65
/// Gets the equivalent <see cref="
InternalDataKind
"/> for the <paramref name="columnType"/>'s RawType.
66
/// This can return default(<see cref="
InternalDataKind
"/>) if the RawType doesn't have a corresponding
67
/// <see cref="
InternalDataKind
"/>.
69
public static
InternalDataKind
GetRawKind(this DataViewType columnType)
71
columnType.RawType.TryGetDataKind(out
InternalDataKind
result);
112
public static PrimitiveDataViewType PrimitiveTypeFromKind(
InternalDataKind
kind)
114
if (kind ==
InternalDataKind
.TX)
116
if (kind ==
InternalDataKind
.BL)
118
if (kind ==
InternalDataKind
.TS)
120
if (kind ==
InternalDataKind
.DT)
122
if (kind ==
InternalDataKind
.DZ)
124
if (kind ==
InternalDataKind
.UG)
131
InternalDataKind
kind;
139
private static NumberDataViewType NumberTypeFromKind(
InternalDataKind
kind)
143
case
InternalDataKind
.I1:
145
case
InternalDataKind
.U1:
147
case
InternalDataKind
.I2:
149
case
InternalDataKind
.U2:
151
case
InternalDataKind
.I4:
153
case
InternalDataKind
.U4:
155
case
InternalDataKind
.I8:
157
case
InternalDataKind
.U8:
159
case
InternalDataKind
.R4:
161
case
InternalDataKind
.R8:
Data\DataKind.cs (85)
75
/// Data type specifier used in command line. <see cref="
InternalDataKind
"/> is the underlying version of <see cref="DataKind"/>
124
public const
InternalDataKind
KindMin =
InternalDataKind
.I1;
125
public const
InternalDataKind
KindLim =
InternalDataKind
.U16 + 1;
131
public static int ToIndex(this
InternalDataKind
kind)
139
public static
InternalDataKind
FromIndex(int index)
142
return (
InternalDataKind
)(index + (int)KindMin);
146
/// This function converts <paramref name="dataKind"/> to <see cref="
InternalDataKind
"/>.
147
/// Because <see cref="DataKind"/> is a subset of <see cref="
InternalDataKind
"/>, the conversion is straightforward.
149
public static
InternalDataKind
ToInternalDataKind(this DataKind dataKind) => (
InternalDataKind
)dataKind;
153
/// Because <see cref="DataKind"/> is a subset of <see cref="
InternalDataKind
"/>, we should check if <paramref name="kind"/>
156
public static DataKind ToDataKind(this
InternalDataKind
kind)
158
Contracts.Check(kind !=
InternalDataKind
.UG);
166
public static ulong ToMaxInt(this
InternalDataKind
kind)
170
case
InternalDataKind
.I1:
172
case
InternalDataKind
.U1:
174
case
InternalDataKind
.I2:
176
case
InternalDataKind
.U2:
178
case
InternalDataKind
.I4:
180
case
InternalDataKind
.U4:
182
case
InternalDataKind
.I8:
184
case
InternalDataKind
.U8:
221
public static long ToMinInt(this
InternalDataKind
kind)
225
case
InternalDataKind
.I1:
227
case
InternalDataKind
.U1:
229
case
InternalDataKind
.I2:
231
case
InternalDataKind
.U2:
233
case
InternalDataKind
.I4:
235
case
InternalDataKind
.U4:
237
case
InternalDataKind
.I8:
239
case
InternalDataKind
.U8:
249
public static Type ToType(this
InternalDataKind
kind)
253
case
InternalDataKind
.I1:
255
case
InternalDataKind
.U1:
257
case
InternalDataKind
.I2:
259
case
InternalDataKind
.U2:
261
case
InternalDataKind
.I4:
263
case
InternalDataKind
.U4:
265
case
InternalDataKind
.I8:
267
case
InternalDataKind
.U8:
269
case
InternalDataKind
.R4:
271
case
InternalDataKind
.R8:
273
case
InternalDataKind
.TX:
275
case
InternalDataKind
.BL:
277
case
InternalDataKind
.TS:
279
case
InternalDataKind
.DT:
281
case
InternalDataKind
.DZ:
283
case
InternalDataKind
.UG:
293
public static bool TryGetDataKind(this Type type, out
InternalDataKind
kind)
299
kind =
InternalDataKind
.I1;
301
kind =
InternalDataKind
.U1;
303
kind =
InternalDataKind
.I2;
305
kind =
InternalDataKind
.U2;
307
kind =
InternalDataKind
.I4;
309
kind =
InternalDataKind
.U4;
311
kind =
InternalDataKind
.I8;
313
kind =
InternalDataKind
.U8;
315
kind =
InternalDataKind
.R4;
317
kind =
InternalDataKind
.R8;
319
kind =
InternalDataKind
.TX;
321
kind =
InternalDataKind
.BL;
323
kind =
InternalDataKind
.TS;
325
kind =
InternalDataKind
.DT;
327
kind =
InternalDataKind
.DZ;
329
kind =
InternalDataKind
.UG;
332
kind = default(
InternalDataKind
);
343
public static string GetString(this
InternalDataKind
kind)
347
case
InternalDataKind
.I1:
349
case
InternalDataKind
.I2:
351
case
InternalDataKind
.I4:
353
case
InternalDataKind
.I8:
355
case
InternalDataKind
.U1:
357
case
InternalDataKind
.U2:
359
case
InternalDataKind
.U4:
361
case
InternalDataKind
.U8:
363
case
InternalDataKind
.R4:
365
case
InternalDataKind
.R8:
367
case
InternalDataKind
.BL:
369
case
InternalDataKind
.TX:
371
case
InternalDataKind
.TS:
373
case
InternalDataKind
.DT:
375
case
InternalDataKind
.DZ:
377
case
InternalDataKind
.UG:
Microsoft.ML.Data (6)
DataLoadSave\Database\DbExtensions.cs (1)
70
/// <summary>Maps a <see cref="
InternalDataKind
"/> to the associated <see cref="DbType"/>.</summary>
DataLoadSave\Text\TextLoader.cs (3)
89
/// <param name="kind"><see cref="
InternalDataKind
"/> of the items in the column.</param>
110
/// <see cref="
InternalDataKind
"/> of the items in the column. It defaults to float.
111
/// Although <see cref="
InternalDataKind
"/> is internal, <see cref="Type"/>'s information can be publicly accessed by <see cref="DataKind"/>.
DataLoadSave\Text\TextLoaderParser.cs (1)
71
for (
var
kind = InternalDataKindExtensions.KindMin; kind < InternalDataKindExtensions.KindLim; kind++)
Utilities\TypeParsingUtils.cs (1)
21
/// the returned <see cref="
InternalDataKind
"/> can really be made into a key with the specified <paramref name="keyCount"/>.
Microsoft.ML.Recommender (1)
RecommenderUtils.cs (1)
41
/// is a <see cref="
InternalDataKind
.U4"/> key of known cardinality.
Microsoft.ML.Transforms (1)
ExpressionTransformer.cs (1)
375
var
kind = InternalDataKindExtensions.FromIndex(dataKindIndex);