openModeller  Version 1.5.0
Sampler.cpp File Reference
#include <openmodeller/Environment.hh>
#include <openmodeller/Occurrence.hh>
#include <openmodeller/Configuration.hh>
#include <openmodeller/Sampler.hh>
#include <openmodeller/Occurrences.hh>
#include <openmodeller/Log.hh>
#include <openmodeller/Random.hh>
#include <openmodeller/env_io/Map.hh>
#include <openmodeller/Model.hh>
#include <stdio.h>
#include <string.h>
#include <sstream>
#include <openmodeller/Exceptions.hh>
Include dependency graph for Sampler.cpp:

Go to the source code of this file.

Functions

SamplerPtr createSampler (const EnvironmentPtr &env, const OccurrencesPtr &presence, const OccurrencesPtr &absence)
 
SamplerPtr createSampler (const ConstConfigurationPtr &config)
 
void splitSampler (const SamplerPtr &orig, SamplerPtr *train, SamplerPtr *test, double propTrain)
 
SamplerPtr cloneSampler (const SamplerPtr &orig)
 

Function Documentation

SamplerPtr cloneSampler ( const SamplerPtr orig)

Returns a fresh sampler cloned from the current object.

Definition at line 1219 of file Sampler.cpp.

References createSampler().

Referenced by ConsensusAlgorithm::initialize().

Here is the call graph for this function:

SamplerPtr createSampler ( const EnvironmentPtr env,
const OccurrencesPtr presence,
const OccurrencesPtr absence = OccurrencesPtr() 
)
SamplerPtr createSampler ( const ConstConfigurationPtr config)

Definition at line 59 of file Sampler.cpp.

void splitSampler ( const SamplerPtr orig,
SamplerPtr train,
SamplerPtr test,
double  propTrain 
)

Splits data points into to 2 new samplers

Parameters
origOriginal sampler to split
trainPointer to train sampler to be returned
testPointer to test sampler to be returned
propTrainPercentage of points to go to train sampler

Definition at line 1171 of file Sampler.cpp.

References splitOccurrences().

Referenced by BestSubsets::iterate(), AbstractBestSubsets::iterate(), and PreJackknife::runImplementation().

Here is the call graph for this function: