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

Represents a resource allocating network with long term memory that can be trained using a CUDA implementation of the algorithm. More...

#include <ResourceAllocatingNetwork.h>

Public Member Functions

 ResourceAllocatingNetwork (float scale_of_interest_max, float desired_accuracy, float overlap_factor, int Rows, int Columns, int NumClasses)
 
void Train (cudafloat *Sample, int Length, float Target, float *dTargetArr)
 
float FindMaxWidth (DeviceMatrix< float > &X, DeviceMatrix< float > &Y)
 
float * CalculateNetworkActivation (cudafloat *Sample, int Length)
 
int GetNumCenters ()
 

Public Attributes

unsigned int start
 
unsigned int times [4]
 
float center_time
 
float width_time
 
float weight_time
 
float scaling_time
 

Detailed Description

Represents a resource allocating network with long term memory that can be trained using a CUDA implementation of the algorithm.

Definition at line 54 of file ResourceAllocatingNetwork.h.

Constructor & Destructor Documentation

ResourceAllocatingNetwork ( float  scale_of_interest_max,
float  desired_accuracy,
float  overlap_factor,
int  Rows,
int  Columns,
int  NumClasses 
)

Constructs a resource allocating network with long term memory.

Parameters
scale_of_interest_maxCut off value for distance.
desired_accuracyCut off value for the accuracy.
overlap_factorScaling factor to apply to the width of the neuron.
RowsNumber of rows in the training data, used to reserve memory.
ColumnsNumber of features.
NumClassesTotal number of classes, if it is a regression problem use the value 1 (one).

Definition at line 25 of file ResourceAllocatingNetwork.cpp.

Member Function Documentation

float * CalculateNetworkActivation ( cudafloat Sample,
int  Length 
)

Calculates the output of the network for the given sample.

Parameters
Samplearray.
Lengthof the sample (number of features).
Returns
Network activation value.

Definition at line 112 of file ResourceAllocatingNetwork.cpp.

float FindMaxWidth ( DeviceMatrix< float > &  X,
DeviceMatrix< float > &  Y 
)

Calculates the maximum width for the neurons in the hidden layer.

Parameters
Xmatrix with the training data.
Ymatrix with the targets.
Returns
Value of the maximum width.

Definition at line 85 of file ResourceAllocatingNetwork.cpp.

void Train ( cudafloat Sample,
int  Length,
float  Target,
float *  dTargetArr 
)

Trains the network with the given sample.

Parameters
Sampletraining array.
Lengthof the sample.
Targetdesired output.
dTargetArrdesired activation in each output neuron.

Definition at line 168 of file ResourceAllocatingNetwork.cpp.


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