542 references to Size
Microsoft.ML.Core (53)
CommandLine\CmdParser.cs (4)
1272
Contracts.Assert(Utils.
Size
(genArgs) == 1);
1441
Contracts.Assert(!IsDefault || Utils.
Size
(ShortNames) == 0);
1728
return Utils.
Size
(ShortNames) != 0 ? ShortNames[0] : LongName;
2160
if (Utils.
Size
(ShortNames) != 0)
ComponentModel\AssemblyLoadingUtils.cs (1)
25
if (Utils.
Size
(assemblies) > 0)
ComponentModel\ComponentCatalog.cs (6)
209
Contracts.Assert(getter == null || Utils.
Size
(attr.CtorTypes) == 0);
236
Contracts.Assert(Utils.
Size
(ctorArgs) == CtorTypes.Length + ((RequireEnvironment) ? 1 : 0));
241
Contracts.Assert(Utils.
Size
(ctorArgs) == 0);
269
env.Check(Utils.
Size
(extra) == ExtraArgCount);
469
if (Utils.
Size
(parmTypes) == 0 && (getter = FindInstanceGetter(instType, loaderType)) != null)
1015
int carg = Utils.
Size
(extra);
ComponentModel\LoadableClassAttribute.cs (1)
168
if (Utils.
Size
(loadNames) == 0)
Data\ModelHeader.cs (2)
307
Contracts.Check(Utils.
Size
(bytes) >= Size);
374
Contracts.Check(Utils.
Size
(bytes) >= Size);
Data\ModelLoadContext.cs (3)
141
_ectx.CheckDecode(-1 <= id && id < Utils.
Size
(Strings));
153
Contracts.CheckDecode(0 <= id && id < Utils.
Size
(Strings));
164
_ectx.CheckDecode(0 <= id && id < Utils.
Size
(Strings));
Data\ProgressReporter.cs (1)
77
int n = Utils.
Size
(values);
Utilities\BigArray.cs (10)
244
int curLastBlockSize = Utils.
Size
(_entries[curBlockCount - 1]);
296
Contracts.Assert(Utils.
Size
(_entries) == 0);
304
Contracts.Assert(0 < miLim && miLim <= Utils.
Size
(_entries[maMax]));
305
if (Utils.
Size
(_entries[maMax]) != miLim)
407
Contracts.Assert(miLim <= Utils.
Size
(_entries[maMax]));
413
Contracts.Assert(BlockSize <= Utils.
Size
(_entries[maMin]));
415
Contracts.Assert(miLim <= Utils.
Size
(_entries[maMax]));
423
Contracts.Assert(BlockSize <= Utils.
Size
(_entries[maMin]));
429
Contracts.Assert(BlockSize <= Utils.
Size
(_entries[major]));
436
Contracts.Assert(miLim <= Utils.
Size
(_entries[maMax]));
Utilities\BinFinder.cs (9)
38
if (Utils.
Size
(_path) < CountBins + 1)
43
if (Utils.
Size
(_valuesSng) < numValues)
116
if (Utils.
Size
(_path) < CountBins + 1)
121
if (Utils.
Size
(_valuesDbl) < numValues)
337
if (Utils.
Size
(_accum) < CountValues + 1)
575
if (Utils.
Size
(_accum) < CountValues + 1)
586
if (Utils.
Size
(_energies) < sizeEnergy)
592
if (Utils.
Size
(_pathInfo) < sizeInfo)
594
if (Utils.
Size
(_cols) < width)
Utilities\FixedSizeQueue.cs (1)
33
Contracts.Assert(Utils.
Size
(_array) >= 0);
Utilities\HashArray.cs (5)
65
Contracts.Assert(0 <= _ct && _ct <= Utils.
Size
(_entries));
69
Contracts.Assert(Utils.
Size
(_rgit) >= _ct || Utils.
Size
(_rgit) == HashHelpers.MaxPrimeArrayLength);
153
if (_ct >= Utils.
Size
(_entries))
155
Contracts.Assert(_ct == Utils.
Size
(_entries));
Utilities\Hashing.cs (1)
346
Contracts.Check(lim <= Utils.
Size
(data));
Utilities\MathUtils.cs (1)
706
Contracts.Assert(Utils.
Size
(src) >= count);
Utilities\NormStr.cs (3)
76
Contracts.Assert(0 <= _cns && _cns <= Utils.
Size
(_rgns));
77
Contracts.Assert(Utils.
Size
(_rgns) == Utils.
Size
(_rgmeta));
Utilities\Stream.cs (2)
149
Contracts.Assert(0 <= count && count <= Utils.
Size
(values));
162
Contracts.Assert(0 <= count && count <= Utils.
Size
(values));
Utilities\SupervisedBinFinder.cs (2)
107
Contracts.Assert(Utils.
Size
(boundaries) > 0);
185
Contracts.Assert(Utils.
Size
(boundaries) > 0);
Utilities\Utils.cs (1)
904
int cv = Utils.
Size
(a);
Microsoft.ML.Core.Tests (5)
UnitTests\TestEntryPoints.cs (4)
3176
Env.Assert(Utils.
Size
(xfNames) == Utils.
Size
(xfArgs));
3209
for (int i = 0; i < Utils.
Size
(xfNames); i++)
3277
for (int i = 0; i < Utils.
Size
(xfNames); i++)
UnitTests\TestVBuffer.cs (1)
996
Contracts.Assert(Utils.
Size
(indices) >= count);
Microsoft.ML.Data (166)
Commands\DataCommand.cs (1)
291
if (Utils.
Size
(ImplOptions.Transforms) > 0)
Commands\SaveDataCommand.cs (1)
136
if (Utils.
Size
(keepColumns) > 0)
Commands\ScoreCommand.cs (4)
162
|| (ImplOptions.OutputAllColumns == null && Utils.
Size
(ImplOptions.OutputColumns) == 0 && outputIsBinary);
165
ImplOptions.OutputAllColumns == true || Utils.
Size
(ImplOptions.OutputColumns) == 0;
167
if (ImplOptions.OutputAllColumns == true && Utils.
Size
(ImplOptions.OutputColumns) != 0)
170
if (!outputAllColumns && Utils.
Size
(ImplOptions.OutputColumns) != 0)
Data\BufferBuilder.cs (1)
84
Contracts.Assert(Utils.
Size
(_indices) >= _count);
Data\DataViewUtils.cs (6)
128
host.Check(Utils.
Size
(inputs) > 0);
225
if (Utils.
Size
(cursors) == 0)
348
if (Utils.
Size
(ourPools) != schema.Count)
765
Contracts.Assert(Utils.
Size
(values) >= count);
833
Contracts.Assert(Utils.
Size
(pipes) == _batchColumns.Length);
939
Contracts.Assert(_count <= Utils.
Size
(Values));
Data\SchemaDefinition.cs (1)
458
if (Utils.
Size
(dims) == 0)
DataLoadSave\Binary\BinaryLoader.cs (9)
650
if (Utils.
Size
(metadataArray) > 0)
786
_host.Assert(_outputSchema.Count == Utils.
Size
(_aliveColumns));
788
if (Utils.
Size
(_deadColumns) > 0)
789
ch.Warning("BinaryLoader does not know how to interpret {0} columns", Utils.
Size
(_deadColumns));
874
ch.Assert(_outputSchema.Count == Utils.
Size
(_aliveColumns));
876
if (Utils.
Size
(_deadColumns) > 0)
877
ch.Warning("BinaryLoader does not know how to interpret {0} columns", Utils.
Size
(_deadColumns));
951
_host.Assert(Utils.
Size
(unsavable) == 0);
1464
Ectx.Assert(0 <= columnIndex && columnIndex < Utils.
Size
(parent._actives));
DataLoadSave\Binary\BinarySaver.cs (2)
712
ColumnCodec[] activeSourceColumns = new ColumnCodec[Utils.
Size
(colIndices)];
713
if (Utils.
Size
(colIndices) == 0)
DataLoadSave\Binary\Codecs.cs (5)
98
Contracts.Assert(0 <= index && index <= Utils.
Size
(values));
99
Contracts.Assert(0 <= count && count <= Utils.
Size
(values) - index);
262
Contracts.Assert(0 <= index && index <= Utils.
Size
(values));
263
Contracts.Assert(0 <= count && count <= Utils.
Size
(values) - index);
1135
if (Utils.
Size
(dims) > 0)
DataLoadSave\Database\DatabaseLoader.cs (1)
51
if (Utils.
Size
(cols) == 0)
DataLoadSave\DataOperationsCatalog.cs (2)
197
int[] prefetch = new int[Utils.
Size
(columnsToPrefetch)];
286
_env.CheckUserArg(Utils.
Size
(columns) > 0, nameof(columns));
DataLoadSave\EstimatorChain.cs (4)
33
Contracts.Assert(Utils.
Size
(estimators) == Utils.
Size
(scopes));
34
Contracts.Assert(Utils.
Size
(estimators) == Utils.
Size
(needCacheAfter));
DataLoadSave\EstimatorExtensions.cs (1)
156
T[] result = new T[Utils.
Size
(array) + 1];
DataLoadSave\LegacyCompositeDataLoader.cs (3)
130
if (Utils.
Size
(transformArgs) == 0)
185
if (Utils.
Size
(tagData) == 0)
215
int count = Utils.
Size
(tagData);
DataLoadSave\Text\TextLoader.cs (9)
198
if (Utils.
Size
(Source) == 0)
239
if (Utils.
Size
(Source) == 0)
549
return Utils.
Size
(Columns) == 0 || Columns.All(x => x.IsValid());
718
if (Utils.
Size
(col.Source) == 0)
782
ch.Assert(Utils.
Size
(col.Source) > 0);
1166
if (Utils.
Size
(cols) == 0 && !TryParseSchema(_host, headerFile ?? dataSample, ref options, out cols, out error))
1179
_host.Assert(Utils.
Size
(cols) > 0);
1372
if (Utils.
Size
(cols) == 0)
1447
host.CheckDecode(Utils.
Size
(_separators) > 0);
DataLoadSave\Text\TextLoaderCursor.cs (2)
224
if (Utils.
Size
(batch.Infos) == 0)
806
Contracts.Assert(0 <= index && index < Utils.
Size
(infos));
DataLoadSave\Text\TextLoaderParser.cs (3)
865
Contracts.Assert(active == null || Utils.
Size
(active) == _infos.Length);
1367
Contracts.Assert(active == null || Utils.
Size
(active) == _infos.Length);
1460
Contracts.Assert(Utils.
Size
(info.Segments) == 1);
DataLoadSave\TransformerChain.cs (1)
106
if (Utils.
Size
(transformers) == 0)
DataView\AppendRowsDataView.cs (1)
421
_ectx.Assert(Utils.
Size
(counts) > 0);
DataView\ArrayDataViewBuilder.cs (5)
468
if (Utils.
Size
(values) > 0)
503
: base(itemType, values, Utils.
Size
)
509
VBuffer<T>.Copy(src, 0, ref dst, Utils.
Size
(src));
518
: base(itemType, values, Utils.
Size
)
525
var length = Utils.
Size
(src);
DataView\CacheDataView.cs (4)
102
if (Utils.
Size
(prefetch) > 0)
1388
Ctx.Assert((idx + 1) < Utils.
Size
(_indexBoundaries));
1389
Ctx.Assert((idx + 1) < Utils.
Size
(_valueBoundaries));
1390
Ctx.Assert(_uniformLength > 0 || idx < Utils.
Size
(_lengths));
DataView\CompositeRowToRowMapper.cs (2)
36
InnerMappers = Utils.
Size
(mappers) > 0 ? mappers : _empty;
38
OutputSchema = Utils.
Size
(mappers) > 0 ? mappers[mappers.Length - 1].OutputSchema : inputSchema;
DataView\DataViewConstructionUtils.cs (4)
316
var n = Utils.
Size
(buf);
344
var n = Utils.
Size
(buf);
982
var n = Utils.
Size
(value);
994
var n = Utils.
Size
(value);
DataView\SimpleRow.cs (1)
42
Contracts.Check(Utils.
Size
(getters) == schema.Count);
DataView\Transposer.cs (5)
90
_host.CheckParam(Utils.
Size
(columns) > 0, nameof(columns), "Cannot be empty");
207
host.CheckParam(Utils.
Size
(columns) > 0, nameof(columns), "Cannot be empty");
699
Ch.Assert(0 <= _slotCurr && _slotCurr < Utils.
Size
(_cbuff) && _cbuff[_slotCurr].Buffer.Length == _len);
1096
Contracts.Assert(Utils.
Size
(lims) >= 2);
1274
Ch.Assert(Utils.
Size
(activeSplitters) == slicer._splitters.Length);
DataView\TypedCursor.cs (2)
437
if (Utils.
Size
(buf) != value.Length)
459
if (value.Length == Utils.
Size
(buf) && value.IsDense)
DataView\ZipDataView.cs (1)
50
_host.Assert(Utils.
Size
(sources) > 1);
Deprecated\Instances\HeaderSchema.cs (3)
82
return Create(Utils.
Size
(names), names);
91
int size = Math.Min(count, Utils.
Size
(names));
302
int size = Math.Min(Utils.
Size
(names), count);
Deprecated\Vector\VectorUtils.cs (5)
25
Contracts.Check(Utils.
Size
(a) == Utils.
Size
(b), "Arrays must have the same length");
26
Contracts.Check(Utils.
Size
(a) > 0);
32
Contracts.Check(Utils.
Size
(a) == b.Length, "Vectors must have the same dimensionality.");
417
Contracts.Check(Utils.
Size
(a) == b.Length, "Vectors must have the same dimensionality.");
Dirty\PredictionUtils.cs (3)
54
if (Utils.
Size
(extraSettings) == 0)
56
if (Utils.
Size
(settings) == 0)
66
if (Utils.
Size
(args) == 0)
EntryPoints\EntryPointNode.cs (2)
538
if (!string.IsNullOrEmpty(colName) && Utils.
Size
(_entryPoint.InputKinds) > 0 &&
539
(Utils.
Size
(inputKinds) == 0 || _entryPoint.InputKinds.Intersect(inputKinds).Any()))
EntryPoints\TransformModelImpl.cs (1)
93
if (Utils.
Size
(xfs) > 0)
Evaluators\AnomalyDetectionEvaluator.cs (1)
148
bool hasStrats = Utils.
Size
(dictionaries) > 0;
Evaluators\BinaryClassifierEvaluator.cs (2)
250
bool hasStrats = Utils.
Size
(dictionaries) > 0;
574
Host.Assert(Utils.
Size
(classNames) == 2);
Evaluators\ClusteringEvaluator.cs (3)
169
bool hasStrats = Utils.
Size
(dictionaries) > 0;
339
Contracts.Assert(Utils.
Size
(scores) == _numClusters);
340
Contracts.Assert(Utils.
Size
(indices) == _numClusters);
Evaluators\EvaluatorBase.cs (4)
152
for (int i = 0; i < Utils.
Size
(dictionaries); i++)
166
for (int i = 0; i < Utils.
Size
(dictionaries); i++)
183
for (int i = 0; i < Utils.
Size
(dictionaries); i++)
208
if (Utils.
Size
(dictionaries) == 0)
Evaluators\EvaluatorUtils.cs (4)
512
Contracts.Assert(src.Length == Utils.
Size
(map));
536
Contracts.Assert(src.Length == Utils.
Size
(map));
996
ch.Assert(Utils.
Size
(getters) == schema.Count);
997
ch.Assert(Utils.
Size
(vBufferGetters) == schema.Count);
Evaluators\MulticlassClassificationEvaluator.cs (2)
158
bool hasStrats = Utils.
Size
(dictionaries) > 0;
402
Host.Assert(Utils.
Size
(classNames) == scoreVectorSize);
Evaluators\MultiOutputRegressionEvaluator.cs (1)
109
bool hasStrats = Utils.
Size
(dictionaries) > 0;
Evaluators\RankingEvaluator.cs (2)
174
bool hasStrats = Utils.
Size
(dictionaries) > 0;
999
Contracts.Assert(Utils.
Size
(groupMaxDcgCur) == truncationLevel);
Evaluators\RegressionEvaluatorBase.cs (1)
62
bool hasStrats = Utils.
Size
(dictionaries) > 0;
Model\Pfa\PfaUtils.cs (1)
148
Contracts.CheckParam(Utils.
Size
(types) >= 2, nameof(types), "Union must have at least two types");
Prediction\Calibrator.cs (5)
785
Host.CheckParam(Utils.
Size
(outputs) == 2, nameof(outputs), "Expected this to have two outputs");
794
Host.CheckParam(Utils.
Size
(outputs) == 2, nameof(outputs), "Expected this to have two outputs");
1237
_host.CheckDecode(Utils.
Size
(_binProbs) > 0);
1298
_host.Check(Utils.
Size
(outputNames) == 2);
1796
_host.Check(Utils.
Size
(scoreProbablityColumnNames) == 2);
Scorers\BinaryClassifierScorer.cs (1)
285
Contracts.CheckParam(Utils.
Size
(mapperOutputs) >= 1, nameof(mapperOutputs));
Scorers\ClusteringScorer.cs (1)
131
Contracts.Assert(Utils.
Size
(mapperOutputs) == 1);
Scorers\MulticlassClassificationScorer.cs (1)
599
Contracts.Assert(Utils.
Size
(mapperOutputs) == 1);
Scorers\SchemaBindablePredictorWrapper.cs (7)
330
Contracts.Assert(Utils.
Size
(outputNames) == 1); // Score.
346
Contracts.Assert(Utils.
Size
(outputNames) <= 2); // PredictedLabel and/or Score.
437
Contracts.Assert(Utils.
Size
(outputNames) == 2); // Score and prob.
458
Contracts.Assert(Utils.
Size
(outputNames) == 3); // Predicted Label, Score and Probability.
555
Contracts.Assert(Utils.
Size
(active) == 2);
671
Contracts.CheckDecode(Utils.
Size
(_quantiles) > 0);
708
Contracts.Assert(Utils.
Size
(_quantiles) > 0);
Training\TrainerUtils.cs (1)
653
Contracts.Assert(Utils.
Size
(inputs) > 0);
Transforms\ColumnBindingsBase.cs (2)
201
if (string.IsNullOrWhiteSpace(Name) || Utils.
Size
(Source) == 0)
226
if (string.IsNullOrWhiteSpace(Name) || Utils.
Size
(Source) == 0)
Transforms\ColumnConcatenatingTransformer.cs (4)
374
env.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
377
env.CheckUserArg(Utils.
Size
(options.Columns[i].Source) > 0, nameof(options.Columns));
394
env.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
397
env.CheckUserArg(Utils.
Size
(options.Columns[i].Source) > 0, nameof(options.Columns));
Transforms\ColumnSelecting.cs (2)
231
bool keepValid = Utils.
Size
(keepColumns) > 0;
232
bool dropValid = Utils.
Size
(dropColumns) > 0;
Transforms\GenerateNumberTransform.cs (3)
109
Contracts.Assert(Utils.
Size
(useCounter) == InfoCount);
110
Contracts.Assert(Utils.
Size
(states) == InfoCount);
282
Host.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
Transforms\LabelConvertTransform.cs (1)
86
Contracts.Assert(Infos.Length == Utils.
Size
(args.Columns));
Transforms\LabelIndicatorTransform.cs (1)
138
Host.Assert(Infos.Length == Utils.
Size
(options.Columns));
Transforms\MetadataDispatcher.cs (1)
363
Contracts.CheckParam(Utils.
Size
(kindsSrc) >= 2, nameof(kindsSrc));
Transforms\NAFilter.cs (1)
98
Host.CheckUserArg(Utils.
Size
(args.Columns) > 0, nameof(args.Columns));
Transforms\NormalizeColumnDbl.cs (1)
255
Contracts.CheckDecode(Utils.
Size
(curUpperBounds) > 0);
Transforms\NormalizeColumnSng.cs (1)
255
Contracts.CheckDecode(Utils.
Size
(curUpperBounds) > 0);
Transforms\SlotsDroppingTransformer.cs (1)
299
Host.CheckDecode(Utils.
Size
(SlotsMin[i]) > 0);
Transforms\TransformBase.cs (4)
321
Contracts.Assert(Utils.
Size
(infos) == InfoCount);
332
host.CheckUserArg(Utils.
Size
(column) > 0, nameof(column));
502
Host.CheckUserArg(Utils.
Size
(column) > 0, nameof(column));
516
Host.CheckUserArg(Utils.
Size
(column) > 0, nameof(column));
Utils\SequencePool.cs (12)
73
Contracts.CheckDecode(Utils.
Size
(_start) > 0 && _start[0] == 0);
78
if (Utils.
Size
(_bytes) < 40)
134
Contracts.Assert(0 <= _idLim && Math.Max(10, _idLim) <= Utils.
Size
(_start) - 1);
135
Contracts.Assert(Math.Max(10, _idLim) <= Utils.
Size
(_hash));
136
Contracts.Assert(Math.Max(10, _idLim) <= Utils.
Size
(_next));
138
Contracts.Assert(0 <= _start[_idLim] && Math.Max(40, _start[_idLim]) <= Utils.
Size
(_bytes));
155
Contracts.Assert(0 <= min && min <= lim && lim <= Utils.
Size
(sequence));
200
Contracts.Check(0 <= min && min <= lim && lim <= Utils.
Size
(sequence));
221
Contracts.Check(0 <= min && min <= lim && lim <= Utils.
Size
(sequence));
232
Contracts.Assert(0 <= min && min <= lim && lim <= Utils.
Size
(sequence));
347
Contracts.Assert(0 <= min && min <= lim && lim <= Utils.
Size
(bytes));
353
if (Utils.
Size
(sequence) <= count)
Microsoft.ML.Ensemble (25)
EntryPoints\CreateEnsemble.cs (5)
335
dataSerialized = new byte[Utils.
Size
(entries)][];
336
dataZipEntryNames = new string[Utils.
Size
(entries)];
337
for (int i = 0; i < Utils.
Size
(entries); i++)
383
ch.Check(dataSerialized.Length == Utils.
Size
(entries));
389
if (Utils.
Size
(buffer) < len)
OutputCombiners\BaseMultiAverager.cs (2)
28
Host.Assert(weights == null || Utils.
Size
(weights) == Utils.
Size
(src));
OutputCombiners\Median.cs (2)
84
_host.Assert(weights == null || Utils.
Size
(weights) == Utils.
Size
(src));
OutputCombiners\MultiMedian.cs (3)
75
Host.Assert(weights == null || Utils.
Size
(weights) == Utils.
Size
(src));
87
if (Utils.
Size
(raw) < count)
OutputCombiners\MultiVoting.cs (3)
75
Host.Assert(weights == null || Utils.
Size
(weights) == Utils.
Size
(src));
77
int count = Utils.
Size
(src);
OutputCombiners\Voting.cs (3)
79
_host.Assert(weights == null || Utils.
Size
(weights) == Utils.
Size
(src));
81
int len = Utils.
Size
(src);
Trainer\EnsembleModelParametersBase.cs (2)
32
Host.Check(Utils.
Size
(models) > 0, "Ensemble was created with no models.");
115
int numMetrics = Utils.
Size
(model.Metrics);
Trainer\EnsembleTrainerBase.cs (5)
85
ch.CheckUserArg(Utils.
Size
(predictorFactories) > 0, nameof(EnsembleTrainer.Arguments.BasePredictors), "This should have at-least one value");
92
if (Utils.
Size
(predictorFactories) > NumModels)
186
if (modelSize < Utils.
Size
(Trainers))
187
ch.Warning("{0} of {1} trainings failed.", Utils.
Size
(Trainers) - modelSize, Utils.
Size
(Trainers));
Microsoft.ML.EntryPoints (4)
CrossValidationMacro.cs (2)
382
env.Assert(Utils.
Size
(perInst) == 1);
388
if (Utils.
Size
(input.ConfusionMatrix) > 0)
FeatureCombiner.cs (1)
30
if (Utils.
Size
(Features) > 0)
JsonUtils\JsonManifestUtils.cs (1)
107
if (Utils.
Size
(componentInfo.Aliases) > 0)
Microsoft.ML.FastTree (60)
BinFile\BinFinder.cs (1)
197
Contracts.Assert(0 <= numDistinct && numDistinct <= Utils.
Size
(distinctCounts));
Dataset\Dataset.cs (2)
509
Contracts.Check(Utils.
Size
(MaxDcg) == 0 || Utils.
Size
(MaxDcg[0]) == QueryIds.Length, "Length of MaxDCG does not match number of queries");
Dataset\FeatureFlock.cs (5)
112
Contracts.Assert(active == null || (0 <= featureOffset && featureOffset <= Utils.
Size
(active) - Flock.Count));
1168
: base(Utils.
Size
(hotFeatureStarts) - 1, categorical)
1172
Contracts.Assert(Utils.
Size
(hotFeatureStarts) == binUpperBounds.Length + 1); // One more than number of features.
1181
Contracts.Assert(AllBinUpperBounds.All(x => Utils.
Size
(x) >= 1));
1251
Contracts.Assert(active == null || (0 <= featureOffset && featureOffset <= Utils.
Size
(active) - Flock.Count));
Dataset\SingletonFeatureFlock.cs (1)
130
Contracts.Assert(active == null || (0 <= featureOffset && featureOffset <= Utils.
Size
(active) - Flock.Count));
FastTree.cs (9)
943
Host.Assert(Utils.
Size
(binUpperBounds) == NumFeatures);
1193
ch.Assert(Utils.
Size
(binUpperBounds) > 0);
1501
Contracts.Assert(Utils.
Size
(bup) > 0);
2079
ch.Assert(Utils.
Size
(bup) > 0);
2117
Contracts.Assert(Utils.
Size
(bup) > 0);
2231
Contracts.Assert(Utils.
Size
(bup) > 0);
2554
Contracts.Assert(Utils.
Size
(binUpperBounds) > 0);
3041
Host.Check(Utils.
Size
(outputNames) >= 1);
3107
string scoreVarName = (Utils.
Size
(outputNames) >= 2) ? outputNames[1] : outputNames[0]; // Get Score from PredictedLabel and/or Score columns
FastTreeRanking.cs (1)
411
if (Utils.
Size
(dataset.MaxDcg) == 0)
GamModelParameters.cs (2)
138
Host.CheckDecode(Utils.
Size
(_binEffects[i]) >= 1);
236
Host.CheckParam(Utils.
Size
(bins) == NumberOfShapeFunctions, nameof(bins));
Training\DcgCalculator.cs (4)
161
if (Utils.
Size
(dataset.MaxDcg) < 3)
263
if (Utils.
Size
(dataset.MaxDcg) < 1)
281
if (Utils.
Size
(dataset.MaxDcg) < 3)
302
if (Utils.
Size
(dataset.MaxDcg) < 1)
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (2)
899
+ sizeof(FloatType) * Utils.
Size
(Weights)
900
+ sizeof(int) * Utils.
Size
(FlockToBestFeature);
TreeEnsemble\InternalRegressionTree.cs (17)
179
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(splitFeatures), nameof(splitFeatures), "Size error, should equal to numLeaves - 1.");
180
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(splitGain), nameof(splitGain), "Size error, should equal to numLeaves - 1.");
181
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(rawThresholds), nameof(rawThresholds), "Size error, should equal to numLeaves - 1.");
182
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(lteChild), nameof(lteChild), "Size error, should equal to numLeaves - 1.");
183
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(gtChild), nameof(gtChild), "Size error, should equal to numLeaves - 1.");
184
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(defaultValueForMissing), nameof(defaultValueForMissing), "Size error, should equal to numLeaves - 1.");
185
Contracts.CheckParam(numLeaves == Utils.
Size
(leafValues), nameof(leafValues), "Size error, should equal to numLeaves.");
186
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(categoricalSplitFeatures), nameof(categoricalSplitFeatures), "Size error, should equal to numLeaves - 1.");
187
Contracts.CheckParam(numLeaves - 1 == Utils.
Size
(categoricalSplit), nameof(categoricalSplit), "Size error, should equal to numLeaves - 1.");
197
Contracts.CheckParam(Utils.
Size
(splitFeatures) > 0, nameof(splitFeatures), "Number of split features must be positive");
199
NumLeaves = Utils.
Size
(splitFeatures) + 1;
438
int numMaxNodes = Utils.
Size
(LteChild);
496
checker(Utils.
Size
(Thresholds) == 0 || Thresholds.Length == numMaxNodes, "bad threshold length");
497
checker(Utils.
Size
(RawThresholds) == 0 || RawThresholds.Length == NumLeaves - 1, "bad rawthreshold length");
500
checker(Utils.
Size
(_splitGain) == 0 || _splitGain.Length == numMaxNodes, "bad splitgain length");
501
checker(Utils.
Size
(_gainPValue) == 0 || _gainPValue.Length == numMaxNodes, "bad gainpvalue length");
502
checker(Utils.
Size
(_previousLeafValue) == 0 || _previousLeafValue.Length == numMaxNodes, "bad previous leaf value length");
TreeEnsembleFeaturizer.cs (2)
346
_ectx.Assert(Utils.
Size
(_leafIds) == _numTrees);
347
_ectx.Assert(Utils.
Size
(_pathIds) == _numTrees);
Utils\ToByteArrayExtensions.cs (14)
257
return checked(sizeof(int) + Utils.
Size
(a) * sizeof(byte));
281
return checked(sizeof(int) + Utils.
Size
(a) * sizeof(short));
314
return checked(sizeof(int) + Utils.
Size
(a) * sizeof(ushort));
347
return checked(sizeof(int) + Utils.
Size
(array) * sizeof(int));
352
int length = Utils.
Size
(a);
385
return checked(sizeof(int) + Utils.
Size
(array) * sizeof(uint));
418
return checked(sizeof(int) + Utils.
Size
(array) * sizeof(long));
451
return checked(sizeof(int) + Utils.
Size
(array) * sizeof(ulong));
484
return checked(sizeof(int) + Utils.
Size
(array) * sizeof(float));
517
return checked(sizeof(int) + Utils.
Size
(array) * sizeof(double));
550
if (Utils.
Size
(array) == 0)
580
for (int i = 0; i < Utils.
Size
(array); ++i)
589
Utils.
Size
(a).ToByteArray(buffer, ref position);
590
for (int i = 0; i < Utils.
Size
(a); ++i)
Microsoft.ML.KMeansClustering (1)
KMeansModelParameters.cs (1)
79
Host.CheckParam(Utils.
Size
(centroids) >= k, nameof(centroids), "Not enough centroids for predictor initialization");
Microsoft.ML.Mkl.Components (4)
OlsLinearRegression.cs (3)
787
Contracts.Assert(Utils.
Size
(standardErrors) == weights.Length + 1);
788
Contracts.Assert(Utils.
Size
(tValues) == weights.Length + 1);
789
Contracts.Assert(Utils.
Size
(pValues) == weights.Length + 1);
VectorWhitening.cs (1)
238
ectx.CheckDecode(Utils.
Size
(model) == valueCount * valueCount, "Invalid model size.");
Microsoft.ML.PCA (1)
PcaTrainer.cs (1)
302
host.Assert(Utils.
Size
(y) == omega.Length); // Size of Y and Omega: dimension x oversampled rank
Microsoft.ML.Predictor.Tests (3)
CmdLine\CmdLine.cs (1)
229
if (Utils.
Size
(nest) > 0)
TestPredictors.cs (2)
682
int predCount = Utils.
Size
(fastTrees);
846
var predCount = Utils.
Size
(predictors);
Microsoft.ML.Recommender (3)
MatrixFactorizationPredictor.cs (3)
184
_host.Check(Utils.
Size
(_leftFactorMatrix) == NumberOfRows * ApproximationRank, "Unexpected matrix size of a factor matrix (matrix P in LIBMF paper)");
185
_host.Check(Utils.
Size
(_rightFactorMatrix) == NumberOfColumns * ApproximationRank, "Unexpected matrix size of a factor matrix (matrix Q in LIBMF paper)");
395
_env.Assert(Utils.
Size
(active) == OutputSchema.Count);
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
435
if (Utils.
Size
(chainArgs.Commands) == 0)
Microsoft.ML.StandardTrainers (52)
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (6)
82
Host.Assert(Utils.
Size
(linearWeights) == featureCount);
84
Host.Assert(Utils.
Size
(latentWeights) == checked(featureCount * fieldCount * LatentDimAligned));
117
Host.Assert(Utils.
Size
(linearWeights) == featureCount);
151
Host.CheckDecode(Utils.
Size
(linearWeights) == featureCount);
153
Host.CheckDecode(Utils.
Size
(latentWeights) == featureCount * fieldCount * latentDim);
205
Host.Assert(Utils.
Size
(_linearWeights) == FeatureCount);
LdSvm\LdSvmTrainer.cs (12)
408
Host.Assert(Utils.
Size
(tempW) == count);
409
Host.Assert(Utils.
Size
(w) == count);
410
Host.Assert(Utils.
Size
(theta) == half);
411
Host.Assert(Utils.
Size
(thetaPrime) == count);
412
Host.Assert(Utils.
Size
(biasW) == count);
413
Host.Assert(Utils.
Size
(biasTheta) == half);
414
Host.Assert(Utils.
Size
(biasThetaPrime) == count);
415
Host.Assert(Utils.
Size
(tempThetaPrime) == count);
416
Host.Assert(Utils.
Size
(tempTheta) == half);
417
Host.Assert(Utils.
Size
(tempBiasW) == count);
418
Host.Assert(Utils.
Size
(tempBiasTheta) == half);
419
Host.Assert(Utils.
Size
(tempBiasThetaPrime) == count);
Optimizer\LineSearch.cs (1)
480
vec = new VBuffer<float>(Utils.
Size
(values), values);
Standard\LinearModelParameters.cs (4)
139
Host.Check(Utils.
Size
(outputs) >= 1);
145
string scoreVarName = (Utils.
Size
(outputs) >= 2) ? outputs[1] : outputs[0]; // Get Score from PredictedLabel and/or Score columns
195
Host.CheckDecode(Utils.
Size
(weights) == 0 || weights.All(x => FloatUtils.IsFinite(x)));
200
Weight = new VBuffer<float>(len, Utils.
Size
(weights), weights, indices);
Standard\LogisticRegression\LbfgsPredictorBase.cs (3)
807
Contracts.Assert(Utils.
Size
(_ranges) == _numChunks + 1);
808
Contracts.Assert(Utils.
Size
(_localLosses) == _numChunks);
809
Contracts.Assert(Utils.
Size
(_localGradients) + 1 == _numChunks);
Standard\LogisticRegression\MulticlassLogisticRegression.cs (6)
247
if (Utils.
Size
(scores) < _numClasses)
509
Contracts.Check(Utils.
Size
(weights) == NumberOfClasses);
510
Contracts.Check(Utils.
Size
(bias) == NumberOfClasses);
601
Weights[i] = new VBuffer<float>(NumberOfFeatures, Utils.
Size
(values), values, indices[i]);
1073
Host.CheckDecode(0 <= id && id < Utils.
Size
(ctx.Strings));
1086
Contracts.Assert(Utils.
Size
(_labelNames) == NumberOfClasses);
Standard\MulticlassClassification\OneVersusAllTrainer.cs (2)
360
Host.Assert(Utils.
Size
(impl.Predictors) > 0);
689
Contracts.Check(Utils.
Size
(predictors) > 0);
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (2)
265
Host.Assert(Utils.
Size
(predictors) > 0);
273
Host.Assert(Utils.
Size
(predictors[i]) == i + 1);
Standard\SdcaBinary.cs (6)
545
Contracts.Assert(Utils.
Size
(invariants) > 0);
963
Contracts.Assert(Utils.
Size
(metrics) == 6);
1527
Host.CheckParam(Utils.
Size
(weights) == 1, nameof(weights));
1528
Host.CheckParam(Utils.
Size
(bias) == 1, nameof(bias));
1815
Host.CheckParam(Utils.
Size
(weights) == 1, nameof(weights));
1816
Host.CheckParam(Utils.
Size
(bias) == 1, nameof(bias));
Standard\SdcaMulticlass.cs (7)
183
int numClasses = Utils.
Size
(weights);
184
Contracts.Assert(Utils.
Size
(biasReg) == numClasses);
185
Contracts.Assert(Utils.
Size
(biasUnreg) == numClasses);
362
Contracts.Assert(Utils.
Size
(weights) == numClasses);
363
Contracts.Assert(Utils.
Size
(biasReg) == numClasses);
364
Contracts.Assert(Utils.
Size
(biasUnreg) == numClasses);
365
Contracts.Assert(Utils.
Size
(metrics) == 6);
Standard\SdcaRegression.cs (2)
146
Host.CheckParam(Utils.
Size
(weights) == 1, nameof(weights));
147
Host.CheckParam(Utils.
Size
(bias) == 1, nameof(bias));
Standard\Simple\SimpleTrainers.cs (1)
406
Host.Check(Utils.
Size
(outputs) >= 3);
Microsoft.ML.Sweeper (6)
Algorithms\KdoSweeper.cs (2)
100
_host.CheckUserArg(Utils.
Size
(options.SweptParameters) > 0, nameof(options.SweptParameters), "KDO sweeper needs at least one parameter to sweep over");
159
_host.Assert(Utils.
Size
(previousRuns) > 1);
Algorithms\SmacSweeper.cs (1)
82
_host.CheckUserArg(Utils.
Size
(options.SweptParameters) > 0, nameof(options.SweptParameters), "SMAC sweeper needs at least one parameter to sweep over");
AsyncSweeper.cs (2)
120
if (Utils.
Size
(paramSets) > 0)
221
if (Utils.
Size
(paramSets) == 0)
SweepCommand.cs (1)
92
if (Utils.
Size
(sweeps) == 0)
Microsoft.ML.TensorFlow (2)
TensorflowUtils.cs (2)
92
if (!(Utils.
Size
(dimensions) == 1 && dimensions[0] <= 0) &&
93
(Utils.
Size
(dimensions) > 0 && dimensions.Skip(1).All(x => x > 0)))
Microsoft.ML.TestFramework (4)
SubComponent.cs (1)
220
if (Utils.
Size
(src._settings) == 0)
TestCommandBase.cs (3)
90
if (Utils.
Size
(many) == 0)
208
Contracts.Assert((argUsage == Usage.None) != (Utils.
Size
(names) >= 1));
380
Contracts.Assert(Utils.
Size
(toCompare) == 0 || toCompare.All(x => x != null));
Microsoft.ML.TimeSeries (51)
AdaptiveSingularSpectrumSequenceModeler.cs (24)
388
_host.CheckDecode(Utils.
Size
(_alpha) == _windowSize - 1);
393
_host.CheckDecode(Utils.
Size
(_state) == _windowSize - 1);
433
_host.CheckDecode(Utils.
Size
(tempArray) == _rank * _windowSize);
459
_host.Assert(Utils.
Size
(_alpha) == _windowSize - 1);
527
Contracts.Assert(Utils.
Size
(singularVectors) >= tMat.WindowSize * rank);
528
Contracts.Assert(Utils.
Size
(output) >= tMat.SeriesLength);
551
Contracts.Assert(Utils.
Size
(singularVectors) >= tMat.WindowSize * rank);
554
Contracts.Assert(Utils.
Size
(output) >= len);
597
Contracts.Assert(Utils.
Size
(alpha) > 0);
598
Contracts.Assert(Utils.
Size
(signal) > 2 * Utils.
Size
(alpha)); // To assure that the autoregression noise variance is unbiased.
599
Contracts.Assert(Utils.
Size
(series) >= Utils.
Size
(signal) + startIndex);
601
var signalLength = Utils.
Size
(signal);
602
var windowSize = Utils.
Size
(alpha) + 1;
646
Contracts.Assert(Utils.
Size
(series) >= tMat.SeriesLength);
647
Contracts.Assert(Utils.
Size
(outputSignal) >= tMat.SeriesLength);
648
Contracts.Assert(Utils.
Size
(singularVectors) >= tMat.WindowSize * tMat.WindowSize);
649
Contracts.Assert(Utils.
Size
(singularValues) >= tMat.WindowSize);
741
Contracts.Assert(Utils.
Size
(series) >= tMat.SeriesLength);
742
Contracts.Assert(Utils.
Size
(singularVectors) >= tMat.WindowSize * tMat.WindowSize);
743
Contracts.Assert(Utils.
Size
(singularValues) >= tMat.WindowSize);
839
if (Utils.
Size
(_alpha) == 1)
1253
_host.Assert(Utils.
Size
(dataArray) > 0);
EigenUtils.cs (1)
515
Contracts.Check(Utils.
Size
(input) >= n2, "The input matrix must at least have " + n2 + " elements");
MovingAverageTransform.cs (3)
77
throw Host.ExceptUserArg(nameof(args.Weights), string.Format("{0} weights are provided, but {1} are expected (or none)'", Utils.
Size
(_weights), args.WindowSize));
93
Host.CheckDecode(_weights == null || Utils.
Size
(_weights) == WindowSize + 1 - _lag);
111
Host.Assert(_weights == null || Utils.
Size
(_weights) == WindowSize + 1 - _lag);
PolynomialUtils.cs (7)
44
Contracts.Assert(Utils.
Size
(coefficients) > 1);
48
if (Utils.
Size
(companionMatrix) < n2)
73
Contracts.CheckParam(Utils.
Size
(coefficients) >= 1, nameof(coefficients), "There must be at least one input coefficient.");
81
if (Utils.
Size
(roots) < n)
201
Contracts.Assert(dstIndex + uLen + vLen <= Utils.
Size
(destination));
281
Contracts.CheckParam(Utils.
Size
(roots) > 0, nameof(roots), "There must be at least 1 input root.");
376
if (Utils.
Size
(coefficients) < n)
TrajectoryMatrix.cs (16)
137
_ectx.Check(Utils.
Size
(data) >= _seriesLength, "The length of the input series cannot be less than that of the original series.");
192
_ectx.Assert(Utils.
Size
(cov) >= _windowSize * _windowSize);
266
_ectx.Assert(Utils.
Size
(vector) >= _k + srcIndex);
267
_ectx.Assert(Utils.
Size
(result) >= _windowSize + dstIndex);
296
_ectx.Assert(Utils.
Size
(vector) >= _k + srcIndex);
297
_ectx.Assert(Utils.
Size
(result) >= _windowSize + dstIndex);
370
_ectx.Assert(Utils.
Size
(vector) >= _windowSize + srcIndex);
371
_ectx.Assert(Utils.
Size
(result) >= _k + dstIndex);
400
_ectx.Assert(Utils.
Size
(vector) >= _windowSize + srcIndex);
401
_ectx.Assert(Utils.
Size
(result) >= _k + dstIndex);
501
_ectx.Assert(Utils.
Size
(u) >= _windowSize + uIndex);
502
_ectx.Assert(Utils.
Size
(v) >= _k + vIndex);
503
_ectx.Assert(Utils.
Size
(result) >= len + dstIndex);
572
_ectx.Assert(Utils.
Size
(u) >= _windowSize + uIndex);
573
_ectx.Assert(Utils.
Size
(v) >= _k + vIndex);
574
_ectx.Assert(Utils.
Size
(result) >= len + dstIndex);
Microsoft.ML.Transforms (101)
CountFeatureSelection.cs (5)
138
_host.CheckUserArg(Utils.
Size
(columns) > 0, nameof(columns));
233
host.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
245
Contracts.Assert(Utils.
Size
(scores) == size);
247
Contracts.Assert(Utils.
Size
(columnOptions) == size);
297
env.CheckParam(Utils.
Size
(columns) > 0, nameof(columns));
Dracula\CMCountTable.cs (3)
50
: base(Utils.
Size
(tables), priorCounts, 0, null)
54
Contracts.Assert(Utils.
Size
(tables[0]) == depth);
58
Contracts.Check(tables.All(x => Utils.
Size
(x) == Depth), "Depth must be the same for all labels");
Dracula\CountTable.cs (6)
97
env.CheckDecode(Utils.
Size
(_priorFrequencies) == LabelCardinality);
105
env.CheckDecode(Utils.
Size
(_garbageCounts) == 0);
108
env.CheckDecode(Utils.
Size
(_garbageCounts) == LabelCardinality);
128
Contracts.Assert(Utils.
Size
(_priorFrequencies) == LabelCardinality);
136
Contracts.Assert(Utils.
Size
(_garbageCounts) == 0);
139
Contracts.Assert(Utils.
Size
(_garbageCounts) == LabelCardinality);
Dracula\CountTableTransformer.cs (3)
447
Host.Assert(Utils.
Size
(seeds) == featurizer.ColCount);
467
env.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
574
ctx.Writer.Write(Utils.
Size
(_labelClassNames));
Dracula\CountTargetEncodingTransformer.cs (2)
170
_host.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns), "Columns must be specified");
280
env.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
Dracula\Featurizer.cs (1)
127
Contracts.Check(Utils.
Size
(classNames) == _labelBinCount, "incorrect class names");
Dracula\MultiCountTable.cs (2)
95
_host.Check(Utils.
Size
(inputCols) == n, "Inconsistent number of columns");
264
_host.Check(Utils.
Size
(inputCols) == table.ColCount, "Inconsistent number of columns");
Expression\BuiltinFunctions.cs (1)
372
Contracts.CheckParam(Utils.
Size
(values) > 0, nameof(values), "Expected values to have positive length");
Expression\CodeGen.cs (2)
1251
if (Utils.
Size
(ps) > 0 && (type = ps[ps.Length - 1].ParameterType).IsArray)
1284
Contracts.Assert(Utils.
Size
(ps) == node.Args.Items.Length);
Expression\Error.cs (1)
39
if (Utils.
Size
(Args) > 0)
Expression\LambdaBinder.cs (1)
1312
if (Utils.
Size
(meths) == 0)
Expression\LambdaParser.cs (2)
157
Contracts.Assert(Utils.
Size
(perm) == types.Length);
167
Contracts.Assert(Utils.
Size
(perm) == types.Length);
Expression\Node.cs (2)
1054
if (Utils.
Size
(ps) > 0 && ps[ps.Length - 1].ParameterType.IsArray)
1061
Contracts.Assert(Utils.
Size
(ps) == argCount);
Expression\TokKind.cs (1)
174
Contracts.Assert(carg == Utils.
Size
(args));
ExpressionTransformer.cs (5)
81
_host.Check(columns.All(col => Utils.
Size
(col.InputColumnNames) > 0));
82
_host.CheckParam(columns.All(col => Utils.
Size
(col.InputColumnNames) <= 5), nameof(ColumnOptions.InputColumnNames), "maximum number of inputs exceeded");
261
ectx.Assert(Utils.
Size
(inputTypes) == Utils.
Size
(inputColumnNames));
323
Utils.
Size
(options.Column[i].Source) == 0 ? new[] { options.Column[i].Name } : options.Column[i].Source,
GroupTransform.cs (1)
114
Host.CheckUserArg(Utils.
Size
(options.GroupKeys) > 0, nameof(options.GroupKeys), "There must be at least one group key");
HashJoiningTransform.cs (7)
137
if (Utils.
Size
(SlotMap) <= 1)
202
Host.Assert(Infos.Length == Utils.
Size
(args.Columns));
262
Host.CheckDecode(Utils.
Size
(slotMap[j]) > 0); // null array could be returned by the call above
317
ctx.Writer.Write(Utils.
Size
(ex.SlotMap));
340
Host.Assert(Utils.
Size
(slotMap) >= 1);
398
if (Utils.
Size
(ex.SlotMap) <= 1)
579
Host.Assert(Utils.
Size
(_exes[iinfo].SlotMap) == 1);
LoadTransform.cs (2)
76
bool complement = args.Complement || Utils.
Size
(args.Tags) == 0;
78
for (int i = 0; i < Utils.
Size
(args.Tags); i++)
MissingValueHandlingTransformer.cs (1)
139
h.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
MissingValueIndicatorTransform.cs (1)
80
Host.Assert(Infos.Length == Utils.
Size
(args.Columns));
MutualInformationFeatureSelection.cs (4)
135
_host.CheckUserArg(Utils.
Size
(columns) > 0, nameof(columns));
326
Contracts.Assert(Utils.
Size
(scores) == size);
327
Contracts.Assert(Utils.
Size
(cols) == size);
687
if (Utils.
Size
(_contingencyTable[0]) < numFeatures)
OneHotEncoding.cs (1)
100
h.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
OneHotHashEncoding.cs (1)
149
h.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns));
OptionalColumnTransform.cs (3)
59
Contracts.Assert(Utils.
Size
(columnTypes) == InfoCount);
60
Contracts.Assert(Utils.
Size
(srcCols) == InfoCount);
279
Host.CheckUserArg(Utils.
Size
(args.Columns) > 0, nameof(args.Columns));
Text\NgramHashingTransformer.cs (3)
553
Host.Assert(0 <= lim && lim <= Utils.
Size
(ngram));
554
Host.Assert(Utils.
Size
(ngram) == ngramLength);
795
Contracts.Assert(Utils.
Size
(srcNames) == srcIndices.Length);
Text\NgramTransform.cs (17)
71
if (NgramLength != null || UseAllLengths != null || SkipLength != null || Utils.
Size
(MaxNumTerms) != 0)
181
Contracts.Assert(Utils.
Size
(NonEmptyLevels) == NgramLength);
304
for (int i = 0; i < Utils.
Size
(invDocFreqs[iinfo]); i++)
342
env.Assert(lims.Count == Utils.
Size
(counts));
349
env.Assert(0 < lim && lim <= Utils.
Size
(ngram));
350
env.Assert(lim <= Utils.
Size
(counts));
401
for (int j = 0; j < Utils.
Size
(_invDocFreqs[i]); j++)
423
var maxNumTerms = Utils.
Size
(item.MaxNumTerms) > 0 ? item.MaxNumTerms : options.MaxNumTerms;
661
Host.Assert(0 < lim && lim <= Utils.
Size
(ngram));
662
Host.Assert(lim <= Utils.
Size
(_parent._transformInfos[iinfo].NonEmptyLevels));
1051
Contracts.CheckUserArg(Utils.
Size
(maximumNgramsCounts) == 0 ||
1052
Utils.
Size
(maximumNgramsCounts) == 1 && maximumNgramsCounts[0] > 0, nameof(maximumNgramsCounts));
1053
limits[ngramLength - 1] = Utils.
Size
(maximumNgramsCounts) == 0 ? Defaults.MaximumNgramsCount : maximumNgramsCounts[0];
1057
Contracts.CheckUserArg(Utils.
Size
(maximumNgramsCounts) <= ngramLength, nameof(maximumNgramsCounts));
1058
Contracts.CheckUserArg(Utils.
Size
(maximumNgramsCounts) == 0 || maximumNgramsCounts.All(i => i >= 0) && maximumNgramsCounts[maximumNgramsCounts.Length - 1] > 0, nameof(maximumNgramsCounts));
1059
var extend = Utils.
Size
(maximumNgramsCounts) == 0 ? Defaults.MaximumNgramsCount : maximumNgramsCounts[maximumNgramsCounts.Length - 1];
1060
limits = Utils.BuildArray(ngramLength, i => i < Utils.
Size
(maximumNgramsCounts) ? maximumNgramsCounts[i] : extend);
Text\SentimentAnalyzingTransform.cs (1)
139
if (Utils.
Size
(hiddenNames) == 0)
Text\StopWordsRemovingTransformer.cs (4)
321
Contracts.Assert(0 <= (int)lang && (int)lang < Utils.
Size
(StopWords));
501
Contracts.Assert(0 <= langVal && langVal < Utils.
Size
(StopWords));
737
if (Utils.
Size
(Stopwords) > 0)
1044
if (Utils.
Size
(options.Stopwords) > 0)
Text\TextCatalog.cs (1)
66
outputColumnName, Utils.
Size
(inputColumnNames) == 0 ? new[] { outputColumnName } : inputColumnNames,
Text\WordBagTransform.cs (10)
90
if (NgramLength != null || SkipLength != null || UseAllLengths != null || Utils.
Size
(MaxNumTerms) > 0 ||
115
h.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns), "Columns must be specified");
145
h.CheckUserArg(Utils.
Size
(column.Source) > 0, nameof(column.Source));
394
if (NgramLength != null || SkipLength != null || UseAllLengths != null || Utils.
Size
(MaxNumTerms) > 0 ||
462
h.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns), "Columns must be specified");
499
maximumNumberOfKeys: Utils.
Size
(column.MaxNumTerms) > 0 ? column.MaxNumTerms[0] :
500
Utils.
Size
(options.MaxNumTerms) > 0 ? options.MaxNumTerms[0] :
554
Contracts.Check(Utils.
Size
(cols[i].Source) == 1, "too many source columns");
687
env.CheckUserArg(Utils.
Size
(col.Source) > 0, nameof(col.Source));
712
env.CheckUserArg(Utils.
Size
(col.Source) > 0 &&
Text\WordHashBagProducingTransform.cs (4)
92
h.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns), "Columns must be specified");
328
h.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns), "Columns must be specified");
346
h.CheckUserArg(Utils.
Size
(column.Source) > 0 &&
386
h.CheckUserArg(Utils.
Size
(cols) > 0, nameof(Options.Columns), "Must be specified");
Text\WordTokenizing.cs (1)
141
Contracts.CheckDecode(Utils.
Size
(separators) > 0);
Text\WrappedTextTransformers.cs (1)
176
_host.CheckUserArg(Utils.
Size
(inputColumnName) > 0, nameof(columns));
UngroupTransform.cs (1)
113
Host.CheckUserArg(Utils.
Size
(options.Columns) > 0, nameof(options.Columns), "There must be at least one pivot column");