GPUMLib  0.2.2
GPU Machine Learning Library
Public Member Functions | Public Attributes | List of all members
RadialBasisFunction Class Reference

Represents a radial basis function network that can be trained using the CUDA implementation of the Radial Basis Function algorithm. More...

#include <RadialBasisFunction.h>

Public Member Functions

 RadialBasisFunction (int network_size, int number_neighbours, float scaling_factor, int NumClasses)
 
void Train (HostMatrix< float > &Input, HostMatrix< float > &Target)
 
HostMatrix< float > Test (HostMatrix< float > &Input)
 
DeviceMatrix< float > Test (DeviceMatrix< float > &Input)
 
DeviceMatrix< float > Test (DeviceMatrix< float > &Input, DeviceMatrix< float > &Centers, DeviceMatrix< float > &Weights, DeviceArray< float > &Widths)
 
void AdjustWidths (int rneighbours)
 
void SetScalingFactor (float scaling_factor)
 
float GetScalingFactor ()
 
void SetSeed (unsigned int seed)
 
unsigned int GetSeed ()
 
DeviceMatrix< float > GetWeights ()
 
DeviceMatrix< float > GetCenters ()
 
DeviceArray< float > & GetWidths ()
 

Public Attributes

unsigned int start
 
unsigned int times [4]
 

Detailed Description

Represents a radial basis function network that can be trained using the CUDA implementation of the Radial Basis Function algorithm.

Definition at line 52 of file RadialBasisFunction.h.

Constructor & Destructor Documentation

RadialBasisFunction ( int  network_size,
int  number_neighbours,
float  scaling_factor,
int  NumClasses 
)

Constructs a radial basis function network that is trained using the a CUDA implementation of the algorithm.

Parameters
network_sizeNumber of neurons for the hidden layer.
number_neighboursNumber of neighbours to use in the width estimation.
scaling_factorScaling factor to apply to the width of the neuron.
NumClassesTotal number of classes, if it is a regression problem use the value 1 (one).

Definition at line 25 of file RadialBasisFunction.cpp.

Member Function Documentation

void AdjustWidths ( int  rneighbours)

Calculates the widths of the neurons, using the R closest neighbours.

Parameters
rneighboursnumber of neighbours to use.

Definition at line 146 of file RadialBasisFunction.cpp.

DeviceMatrix<float> GetCenters ( )
inline

Get the hidden layer center values.

Returns
Matrix with the centers of the network.

Definition at line 146 of file RadialBasisFunction.h.

float GetScalingFactor ( )
inline

Get scaling factor applied on the hidden layer neuron width.

Returns
Scaling factor used.

Definition at line 126 of file RadialBasisFunction.h.

DeviceMatrix<float> GetWeights ( )
inline

Get the weights of the network.

Returns
Matrix with the weights of the network.

Definition at line 140 of file RadialBasisFunction.h.

DeviceArray<float>& GetWidths ( )
inline

Get the widths of the hidden layer gaussian functions.

Returns
Array with the widths applied in the hidden layer.

Definition at line 152 of file RadialBasisFunction.h.

void SetScalingFactor ( float  scaling_factor)
inline

Set scaling factor to be applied on the hidden layer neuron width.

Parameters
scaling_factorScaling factor to use.

Definition at line 120 of file RadialBasisFunction.h.

HostMatrix< float > Test ( HostMatrix< float > &  Input)

Test the network against the input data.

Parameters
Inputmatrix to test against.
Returns
Solution matrix.

Definition at line 45 of file RadialBasisFunction.cpp.

DeviceMatrix< float > Test ( DeviceMatrix< float > &  Input)

Test the network against the input data.

Parameters
Inputmatrix to test against.
Returns
Solution matrix.

Definition at line 60 of file RadialBasisFunction.cpp.

DeviceMatrix< float > Test ( DeviceMatrix< float > &  Input,
DeviceMatrix< float > &  Centers,
DeviceMatrix< float > &  Weights,
DeviceArray< float > &  Widths 
)

Test the network against the input data, using the given Centers and Weights.

Parameters
Inputmatrix to test against.
Centersmatrix with the centers to use.
Weightsmatrix with the weights to use.
Widthsarray with the widths to use.
Returns
Solution matrix.

Definition at line 72 of file RadialBasisFunction.cpp.

void Train ( HostMatrix< float > &  Input,
HostMatrix< float > &  Target 
)

Trains the network.

Parameters
Inputmatrix.
Targettarget matrix.

Definition at line 85 of file RadialBasisFunction.cpp.


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