Neighborhood definition by Bench.
The Neighborhood is usually meant to select a sub-population from the input Data Base, containing the active samples close to the target.
The selected samples belong to the same 'bench' as the target: the distance (according to the last space coordinate, e.g. the elevation in the 3-D case) between a selected sample and the target is smaller than the bench width.
The neighborhood also offers the possibility to suppress any sample which would be too close to (or coincide with) the target: this is the cross-validation option.
|
| NeighBench (bool flag_xvalid=false, double width=0., bool useBallTree=false, int leaf_size=10, const ASpaceSharedPtr &space=ASpaceSharedPtr()) |
|
| NeighBench (const NeighBench &r) |
|
NeighBench & | operator= (const NeighBench &r) |
|
virtual | ~NeighBench () |
|
virtual int | attach (const Db *dbin, const Db *dbout=nullptr) override |
| Interface for ANeigh.
|
|
virtual void | getNeigh (int iech_out, VectorInt &ranks) override |
|
virtual bool | hasChanged (int iech_out) const override |
|
virtual int | getNSampleMax (const Db *db) const override |
|
virtual ENeigh | getType () const override |
|
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
| Interface for AStringable.
|
|
double | getWidth () const |
|
| ANeigh (const ASpaceSharedPtr &space=ASpaceSharedPtr()) |
|
| ANeigh (const ANeigh &r) |
|
ANeigh & | operator= (const ANeigh &r) |
|
virtual | ~ANeigh () |
|
virtual bool | isConsistent (const ASpace *space) const override |
| ASpaceObject Interface.
|
|
virtual VectorDouble | summary (int iech_out) |
|
virtual bool | getFlagContinuous () const |
|
void | displayDebug (VectorInt &ranks) const |
|
void | select (int iech_out, VectorInt &ranks) |
|
bool | isUnchanged () const |
|
void | setIsChanged (bool status=false) |
|
void | reset () |
|
bool | getFlagXvalid () const |
|
bool | getFlagKFold () const |
|
void | setFlagXvalid (bool flagXvalid) |
|
void | setFlagKFold (bool flagKFold) |
|
void | setFlagSimu (bool flagSimu) |
|
void | setBallSearch (bool status, int leaf_size=10) |
|
void | attachBall (double(*dist_function)(const double *x1, const double *x2, int size)=nullptr) |
|
| ASpaceObject (const ASpaceSharedPtr &space=ASpaceSharedPtr()) |
|
| ASpaceObject (const ASpaceObject &r) |
|
ASpaceObject & | operator= (const ASpaceObject &r) |
|
virtual | ~ASpaceObject () |
|
ASpaceSharedPtr | getSpace () const |
| Accessor to the current object space context.
|
|
bool | isConsistent () const |
| Indicate if I am consistent with my current space context.
|
|
VectorDouble | getUnitaryVector () const |
| Return unitary vector for the current space context.
|
|
bool | isConsistent (const ASpaceSharedPtr &space) const |
| Indicate if I am consistent with the provided space.
|
|
unsigned int | getNDim (int ispace=-1) const |
| Shortcuts to ASpace methods.
|
|
const VectorDouble & | getOrigin (int ispace=-1) const |
| Return the current space context origin coordinates.
|
|
double | getDistance (const SpacePoint &p1, const SpacePoint &p2, int ispace=0) const |
| Return the distance between two space points for the current space context.
|
|
VectorDouble | getDistances (const SpacePoint &p1, const SpacePoint &p2) const |
| Return all the distances (space composits) between two space points for the current space context.
|
|
VectorDouble | getIncrement (const SpacePoint &p1, const SpacePoint &p2, int ispace=0) const |
| Return the increment vector between two space points for the current space context.
|
|
| AStringable () |
|
| AStringable (const AStringable &r) |
|
AStringable & | operator= (const AStringable &r) |
|
virtual | ~AStringable () |
|
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
|
virtual void | display (int level) const final |
|
| ASerializable () |
|
| ASerializable (const ASerializable &r) |
|
ASerializable & | operator= (const ASerializable &r) |
|
virtual | ~ASerializable () |
|
bool | deserialize (std::istream &is, bool verbose=true) |
|
bool | serialize (std::ostream &os, bool verbose=true) const |
|
bool | dumpToNF (const String &neutralFilename, bool verbose=false) const |
|
| ICloneable () |
|
virtual | ~ICloneable () |
|
virtual ICloneable * | clone () const =0 |
|
|
static NeighBench * | create (bool flag_xvalid=false, double width=0, bool useBallTree=false, int leaf_size=10, const ASpaceSharedPtr &space=ASpaceSharedPtr()) |
|
static NeighBench * | createFromNF (const String &neutralFilename, bool verbose=true) |
|
static String | buildFileName (int status, const String &filename, bool ensureDirExist=false) |
|
static String | getHomeDirectory (const String &sub="") |
|
static String | getWorkingDirectory () |
|
static String | getTestData (const String &subdir, const String &filename) |
|
static String | getFileIdentity (const String &filename, bool verbose=false) |
|
static void | setContainerName (bool useDefault, const String &containerName="", bool verbose=false) |
|
static void | unsetContainerName () |
|
static void | setPrefixName (const String &prefixName) |
|
static void | unsetPrefixName () |
|
static const String & | getContainerName () |
|
static const String & | getPrefixName () |
|
static bool | createDirectory (const String &dir) |
|
static String | getExecDirectory () |
|
static String | getDirectory (const String &path) |
|