UFJF - Machine Learning Toolkit  0.51.8
mltk Namespace Reference

UFJF-MLTK main namespace for core functionalities. More...

Namespaces

 classifier
 Namespace for classification methods.
 
 clusterer
 Namespace for clustering methods.
 
 datasets
 Namespace for artificial datasets generation.
 
 featselect
 Namespace for feature selection methods.
 
 random
 Namespace for random number generation (Mersenne Twister pseudorandom generator).
 
 regressor
 Namespace for regression methods.
 
 stats
 Namespace for statistical methods.
 
 validation
 Validation methods namespace.
 
 visualize
 Namespace for data visualization methods.
 

Classes

class  Statistics
 
class  Data
 Wrapper for the dataset data. More...
 
class  Kernel
 Class for the kernel computations. More...
 
class  Learner
 
class  Point
 Wrapper for the point data. More...
 
class  DSM
 
class  RSM
 
class  OverSampling
 Base class for the implementation of over sampling methods. More...
 
class  SMOTE
 Functor for the implementation of the SMOTE over sampling algorithm. More...
 
class  BorderlineSMOTEOne
 Functor for the implementation of the Borderline SMOTE 1 over sampling algorithm. More...
 
class  Solution
 
class  ThreadPool
 A C++17 thread pool class. The user submits tasks to be executed into a queue. Whenever a thread becomes available, it pops a task from the queue and executes it. Each task is automatically assigned a future, which can be used to wait for the task to finish executing and/or obtain its eventual return value. More...
 
class  synced_stream
 A helper class to synchronize printing to an output stream by different threads. More...
 
class  timer
 A helper class to measure execution time for benchmarking purposes. More...
 
class  Timer
 Wrapper for the implementation of a simple timer. More...
 

Typedefs

template<class T >
using DataPointer = std::shared_ptr< mltk::Data< T > >
 
template<class T >
using SamplePointer = std::shared_ptr< mltk::Point< T > >
 
template<class T >
using SampleIterator = typename std::vector< SamplePointer< T > >::iterator
 
template<class T >
using ConstSampleIterator = typename std::vector< SamplePointer< T > >::const_iterator
 
template<class T >
using LearnerPointer = std::shared_ptr< mltk::Learner< T > >
 
template<class T , typename Rep = std::vector<T>>
using PointPointer = std::shared_ptr< mltk::Point< T, Rep > >
 
template<class T , typename Rep = std::vector<T>>
using PointIterator = typename Rep::iterator
 
typedef std::vector< std::vector< double > > dMatrix
 

Enumerations

enum  Type {
  TYPE_INVALID = -1 , TYPE_DATA = 0 , TYPE_CSV = 1 , TYPE_ARFF = 2 ,
  TYPE_TXT = 3
}
 
enum  KernelType {
  INVALID_TYPE = -1 , INNER_PRODUCT , POLYNOMIAL , GAUSSIAN ,
  CUSTOM
}
 
enum  NormType { NORM_LINF = 0 , NORM_L1 = 1 , NORM_L2 = 2 }
 

Functions

template<typename T , typename... Types>
DataPointer< T > make_data (Types... args)
 Makes a shared_pointer for a data object. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &output, const Data< T > &data)
 
template<typename T , typename Rep >
std::ostream & operator<< (std::ostream &output, const Point< T, Rep > &p)
 
template<typename T , typename R = std::vector<T>, typename... Types>
PointPointer< T, R > make_point (Types... args)
 
template<typename T >
double norm (const Point< T > &p, int q)
 
template<typename T , typename R >
dot (const Point< T, R > &p, const Point< T, R > &p1)
 Computes the dot product with a vector. More...
 
template<typename T , typename R >
max (const Point< T, R > &p)
 Returns the max value of the point. More...
 
template<typename T , typename R >
min (const Point< T, R > &p)
 Returns the min value of the point. More...
 
template<typename T = double, typename R = std::vector< T >>
Point< T, R > random_init (Point< T, R > &p, const size_t &size, const size_t &seed)
 
template<typename T = double, typename R = std::vector< T >>
Point< T, R > random_init (const size_t &size, const size_t &seed=0)
 
template<typename T = double, typename distribution = std::uniform_real_distribution<T>>
Point< T > random_init (T val1, T val2, const size_t &size, const size_t &seed=0)
 
template<typename T = double, typename R = std::vector< T >>
Point< T, R > random_init (Point< T, R > &p, const size_t &seed=0)
 
template<typename T , typename R >
Point< T, F_Abs< T, R > > abs (const Point< T, R > &p)
 
template<typename T , typename R >
Point< T, F_Cos< T, R > > cos (const Point< T, R > &p)
 
template<typename T , typename R >
Point< T, F_Sin< T, R > > sin (const Point< T, R > &p)
 
template<typename T , typename R >
Point< T, F_Exp< T, R > > exp (const Point< T, R > &p)
 
template<typename T , typename R >
Point< T, F_Log< T, R > > log (const Point< T, R > &p)
 
template<typename T , typename P , typename R >
Point< T, F_Pow< T, P, R > > pow (const Point< T, R > &p, const P &power)
 
template<typename T >
Point< T > normalize (Point< T > p, const double q)
 normalize Normalize a vector using a Lp-norm. More...
 
