1 implementation of Rand
Microsoft.ML.Core (1)
Environment\HostEnvironmentBase.cs (1)
122public Random Rand => _rand;
48 references to Rand
Microsoft.ML.Data (10)
DataLoadSave\Binary\BinarySaver.cs (1)
740Random rand = data.CanShuffle ? new TauswortheHybrid(_host.Rand) : null;
Evaluators\AnomalyDetectionEvaluator.cs (1)
466_aucAggregator = new UnweightedAucAggregator(Host.Rand, reservoirSize);
Evaluators\BinaryClassifierEvaluator.cs (5)
586_aucAggregator = new WeightedAucAggregator(Host.Rand, aucReservoirSize); 588AuPrcAggregator = new WeightedAuPrcAggregator(Host.Rand, auPrcReservoirSize); 592_aucAggregator = new UnweightedAucAggregator(Host.Rand, aucReservoirSize); 594AuPrcAggregator = new UnweightedAuPrcAggregator(Host.Rand, auPrcReservoirSize); 606_prCurveReservoir = new ReservoirSamplerWithoutReplacement<RocInfo>(Host.Rand, prCount, prSampleGetter);
Evaluators\EvaluatorUtils.cs (1)
1408var tempPerm = Utils.GetRandomPermutation(host.Rand, labelNames.Length);
Transforms\BootstrapSamplingTransformer.cs (1)
85_state = new TauswortheHybrid.State(options.Seed ?? (uint)Host.Rand.Next());
Transforms\RowShufflingTransformer.cs (1)
124_forceShuffleSeed = options.ForceShuffleSeed ?? Host.Rand.NextSigned();
Microsoft.ML.Ensemble (2)
Trainer\EnsembleTrainerBase.cs (2)
141foreach (var batch in _subsetSelector.GetBatches(Host.Rand)) 147Parallel.ForEach(_subsetSelector.GetSubsets(batch, Host.Rand),
Microsoft.ML.FastTree (2)
SumupPerformanceCommand.cs (2)
159int salt = _host.Rand.Next(); 317InitSumupInputData(data, partition, _host.Rand);
Microsoft.ML.KMeansClustering (3)
KMeansPlusPlusTrainer.cs (3)
415host.Rand.NextSingle() < probabilityWeight / cumulativeWeight) 1731Random rand = RandomUtils.Create(baseHost.Rand); 1746reducer(buffer, baseHost.Rand, ref result);
Microsoft.ML.LightGbm (3)
LightGbmTrainerBase.cs (3)
273res["seed"] = (Seed.HasValue) ? Seed : host.Rand.Next(); 918var rand = Host.Rand; 1008var rand = Host.Rand;
Microsoft.ML.Mkl.Components (1)
SymSgdClassificationTrainer.cs (1)
576_cursor = _cursorFactory.Create(RandomUtils.Create(host.Rand.Next()));
Microsoft.ML.PCA (3)
PcaTrainer.cs (2)
169_seed = options.Seed ?? Host.Rand.Next(); 176_seed = seed ?? Host.Rand.Next();
PcaTransformer.cs (1)
309var rnd = columns[iinfo].Seed == null ? Host.Rand : new Random(columns[iinfo].Seed.Value);
Microsoft.ML.StandardTrainers (15)
FactorizationMachine\FactorizationMachineTrainer.cs (2)
307var rng = _host.Rand; 456var rng = shuffle ? _host.Rand : null;
LdSvm\LdSvmTrainer.cs (9)
236var sample = data.SampleForGammaUpdate(Host.Rand); 240int thetaIdx = Host.Rand.Next(numLeaf - 1); 313var sample = data.SampleExamples(Host.Rand); 430wInit.Values[j] = 2 * Host.Rand.NextSingle() - 1; 431thetaPrimeInit.Values[j] = 2 * Host.Rand.NextSingle() - 1; 433thetaInit.Values[j] = 2 * Host.Rand.NextSingle() - 1; 443float bW = 2 * Host.Rand.NextSingle() - 1; 446float bTP = 2 * Host.Rand.NextSingle() - 1; 459float bT = 2 * Host.Rand.NextSingle() - 1;
Standard\LogisticRegression\LbfgsPredictorBase.cs (1)
331initWeights[j] = InitWtsDiameter * (Host.Rand.NextSingle() - 0.5f);
Standard\Online\OnlineLinear.cs (1)
322var rand = shuffle ? Host.Rand : null;
Standard\SdcaBinary.cs (2)
563rands[i] = RandomUtils.Create(Host.Rand.Next()); 2115rands[e - 1] = RandomUtils.Create(Host.Rand.Next());
Microsoft.ML.Sweeper (5)
Algorithms\Grid.cs (3)
132_permutation = Utils.GetRandomPermutation(Host.Rand, _nGridPoints); 149_permutation = Utils.GetRandomPermutation(Host.Rand, _nGridPoints); 184return new ParameterSet(SweepParameters.Select(sweepParameter => sweepParameter[Host.Rand.Next(sweepParameter.Count)]));
Algorithms\Random.cs (1)
34return new ParameterSet(SweepParameters.Select(sweepParameter => sweepParameter.CreateFromNormalized(Host.Rand.NextDouble())));
Algorithms\SweeperProbabilityUtils.cs (1)
18_rng = new Random(host.Rand.Next());
Microsoft.ML.Transforms (3)
PermutationFeatureImportance.cs (1)
173var shuffleRand = RandomUtils.Create(host.Rand.Next());
RandomFourierFeaturizing.cs (2)
116_rand = seed.HasValue ? RandomUtils.Create(seed) : RandomUtils.Create(host.Rand); 301var rng = columns[i].Seed.HasValue ? RandomUtils.Create(columns[i].Seed.Value) : Host.Rand;
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
863featurizedImages = featurizedImages.OrderBy(x => Host.Rand.Next(0, metrics.Bottleneck.Index)).ToList();