Implementation of different sampling strategies.
Definition at line 31 of file RSampler.hxx.
#include <ROOT/ML/RSampler.hxx>
◆ RSampler()
| ROOT::Experimental::Internal::ML::RSampler::RSampler |
( |
std::vector< RFlat2DMatrix > & | datasets, |
|
|
const std::string & | sampleType, |
|
|
float | sampleRatio, |
|
|
bool | replacement = false, |
|
|
bool | shuffle = true, |
|
|
std::size_t | setSeed = 0 ) |
|
inline |
◆ GetNumEntries()
| std::size_t ROOT::Experimental::Internal::ML::RSampler::GetNumEntries |
( |
| ) |
|
|
inline |
◆ RandomOversampler()
| void ROOT::Experimental::Internal::ML::RSampler::RandomOversampler |
( |
RFlat2DMatrix & | ShuffledTensor | ) |
|
|
inline |
Oversample entries randomly from the minority dataset.
- Parameters
-
| [in] | SampledTensor | Tensor with all the sampled entries |
Definition at line 168 of file RSampler.hxx.
◆ RandomUndersampler()
| void ROOT::Experimental::Internal::ML::RSampler::RandomUndersampler |
( |
RFlat2DMatrix & | ShuffledTensor | ) |
|
|
inline |
Undersample entries randomly from the majority dataset.
- Parameters
-
| [in] | SampledTensor | Tensor with all the sampled entries |
Definition at line 138 of file RSampler.hxx.
◆ Sampler()
| void ROOT::Experimental::Internal::ML::RSampler::Sampler |
( |
RFlat2DMatrix & | SampledTensor | ) |
|
|
inline |
Collection of sampling types.
- Parameters
-
| [in] | SampledTensor | Tensor with all the sampled entries |
Definition at line 82 of file RSampler.hxx.
◆ SampleWithoutReplacement()
| void ROOT::Experimental::Internal::ML::RSampler::SampleWithoutReplacement |
( |
std::size_t | n_samples, |
|
|
std::size_t | max ) |
|
inline |
Add indices without replacement to fSamples.
- Parameters
-
| [in] | n_samples | Number of indices to sample |
| [in] | max | Max index of the sample distribution |
Definition at line 224 of file RSampler.hxx.
◆ SampleWithReplacement()
| void ROOT::Experimental::Internal::ML::RSampler::SampleWithReplacement |
( |
std::size_t | n_samples, |
|
|
std::size_t | max ) |
|
inline |
Add indices with replacement to fSamples.
- Parameters
-
| [in] | n_samples | Number of indices to sample |
| [in] | max | Max index of the sample distribution |
Definition at line 193 of file RSampler.hxx.
◆ SetupRandomOversampler()
| void ROOT::Experimental::Internal::ML::RSampler::SetupRandomOversampler |
( |
| ) |
|
|
inline |
Calculate fNumEntries and major/minor variables for the random oversampler.
Definition at line 119 of file RSampler.hxx.
◆ SetupRandomUndersampler()
| void ROOT::Experimental::Internal::ML::RSampler::SetupRandomUndersampler |
( |
| ) |
|
|
inline |
Calculate fNumEntries and major/minor variables for the random undersampler.
Definition at line 93 of file RSampler.hxx.
◆ SetupSampler()
| void ROOT::Experimental::Internal::ML::RSampler::SetupSampler |
( |
| ) |
|
|
inline |
Calculate fNumEntries and major/minor variables.
Definition at line 70 of file RSampler.hxx.
◆ fDatasets
| std::vector<RFlat2DMatrix>& ROOT::Experimental::Internal::ML::RSampler::fDatasets |
|
private |
◆ fMajor
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fMajor |
|
private |
◆ fMinor
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fMinor |
|
private |
◆ fNumEntries
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fNumEntries |
|
private |
◆ fNumMajor
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fNumMajor |
|
private |
◆ fNumMinor
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fNumMinor |
|
private |
◆ fNumResampledMajor
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fNumResampledMajor |
|
private |
◆ fNumResampledMinor
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fNumResampledMinor |
|
private |
◆ fReplacement
| bool ROOT::Experimental::Internal::ML::RSampler::fReplacement |
|
private |
◆ fSampleRatio
| float ROOT::Experimental::Internal::ML::RSampler::fSampleRatio |
|
private |
◆ fSamples
| std::vector<std::size_t> ROOT::Experimental::Internal::ML::RSampler::fSamples |
|
private |
◆ fSampleType
| std::string ROOT::Experimental::Internal::ML::RSampler::fSampleType |
|
private |
◆ fSetSeed
| std::size_t ROOT::Experimental::Internal::ML::RSampler::fSetSeed |
|
private |
◆ fShuffle
| bool ROOT::Experimental::Internal::ML::RSampler::fShuffle |
|
private |
◆ fTensorOperators
The documentation for this class was generated from the following file: