SG++-Doxygen-Documentation
sgpp::datadriven::NearestNeighbors Class Reference

The NearestNeighbors class. More...

#include <NearestNeighbors.hpp>

Public Types

typedef std::pair< size_t, size_t > point_t
 

Public Member Functions

std::vector< std::vector< size_t > > getAllInteractions (size_t level, double threshold) const
 calculates all interaction terms with l2Distance(center, other) \(\leq\) threshold More...
 
 NearestNeighbors (size_t rows, size_t cols)
 NearestNeighbors. More...
 

Detailed Description

The NearestNeighbors class.

Generates interactions for images, that only consider interactions between pixels that are close to each other, measured by an \( l_2 \)-distance. The pixel-neighborhood for a threshold of \( \sqrt{2} \) is

nearest_neighbors_l2.svg

Member Typedef Documentation

typedef std::pair<size_t, size_t> sgpp::datadriven::NearestNeighbors::point_t

Constructor & Destructor Documentation

sgpp::datadriven::NearestNeighbors::NearestNeighbors ( size_t  rows,
size_t  cols 
)

NearestNeighbors.

Parameters
rowsis the number of rows of each image
colsis the number of columns of each image

References chess::b, python.statsfileInfo::f, friedman::p, and create_scripts::s.

Member Function Documentation

std::vector< std::vector< size_t > > sgpp::datadriven::NearestNeighbors::getAllInteractions ( size_t  level,
double  threshold 
) const

calculates all interaction terms with l2Distance(center, other) \(\leq\) threshold

Parameters
levelis the maximum level of interactions to include
thresholdis the maximum distance
Returns
all interactions

References python.statsfileInfo::i, level, and create_scripts::s.


The documentation for this class was generated from the following files: