Implemented interface member:
798 references to
DnnAnalyzer (6)
DnnAnalyzer.cs (6)
37var name = schema[i].Name; 38var type = schema[i].Type; 40var metadataType = schema[i].Annotations.Schema.GetColumnOrNull("TensorflowOperatorType")?.Type; 42schema[i].Annotations.GetValue("TensorflowOperatorType", ref opType); 43metadataType = schema[i].Annotations.Schema.GetColumnOrNull("TensorflowUpstreamOperators")?.Type; 47schema[i].Annotations.GetValue("TensorflowUpstreamOperators", ref inputOps);
Microsoft.ML.AutoML (14)
API\AutoCatalog.cs (7)
823&& data.Schema[c.ColumnIndex].Type != BooleanDataViewType.Instance 824&& !(data.Schema[c.ColumnIndex].Type is VectorDataViewType vt && vt.ItemType == BooleanDataViewType.Instance)).ToArray(); 828var textFeatureColumnNames = textFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 829var numericFeatureColumnNames = numericFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 830var catalogFeatureColumnNames = catalogFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 831var imagePathColumnNames = imagePathFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray(); 832var booleanFeatureColumnNames = booleanFeatures.Select(c => data.Schema[c.ColumnIndex].Name).ToArray();
ColumnInference\ColumnInferenceApi.cs (1)
86purposeResults = purposeInferenceResult.Select(p => (dataView.Schema[p.ColumnIndex].Name, p.Purpose));
ColumnInference\PurposeInference.cs (4)
73_type = new Lazy<DataViewType>(() => _data.Schema[_columnId].Type); 74_columnName = new Lazy<string>(() => _data.Schema[_columnId].Name); 89var column = _data.Schema[_columnId]; 250var column = data.Schema[i];
DatasetDimensions\DatasetDimensionsApi.cs (1)
21var column = data.Schema[i];
Utils\DatasetColumnInfo.cs (1)
34var schemaCol = data.Schema[i];
Microsoft.ML.AutoML.Tests (2)
AutoFitTests.cs (2)
634Assert.Equal(col.Name, resTrainTest.Schema[col.Index].Name); 635Assert.Equal(col.Name, resCV.Schema[col.Index].Name);
Microsoft.ML.Core (19)
Data\AnnotationUtils.cs (13)
226var columnType = schema[col].Annotations.Schema.GetColumnOrNull(annotationKind)?.Type; 232schema[col].Annotations.GetValue(annotationKind, ref value); 250var columnType = schema[col].Annotations.Schema.GetColumnOrNull(annotationKind)?.Type; 254schema[col].Annotations.GetValue(annotationKind, ref val); 269var columnType = schema[col].Annotations.Schema.GetColumnOrNull(annotationKind)?.Type; 273schema[col].Annotations.GetValue(annotationKind, ref val); 304if (list?.Count != 1 || !schema.Schema[list[0].Index].HasSlotNames(vectorSize)) 307schema.Schema[list[0].Index].Annotations.GetValue(Kinds.SlotNames, ref slotNames); 363var annotationType = schema[col].Annotations.Schema.GetColumnOrNull(kind)?.Type; 366schema[col].Annotations.GetValue(kind, ref value); 385if (!(schema[colIndex].Type is VectorDataViewType vecType && vecType.Size > 0)) 388var type = schema[colIndex].Annotations.Schema.GetColumnOrNull(Kinds.CategoricalSlotRanges)?.Type; 392schema[colIndex].Annotations.GetValue(Kinds.CategoricalSlotRanges, ref catIndices);
Data\IEstimator.cs (4)
185if (!schema[iCol].IsHidden) 189foreach (var annotationColumn in schema[iCol].Annotations.Schema) 196GetColumnTypeShape(schema[iCol].Type, out var vecKind, out var itemType, out var isKey); 197cols.Add(new Column(schema[iCol].Name, vecKind, itemType, isKey, annotations));
Data\RoleMappedSchema.cs (1)
170Contracts.Assert(!schema[info.Index].IsHidden, "How did a hidden column sneak in?");
Utilities\Utils.cs (1)
777if (!pred(schema[c]))
Microsoft.ML.Core.Tests (19)
UnitTests\CoreBaseTestClass.cs (12)
47var g1 = r1.GetGetter<T>(r1.Schema[col]); 48var g2 = r2.GetGetter<T>(r2.Schema[col]); 70var g1 = r1.GetGetter<VBuffer<T>>(r1.Schema[col]); 71var g2 = r2.GetGetter<VBuffer<T>>(r2.Schema[col]); 253var f1 = curs1.IsColumnActive(curs1.Schema[col]); 254var f2 = curs2.IsColumnActive(curs2.Schema[col]); 258var type1 = curs1.Schema[col].Type; 259var type2 = curs2.Schema[col].Type; 336Contracts.Assert(curs1.IsColumnActive(curs1.Schema[col])); 337cursors[col] = view2.GetRowCursor(view2.Schema[col]); 347var type1 = curs1.Schema[col].Type; 348var type2 = cursors[col].Schema[col].Type;
UnitTests\TestEntryPoints.cs (7)
1633var type = binaryScored.Schema[scoreCol.Value.Index].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnKind)?.Type; 1636binaryScored.Schema[scoreCol.Value.Index].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref kind); 1642type = regressionScored.Schema[scoreCol.Value.Index].Annotations.Schema[AnnotationUtils.Kinds.ScoreColumnKind].Type; 1644regressionScored.Schema[scoreCol.Value.Index].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref kind); 1650type = anomalyScored.Schema[scoreCol.Value.Index].Annotations.Schema[AnnotationUtils.Kinds.ScoreColumnKind].Type; 1652anomalyScored.Schema[scoreCol.Value.Index].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref kind); 4849Assert.Equal(expected[i], schema[i].Name);
Microsoft.ML.Data (481)
Commands\CrossValidationCommand.cs (1)
302var type = schema[index].Type;
Commands\DataCommand.cs (2)
165var nameOfMetric = "TLC_" + cursor.Schema[currentIndex].Name; 166var type = cursor.Schema[currentIndex].Type;
Commands\SaveDataCommand.cs (6)
148if (!ImplOptions.KeepHidden && data.Schema[i].IsHidden) 150var type = data.Schema[i].Type; 154ch.Info(MessageSensitivity.Schema, "The column '{0}' will not be written as it has unsavable column type.", data.Schema[i].Name); 210if (!keepHidden && view.Schema[i].IsHidden) 212var type = view.Schema[i].Type; 216ch.Info(MessageSensitivity.Schema, "The column '{0}' will not be written as it has unsavable column type.", view.Schema[i].Name);
Commands\ScoreCommand.cs (5)
186if (!ImplOptions.KeepHidden && loader.Schema[i].IsHidden) 190var type = loader.Schema[i].Type; 196loader.Schema[i].Name); 222switch (schema[i].Name) 232if (ImplOptions.OutputColumns != null && Array.FindIndex(ImplOptions.OutputColumns, schema[i].Name.Equals) >= 0)
Commands\ShowSchemaCommand.cs (7)
139var name = schema[col].Name; 140var type = schema[col].Type; 156if ((typeNames = schema[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type) == null) 163schema[col].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref names); 191foreach (var metaColumn in schema[col].Annotations.Schema.OrderBy(mcol => mcol.Name)) 241schema[col].Annotations.GetValue(kind, ref value); 278schema[col].Annotations.GetValue(kind, ref value);
Commands\TrainCommand.cs (1)
467if (!trainer.Info.NeedNormalization || schema[featCol].IsNormalized())
Data\DataViewUtils.cs (15)
183if (!predicate(schema[col])) 185var type = schema[col].Type; 242bool active = firstCursor.IsColumnActive(schema[c]); 245if (cursors[i].IsColumnActive(schema[c]) != active) 355DataViewType type = schema[c].Type; 538var column = input.Schema[activeToCol[c]]; 644return CreateInPipeCore(col, input.GetGetter<T>(_schema[col])); 1244return Utils.MarshalInvoke(_createGetterMethodInfo, this, Schema[col].Type.RawType, col); 1250var type = Schema[col].Type; 1256Ch.Assert(cursor.IsColumnActive(Schema[col])); 1257Ch.Assert(type.Equals(cursor.Schema[col].Type)); 1258getters[i] = _cursors[i].GetGetter<T>(cursor.Schema[col]); 1338var colType = cursor.Schema[srcColIndex].Type; 1358var floatGetter = cursor.GetGetter<T>(cursor.Schema[i]); 1388var vecGetter = cursor.GetGetter<VBuffer<T>>(cursor.Schema[colIndex]);
Data\RowCursorUtils.cs (26)
37Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active"); 39return Utils.MarshalInvoke(_getGetterAsDelegateCoreMethodInfo, row.Schema[col].Type.RawType, row, col); 44return row.GetGetter<TValue>(row.Schema[col]); 59Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active"); 61var typeSrc = row.Schema[col].Type; 80Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active"); 82var typeSrc = row.Schema[col].Type; 95var getter = row.GetGetter<TSrc>(row.Schema[col]); 125Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active"); 127var typeSrc = row.Schema[col].Type; 136var getter = row.GetGetter<TSrc>(row.Schema[col]); 158Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active"); 160var typeSrc = row.Schema[col].Type as VectorDataViewType; 178Contracts.CheckParam(row.IsColumnActive(row.Schema[col]), nameof(col), "column was not active"); 180var typeSrc = row.Schema[col].Type as VectorDataViewType; 235return _row.GetGetter<TValue>(_row.Schema[_col]); 308DataViewType type = cursor.Schema[col].Type; 315var getter = cursor.GetGetter<T>(cursor.Schema[col]); 354var type = cursor.Schema[labelIndex].Type; 357return cursor.GetGetter<Single>(cursor.Schema[labelIndex]); 361var getSingleSrc = cursor.GetGetter<Double>(cursor.Schema[labelIndex]); 376var type = cursor.Schema[labelIndex].Type; 383var getBoolSrc = cursor.GetGetter<bool>(cursor.Schema[labelIndex]); 458row.GetGetter<T>(row.Schema[col])(ref val); 477env.CheckParam(Enumerable.Range(0, row.Schema.Count).All(c => row.IsColumnActive(row.Schema[c])), nameof(row), "Some columns were inactive"); 520_host.Assert(Enumerable.Range(0, row.Schema.Count).All(c => row.IsColumnActive(row.Schema[c])));
DataDebuggerPreview.cs (3)
48setters[i] = Utils.MarshalInvoke(_makeSetterMethodInfo, this, data.Schema[i].Type.RawType, cursor, i); 62ColumnView = Enumerable.Range(0, n).Select(c => new ColumnInfo(data.Schema[c], columns[c].ToArray())).ToImmutableArray(); 70var column = row.Schema[col];
DataLoadSave\Binary\BinaryLoader.cs (1)
991.Select(x => new { col = x, isSavable = saver.IsColumnSavable(schema[x].Type) });
DataLoadSave\Binary\BinarySaver.cs (9)
122_getter = cursor.GetGetter<T>(cursor.Schema[col.SourceIndex]); 281foreach (var metaColumn in schema[col].Annotations.Schema) 286throw _host.Except("Metadata with duplicate kind '{0}' encountered, disallowed", metaColumn.Name, schema[col].Name); 294metaColumn.Type, schema[col].Name, col, metaColumn.Name); 361schema[col].Annotations.GetValue(kind, ref value); 515string name = sourceSchema[active.SourceIndex].Name; 718DataViewType type = schema[colIndices[c]].Type; 721throw _host.Except("Could not get codec for requested column {0} of type {1}", schema[c].Name, type); 781ValueGetter<T> getter = cursor.GetGetter<T>(cursor.Schema[col.SourceIndex]);
DataLoadSave\DataOperationsCatalog.cs (1)
558var type = data.Schema[samplingColIndex].Type;
DataLoadSave\LegacyCompositeDataLoader.cs (1)
609Schema[col].Name);
DataLoadSave\Text\TextSaver.cs (11)
64DataViewType type = cursor.Schema[col].Type; 164_getSrc = cursor.GetGetter<VBuffer<T>>(cursor.Schema[source]); 167&& (typeNames = cursor.Schema[source].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType) != null 170cursor.Schema[source].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref _slotNames); 229var column = cursor.Schema[source]; 402DataViewType itemType = data.Schema[cols[i]].Type.GetItemType(); 404activeCols.Add(data.Schema[cols[i]]); 414var type = data.Schema[cols[i]].Type; 422var typeNames = data.Schema[cols[i]].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType; 477string name = schema[src].Name; 478var type = schema[src].Type;
DataLoadSave\Transpose\TransposeLoader.cs (7)
312var type = _parent.Schema[_col].Type; 553env.Assert(Enumerable.Range(0, schema.Count).All(c => saver.IsColumnSavable(schema[c].Type))); 644Schema[col].Name); 738_host.Assert((trans as ITransposeDataView)?.GetSlotType(0).GetValueCount() == Schema[col].Type.GetValueCount()); 798var type = Schema[col].Type; 813var type = Schema[col].Type; 833var type = Schema[col].Type;
DataLoadSave\Transpose\TransposeSaver.cs (1)
153viewAction(data.Schema[col].Name, new TransposerUtils.SlotDataView(_host, data, col));
DataView\AppendRowsDataView.cs (7)
117string name = Schema[c].Name; 118DataViewType type = Schema[c].Type; 123_host.Check(schema[c].Name == name, errMsg); 124_host.Check(schema[c].Type.SameSizeAndItemType(type), errMsg); 182DataViewType colType = Schema[col].Type; 260getSrc = _currentCursor.GetGetter<TValue>(_currentCursor.Schema[col]); 360getSrc[_currentSourceIndex] = rowCursor.GetGetter<TValue>(rowCursor.Schema[col]);
DataView\BatchDataViewMapperBase.cs (1)
117return _input.GetGetter<TValue>(_input.Schema[col]);
DataView\CacheDataView.cs (10)
134var type = schema[c].Type; 151schema[c].Name, type); 1221return Utils.MarshalInvoke(_createGetterDelegateMethodInfo, this, Schema[col].Type.RawType, col); 1228Ch.Assert(Schema[col].Type.RawType == typeof(TValue)); 1285host.Assert(input.IsColumnActive(input.Schema[srcCol])); 1287var type = input.Schema[srcCol].Type; 1350var type = input.Schema[srcCol].Type; 1355_getter = input.GetGetter<VBuffer<T>>(input.Schema[srcCol]); 1433_getter = input.GetGetter<T>(input.Schema[srcCol]); 1470Contracts.Assert(input.Schema[srcCol].Type.RawType == typeof(T));
DataView\CompositeRowToRowMapper.cs (2)
65bool isActive = input.IsColumnActive(input.Schema[c]); 69throw Contracts.ExceptParam(nameof(input), $"Mapper required column '{input.Schema[c].Name}' active but it was not.");
DataView\DataViewConstructionUtils.cs (1)
230_getters[c] = predicate(c) ? CreateGetter(schema[c].Type, schemaDef.Columns[c], peeks[c]) : null;
DataView\DataViewExtensions.cs (2)
26Contracts.Assert(dv.Schema[col.Index].Equals(col), $"The requested column named: {col.Name}, with index: {col.Index} and type: {col.Type}" + 41Contracts.Assert(dv.Schema[columnNeeded.Index].Equals(columnNeeded), $"The requested column named: {columnNeeded.Name}, with index: {columnNeeded.Index} and type: {columnNeeded.Type}" +
DataView\LambdaColumnMapper.cs (1)
49var typeOrig = input.Schema[colSrc].Type;
DataView\LambdaFilter.cs (1)
40var typeOrig = input.Schema[colSrc].Type;
DataView\RowToRowMapperTransform.cs (1)
353return Input.IsColumnActive(Schema[index]);
DataView\Transposer.cs (29)
114_nameToICol[(_cols[c] = schema[columns[c]]).Name] = c; 139var type = schema[_cols[c].Index].Type; 148ch.Assert(Enumerable.Range(0, slicerSchema.Count).All(c => saver.IsColumnSavable(slicerSchema[c].Type))); 242throw _host.ExceptParam(nameof(col), "Bad call to GetSlotCursor on untransposable column '{0}'", _tview.Schema[col].Name); 255if (_view.Schema[col].Type is VectorDataViewType) 267var transposedColumn = _view.Schema[col]; 361Ch.Assert(_view.Schema[_col].Type is PrimitiveDataViewType); 362Ch.Assert(_view.Schema[_col].Type.RawType == typeof(T)); 374var isDefault = Conversion.Conversions.DefaultInstance.GetIsDefaultPredicate<T>(_view.Schema[_col].Type); 383var currentColumn = _view.Schema[_col]; 517var type = _view.Schema[_colCurr].Type; 535var currentColumn = _view.Schema[_colCurr]; 690_slotLim = _view.Schema[_colCurr].Type.GetValueCount(); 766nameToCol[_input.Schema[toSlice[c]].Name] = outputColumnCount - 1; 924var type = view.Schema[col].Type; 986Contracts.Assert(input.IsColumnActive(input.Schema[parent.SrcCol])); 1011Contracts.Assert(_view.Schema[col].Type.RawType == typeof(T)); 1014var selectedColumn = _view.Schema[col]; 1027Contracts.Assert(row.IsColumnActive(row.Schema[SrcCol])); 1094var type = _view.Schema[SrcCol].Type as VectorDataViewType; 1109var selectedColumn = _view.Schema[col]; 1121Contracts.Assert(row.IsColumnActive(row.Schema[SrcCol])); 1143_inputGetter = input.GetGetter<VBuffer<T>>(input.Schema[Parent.SrcCol]); 1305return row != null && row.IsColumnActive(row.Schema[splitCol]); 1322return splitIndRow.GetGetter<TValue>(splitIndRow.Schema[splitCol]); 1348throw Contracts.Except("Could not get single value on column '{0}' because there are no slots", view.Schema[col].Name); 1351throw Contracts.Except("Could not get single value on column '{0}' because there is more than one slot", view.Schema[col].Name); 1437builder.AddColumn(_data.Schema[_col].Name, _type); 1443var type = _data.Schema[_col].Type;
DataView\TypedCursor.cs (9)
110var realColType = _data.Schema[colIndex].Type; 252DataViewType expectedType = data.Schema[colIndex].Type; 358var colType = input.Schema[index].Type; 426var getter = input.GetGetter<VBuffer<TSrc>>(input.Schema[col]); 448var getter = input.GetGetter<VBuffer<TDst>>(input.Schema[col]); 486var getter = input.GetGetter<TSrc>(input.Schema[col]); 502var getter = input.GetGetter<TDst>(input.Schema[col]); 515var getter = input.GetGetter<VBuffer<TDst>>(input.Schema[col]); 583public bool IsColumnActive(int col) => _row.IsColumnActive(_row.Schema[col]);
DataView\ZipDataView.cs (1)
186return rowCursor.GetGetter<TValue>(rowCursor.Schema[srcCol]);
Dirty\ChooseColumnsByIndexTransform.cs (1)
116var selectedColumn = _sourceSchema[selectedIndex];
Evaluators\AnomalyDetectionEvaluator.cs (2)
523_nameGetter = row.GetGetter<ReadOnlyMemory<char>>(row.Schema[_nameIndex]); 733var type = cursor.Schema[stratCol].Type;
Evaluators\BinaryClassifierEvaluator.cs (4)
1166probGetter = input.GetGetter<Single>(input.Schema[_probIndex]); 1171scoreGetter = input.GetGetter<Single>(input.Schema[ScoreIndex]); 1268t = schema[ScoreIndex].Type; 1275t = schema[_probIndex].Type;
Evaluators\ClusteringEvaluator.cs (3)
663var scoreGetter = input.GetGetter<VBuffer<Single>>(input.Schema[ScoreIndex]); 840var type = perInst.Schema[index].Type; 847var type = perInst.Schema[index].Type;
Evaluators\EvaluatorUtils.cs (64)
66schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp); 77schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp); 87var columnType = schema[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnKind)?.Type; 91schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp); 99var columnType = schema[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnKind)?.Type; 186var type = schema[colScore].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnSetId)?.Type; 193schema[colScore].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnSetId, ref setId); 222var type = schema[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.ScoreColumnKind)?.Type; 226schema[col].Annotations.GetValue(AnnotationUtils.Kinds.ScoreColumnKind, ref tmp); 281isWeightedGetter = cursor.GetGetter<bool>(schema[isWeightedCol]); 288var type = cursor.Schema[stratCol].Type; 301var column = schema[i]; 306var type = schema[i].Type; 343yield return new KeyValuePair<string, double>(schema[i].Name, metricVal); 352var size = schema[i].Type.GetVectorSize(); 353var slotNamesType = schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType; 355schema[i].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref names); 363var colName = schema[i].Name; 399while (inputCol < input.Schema.Count && input.Schema[inputCol].IsHidden) 441while (inputCol < input.Schema.Count && input.Schema[inputCol].IsHidden) 445var inputColName = input.Schema[inputCol].Name; 446var inputColType = input.Schema[inputCol].Type; 478var type = typeSrc[i] = idv.Schema[col].Type; 479if (!idv.Schema[col].HasSlotNames(type.GetVectorSize())) 481idv.Schema[col].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref slotNamesCur); 568var type = schema[indices[i]].Type; 569var keyValueType = schema[indices[i]].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type; 581schema[indices[i]].GetKeyValues(ref keyNamesCur); 633views[i].Schema[indices[i]].Type, keyType, mapper, keyValueGetter); 725var type = views[i].Schema[columnIndices[i]].Type; 726if (views[i].Schema[columnIndices[i]].HasSlotNames(type.GetVectorSize())) 731(ref VBuffer<ReadOnlyMemory<char>> dst) => schema[index].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref dst); 827if (dv.Schema[i].IsHidden) 833var type = dv.Schema[i].Type; 834var name = dv.Schema[i].Name; 840if (dv.Schema[i].HasKeyValues()) 843if (dv.Schema[i].HasSlotNames(vectorType.Size)) 846dv.Schema[i].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref slotNames); 867labelColKeyValuesType = dv.Schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type; 869else if (dvNumber == 0 && dv.Schema[i].HasKeyValues()) 871else if (type.GetKeyCount() > 0 && name != labelColName && !dv.Schema[i].HasKeyValues()) 930var vectorType = idv.Schema[index].Type as VectorDataViewType; 949if (schema[i].IsHidden && schema[i].Name == colName) 961if (dv.Schema[col].HasSlotNames(type.Size)) 965dv.Schema[col].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref currSlotNames); 1006if (schema[i].IsHidden || ignoreCol(i)) 1009var type = schema[i].Type; 1010var metricName = row.Schema[i].Name; 1025vBufferGetters[i] = row.GetGetter<VBuffer<double>>(schema[i]); 1027var slotNamesType = schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType; 1029schema[i].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref names); 1115var type = cursor.Schema[stratCol].Type; 1227if (schema[i].IsHidden) 1230var type = schema[i].Type; 1231var name = schema[i].Name; 1236var keyValuesType = schema[i].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type as VectorDataViewType; 1247schema[stratCol].GetKeyValues(ref dst); 1478var type = cursor.Schema[countIndex].Type as VectorDataViewType; 1480var countGetter = cursor.GetGetter<VBuffer<double>>(cursor.Schema[countIndex]); 1484var stratType = cursor.Schema[stratCol].Type; 1775var type = data.Schema[stratCol].Type; 1786data = ColumnSelectingTransformer.CreateDrop(env, data, data.Schema[stratCol].Name, data.Schema[stratVal].Name);
Evaluators\MulticlassClassificationEvaluator.cs (12)
101var mdType = schema.Schema[scoreInfo.Index].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType; 105schema.Schema[scoreInfo.Index].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref labelNames); 622if (schema[ScoreIndex].HasSlotNames(_numClasses)) 726var scoreGetter = input.GetGetter<VBuffer<float>>(input.Schema[ScoreIndex]); 860var scoreType = schema[ScoreIndex].Type as VectorDataViewType; 862throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "Vector of two or more items of type Single", schema[ScoreIndex].Type.ToString()); 863var labelType = schema[LabelIndex].Type; 985if (idv.Schema[col].IsHidden && 986idv.Schema[col].Name.Equals(MulticlassClassificationEvaluator.PerClassLogLoss)) 1059var labelCol = perInst.Schema[labelColIndex]; 1071var type = perInstSchema[sortedClassesIndex].Type; 1080var type = perInst.Schema[sortedScoresIndex].Type;
Evaluators\MultiOutputRegressionEvaluator.cs (11)
476? input.GetGetter<VBuffer<float>>(input.Schema[ScoreIndex]) 549var t = schema[LabelIndex].Type as VectorDataViewType; 551throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol, "known-size vector of Single or Double", schema[LabelIndex].Type.ToString()); 558t = schema[ScoreIndex].Type as VectorDataViewType; 560throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "known-size vector of Single", schema[ScoreIndex].Type.ToString()); 595var type = schema[column].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type; 599(ref VBuffer<ReadOnlyMemory<char>> dst) => schema[column].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref dst); 691var type = cursor.Schema[stratCol].Type; 700var currentColumn = fold.Schema[i]; 707var type = fold.Schema[i].Type as VectorDataViewType; 756sb.AppendFormat("{0}{1,12}:", isWeighted ? "Weighted " : "", fold.Schema[i].Name);
Evaluators\QuantileRegressionEvaluator.cs (8)
47var type = schema.Schema[scoreInfo.Index].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType; 50schema.Schema[scoreInfo.Index].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref quantiles); 74var slotNamesType = schema.Schema[scoreInfo.Index].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type as VectorDataViewType; 76schema.Schema[scoreInfo.Index].GetSlotNames(ref slotNames); 396scoreGetter = input.GetGetter<VBuffer<float>>(input.Schema[ScoreIndex]); 451VectorDataViewType scoreType = schema[ScoreIndex].Type as VectorDataViewType; 516var type = data.Schema[i].Type; 519var name = data.Schema[i].Name;
Evaluators\RankingEvaluator.cs (1)
799return row.GetGetter<Single>(row.Schema[_bindings.ScoreIndex]);
Evaluators\RegressionEvaluator.cs (2)
284scoreGetter = input.GetGetter<float>(input.Schema[ScoreIndex]); 332t = schema[ScoreIndex].Type;
Model\Pfa\BoundPfaContext.cs (3)
68if (schema[c].IsHidden) 70string name = schema[c].Name; 170DataViewType type = schema[col].Type;
Model\Pfa\SavePfaCommand.cs (2)
190if (end.Schema[i].IsHidden) 192var name = end.Schema[i].Name;
Prediction\Calibrator.cs (4)
668var scoreType = _predictor.OutputSchema[_scoreCol].Type; 702var type = predictorRow.Schema[column.Index].Type; 712=> input.GetGetter<T>(input.Schema[col]); 886var type = outputSchema[scoreCol].Type;
Prediction\CalibratorCatalog.cs (4)
268var scoreName = InputSchema[_scoreColIndex].Name; 283var annotation = InputSchema[_scoreColIndex].Annotations; 318Host.Assert(input.IsColumnActive(input.Schema[_scoreColIndex])); 319var getScore = input.GetGetter<float>(input.Schema[_scoreColIndex]);
Scorers\BinaryClassifierScorer.cs (4)
99if (mapper.OutputSchema[scoreIdx].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.TrainingLabelValues)?.Type != null) 199string scoreColumn = Bindings.RowMapper.OutputSchema[Bindings.ScoreColumnIndex].Name; 236Host.Assert(output.IsColumnActive(output.Schema[Bindings.ScoreColumnIndex])); 238var scoreColumn = output.Schema[Bindings.ScoreColumnIndex];
Scorers\ClusteringScorer.cs (2)
97Contracts.Assert(output.IsColumnActive(output.Schema[Bindings.ScoreColumnIndex])); 99ValueGetter<VBuffer<float>> mapperScoreGetter = output.GetGetter<VBuffer<float>>(output.Schema[Bindings.ScoreColumnIndex]);
Scorers\FeatureContributionCalculation.cs (6)
195var typeSrc = input.Schema[colSrc].Type; 207var typeSrc = input.Schema[colSrc].Type; 228var featureGetter = input.GetGetter<TSrc>(input.Schema[colSrc]); 267var featureGetter = input.GetGetter<TSrc>(input.Schema[colSrc]); 339if (InputSchema[FeatureColumn.Index].HasSlotNames(featureSize)) 381if (genericRow.IsColumnActive(genericRow.Schema[i]))
Scorers\MulticlassClassificationScorer.cs (8)
323meta.Add(partialSchema[i].Annotations, selector: s => s != labelNameKind); 329meta.Add(partialSchema[i].Annotations, selector: s => true); 333builder.AddColumn(partialSchema[i].Name, partialSchema[i].Type, meta.ToAnnotations()); 459if (outSchema[scoreIdx].Annotations.Schema.GetColumnOrNull(metaKind)?.Type != null) 461scoreType = outSchema[scoreIdx].Type; 566Host.Assert(output.IsColumnActive(output.Schema[Bindings.ScoreColumnIndex])); 568ValueGetter<VBuffer<float>> mapperScoreGetter = output.GetGetter<VBuffer<float>>(Bindings.RowMapper.OutputSchema[Bindings.ScoreColumnIndex]);
Scorers\PredictedLabelScorerBase.cs (9)
66var scoreColMetadata = mapper.OutputSchema[scoreColIndex].Annotations; 105string scoreCol = RowMapper.OutputSchema[ScoreColumnIndex].Name; 145var scoreType = mapper.OutputSchema[scoreColIndex].Type; 162ctx.SaveNonEmptyString(RowMapper.OutputSchema[ScoreColumnIndex].Name); 186yield return new KeyValuePair<string, DataViewType>(sch[i].Name, sch[i].Type); 208return _predColMetadata.Schema[mcol].Type; 294var scoreType = mapper.OutputSchema[scoreColIndex].Type; 413Host.Assert(output.IsColumnActive(output.Schema[Bindings.ScoreColumnIndex]));
Scorers\PredictionTransformer.cs (5)
236FeatureColumnType = trainSchema[col].Type; 251FeatureColumnType = TrainSchema[col].Type; 266FeatureColumnType = TrainSchema[col].Type; 284if (!inputSchema[col].Type.Equals(FeatureColumnType)) 285throw Host.ExceptSchemaMismatch(nameof(inputSchema), "feature", FeatureColumnName, FeatureColumnType.ToString(), inputSchema[col].Type.ToString());
Scorers\RowToRowScorerBase.cs (9)
208Contracts.Assert(row.IsColumnActive(row.Schema[col])); 210var type = row.Schema[col].Type; 218Contracts.Assert(output.IsColumnActive(output.Schema[col])); 219return output.GetGetter<T>(output.Schema[col]); 375res[dst++] = schema[i].Name + suffix; 431return Mapper.OutputSchema[iinfo - DerivedColumnCount].Type; 441foreach (var pair in Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type))) 452return Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.Schema.GetColumnOrNull(kind)?.Type; 466Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.GetValue(kind, ref value);
Scorers\SchemaBindablePredictorWrapper.cs (3)
162var typeSrc = input.Schema[colSrc].Type; 171var featureGetter = input.GetGetter<TSrc>(input.Schema[colSrc]); 703var column = input.Schema[colSrc];
Transforms\BindingsWrappedRowCursor.cs (1)
45return isSrc && Input.IsColumnActive(Schema[srcColumnIndex]);
Transforms\ColumnBindingsBase.cs (9)
361var str = input[colHidden].Name; 494return Input[index].Name; 505return Input[index].Type; 516return Input[index].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)); 529return Input[index].Annotations.Schema.GetColumnOrNull(kind)?.Type; 542Input[index].Annotations.GetValue(kind, ref value); 691namesUsed.Add(input[i].Name); 708var colName = indices[j] >= 0 ? input[indices[j]].Name : addedColumns[~indices[j]].Name; 720var schemaColumns = indices.Select(idx => idx >= 0 ? new DataViewSchema.DetachedColumn(input[idx]) : addedColumns[~idx]);
Transforms\ColumnConcatenatingTransformer.cs (13)
470var curType = inputSchema[srcCol].Type; 492if (isNormalized && !inputSchema[srcCol].IsNormalized()) 503|| (curVectorType != null && inputSchema[srcCol].HasSlotNames(curVectorType.Size))) 553_srcTypes = sources.Select(c => inputSchema[c].Type).ToArray(); 559_isIdentity = SrcIndices.Length == 1 && _inputSchema[SrcIndices[0]].Type is VectorDataViewType; 575var inputCol = _inputSchema[SrcIndices[0]]; 637var colName = _inputSchema[colSrc].Name; 648var inputMetadata = _inputSchema[colSrc].Annotations; 650typeNames = inputMetadata.Schema[idx].Type as VectorDataViewType; 686return input.GetGetter<T>(input.Schema[SrcIndices[0]]); 696var column = input.Schema[SrcIndices[j]]; 719input.Schema[SrcIndices[i]].Name, vectorType.Size, tmpBufs[i].Length) 933InputSchema[srcIndex].Type.GetValueCount()));
Transforms\ColumnCopying.cs (3)
220var type = input.Schema[colIndex].Type; 225=> row.GetGetter<T>(row.Schema[index]); 252var dstVariableName = ctx.AddIntermediateVariable(_schema[colIndex].Type, column.outputColumnName);
Transforms\ColumnSelecting.cs (7)
569if (!keepHidden && inputSchema[colIdx].IsHidden) 572var columnName = inputSchema[colIdx].Name; 605if (selectedColumns.Contains(inputSchema[colIdx].Name)) 618var outputColumns = map.Select(x => new DataViewSchema.DetachedColumn(inputSchema[x])); 741var srcCol = InputSchema[outputToInputMap[i]]; 742var dstCol = OutputSchema[i]; 779return _inputCursor.GetGetter<TValue>(_inputCursor.Schema[index]);
Transforms\FeatureContributionCalculationTransformer.cs (6)
183_featureColumnType = schema[_featureColumnIndex].Type as VectorDataViewType; 185throw Host.ExceptSchemaMismatch(nameof(schema), "feature", _parent.ColumnPairs[0].inputColumnName, "vector of Single", schema[_featureColumnIndex].Type.ToString()); 187if (InputSchema[_featureColumnIndex].HasSlotNames(_featureColumnType.Size)) 188InputSchema[_featureColumnIndex].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref _slotNames); 199builder.Add(InputSchema[_featureColumnIndex].Annotations, x => x == AnnotationUtils.Kinds.SlotNames); 218var featureGetter = input.GetGetter<TSrc>(input.Schema[colSrc]);
Transforms\GenerateNumberTransform.cs (1)
407if (!_bindings.UseCounter[iinfo] && IsColumnActive(Schema[_bindings.MapIinfoToCol(iinfo)]))
Transforms\Hashing.cs (13)
150var type = inputSchema[srcCol].Type; 166var srcType = inputSchema[srcCol].Type; 267var srcType = input.Schema[srcCol].Type; 454var getSrc = input.GetGetter<VBuffer<T>>(input.Schema[srcCol]); 1003Contracts.Assert(input.Schema[srcCol].Type.RawType == typeof(T)); 1005var srcGetter = input.GetGetter<T>(input.Schema[srcCol]); 1285var getSrc = input.GetGetter<VBuffer<T>>(input.Schema[srcCol]); 1337meta.Add(InputSchema[colIndex].Annotations, name => name == AnnotationUtils.Kinds.SlotNames); 1493_srcType = row.Schema[srcCol].Type; 1511DataViewType typeSrc = row.Schema[srcCol].Type; 1632_srcGetter = Row.GetGetter<T>(Row.Schema[_srcCol]); 1666_srcGetter = Row.GetGetter<VBuffer<T>>(Row.Schema[_srcCol]); 1700_srcGetter = Row.GetGetter<VBuffer<T>>(Row.Schema[_srcCol]);
Transforms\InvertHashUtils.cs (3)
39var type = schema[col].Type.GetItemType(); 49if (schema[col].HasKeyValues()) 54schema[col].GetKeyValues(ref keyValues);
Transforms\KeyToValue.cs (6)
177meta.Add(InputSchema[ColMapNewToOld[i]].Annotations, name => name == AnnotationUtils.Kinds.SlotNames); 229var typeSrc = schema[ColMapNewToOld[iinfo]].Type; 230var typeVals = schema[ColMapNewToOld[iinfo]].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type; 259InputSchema[ColMapNewToOld[iinfo]].GetKeyValues(ref keyMetadata); 366var column = input.Schema[Parent.ColMapNewToOld[InfoIndex]]; 488var srcType = Parent.InputSchema[Parent.ColMapNewToOld[InfoIndex]].Type;
Transforms\KeyToVector.cs (3)
116var type = inputSchema[srcCol].Type; 282var type = inputSchema[colSrc].Type; 306var inputMetadata = InputSchema[srcCol].Annotations;
Transforms\LabelConvertTransform.cs (1)
178var typeSrc = input.Schema[col].Type;
Transforms\LabelIndicatorTransform.cs (1)
186var column = input.Schema[info.Source];
Transforms\MetadataDispatcher.cs (3)
236foreach (var kvp in info.SchemaSrc[info.IndexSrc].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type))) 268return info.SchemaSrc[info.IndexSrc].Annotations.Schema.GetColumnOrNull(kind)?.Type; 298info.SchemaSrc[info.IndexSrc].Annotations.GetValue(kind, ref value);
Transforms\NAFilter.cs (3)
114var type = schema[index].Type; 150var type = schema[index].Type; 183ctx.SaveNonEmptyString(Source.Schema[info.Index].Name);
Transforms\NormalizeColumn.cs (9)
812var type = row.Schema[col].Type; 886_colGetterSrc = dataRow.GetGetter<TFloat>(dataRow.Schema[valueColId]); 914var valueCol = dataRow.Schema[valueColId]; 982var srcColumn = cursor.Schema[srcIndex]; 1021var srcColumn = cursor.Schema[srcIndex]; 1062var srcColumn = cursor.Schema[srcIndex]; 1102var srcColumn = cursor.Schema[srcIndex]; 1132var labelColumnType = cursor.Schema[labelColumnId].Type; 1213var srcColumn = cursor.Schema[srcIndex];
Transforms\NormalizeColumnDbl.cs (6)
709var getSrc = input.GetGetter<TFloat>(input.Schema[icol]); 785var getSrc = input.GetGetter<VBuffer<TFloat>>(input.Schema[icol]); 1037var getSrc = input.GetGetter<TFloat>(input.Schema[icol]); 1082var getSrc = input.GetGetter<VBuffer<TFloat>>(input.Schema[icol]); 1211var getSrc = input.GetGetter<TFloat>(input.Schema[icol]); 1296var getSrc = input.GetGetter<VBuffer<TFloat>>(input.Schema[icol]);
Transforms\NormalizeColumnSng.cs (6)
867var getSrc = input.GetGetter<TFloat>(input.Schema[icol]); 942var getSrc = input.GetGetter<VBuffer<TFloat>>(input.Schema[icol]); 1197var getSrc = input.GetGetter<TFloat>(input.Schema[icol]); 1242var getSrc = input.GetGetter<VBuffer<TFloat>>(input.Schema[icol]); 1372var getSrc = input.GetGetter<TFloat>(input.Schema[icol]); 1457var getSrc = input.GetGetter<VBuffer<TFloat>>(input.Schema[icol]);
Transforms\Normalizer.cs (4)
547srcTypes[i] = data.Schema[srcCols[i]].Type; 548activeCols.Add(data.Schema[srcCols[i]]); 705var colType = inputSchema[srcCol].Type; 747builder.Add(InputSchema[ColMapNewToOld[iinfo]].Annotations, name => name == AnnotationUtils.Kinds.SlotNames);
Transforms\NormalizeUtils.cs (1)
151if (!schema[col].IsNormalized())
Transforms\PerGroupTransformBase.cs (1)
300return _input.GetGetter<TValue>(_input.Schema[index]);
Transforms\RangeFilter.cs (3)
106_type = schema[_index].Type; 154_type = schema[_index].Type; 192ctx.SaveNonEmptyString(Source.Schema[_index].Name);
Transforms\RowShufflingTransformer.cs (6)
195var type = schema[c].Type; 215var type = schema[c].Type; 522_colToActivesIndex[c] = _input.IsColumnActive(Schema[c]) ? numActive++ : -1; 531input.Schema[c].Type, RowCursorUtils.GetGetterAsDelegate(input, c)); 680return Utils.MarshalInvoke(_createGetterDelegateMethodInfo, this, Schema[col].Type.RawType, col); 687Ch.Assert(Schema[col].Type.RawType == typeof(TValue));
Transforms\SlotsDroppingTransformer.cs (6)
484_srcTypes[i] = inputSchema[_cols[i]].Type; 544var hasSlotNames = input[_cols[iinfo]].HasSlotNames(vectorType.Size); 555InputSchema[_cols[iinfo]].GetSlotNames(ref names); 811var src = input.Schema[_cols[iinfo]]; 840var hasSlotNames = InputSchema[_cols[iinfo]].HasSlotNames(vectorType.Size); 870builder.Add(InputSchema[_cols[iinfo]].Annotations, x => x == AnnotationUtils.Kinds.KeyValues || x == AnnotationUtils.Kinds.IsNormalized);
Transforms\TransformBase.cs (11)
349var type = inputSchema[colSrc].Type; 398var type = inputSchema[colSrc].Type; 425ctx.SaveNonEmptyString(Input[info.Source].Name); 554Source = transform.Source.Schema[x.Source].Name, 584var srcName = Source.Schema[info.Source].Name; 611string inputColumnName = Source.Schema[info.Source].Name; 619ctx.AddIntermediateVariable(OutputSchema[_bindings.MapIinfoToCol(iinfo)].Type, info.Name))) 699Host.Assert(input.IsColumnActive(input.Schema[src])); 700return input.GetGetter<T>(input.Schema[src]); 775OutputSchema[col].Name); 867if (!IsColumnActive(Schema[parent._bindings.MapIinfoToCol(iinfo)]))
Transforms\TypeConverting.cs (5)
401var srcCol = inputSchema[_srcCols[i]]; 440var srcType = InputSchema[_srcCols[i]].Type; 442builder.Add(InputSchema[ColMapNewToOld[i]].Annotations, name => name == AnnotationUtils.Kinds.SlotNames); 452builder.Add(InputSchema[ColMapNewToOld[i]].Annotations, name => name == AnnotationUtils.Kinds.KeyValues); 456builder.Add(InputSchema[ColMapNewToOld[i]].Annotations, name => name == AnnotationUtils.Kinds.IsNormalized);
Transforms\ValueMapping.cs (6)
463using (var cursor = dataView.GetRowCursor(dataView.Schema[keyColumn.Index], dataView.Schema[valueColumn.Index])) 484var getKey = cursor.GetGetter<ReadOnlyMemory<char>>(cursor.Schema[keyIdx]); 485var getValue = cursor.GetGetter<ReadOnlyMemory<char>>(cursor.Schema[valueIdx]); 911var column = input.Schema[index]; 1070var type = _inputSchema[colSrc].Type;
Transforms\ValueToKeyMappingTransformer.cs (2)
236var type = inputSchema[colSrc].Type; 750builder.Add(InputSchema[colIndex].Annotations, name => name == AnnotationUtils.Kinds.SlotNames);
Transforms\ValueToKeyMappingTransformerImpl.cs (7)
292var type = schema[col].Type; 312inputGetter = row.GetGetter<T>(row.Schema[col]); 324var inputGetter = row.GetGetter<VBuffer<T>>(row.Schema[col]); 1098VectorDataViewType srcMetaType = _schema[srcCol].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type as VectorDataViewType; 1127_schema[srcCol].GetKeyValues(ref srcMeta); 1179VectorDataViewType srcMetaType = _schema[srcCol].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type as VectorDataViewType; 1204_schema[srcCol].GetKeyValues(ref srcMeta);
Utilities\ColumnCursor.cs (6)
45if (data.Schema[colIndex].Name != colName || data.Schema[colIndex].Type != colType) 103var column = data.Schema[col]; 121var column = data.Schema[col]; 139var column = data.Schema[col]; 161var column = data.Schema[col];
Microsoft.ML.DataView (2)
DataViewSchema.cs (1)
205Utils.MarshalActionInvoke(CheckGetter<int>, schema[i].Type.RawType, getter);
SchemaDebuggerProxy.cs (1)
22Columns = Enumerable.Range(0, schema.Count).Select(x => schema[x]).ToArray();
Microsoft.ML.Ensemble (3)
PipelineEnsemble.cs (3)
145var predictorRow = Mappers[i].GetRow(pipelineRow, Enumerable.Repeat(Mappers[i].InputSchema[ScoreCols[i]], 1)); 146getters[i] = predictorRow.GetGetter<T>(predictorRow.Schema[ScoreCols[i]]); 651schema[labelIndex].GetKeyValues(ref labelNames);
Microsoft.ML.EntryPoints (4)
CrossValidationMacro.cs (2)
398if (idv.Schema[col].IsHidden && 399idv.Schema[col].Name.Equals(MetricKinds.ColumnNames.Count))
ScoreColumnSelector.cs (2)
34if (view.Schema[i].IsHidden) 52var columnName = schema[i].Name;
Microsoft.ML.FastTree (2)
TreeEnsembleFeaturizationTransformer.cs (1)
80CheckFeatureColumnCompatibility(inputSchema[featureColumn.Index]);
TreeEnsembleFeaturizer.cs (1)
256_featureGetter = input.GetGetter<VBuffer<float>>(input.Schema[featureIndex]);
Microsoft.ML.ImageAnalytics (10)
ImageGrayscale.cs (2)
145if (!(inputSchema[srcCol].Type is ImageDataViewType)) 146throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName, "image", inputSchema[srcCol].Type.ToString());
ImageLoader.cs (2)
160if (!(inputSchema[srcCol].Type is TextDataViewType)) 161throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName, TextDataViewType.Instance.ToString(), inputSchema[srcCol].Type.ToString());
ImagePixelExtractor.cs (2)
270var imageType = inputSchema[srcCol].Type as ImageDataViewType; 272throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputColName, "image", inputSchema[srcCol].Type.ToString());
ImageResizer.cs (2)
255if (!(inputSchema[srcCol].Type is ImageDataViewType)) 256throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _columns[col].InputColumnName, "image", inputSchema[srcCol].Type.ToString());
VectorToImageTransform.cs (2)
302var vectorType = inputSchema[srcCol].Type as VectorDataViewType; 304throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputColName, "image", inputSchema[srcCol].Type.ToString());
Microsoft.ML.Mkl.Components (4)
VectorWhitening.cs (4)
213var inType = inputSchema[srcCol].Type; 339getters[i] = cursor.GetGetter<VBuffer<float>>(cursor.Schema[cols[i]]); 567_srcTypes[i] = inputSchema[_cols[i]].Type; 675var srcCol = input.Schema[_cols[iinfo]];
Microsoft.ML.OnnxConverter (8)
OnnxExportExtensions.cs (2)
31if (!outputColumnNamesToKeep.Contains(sink.Schema[i].Name)) 33outputColumnNamesToDrop.Add(sink.Schema[i].Name);
SaveOnnxCommand.cs (6)
173string colName = inputData.Schema[i].Name; 177ctx.AddInputVariable(inputData.Schema[i].Type, colName); 191if (outputData.Schema[i].IsHidden) 194var column = outputData.Schema[i]; 209var trueVariableName = ctx.AddIntermediateVariable(outputData.Schema[i].Type, idataviewColumnName + ".output"); 211ctx.AddOutputVariable(outputData.Schema[i].Type, trueVariableName);
Microsoft.ML.OnnxTransformer (9)
OnnxTransform.cs (9)
537var type = inputSchema[_inputColIndices[i]].Type; 782var isVector = input.Schema[colIndex].Type is VectorDataViewType; 801var type = input.Schema[colIndex].Type.RawType; 824var type = input.Schema[colIndex].Type.GetItemType().RawType; 852_colName = input.Schema[colIndex].Name; 853_srcGetter = input.GetGetter<T>(input.Schema[colIndex]); 878_srcGetter = input.GetGetter<VBuffer<T>>(input.Schema[colIndex]); 880_colName = input.Schema[colIndex].Name; 886var isKnownSize = (input.Schema[colIndex].Type as VectorDataViewType).IsKnownSize;
Microsoft.ML.Parquet (7)
ParquetLoader.cs (2)
491Ch.CheckParam(IsColumnActive(Schema[col]), nameof(col)); 539Ch.CheckParam(IsColumnActive(Schema[col]), nameof(col));
PartitionedFileLoader.cs (5)
550var type = _subCursor.Schema[i].Type; 551_subGetters[i] = MarshalGetter(_subCursor.GetGetter<DataViewSchema.Column>, type.RawType, _subCursor.Schema[i]); 585var type = Schema[i].Type; 670var type1 = schema1[col].Type; 671var type2 = schema2[col].Type;
Microsoft.ML.PCA (5)
PcaTransformer.cs (5)
425weightGetters[iinfo] = cursor.GetGetter<float>(cursor.Schema[sInfo.WeightColumnIndex]); 426columnGetters[iinfo] = cursor.GetGetter<VBuffer<float>>(cursor.Schema[sInfo.InputIndex]); 504ValidatePcaInput(Host, inputSchema[srcCol].Name, inputSchema[srcCol].Type); 534Contracts.CheckParam(schema[weightIndex].Type == NumberDataViewType.Single, nameof(weightColumn));
Microsoft.ML.PerformanceTests (1)
TextLoaderBench.cs (1)
63getters.Add(rowCursor.GetGetter<ReadOnlyMemory<char>>(_dataView.Schema[i]));
Microsoft.ML.Predictor.Tests (9)
TestTransposer.cs (9)
26var type = view.Schema[col].Type; 34using (var cursor = view.GetRowCursor(view.Schema[col])) 38var getter = cursor.GetGetter<VBuffer<T>>(cursor.Schema[col]); 54var getter = cursor.GetGetter<T>(cursor.Schema[col]); 72DataViewType colType = trans.Schema[col].Type; 73Assert.Equal(view.Schema[viewCol].Name, trans.Schema[col].Name); 74DataViewType expectedType = view.Schema[viewCol].Type; 76string desc = string.Format("Column {0} named '{1}'", col, trans.Schema[col].Name);
Microsoft.ML.Recommender (6)
MatrixFactorizationPredictor.cs (6)
382var type = schema[matrixColumnIndexCol].Type; 387type = schema[matrixRowIndexCol].Type; 457MatrixColumnIndexColumnType = trainSchema[xCol].Type; 460MatrixRowIndexColumnType = trainSchema[yCol].Type; 495MatrixColumnIndexColumnType = TrainSchema[xCol].Type; 499MatrixRowIndexColumnType = TrainSchema[yCol].Type;
Microsoft.ML.StandardTrainers (5)
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (4)
321featureColumnTypes[i++] = trainSchema[col].Type; 352featureColumnTypes[i] = TrainSchema[col].Type; 380if (!inputSchema[col].Type.Equals(FeatureColumnTypes[i])) 381throw Host.ExceptSchemaMismatch(nameof(inputSchema), "feature", feat, FeatureColumnTypes[i].ToString(), inputSchema[col].Type.ToString());
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (1)
115inputGetters[f] = input.GetGetter<VBuffer<float>>(input.Schema[_inputColumnIndexes[f]]);
Microsoft.ML.TensorFlow (3)
TensorflowTransform.cs (3)
555var type = inputSchema[_inputColIndices[i]].Type; 829_srcgetter = input.GetGetter<T>(input.Schema[colIndex]); 877_srcgetter = input.GetGetter<VBuffer<T>>(input.Schema[colIndex]);
Microsoft.ML.TensorFlow.Tests (25)
TensorFlowEstimatorTests.cs (1)
242var type = (VectorDataViewType)schema[column].Type;
TensorflowTests.cs (24)
582var type = (VectorDataViewType)schema[col].Type; 586var metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowOperatorTypeKind].Type; 590schema[col].Annotations.GetValue(TensorFlowUtils.TensorflowOperatorTypeKind, ref opType); 592metadataType = schema[col].Annotations.Schema.GetColumnOrNull(TensorFlowUtils.TensorflowUpstreamOperatorsKind)?.Type; 596type = (VectorDataViewType)schema[col].Type; 598metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowOperatorTypeKind].Type; 601schema[col].Annotations.GetValue(TensorFlowUtils.TensorflowOperatorTypeKind, ref opType); 603metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowUpstreamOperatorsKind].Type; 606schema[col].Annotations.GetValue(TensorFlowUtils.TensorflowUpstreamOperatorsKind, ref inputOps); 611type = (VectorDataViewType)schema[col].Type; 613metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowOperatorTypeKind].Type; 616schema[col].Annotations.GetValue(TensorFlowUtils.TensorflowOperatorTypeKind, ref opType); 618metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowUpstreamOperatorsKind].Type; 620schema[col].Annotations.GetValue(TensorFlowUtils.TensorflowUpstreamOperatorsKind, ref inputOps); 626type = (VectorDataViewType)schema[col].Type; 628metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowOperatorTypeKind].Type; 631schema[col].Annotations.GetValue(TensorFlowUtils.TensorflowOperatorTypeKind, ref opType); 633metadataType = schema[col].Annotations.Schema[TensorFlowUtils.TensorflowUpstreamOperatorsKind].Type; 635schema[col].Annotations.GetValue(TensorFlowUtils.TensorflowUpstreamOperatorsKind, ref inputOps); 644Assert.Equal(name.ToString(), schema[i].Name); 645type = (VectorDataViewType)schema[i].Type; 1005var type = (VectorDataViewType)schema[column].Type; 1064var type = (VectorDataViewType)schema[column].Type; 1108var type = (VectorDataViewType)schema[column].Type;
Microsoft.ML.TestFramework (18)
DataPipe\TestDataPipeBase.cs (18)
386DataViewType type = schema[c].Type; 387if (saver.IsColumnSavable(type) && (hidden || !schema[c].IsHidden)) 476var typeSlot = sch[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.SlotNames)?.Type; 477var typeKeys = sch[col].Annotations.Schema.GetColumnOrNull(AnnotationUtils.Kinds.KeyValues)?.Type; 480foreach (var metaColumn in sch[col].Annotations.Schema) 533DataViewType type = schema[c].Type; 579DataViewType type = schema[c].Type; 710var f1 = curs1.IsColumnActive(curs1.Schema[col]); 711var f2 = curs2.IsColumnActive(curs2.Schema[col]); 715var type1 = curs1.Schema[col].Type; 716var type2 = curs2.Schema[col].Type; 794Contracts.Assert(curs1.IsColumnActive(curs1.Schema[col])); 805var type1 = curs1.Schema[col].Type; 806var type2 = cursors[col].Schema[col].Type; 1002var g1 = r1.GetGetter<T>(r1.Schema[col]); 1003var g2 = r2.GetGetter<T>(r2.Schema[col]); 1019var g1 = r1.GetGetter<VBuffer<T>>(r1.Schema[col]); 1020var g2 = r2.GetGetter<VBuffer<T>>(r2.Schema[col]);
Microsoft.ML.TestFrameworkCommon (9)
TestCommon.cs (9)
94string name1 = sch1[col].Name; 95string name2 = sch2[col].Name; 98var type1 = sch1[col].Type; 99var type2 = sch2[col].Type; 237var t1 = sch1[col].Annotations.Schema.GetColumnOrNull(kind)?.Type; 238var t2 = sch2[col].Annotations.Schema.GetColumnOrNull(kind)?.Type; 262sch1[col].Annotations.GetValue(kind, ref names1); 263sch2[col].Annotations.GetValue(kind, ref names2); 273sch[col].Annotations.GetValue(kind, ref names);
Microsoft.ML.Tests (14)
Scenarios\Api\TestApi.cs (1)
338Assert.Equal(col.Name, split.Schema[col.Index].Name);
TermEstimatorTests.cs (2)
146var type1 = result.Schema[termIndex].Type; 148result.Schema[termIndex].GetKeyValues(ref names1);
TextLoaderTests.cs (1)
822Assert.True(result.Schema[featureIdx].Type is KeyDataViewType keyType && keyType.Count == typeof(uint).ToMaxInt());
Transformers\ConcatTests.cs (2)
62return schema[cIdx].Type; 119return schema[cIdx].Type;
Transformers\CopyColumnEstimatorTests.cs (4)
147var type1 = result.Schema[termIndex].Type; 153var type2 = result.Schema[copyIndex].Type; 154result.Schema[termIndex].GetKeyValues(ref names1); 155result.Schema[copyIndex].GetKeyValues(ref names2);
Transformers\CountTargetEncodingTests.cs (2)
136getters[i] = curs.GetGetter<VBuffer<float>>(transformedData.Schema[countCols[i]]); 137getters1[i] = curs1.GetGetter<VBuffer<float>>(transformedData1.Schema[countCols[i]]);
Transformers\ValueMappingTests.cs (2)
741Assert.True(result.Schema[labelIdx].Type is KeyDataViewType); 742Assert.Equal((ulong)5, result.Schema[labelIdx].Type.GetItemType().GetKeyCount());
Microsoft.ML.TimeSeries (15)
PredictionEngine.cs (2)
176bool isActive = input.IsColumnActive(input.Schema[c]); 180throw Contracts.ExceptParam(nameof(input), $"Mapper required column '{input.Schema[c].Name}' active but it was not.");
SequentialAnomalyDetectionTransformBase.cs (3)
319var colType = inputSchema[_inputColumnIndex].Type; 367var srcGetter = input.GetGetter<TInput>(input.Schema[_inputColumnIndex]); 393var srcGetter = input.GetGetter<TInput>(input.Schema[_inputColumnIndex]);
SequentialForecastingTransformBase.cs (3)
116var colType = inputSchema[_inputColumnIndex].Type; 201var srcGetter = input.GetGetter<TInput>(input.Schema[_inputColumnIndex]); 234var srcGetter = input.GetGetter<TInput>(input.Schema[_inputColumnIndex]);
SequentialTransformBase.cs (1)
351bs.TryWriteTypeDescription(ctx.Writer.BaseStream, _transform.Schema[colIndex].Type, out byteWritten);
SequentialTransformerBase.cs (2)
665return _input.GetGetter<T>(_input.Schema[index]); 1012return _input.IsColumnActive(_input.Schema[index]);
SlidingWindowTransformBase.cs (1)
102DataViewType col = sch[index].Type;
SrCnnTransformBase.cs (3)
162var colType = inputSchema[_inputColumnIndex].Type; 210var srcGetter = input.GetGetter<TInput>(input.Schema[_inputColumnIndex]); 236var srcGetter = input.GetGetter<TInput>(input.Schema[_inputColumnIndex]);
Microsoft.ML.Transforms (93)
CountFeatureSelection.cs (4)
312var colType = schema[colSrc].Type; 316activeCols.Add(schema[colSrc]); 361return new CountAggregator<T>(colType, row.GetGetter<T>(row.Schema[colSrc])); 373return new CountAggregator<T>(colType, row.GetGetter<VBuffer<T>>(row.Schema[colSrc]));
CustomMappingTransformer.cs (3)
161result[i] = Utils.MarshalInvoke(GetDstGetter<int>, dstRow.Schema[i].Type.RawType, dstRow, i, refresh); 168var getter = input.GetGetter<T>(input.Schema[colIndex]); 192return Enumerable.Range(0, dstRow.Schema.Count).Select(x => new DataViewSchema.DetachedColumn(dstRow.Schema[x])).ToArray();
GcnTransform.cs (4)
197var inType = inputSchema[srcCol].Type; 199throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema[srcCol].Name, LpNormNormalizingEstimatorBase.ExpectedColumnType, inType.ToString()); 338var srcCol = inputSchema[_srcCols[i]]; 370var getSrc = input.GetGetter<VBuffer<float>>(input.Schema[_srcCols[iinfo]]);
GroupTransform.cs (5)
405ValueGetter<T> getter = row.GetGetter<T>(row.Schema[col]); 429var type = row.Schema[col].Type; 451var colType = row.Schema[col].Type; 470_srcGetter = row.GetGetter<TValue>(row.Schema[col]); 657return _trailingCursor.GetGetter<TValue>(_parent._groupBinding.OutputSchema[groupIndex]);
KeyToVectorMapping.cs (2)
73var type = inputSchema[srcCol].Type; 196var type = inputSchema[colSrc].Type;
MissingValueDroppingTransformer.cs (4)
133var inType = inputSchema[srcCol].Type; 135throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema[srcCol].Name, "vector", inType.ToString()); 195var srcCol = inputSchema[_srcCols[i]]; 228var srcGetter = input.GetGetter<VBuffer<TDst>>(input.Schema[_srcCols[iinfo]]);
MissingValueHandlingTransformer.cs (1)
164var replaceType = input.Schema[inputCol].Type;
MissingValueIndicatorTransformer.cs (1)
192var inType = inputSchema[colSrc].Type;
MissingValueReplacing.cs (4)
204var type = inputSchema[srcCol].Type; 293var type = input.Schema[colSrc].Type; 315sourceColumns.Add(input.Schema[colSrc]); 602var type = inputSchema[colSrc].Type;
MissingValueReplacingUtils.cs (1)
190_getter = cursor.GetGetter<TValue>(cursor.Schema[col]);
MutualInformationFeatureSelection.cs (4)
448var labelType = schema[labelCol].Type; 466var colType = schema[colSrc].Type; 595var type = trans.Schema[col].Type; 662var slotCount = trans.Schema[col].Type.GetValueCount();
OptionalColumnTransform.cs (2)
82columnTypes[i] = input[col].Type; 406return input.GetGetter<T>(input.Schema[_bindings.SrcCols[iinfo]]);
PermutationFeatureImportance.cs (2)
56if (data.Schema[featuresColumnIndex].HasSlotNames(numSlots)) 57data.Schema[featuresColumnIndex].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref slotNames);
RandomFourierFeaturizing.cs (10)
244var type = inputSchema[srcCol].Type; 261var typeSrc = input.Schema[srcCol].Type; 289var type = input.Schema[srcCol].Type; 294activeColumns.Add(input.Schema[srcCol]); 302var srcType = input.Schema[srcCols[i]].Type; 305var get = cursor.GetGetter<VBuffer<float>>(cursor.Schema[srcCols[i]]); 310var getOne = cursor.GetGetter<float>(cursor.Schema[srcCols[i]]); 486var srcCol = inputSchema[_srcCols[i]]; 514var getSrc = input.GetGetter<VBuffer<float>>(input.Schema[_srcCols[iinfo]]); 531var getSrc = input.GetGetter<float>(input.Schema[_srcCols[iinfo]]);
StatefulCustomMappingTransformer.cs (3)
122var cols = Enumerable.Range(0, dstRow.Schema.Count).Select(x => new DataViewSchema.DetachedColumn(dstRow.Schema[x])).ToArray(); 308_getters[iinfo] = Utils.MarshalInvoke(_parent.GetDstGetter<int>, _parent._bindings.Schema[i].Type.RawType, dstRow, _parent._bindings.Schema[i].Name, refresh);
StatefulFilterTransform.cs (4)
222return _input.IsColumnActive(_input.Schema[iCol]); 223return _appendedRow.IsColumnActive(_appendedRow.Schema[iCol]); 239_input.GetGetter<TValue>(_input.Schema[iCol]) 240: _appendedRow.GetGetter<TValue>(_appendedRow.Schema[iCol]);
SvmLight\SvmLightSaver.cs (1)
117var column = data.Schema[col];
Text\LdaTransform.cs (5)
578var srcCol = inputSchema[_srcCols[i]]; 841var srcColType = inputSchema[srcCol].Type as VectorDataViewType; 846activeColumns.Add(inputData.Schema[srcCol]); 850if (inputSchema[srcCol].HasSlotNames(srcColType.Size)) 851inputSchema[srcCol].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref dst);
Text\NgramHashingTransformer.cs (5)
216var columnType = input.Schema[srcCol].Type; 217if (!NgramHashingEstimator.IsColumnTypeValid(input.Schema[srcCol].Type)) 219sourceColumnsForInvertHash.Add(input.Schema[srcCol]); 399var columnType = inputSchema[srcCol].Type; 402var srcType = inputSchema[srcCol].Type;
Text\NgramTransform.cs (5)
202var type = inputSchema[srcCol].Type; 214var typeSrc = input.Schema[srcCol].Type; 237srcTypes[iinfo] = trainingData.Schema[srcCols[iinfo]].Type; 238activeCols.Add(trainingData.Schema[srcCols[iinfo]]); 493_srcTypes[i] = inputSchema[_srcCols[i]].Type;
Text\StopWordsRemovingTransformer.cs (6)
189var type = inputSchema[srcCol].Type; 410var getLang = _languageColumns[iinfo] >= 0 ? input.GetGetter<ReadOnlyMemory<char>>(input.Schema[_languageColumns[iinfo]]) : null; 411var getSrc = input.GetGetter<VBuffer<ReadOnlyMemory<char>>>(input.Schema[_colMapNewToOld[iinfo]]); 870var typeSrc = loader.Schema[colSrcIndex].Type; 877var getter = cursor.GetGetter<ReadOnlyMemory<char>>(cursor.Schema[colSrcIndex]); 1076var srcType = inputSchema[srcCol].Type;
Text\TextNormalizing.cs (2)
118var type = inputSchema[srcCol].Type; 211var srcType = inputSchema[srcCol].Type;
Text\TokenizingByCharacters.cs (1)
122var type = inputSchema[srcCol].Type;
Text\WordEmbeddingsExtractor.cs (2)
303var colType = inputSchema[srcCol].Type; 305throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName, "String", inputSchema[srcCol].Type.ToString());
Text\WordTokenizing.cs (3)
124var type = inputSchema[srcCol].Type; 217var srcType = inputSchema[srcCol].Type; 241var srcType = input.Schema[srcCol].Type;
UngroupTransform.cs (9)
298schemaBuilder.AddColumn(inputSchema[i].Name, inputSchema[i].Type, inputSchema[i].Annotations); 304metadataBuilder.Add(inputSchema[i].Annotations, metadataName => ShouldPreserveMetadata(metadataName)); 314schemaBuilder.AddColumn(inputSchema[i].Name, inputSchema[i].Type.GetItemType(), metadataBuilder.ToAnnotations()); 336if (!(inputSchema[col].Type is VectorDataViewType colType)) 338"Pivot column '{0}' has type '{1}', but must be a vector of primitive types", name, inputSchema[col].Type); 582var srcGetter = GetGetter<T>(Schema[col]);
Microsoft.ML.Vision (5)
DnnRetrainTransform.cs (5)
233var type = inputSchema[inputColIndex].Type; 473if (input.Schema[colIndex].Type is KeyDataViewType && type.RawType == typeof(Int64)) 779var type = inputSchema[_inputColIndices[i]].Type; 982_srcgetter = input.GetGetter<T>(input.Schema[colIndex]); 1064_srcgetter = input.GetGetter<VBuffer<T>>(input.Schema[colIndex]);