165 references to Check
Microsoft.ML.Core (17)
CommandLine\CmdParser.cs (1)
241env.Check(destinationType.IsInstanceOfType(destination));
ComponentModel\ComponentCatalog.cs (3)
268env.Check((ArgType != null) == (args != null)); 269env.Check(Utils.Size(extra) == ExtraArgCount); 1001env.Check(signatureType.BaseType == typeof(MulticastDelegate));
Data\LinkedRowRootCursorBase.cs (2)
27Ch.Check(active == null || active.Length == schema.Count); 37Ch.Check(column.Index < Schema.Count);
Data\ModelLoadContext.cs (2)
116_ectx.Check(Reader.BaseStream.Position == FpMin + Header.FpModel); 121_ectx.Check(Reader.BaseStream.Position == FpMin + Header.FpModel);
Data\ModelSaveContext.cs (1)
139_ectx.Check(Writer.BaseStream.Position == FpMin + Header.FpModel);
Data\Repository.cs (8)
251_ectx.Check(parent != null); 252_ectx.Check(parent.StartsWith(root)); 255_ectx.Check(entityPath.Length > ichSplit && entityPath[ichSplit] == Path.DirectorySeparatorChar); 262_ectx.Check(Utils.Size(pathEnt) > 0); 263_ectx.Check(entityPath == Path.Combine(root, pathEnt)); 317ExceptionContext.Check(!Disposed); 414ExceptionContext.Check(!Disposed); 501ExceptionContext.Check(!Disposed);
Microsoft.ML.Data (63)
Data\DataViewUtils.cs (1)
128host.Check(Utils.Size(inputs) > 0);
DataLoadSave\Database\DatabaseLoaderCursor.cs (2)
147Ch.Check(column.Index < _bindings.Infos.Length); 161Ch.Check(IsColumnActive(column));
DataLoadSave\LegacyCompositeDataLoader.cs (1)
353h.Check(ctx.Reader.BaseStream.Position == ctx.FpMin + ctx.Header.FpModel);
DataLoadSave\Text\TextLoaderCursor.cs (2)
306Ch.Check(column.Index < _bindings.Infos.Length); 320Ch.Check(IsColumnActive(column));
DataLoadSave\Text\TextSaver.cs (2)
401ch.Check(0 <= cols[i] && cols[i] < data.Schema.Count); 403ch.Check(itemType is KeyDataViewType || itemType.IsStandardScalar());
DataLoadSave\TransformWrapper.cs (1)
53_host.Check(transform is IRowToRowMapper);
DataView\ArrayDataViewBuilder.cs (2)
312Ch.Check(column.Index < Schema.Count); 325Ch.Check(column.Index < Schema.Count);
DataView\BatchDataViewMapperBase.cs (1)
142Ch.Check(column.Index < _parent.SchemaBindings.AsSchema.Count);
DataView\CacheDataView.cs (1)
1207Ch.Check(_colToActivesIndex[column.Index] < _getters.Length);
DataView\DataViewConstructionUtils.cs (2)
379Host.Check(keyType != null); 381Host.Check(typeof(TDst) == typeof(ulong) || typeof(TDst) == typeof(uint) ||
DataView\LambdaColumnMapper.cs (2)
32env.Check(keyValueGetter == null || typeDst.GetItemType() is KeyDataViewType); 33env.Check(slotNamesGetter == null || typeDst.IsKnownSizeVector());
DataView\RowToRowMapperTransform.cs (2)
382Ch.Check(column.Index < _bindings.Schema.Count); 395Ch.Check(IsColumnActive(column));
DataView\Transposer.cs (1)
1317Ch.Check(IsColumnActive(column));
Dirty\ChooseColumnsByIndexTransform.cs (2)
300Ch.Check(column.Index < _bindings.OutputSchema.Count); 313Ch.Check(IsColumnActive(column));
EntryPoints\InputBuilder.cs (2)
73_ectx.Check(!fieldInfo.IsStatic && !fieldInfo.IsInitOnly && !fieldInfo.IsLiteral); 719_ectx.Check(output.GetType() == _type);
Evaluators\ClusteringEvaluator.cs (2)
433Host.Check(_scores.Length == _scoresArr.Length); 473Host.Check(_scores.Length == _scoresArr.Length);
Evaluators\MulticlassClassificationEvaluator.cs (1)
445Host.Check(_scores.Length == _scoresArr.Length);
Prediction\Calibrator.cs (5)
326Host.Check(typeof(TOut) == typeof(float)); 327Host.Check(typeof(TDist) == typeof(float)); 669env.Check(scoreType is NumberDataViewType); 1298_host.Check(Utils.Size(outputNames) == 2); 1796_host.Check(Utils.Size(scoreProbablityColumnNames) == 2);
Scorers\MulticlassClassificationScorer.cs (2)
578Host.Check(score.Length == scoreLength); 589Host.Check(score.Length == scoreLength);
Scorers\RowToRowScorerBase.cs (2)
278Ch.Check(column.Index < _bindings.ColumnCount); 291Ch.Check(IsColumnActive(column));
Transforms\GenerateNumberTransform.cs (2)
422Ch.Check(column.Index < _bindings.ColumnCount); 435Ch.Check(IsColumnActive(column));
Transforms\KeyToValue.cs (1)
260Host.Check(keyMetadata.Length == keyItemType.GetKeyCountAsInt32(Host));
Transforms\KeyToVector.cs (4)
383Host.Check(namesSlotSrc.Length == typeSrc.Size); 395Host.Check(namesKeySrc.Length == keyCount); 527Host.Check(cv == 0 || src.Length == cv); 571Host.Check(lenSrc == cv || cv == 0);
Transforms\MetadataDispatcher.cs (1)
278ectx.Check(0 <= index && index < _infos.Length);
Transforms\NAFilter.cs (1)
404Ch.Check(IsColumnActive(column));
Transforms\NormalizeColumn.cs (6)
465Host.Check(typeSrc.RawType == typeof(TFloat)); 498Host.Check(typeSrc.GetVectorSize() == Scale.Length); 499Host.Check(typeSrc.GetItemType().RawType == typeof(TFloat)); 587Host.Check(typeSrc.RawType == typeof(TFloat)); 618Host.Check(typeSrc.GetVectorSize() == Mean.Length); 619Host.Check(typeSrc.GetItemType().RawType == typeof(TFloat));
Transforms\NormalizeColumnDbl.cs (3)
1088Host.Check(dst.Length == Mean.Length); 1302Host.Check(dst.Length == _binUpperBounds.Length); 1934Host.Check(buffer.Length == size);
Transforms\NormalizeColumnSng.cs (3)
1248Host.Check(dst.Length == Mean.Length); 1463Host.Check(dst.Length == _binUpperBounds.Length); 2097Host.Check(buffer.Length == size);
Transforms\PerGroupTransformBase.cs (1)
280Ch.Check(column.Index < _parent.GetBindings().ColumnCount);
Transforms\RangeFilter.cs (2)
319Ch.Check(0 <= column.Index && column.Index < Schema.Count); 320Ch.Check(IsColumnActive(column));
Transforms\TransformBase.cs (2)
899Ch.Check(IsColumnActive(column)); 920Ch.Check(column.Index < _bindings.ColumnCount);
Transforms\ValueMapping.cs (1)
717env.Check(termLookupModel || CheckModelVersion(ctx, GetVersionInfo()));
Microsoft.ML.Ensemble (18)
EntryPoints\CreateEnsemble.cs (1)
383ch.Check(dataSerialized.Length == Utils.Size(entries));
OutputCombiners\BaseStacking.cs (2)
133ch.Check(BasePredictorType != null); 162ch.Check(data.Schema.Label.Value.Type is KeyDataViewType);
Trainer\EnsembleDistributionModelParameters.cs (7)
142Host.Check(typeof(TIn) == typeof(VBuffer<Single>)); 143Host.Check(typeof(TOut) == typeof(Single)); 154Host.Check(src.Length == _inputType.Size); 178Host.Check(typeof(TIn) == typeof(VBuffer<Single>)); 179Host.Check(typeof(TOut) == typeof(Single)); 180Host.Check(typeof(TDist) == typeof(Single)); 192Host.Check(src.Length == _inputType.Size);
Trainer\EnsembleModelParameters.cs (3)
132Host.Check(typeof(TIn) == typeof(VBuffer<Single>)); 133Host.Check(typeof(TOut) == typeof(Single)); 146Host.Check(src.Length == _inputType.Size);
Trainer\EnsembleModelParametersBase.cs (1)
33Host.Check(weights == null || weights.Length == models.Length);
Trainer\Multiclass\EnsembleMulticlassModelParameters.cs (4)
112Host.Check(typeof(TIn) == typeof(VBuffer<Single>)); 113Host.Check(typeof(TOut) == typeof(VBuffer<Single>)); 131Host.Check(src.Length == _inputType.Size); 146Host.Check(predictions[i].Length == _mappers[i].OutputType.GetVectorSize());
Microsoft.ML.FastTree (12)
FastTree.cs (9)
2913Host.Check(typeof(TIn) == typeof(VBuffer<float>)); 2914Host.Check(typeof(TOut) == typeof(float)); 2924Host.Check(src.Length == inputVectorSize); 2926Host.Check(src.Length > MaxSplitFeatIdx); 2933Host.Check(typeof(TSrc) == typeof(VBuffer<float>)); 2934Host.Check(typeof(TDst) == typeof(VBuffer<float>)); 2952Host.Check(src.Length == inputVectorSize); 2954Host.Check(src.Length > MaxSplitFeatIdx); 3041Host.Check(Utils.Size(outputNames) >= 1);
GamModelParameters.cs (1)
636ch.Check(len == _pred._numInputFeatures);
RandomForestRegression.cs (2)
236Host.Check(src.Length == inputVectorSize); 238Host.Check(src.Length > MaxSplitFeatIdx);
Microsoft.ML.ImageAnalytics (1)
ImagePixelExtractor.cs (1)
348Host.Check(src.Height == height && src.Width == width);
Microsoft.ML.KMeansClustering (2)
KMeansModelParameters.cs (2)
149Host.Check(typeof(TIn) == typeof(VBuffer<float>)); 150Host.Check(typeof(TOut) == typeof(VBuffer<float>));
Microsoft.ML.Parquet (6)
PartitionedFileLoader.cs (4)
422Ch.Check(IsColumnActive(column)); 449Ch.Check(column.Index < Schema.Count); 609Ch.Check(col >= 0 && col < SubColumnCount); 626Ch.Check(col >= 0 && col < _colValues.Length);
PartitionedPathParser.cs (2)
166_host.Check(col.TryUnparse(sb)); 279_host.Check(col.TryUnparse(sb));
Microsoft.ML.PCA (4)
PcaTrainer.cs (3)
619Host.Check(typeof(TIn) == typeof(VBuffer<float>)); 620Host.Check(typeof(TOut) == typeof(float)); 625Host.Check(src.Length == _dimension);
PcaTransformer.cs (1)
589ectx.Check(src.Length == transformInfo.Dimension);
Microsoft.ML.StandardTrainers (16)
LdSvm\LdSvmModelParameters.cs (3)
270Host.Check(typeof(TIn) == typeof(VBuffer<float>)); 271Host.Check(typeof(TOut) == typeof(float)); 276Host.Check(src.Length == InputType.GetVectorSize());
Optimizer\L1Optimizer.cs (2)
38Env.Check(biasCount >= 0); 39Env.Check(l1weight >= 0);
Standard\LinearModelParameters.cs (1)
139Host.Check(Utils.Size(outputs) >= 1);
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
775Host.Check(src.Length == NumberOfFeatures);
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (2)
412Host.Check(typeof(TIn) == typeof(VBuffer<float>)); 413Host.Check(typeof(TOut) == typeof(VBuffer<float>));
Standard\MulticlassClassification\OneVersusAllTrainer.cs (2)
450Host.Check(typeof(TIn) == typeof(VBuffer<float>)); 451Host.Check(typeof(TOut) == typeof(VBuffer<float>));
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (3)
460Host.Check(typeof(TIn) == typeof(VBuffer<float>)); 461Host.Check(typeof(TOut) == typeof(VBuffer<float>)); 472Host.Check(src.Length == _inputType.Size);
Standard\Simple\SimpleTrainers.cs (2)
361Host.Check(!float.IsNaN(prob)); 406Host.Check(Utils.Size(outputs) >= 3);
Microsoft.ML.TimeSeries (2)
SequentialTransformerBase.cs (2)
1041Ch.Check(column.Index < _bindings.Schema.Count); 1054Ch.Check(IsColumnActive(column));
Microsoft.ML.Transforms (22)
Dracula\CountTableTransformer.cs (1)
316ectx.Check(keyNames.Length == labelCardinality);
ExpressionTransformer.cs (3)
79_host.Check(columns.All(col => !string.IsNullOrWhiteSpace(col.Expression))); 80_host.Check(columns.All(col => !string.IsNullOrWhiteSpace(col.Name))); 81_host.Check(columns.All(col => Utils.Size(col.InputColumnNames) > 0));
GroupTransform.cs (2)
374_ectx.Check(0 <= col && col < GroupColumnIndexes.Length + KeepColumnIndexes.Length); 483ctx.Check(typeof(T) == typeof(VBuffer<TValue>));
HashJoiningTransform.cs (2)
547Host.Check(src.Length == expectedSrcLength); 595Host.Check(src.Length == expectedSrcLength);
KeyToVectorMapping.cs (2)
299Host.Check(namesSlotSrc.Length == srcVectorSize); 399Host.Check(src.Length == cv || cv == 0);
MissingValueIndicatorTransform.cs (2)
139Host.Check(type.GetValueCount() < int.MaxValue / 2); 297ectx.Check(0 <= size && size < int.MaxValue / 2);
MissingValueReplacing.cs (1)
700Host.Check(src.Length == repArray.Length);
OptionalColumnTransform.cs (2)
465Ch.Check(column.Index < _bindings.ColumnCount); 478Ch.Check(IsColumnActive(column));
StatefulCustomMappingTransformer.cs (2)
314Ch.Check(IsColumnActive(column)); 332Ch.Check(column.Index < _parent._bindings.Schema.Count);
SvmLight\SvmLightSaver.cs (1)
116_host.Check(col < data.Schema.Count);
Text\NgramTransform.cs (1)
535Host.Check(unigramNames.Length == keyCount);
Text\TextFeaturizingEstimator.cs (2)
385host.Check(Enum.IsDefined(typeof(Language), parent.OptionalSettings.Language)); 386host.Check(Enum.IsDefined(typeof(CaseMode), parent.OptionalSettings.CaseMode));
UngroupTransform.cs (1)
601Ch.Check(column.Index < _ungroupBinding.InputColumnCount);
Microsoft.ML.Vision (2)
ImageClassificationTrainer.cs (2)
1475Host.Check(typeof(TSrc) == typeof(VBuffer<byte>)); 1476Host.Check(typeof(TDst) == typeof(VBuffer<float>));