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