1 write to Index
Microsoft.ML.DataView (1)
DataViewSchema.cs (1)
113Index = index;
357 references to Index
Microsoft.Data.Analysis (4)
DataFrame.IDataView.cs (4)
48if (column.Index < activeColumns.Length) 50activeColumns[column.Index] = true; 119return (ValueGetter<TValue>)_getters[column.Index]; 129return _getters[column.Index] != null;
Microsoft.ML.AutoML.Tests (6)
AutoFitTests.cs (4)
465Assert.True(col.Name == expectedOutputNames[col.Index]); 548Assert.True(col.Name == expectedOutputNames[col.Index]); 634Assert.Equal(col.Name, resTrainTest.Schema[col.Index].Name); 635Assert.Equal(col.Name, resCV.Schema[col.Index].Name);
Utils\MLNetUtils\MLNetUtils.cs (2)
16if (col.Index < result.Length) 17result[col.Index] = true;
Microsoft.ML.Core (11)
Data\AnnotationUtils.cs (2)
304if (list?.Count != 1 || !schema.Schema[list[0].Index].HasSlotNames(vectorSize)) 307schema.Schema[list[0].Index].Annotations.GetValue(Kinds.SlotNames, ref slotNames);
Data\LinkedRowRootCursorBase.cs (2)
37Ch.Check(column.Index < Schema.Count); 38return _active == null || _active[column.Index];
Data\RoleMappedSchema.cs (1)
170Contracts.Assert(!schema[info.Index].IsHidden, "How did a hidden column sneak in?");
Data\SchemaExtensions.cs (1)
25col = schema.GetColumnOrNull(name)?.Index ?? -1;
Utilities\Utils.cs (5)
735if (col.Index < result.Length) 736result[col.Index] = true; 848Contracts.Check(col.Index < lim); 849invMap[col.Index] = mapList.Count; 850mapList.Add(col.Index);
Microsoft.ML.Core.Tests (8)
UnitTests\CoreBaseTestClass.cs (2)
212var view2EvenCols = view2.Schema.Where(col => (col.Index & 1) == 0); 223var view2OddCols = view2.Schema.Where(col => (col.Index & 1) == 0);
UnitTests\TestEntryPoints.cs (6)
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);
Microsoft.ML.Data (213)
Data\DataViewUtils.cs (8)
1112Ch.CheckParam(column.Index < _colToActive.Length, nameof(column)); 1113return _colToActive[column.Index] >= 0; 1126Ch.CheckParam(column.Index < _colToActive.Length, nameof(column), "requested column is not active or valid for the Schema."); 1128var originGetter = _getters[_colToActive[column.Index]]; 1303Ch.CheckParam(column.Index < _colToActive.Length, nameof(column)); 1304return _colToActive[column.Index] >= 0; 1317Ch.CheckParam(column.Index < _colToActive.Length, nameof(column), "requested column not active or is invalid for the schema. "); 1319var originGetter = _getters[_colToActive[column.Index]];
Data\RowCursorUtils.cs (7)
484/// the column with the given <see cref="DataViewSchema.Column.Index"/> is part of the <paramref name="columnsNeeded"/>. 498if (col.Index >= indicesRequested.Length) 501indicesRequested[col.Index] = true; 572Ch.CheckParam(column.Index < Schema.Count, nameof(column)); 573Ch.CheckParam(IsColumnActive(column), nameof(column.Index), "Requested column is not active."); 589Ch.CheckParam(column.Index < Schema.Count, nameof(column)); 593return _active[column.Index];
DataLoadSave\Binary\BinaryLoader.cs (4)
1969Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 1970return _colToActivesIndex[column.Index] >= 0; 2037Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column), "requested column not active."); 2039var originGetter = _pipeGetters[_colToActivesIndex[column.Index]];
DataLoadSave\Binary\BinarySaver.cs (2)
587using (DataViewRowCursor cursor = data.GetRowCursor(data.Schema.Where(c => activeSet.Contains(c.Index)))) 745using (DataViewRowCursor cursor = data.GetRowCursor(data.Schema.Where(x => active.Contains(x.Index)), rand))
DataLoadSave\Database\DatabaseLoaderCursor.cs (4)
147Ch.Check(column.Index < _bindings.Infos.Length); 148return _active == null || _active[column.Index]; 160Ch.CheckParam(column.Index < _getters.Length, nameof(column), "requested column not valid."); 163var originFn = _getters[column.Index];
DataLoadSave\Text\TextLoaderCursor.cs (4)
306Ch.Check(column.Index < _bindings.Infos.Length); 307return _active == null || _active[column.Index]; 319Ch.CheckParam(column.Index < _getters.Length, nameof(column), "requested column not valid."); 322var originFn = _getters[column.Index];
DataLoadSave\Transpose\TransposeLoader.cs (5)
871Ch.CheckParam(column.Index <= _colToActivesIndex.Length, nameof(column)); 872return _colToActivesIndex[column.Index] >= 0; 884Ch.CheckParam(column.Index <= _colToActivesIndex.Length && IsColumnActive(column), nameof(column), "requested column not active"); 885Ch.AssertValue(_getters[_colToActivesIndex[column.Index]]); 887var originGetter = _getters[_colToActivesIndex[column.Index]];
DataView\AppendRowsDataView.cs (8)
191Ch.CheckParam(column.Index <= Getters.Length && IsColumnActive(column), nameof(column), "requested column not active"); 193var originGetter = Getters[column.Index]; 206Ch.Check(column.Index < Schema.Count, "Column index is out of range"); 207return Getters[column.Index] != null; 229Getters[col.Index] = CreateGetter(col.Index); 331Getters[col.Index] = CreateGetter(col.Index);
DataView\ArrayDataViewBuilder.cs (6)
312Ch.Check(column.Index < Schema.Count); 313return _active[column.Index]; 325Ch.Check(column.Index < Schema.Count); 326Ch.Check(column.Index < _active.Length && _active[column.Index], "the requested column is not active"); 328var originColumnValue = _view._columns[column.Index];
DataView\BatchDataViewMapperBase.cs (5)
44var inputCursor = _source.GetRowCursor(_source.Schema.Where(c => activeInput[c.Index]), null); 54var inputCols = _source.Schema.Where(c => predInput(c.Index)); 113var col = _parent.SchemaBindings.MapColumnIndex(out bool isSrc, column.Index); 142Ch.Check(column.Index < _parent.SchemaBindings.AsSchema.Count); 143return _active[column.Index];
DataView\CacheDataView.cs (6)
350cursor = _subsetInput.GetRowCursor(_subsetInput.Schema.Where(c => taskColumns.Contains(c.Index))); 1186Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 1187return _colToActivesIndex[column.Index] >= 0; 1206Ch.CheckParam(column.Index <= _colToActivesIndex.Length && IsColumnActive(column), nameof(column), "requested column not active"); 1207Ch.Check(_colToActivesIndex[column.Index] < _getters.Length); 1209var originGetter = _getters[_colToActivesIndex[column.Index]];
DataView\CompositeRowToRowMapper.cs (3)
58var activeIndices = activeColumns.Select(c => c.Index).ToArray(); 78deps[deps.Length - 1] = OutputSchema.Where(c => activeIndices.Contains(c.Index)); 119public override bool IsColumnActive(DataViewSchema.Column column) => _pred(column.Index);
DataView\DataViewConstructionUtils.cs (4)
412CheckColumnInRange(column.Index); 413return _getters[column.Index] != null; 431Host.CheckParam(column.Index <= _getters.Length && IsColumnActive(column), nameof(column), "requested column not active"); 433var getter = _getters[column.Index];
DataView\DataViewExtensions.cs (4)
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\EmptyDataView.cs (2)
70public override bool IsColumnActive(DataViewSchema.Column column) => column.Index < _active.Length && _active[column.Index];
DataView\LambdaFilter.cs (2)
119var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 132var inputCols = Source.Schema.Where(x => inputPred(x.Index));
DataView\RowToRowMapperTransform.cs (9)
163inputColumns = _bindings.InputSchema.Where(col => activeInput[col.Index] || predicateIn(col.Index)); 260Host.Assert(column.Index < activeArr.Length, $"The columns {activeColumns.Select(c => c.Name)} are not suitable for the OutputSchema."); 261activeArr[column.Index] = true; 332int index = _parent._bindings.MapColumnIndex(out isSrc, column.Index); 351int index = _parent._bindings.MapColumnIndex(out isSrc, column.Index); 382Ch.Check(column.Index < _bindings.Schema.Count); 383return _active[column.Index]; 398int index = _bindings.MapColumnIndex(out isSrc, column.Index);
DataView\SimpleRow.cs (4)
57Contracts.CheckParam(column.Index < _getters.Length, nameof(column), "Invalid col value in GetGetter"); 59if (_getters[column.Index] is ValueGetter<TValue> fn) 69Contracts.Check(column.Index < _getters.Length); 70return _getters[column.Index] != null;
DataView\Transposer.cs (20)
139var type = schema[_cols[c].Index].Type; 248_host.Assert(_cols[tcol].Index == col); 352_col = parent._cols[iinfo].Index; 481_colMin = parent._cols[iinfo].Index; 838var inputCols = _input.Schema.Where(x => srcPred(x.Index)); 851var srcCols = columnsNeeded.Where(x => srcPred(x.Index)); 1047Contracts.CheckParam(column.Index < Parent.ColumnCount, nameof(column)); 1156Contracts.CheckParam(column.Index < Parent.ColumnCount, nameof(column)); 1157return _getters[column.Index] != null; 1169Contracts.Check(IsColumnActive(column) && column.Index < _getters.Length); 1170Contracts.AssertValue(_getters[column.Index]); 1171var originFn = _getters[column.Index]; 1300Ch.Check(column.Index < Schema.Count, nameof(column)); 1303_slicer.OutputColumnToSplitterIndices(column.Index, out splitInd, out splitCol); 1320_slicer.OutputColumnToSplitterIndices(column.Index, out splitInd, out splitCol); 1451bool hasZero = columnsNeeded != null && columnsNeeded.Any(x => x.Index == 0); 1489Ch.CheckParam(column.Index == 0, nameof(column)); 1502Ch.CheckParam(column.Index == 0, nameof(column)); 1550Ch.CheckParam(column.Index == 0, nameof(column)); 1563Ch.CheckParam(column.Index == 0, nameof(column));
DataView\TypedCursor.cs (3)
186var inputCols = _data.Schema.Where(x => deps(x.Index)); 208var inputs = _data.GetRowCursorSet(_data.Schema.Where(col => _columnIndices.Contains(col.Index) || additionalColumnsPredicate(col.Index)), n, rand);
DataView\ZipDataView.cs (4)
88.Select((dv, i) => srcPredicates[i] == null ? GetMinimumCursor(dv) : dv.GetRowCursor(dv.Schema.Where(x => srcPredicates[i](x.Index)), null)).ToArray(); 169_zipBinding.CheckColumnInRange(column.Index); 170return _isColumnActive[column.Index]; 184_zipBinding.GetColumnSource(column.Index, out dv, out srcCol);
Dirty\ChooseColumnsByIndexTransform.cs (5)
253var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 267var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 300Ch.Check(column.Index < _bindings.OutputSchema.Count); 301return _active == null || _active[column.Index]; 315var src = _bindings.GetSourceColumnIndex(column.Index);
Evaluators\BinaryClassifierEvaluator.cs (3)
163return i => Utils.Size(prob) > 0 && i == prob[0].Index || pred(i); 1349scoreCol.Index, AnnotationUtils.Const.ScoreValueKind.Probability, NumberDataViewType.Single.Equals); 1483scoreCol.Index, AnnotationUtils.Const.ScoreValueKind.Probability, NumberDataViewType.Single.Equals);
Evaluators\EvaluatorBase.cs (5)
80var stratIndices = Utils.Size(stratCols) > 0 ? new HashSet<int>(stratCols.Select(col => col.Index)) : new HashSet<int>(); 94int label = schema.Label?.Index ?? -1; 95int weight = schema.Weight?.Index ?? -1; 96return i => i == score.Index || i == label || i == weight; 144var activeCols = data.Schema.Where(x => activeColsIndices(x.Index));
Evaluators\EvaluatorUtils.cs (6)
1091isWeightedCol = hasWeighted ? isWeightedColumn.Value.Index : -1; 1127i => hasWeighted && i == isWeightedColumn.Value.Index || hasStrats && (i == scol || i == svalcol) || 1428confusionTable = GetConfusionTableAsArray(confusionDataView, weightColumn.Value.Index, labelNames.Length, 1431confusionTable = GetConfusionTableAsArray(confusionDataView, countColumn.Index, labelNames.Length, 1476using (var cursor = confusionDataView.GetRowCursor(confusionDataView.Schema.Where(col => col.Index == countIndex || hasStrat && col.Index == stratCol)))
Evaluators\MulticlassClassificationEvaluator.cs (2)
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);
Evaluators\MultiOutputRegressionEvaluator.cs (1)
701if (currentColumn.IsHidden || (isWeightedCol.HasValue && i == isWeightedCol.Value.Index) ||
Evaluators\QuantileRegressionEvaluator.cs (4)
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);
Prediction\Calibrator.cs (7)
697if (column.Index == OutputSchema.Count - 1) 702var type = predictorRow.Schema[column.Index].Type; 703getters[column.Index] = Utils.MarshalInvoke(_getPredictorGetterMethodInfo, this, type.RawType, predictorRow, column.Index); 968var labelGetter = RowCursorUtils.GetLabelGetter(cursor, labelCol.Index); 969var scoreGetter = RowCursorUtils.GetGetterAs<Single>(NumberDataViewType.Single, cursor, scoreCol.Index); 971RowCursorUtils.GetGetterAs<Single>(NumberDataViewType.Single, cursor, weightCol.Value.Index);
Prediction\CalibratorCatalog.cs (1)
256_scoreColIndex = inputSchema.GetColumnOrNull(_scoreColumnName)?.Index ?? -1;
Scorers\FeatureContributionCalculation.cs (4)
339if (InputSchema[FeatureColumn.Index].HasSlotNames(featureSize)) 371if (activeColumns.Select(c => c.Index).Contains(_outputGenericSchema.Count)) 374? _parent.GetTextContributionGetter(input, FeatureColumn.Index, _slotNames) 375: _parent.GetContributionGetter(input, FeatureColumn.Index);
Scorers\RowToRowScorerBase.cs (6)
104var activeInCols = bindings.Input.Where(c => c.Index < activeInput.Length && activeInput[c.Index]); 171var activeIndices = new HashSet<int>(activeColumns.Select(c => c.Index)); 278Ch.Check(column.Index < _bindings.ColumnCount); 279return _active[column.Index]; 294int index = _bindings.MapColumnIndex(out isSrc, column.Index);
Scorers\SchemaBindablePredictorWrapper.cs (1)
241if (activeColumns.Select(c => c.Index).Contains(0))
Training\TrainerUtils.cs (2)
317return RowCursorUtils.GetGetterAs<float>(NumberDataViewType.Single, row, col.Value.Index); 338return RowCursorUtils.GetGetterAs<ulong>(NumberDataViewType.UInt64, row, col.Value.Index);
Transforms\BindingsWrappedRowCursor.cs (3)
42Ch.Check(column.Index < _bindings.ColumnCount, nameof(column)); 44int srcColumnIndex = _bindings.MapColumnIndex(out isSrc, column.Index); 59var index = _bindings.MapColumnIndex(out isSrc, column.Index);
Transforms\ColumnSelecting.cs (6)
643int index = _mapper.GetInputIndex(column.Index); 720active[_mapper.GetInputIndex(column.Index)] = true; 722return _mapper.InputSchema.Where(col => col.Index < active.Length && active[col.Index]); 778int index = _mapper.GetInputIndex(column.Index); 785public override bool IsColumnActive(DataViewSchema.Column column) => _active[column.Index];
Transforms\GenerateNumberTransform.cs (5)
345var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 356var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 422Ch.Check(column.Index < _bindings.ColumnCount); 423return _active == null || _active[column.Index]; 438int index = _bindings.MapColumnIndex(out isSrc, column.Index);
Transforms\Hashing.cs (1)
205CheckInputColumn(input.Schema, i, srcCol.Value.Index);
Transforms\NAFilter.cs (3)
214var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 226var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 407if (TryGetColumnValueGetter(column.Index, out fn))
Transforms\PerGroupTransformBase.cs (6)
176var activeCols = Source.Schema.Where(x => activeInput.Length > x.Index && activeInput[x.Index]); 191var cols = Source.Schema.Where(x => predInput(x.Index)); 280Ch.Check(column.Index < _parent.GetBindings().ColumnCount); 281return _active[column.Index]; 296var index = _parent.GetBindings().MapColumnIndex(out isSrc, column.Index);
Transforms\RangeFilter.cs (5)
214var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 228var inputCols = Source.Schema.Where(x => inputPred(x.Index)); 319Ch.Check(0 <= column.Index && column.Index < Schema.Count); 322if (column.Index != Parent._index)
Transforms\RowShufflingTransformer.cs (5)
671Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 672Ch.Assert((_colToActivesIndex[column.Index] >= 0) == _input.IsColumnActive(column)); 714Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 715Ch.CheckParam(_colToActivesIndex[column.Index] >= 0, nameof(column), "requested column not active"); 717var originGetter = _getters[_colToActivesIndex[column.Index]];
Transforms\TransformBase.cs (10)
228int index = _parent.MapColumnIndex(out isSrc, column.Index); 247int index = _parent.MapColumnIndex(out isSrc, column.Index); 440int index = MapColumnIndex(out isSrc, col.Index); 447return Input.Where(col => col.Index < active.Length && active[col.Index]); 738Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c); 820var activeIndices = new HashSet<int>(activeColumns.Select(c => c.Index)); 902int index = _bindings.MapColumnIndex(out isSrc, column.Index); 920Ch.Check(column.Index < _bindings.ColumnCount); 921return _active == null || _active[column.Index];
Transforms\ValueMapping.cs (6)
449Host.Check(retrievedKeyColumn.Index == keyColumn.Index, nameof(keyColumn) + "'s column index doesn't match that of the associated column in " + nameof(dataView)); 457Host.Check(retrievedValueColumn.Index == valueColumn.Index, nameof(valueColumn) + "'s column index doesn't match that of the associated column in " + nameof(dataView)); 463using (var cursor = dataView.GetRowCursor(dataView.Schema[keyColumn.Index], dataView.Schema[valueColumn.Index]))
Transforms\ValueToKeyMappingTransformer.cs (1)
587using (var cursor = trainingData.GetRowCursor(trainingData.Schema.Where(c => toTrain.Contains(c.Index))))
Utilities\ColumnCursor.cs (1)
39var colIndex = column.Index;
Microsoft.ML.DataView (5)
DataViewSchema.cs (5)
223if (column.Index >= _getters.Length) 225var typedGetter = _getters[column.Index] as ValueGetter<TValue>; 228Debug.Assert(_getters[column.Index] != null); 282_items.Add((column.Name, column.Type, annotations.GetGetterInternal(column.Index), column.Annotations)); 456Debug.Assert(_columns[i].Index == i);
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (1)
100return InputSchema.Where(col => _inputColIndices.Contains(col.Index));
Selector\SubModelSelector\BaseSubModelSelector.cs (1)
114scoreCol.Index, AnnotationUtils.Const.ScoreValueKind.Probability, NumberDataViewType.Single.Equals);
Microsoft.ML.Fairlearn (1)
Metrics\FairlearnMetricCatalog.cs (1)
186var groups = evalDf.Rows.GroupBy(r => r[sensitiveCol.Index]);
Microsoft.ML.FastTree (7)
FastTree.cs (1)
1293var idx = info.Value.Index;
TreeEnsembleFeaturizationTransformer.cs (1)
80CheckFeatureColumnCompatibility(inputSchema[featureColumn.Index]);
TreeEnsembleFeaturizer.cs (5)
188var activeIndices = activeColumns.Select(c => c.Index); 189var state = new State(_ectx, input, _owner._ensemble, _owner._totalLeafCount, FeatureColumn.Index); 195if (activeIndices.Contains(OutputSchema[_treesColumnName].Index)) 205if (activeIndices.Contains(OutputSchema[_leavesColumnName].Index)) 215if (activeIndices.Contains(OutputSchema[_pathsColumnName].Index))
Microsoft.ML.IntegrationTests (2)
Common.cs (2)
111Assert.Equal(schemaPair.Item1.Index, schemaPair.Item2.Index);
Microsoft.ML.Mkl.Components (2)
VectorWhitening.cs (2)
290cols[i] = col.Value.Index; 335using (var cursor = inputData.GetRowCursor(inputData.Schema.Where(c => cols.Any(col => c.Index == col))))
Microsoft.ML.OnnxTransformer (1)
OnnxTransform.cs (1)
464_inputColIndices[i] = col.Value.Index;
Microsoft.ML.Parquet (8)
ParquetLoader.cs (3)
602var originGetter = _getters[_colToActivesIndex[column.Index]]; 627Ch.CheckParam(column.Index < _colToActivesIndex.Length, nameof(column)); 628return _colToActivesIndex[column.Index] >= 0;
PartitionedFileLoader.cs (5)
401_subActivecolumnsNeeded = Schema.Where(x => (_subActive?.Length > x.Index) && _subActive[x.Index]); 424var originGetter = _getters[column.Index]; 449Ch.Check(column.Index < Schema.Count); 450return _active[column.Index];
Microsoft.ML.PCA (1)
PcaTransformer.cs (1)
416var inputCols = trainingData.Schema.Where(x => activeColumns[x.Index]);
Microsoft.ML.PerformanceTests (3)
CacheDataViewBench.cs (1)
65_seeker = ((IRowSeekable)_cacheDataView).GetSeeker(colIndex => colIndex == _col.Index);
HashBench.cs (2)
35if (column.Index != 0) 49if (column.Index != 0)
Microsoft.ML.Recommender (8)
MatrixFactorizationPredictor.cs (4)
352_matrixColumnIndexColumnIndex = matrixColumnList[0].Index; 355_matrixRowIndexCololumnIndex = matrixRowList[0].Index; 370return InputSchema.Where(col => col.Index == _matrixColumnIndexColumnIndex || col.Index == _matrixRowIndexCololumnIndex);
MatrixFactorizationTrainer.cs (4)
478var matrixColumnIndexGetter = RowCursorUtils.GetGetterAs<uint>(NumberDataViewType.UInt32, cursor, matrixColumnIndexColInfo.Index); 479var matrixRowIndexGetter = RowCursorUtils.GetGetterAs<uint>(NumberDataViewType.UInt32, cursor, matrixRowIndexColInfo.Index); 496var validMatrixColumnIndexGetter = RowCursorUtils.GetGetterAs<uint>(NumberDataViewType.UInt32, validCursor, validMatrixColumnIndexColInfo.Index); 497var validMatrixRowIndexGetter = RowCursorUtils.GetGetterAs<uint>(NumberDataViewType.UInt32, validCursor, validMatrixRowIndexColInfo.Index);
Microsoft.ML.Samples (4)
Dynamic\SimpleDataViewImplementation.cs (4)
175=> new Cursor(this, columnsNeeded.Any(c => c.Index == 0), 176columnsNeeded.Any(c => c.Index == 1)); 302return (ValueGetter<TValue>)_getters[column.Index]; 309=> _getters[column.Index] != null;
Microsoft.ML.StandardTrainers (2)
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (2)
108var activeIndices = activeColumns.Select(c => c.Index).ToArray(); 148return InputSchema.Where(col => _inputColumnIndexes.Contains(col.Index));
Microsoft.ML.TestFramework (2)
DataPipe\TestDataPipeBase.cs (2)
669var view2EvenCols = view2.Schema.Where(col => (col.Index & 1) == 0); 680var view2OddCols = view2.Schema.Where(col => (col.Index & 1) != 0);
Microsoft.ML.TestFrameworkCommon (1)
TestCommon.cs (1)
228col = schema.GetColumnOrNull(name)?.Index ?? -1;
Microsoft.ML.Tests (2)
Scenarios\Api\TestApi.cs (1)
338Assert.Equal(col.Name, split.Schema[col.Index].Name);
TrainerEstimators\MatrixFactorizationTests.cs (1)
116Assert.True(col.Name == expectedOutputNames[col.Index]);
Microsoft.ML.TimeSeries (10)
PredictionEngine.cs (1)
169var activeIndices = new HashSet<int>(activeColumns.Select(c => c.Index));
SequentialTransformBase.cs (1)
414Ch.Check(column.Index < Schema.Count, nameof(column));
SequentialTransformerBase.cs (8)
663int index = _bindings.MapColumnIndex(out isSrc, column.Index); 682int index = _bindings.MapColumnIndex(out bool isSrc, column.Index); 709Ch.Check(column.Index < Schema.Count, nameof(column)); 986int index = _parent._bindings.MapColumnIndex(out isSrc, column.Index); 1010int index = _parent._bindings.MapColumnIndex(out isSrc, column.Index); 1041Ch.Check(column.Index < _bindings.Schema.Count); 1042return _active[column.Index]; 1057int index = _bindings.MapColumnIndex(out isSrc, column.Index);
Microsoft.ML.Transforms (49)
CustomMappingFilter.cs (2)
44var inputCols = Input.Schema.Where(x => inputPred(x.Index)); 80var inputCols = Input.Schema.Where(x => inputPred(x.Index));
Dracula\CountTableTransformer.cs (2)
248var getSrc = RowCursorUtils.GetGetterAs<ulong>(NumberDataViewType.UInt64, row, col.Index); 265var getSrc = RowCursorUtils.GetGetterAs<double>(NumberDataViewType.Double, row, col.Index);
GroupTransform.cs (10)
361ids[i] = retrievedColumn.Value.Index; 568Ch.CheckParam(column.Index < _active.Length, nameof(column)); 569_parent._groupBinding.CheckColumnInRange(column.Index); 570return _active[column.Index]; 650_parent._groupBinding.CheckColumnInRange(column.Index); 651if (!_active[column.Index]) 654if (column.Index < _groupCount) 656var groupIndex = _parent._groupBinding.GroupColumnIndexes[column.Index]; 660Ch.AssertValue(_aggregators[column.Index - _groupCount]); 661return _aggregators[column.Index - _groupCount].GetGetter<TValue>(Ch);
OptionalColumnTransform.cs (4)
377var activeIndices = new HashSet<int>(activeColumns.Select(c => c.Index)); 465Ch.Check(column.Index < _bindings.ColumnCount); 466return _active == null || _active[column.Index]; 481int index = _bindings.MapColumnIndex(out isSrc, column.Index);
ProduceIdTransform.cs (5)
193Ch.CheckParam(column.Index < _bindings.ColumnCount, nameof(column)); 195int index = _bindings.MapColumnIndex(out isSrc, column.Index); 211Ch.CheckParam(column.Index < _bindings.ColumnCount, nameof(column)); 212Ch.CheckParam(IsColumnActive(column), nameof(column.Index)); 214int index = _bindings.MapColumnIndex(out isSrc, column.Index);
StatefulCustomMappingTransformer.cs (7)
131Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c); 186var iinfo = _bindings.MapColumnIndex(out var isSrc, col.Index); 213int index = MapColumnIndex(out isSrc, col.Index); 231Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c); 317int index = _parent._bindings.MapColumnIndex(out isSrc, column.Index); 332Ch.Check(column.Index < _parent._bindings.Schema.Count); 333return _active == null || _active[column.Index];
StatefulFilterTransform.cs (4)
218Contracts.CheckParam(column.Index < Schema.Count, nameof(column)); 220int iCol = _parent._bindings.MapColumnIndex(out isSrc, column.Index); 235Contracts.CheckParam(column.Index < Schema.Count, nameof(column)); 237int iCol = _parent._bindings.MapColumnIndex(out isSrc, column.Index);
SvmLight\SvmLightLoader.cs (2)
481Ch.CheckParam(column.Index == 0, nameof(column)); 503Ch.CheckParam(column.Index == 0, nameof(column));
SvmLight\SvmLightLoaderSaverCatalog.cs (1)
141saver.SaveData(stream, data, data.Schema.Select(col => col.Index).ToArray());
Text\NgramHashingTransformer.cs (3)
663Contracts.Assert(col.Index < _srcTextGetters.Length); 664_srcTextGetters[col.Index] = InvertHashUtils.GetSimpleMapper<uint>(inputSchema, col.Index);
UngroupTransform.cs (9)
601Ch.Check(column.Index < _ungroupBinding.InputColumnCount); 602return _active[column.Index]; 614Ch.CheckParam(column.Index < _ungroupBinding.InputColumnCount, nameof(column)); 616if (!_ungroupBinding.IsPivot(column.Index)) 619if (_cachedGetters[column.Index] == null) 620_cachedGetters[column.Index] = MakeGetter<TValue>(column.Index, _ungroupBinding.GetPivotColumnOptionsByCol(column.Index).ItemType); 622var result = _cachedGetters[column.Index] as ValueGetter<TValue>;
Microsoft.ML.Vision (5)
DnnRetrainTransform.cs (1)
330var cols = input.Schema.Where(c => inputColIndices.Contains(c.Index));
ImageClassificationTrainer.cs (4)
833input.Schema.Where(c => c.Index == labelColumn.Index || c.Index == imageColumn.Index)))