template<typename T >
Point< T > normalize (std::vector< T > &p, const double q)
 
template<typename T = double>
Point< T > linspace (double lower, double upper, size_t N)
 
template<typename T , typename R >
std::ostream & operator<< (std::ostream &output, const Point< T, R > &p)
 
template<typename T , typename R1 >
Point< T, A_Mod< T, R1, A_Scalar< T > > > operator% (const Point< T, R1 > &p, const T &mod)
 
template<typename T , typename Y , typename R1 >
Point< T, A_Mod< T, R1, A_Scalar< Y > > > operator% (const Point< T, R1 > &p, const Y &mod)
 
template<typename T , typename R1 , typename R2 >
Point< T, A_Add< T, R1, R2 > > operator+ (Point< T, R1 > const &a, Point< T, R2 > const &b)
 
template<typename T , typename R2 >
Point< T, A_Add< T, A_Scalar< T >, R2 > > operator+ (T const &s, Point< T, R2 > const &b)
 
template<typename T , typename T2 , typename R2 >
Point< T, A_Add< T, A_Scalar< T2 >, R2 > > operator+ (T2 const &s, Point< T, R2 > const &b)
 
template<typename T , typename R1 >
Point< T, A_Add< T, R1, A_Scalar< T > > > operator+ (Point< T, R1 > const &a, T const &s)
 
template<typename T , typename T2 , typename R1 >
Point< T, A_Add< T, R1, A_Scalar< T2 > > > operator+ (Point< T, R1 > const &a, T2 const &s)
 
template<typename T , typename R1 , typename R2 >
Point< T, A_Sub< T, R1, R2 > > operator- (Point< T, R1 > const &a, Point< T, R2 > const &b)
 
template<typename T , typename R2 >
Point< T, A_Sub< T, A_Scalar< T >, R2 > > operator- (T const &s, Point< T, R2 > const &b)
 
template<typename T , typename R2 >
Point< T, A_Sub< T, A_Scalar< int >, R2 > > operator- (int const &s, Point< T, R2 > const &b)
 
template<typename T , typename R1 >
Point< T, A_Sub< T, R1, A_Scalar< T > > > operator- (Point< T, R1 > const &a, T const &s)
 
template<typename T , typename R1 >
Point< T, A_Sub< T, R1, A_Scalar< int > > > operator- (Point< T, R1 > const &a, int const &s)
 
template<typename T , typename R1 , typename R2 >
Point< T, A_Mult< T, R1, R2 > > operator* (Point< T, R1 > const &a, Point< T, R2 > const &b)
 
template<typename T , typename R2 >
Point< T, A_Mult< T, A_Scalar< T >, R2 > > operator* (T const &s, Point< T, R2 > const &b)
 
template<typename T , typename T2 , typename R1 >
Point< T, A_Mult< T, A_Scalar< T2 >, R1 > > operator* (T2 const &s, Point< T, R1 > const &b)
 
template<typename T , typename R1 >
Point< T, A_Mult< T, R1, A_Scalar< T > > > operator* (Point< T, R1 > const &a, T const &s)
 
template<typename T , typename T2 , typename R1 >
Point< T, A_Mult< T, R1, A_Scalar< T2 > > > operator* (Point< T, R1 > const &a, T2 const &s)
 
template<typename T , typename R1 , typename R2 >
Point< T, A_Div< T, R1, R2 > > operator/ (Point< T, R1 > const &a, Point< T, R2 > const &b)
 
template<typename T , typename R1 >
Point< T, A_Div< T, R1, A_Scalar< T > > > operator/ (Point< T, R1 > const &a, T const &s)
 
template<typename T , typename R1 >
Point< T, A_Div< T, R1, A_Scalar< int > > > operator/ (Point< T, R1 > const &a, int const &s)
 
template<typename T , typename R2 >
Point< T, A_Div< T, A_Scalar< T >, R2 > > operator/ (T const &s, Point< T, R2 > const &b)
 
template<typename T , typename R2 >
Point< T, A_Div< T, A_Scalar< int >, R2 > > operator/ (int const &s, Point< T, R2 > const &b)
 

Detailed Description

UFJF-MLTK main namespace for core functionalities.

Function Documentation

◆ dot()

template<typename T , typename R >
T mltk::dot ( const Point< T, R > &  p,
const Point< T, R > &  p1 
)

Computes the dot product with a vector.

Parameters
pFirst point from dot product
p1Second point from dot product
Returns
double

◆ make_data()

template<typename T , typename... Types>
DataPointer< T > mltk::make_data ( Types...  args)

Makes a shared_pointer for a data object.

Template Parameters
TType of the underlying data.
Types
Parameters
argsArguments for make_shared function.
Returns

◆ max()

template<typename T , typename R >
T mltk::max ( const Point< T, R > &  p)

Returns the max value of the point.

Returns
T

◆ min()

template<typename T , typename R >
T mltk::min ( const Point< T, R > &  p)

Returns the min value of the point.

Returns
T

◆ normalize()

template<typename T >
Point<T> mltk::normalize ( Point< T >  p,
const double  q 
)

normalize Normalize a vector using a Lp-norm.

Parameters
qNorm to be utilized.
pVector to be normalized.