Skylark (Sketching Library)
0.1
|
#include <PPT_data.hpp>
Classes | |
struct | params_t |
Params structure. More... | |
Public Types | |
typedef sketch_transform_data_t | base_t |
Public Member Functions | |
PPT_data_t (int N, int S, int q, double c, double gamma, base::context_t &context) | |
PPT_data_t (int N, int S, const params_t ¶ms, base::context_t &context) | |
PPT_data_t (const boost::property_tree::ptree &pt) | |
virtual boost::property_tree::ptree | to_ptree () const |
Protected Member Functions | |
PPT_data_t (int N, int S, int q, double c, double gamma, const base::context_t &context, std::string type) | |
base::context_t | build () |
Protected Attributes | |
const int | _q |
const double | _c |
const double | _gamma |
std::vector< size_t > | _hash_idx |
std::vector< double > | _hash_val |
std::list< CWT_data_t > | _cwts_data |
Pham-Pagh Transform aka TensorSketch (data).
Sketches the monomial expansion of a vector.
See: Ninh Pham and Rasmus Pagh Fast and Scalable Polynomial Kernels via Explicit Feature Maps KDD 2013
Definition at line 24 of file PPT_data.hpp.
Definition at line 26 of file PPT_data.hpp.
skylark::sketch::PPT_data_t::PPT_data_t | ( | int | N, |
int | S, | ||
int | q, | ||
double | c, | ||
double | gamma, | ||
base::context_t & | context | ||
) | [inline] |
Definition at line 40 of file PPT_data.hpp.
References build().
skylark::sketch::PPT_data_t::PPT_data_t | ( | int | N, |
int | S, | ||
const params_t & | params, | ||
base::context_t & | context | ||
) | [inline] |
Definition at line 47 of file PPT_data.hpp.
References build().
skylark::sketch::PPT_data_t::PPT_data_t | ( | const boost::property_tree::ptree & | pt | ) | [inline] |
Definition at line 55 of file PPT_data.hpp.
skylark::sketch::PPT_data_t::PPT_data_t | ( | int | N, |
int | S, | ||
int | q, | ||
double | c, | ||
double | gamma, | ||
const base::context_t & | context, | ||
std::string | type | ||
) | [inline, protected] |
Definition at line 81 of file PPT_data.hpp.
base::context_t skylark::sketch::PPT_data_t::build | ( | ) | [inline, protected] |
random samples should only be drawn here, return context after random samples have been extracted.
Reimplemented from skylark::sketch::sketch_transform_data_t.
Definition at line 88 of file PPT_data.hpp.
References _cwts_data, _hash_idx, _hash_val, skylark::sketch::sketch_transform_data_t::_N, _q, skylark::sketch::sketch_transform_data_t::_S, skylark::sketch::sketch_transform_data_t::build(), and skylark::base::context_t::generate_random_samples_array().
Referenced by PPT_data_t().
virtual boost::property_tree::ptree skylark::sketch::PPT_data_t::to_ptree | ( | ) | const [inline, virtual] |
Serializes a sketch to a string.
[out] | property_tree | describing the sketch. |
Implements skylark::sketch::sketch_transform_data_t.
Definition at line 70 of file PPT_data.hpp.
References _c, _gamma, _q, and skylark::sketch::sketch_transform_data_t::add_common().
const double skylark::sketch::PPT_data_t::_c [protected] |
Definition at line 107 of file PPT_data.hpp.
Referenced by to_ptree().
std::list< CWT_data_t > skylark::sketch::PPT_data_t::_cwts_data [protected] |
Definition at line 114 of file PPT_data.hpp.
Referenced by build().
const double skylark::sketch::PPT_data_t::_gamma [protected] |
Definition at line 108 of file PPT_data.hpp.
Referenced by to_ptree().
std::vector<size_t> skylark::sketch::PPT_data_t::_hash_idx [protected] |
Definition at line 111 of file PPT_data.hpp.
Referenced by build().
std::vector<double> skylark::sketch::PPT_data_t::_hash_val [protected] |
Definition at line 112 of file PPT_data.hpp.
Referenced by build().
const int skylark::sketch::PPT_data_t::_q [protected] |
Polynomial degree
Definition at line 106 of file PPT_data.hpp.
Referenced by build(), and to_ptree().