34 #ifndef __NEURALNETWORK_H__
35 #define __NEURALNETWORK_H__
44 template<
class T>
class CDenseFeatures;
45 class CDynamicObjectArray;
137 virtual void connect(int32_t i, int32_t j);
145 virtual void disconnect(int32_t i, int32_t j);
232 virtual const char*
get_name()
const {
return "NeuralNetwork";}
560 static float64_t lbfgs_evaluate(
void *userdata,
567 static int lbfgs_progress(
void *instance,
void set_gd_learning_rate(float64_t gd_learning_rate)
SGVector< int32_t > m_index_offsets
virtual CBinaryLabels * apply_binary(CFeatures *data)
void set_gd_momentum(float64_t gd_momentum)
Real Labels are real-valued labels.
virtual void initialize_neural_network(float64_t sigma=0.01f)
int32_t get_gd_mini_batch_size() const
float64_t get_l2_coefficient() const
int32_t get_num_parameters()
virtual const char * get_name() const
float64_t get_gd_learning_rate() const
void set_max_norm(float64_t max_norm)
void set_gd_mini_batch_size(int32_t gd_mini_batch_size)
The class Labels models labels, i.e. class assignments of objects.
float64_t m_l1_coefficient
SGVector< float64_t > get_parameters()
float64_t m_gd_error_damping_coeff
virtual bool train_machine(CFeatures *data=NULL)
SGVector< float64_t > m_params
void set_dropout_hidden(float64_t dropout_hidden)
A generic multi-layer neural network.
float64_t get_dropout_input() const
float64_t get_gd_learning_rate_decay() const
SGMatrix< bool > m_adj_matrix
SGMatrix< float64_t > features_to_matrix(CFeatures *features)
virtual void disconnect(int32_t i, int32_t j)
Base class for neural network layers.
virtual bool train_gradient_descent(SGMatrix< float64_t > inputs, SGMatrix< float64_t > targets)
virtual void quick_connect()
float64_t get_gd_error_damping_coeff() const
void set_max_num_epochs(int32_t max_num_epochs)
virtual float64_t compute_error(SGMatrix< float64_t > inputs, SGMatrix< float64_t > targets)
A generic learning machine interface.
float64_t m_dropout_hidden
void set_epsilon(float64_t epsilon)
float64_t get_gd_momentum() const
SGVector< bool > m_param_regularizable
float64_t m_dropout_input
virtual CMulticlassLabels * apply_multiclass(CFeatures *data)
Multiclass Labels for multi-class classification.
float64_t m_l2_coefficient
int32_t get_max_num_epochs() const
CDynamicObjectArray * m_layers
virtual void connect(int32_t i, int32_t j)
virtual void set_batch_size(int32_t batch_size)
virtual void disconnect_all()
virtual ~CNeuralNetwork()
int32_t m_total_num_parameters
virtual CRegressionLabels * apply_regression(CFeatures *data)
ENNOptimizationMethod get_optimization_method() const
void set_gd_error_damping_coeff(float64_t gd_error_damping_coeff)
void set_l2_coefficient(float64_t l2_coefficient)
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
ENNOptimizationMethod m_optimization_method
float64_t m_gd_learning_rate_decay
CDynamicObjectArray * get_layers()
float64_t get_max_norm() const
int32_t m_gd_mini_batch_size
virtual float64_t check_gradients(float64_t approx_epsilon=1.0e-3, float64_t s=1.0e-9)
CNeuralLayer * get_layer(int32_t i)
virtual bool is_label_valid(CLabels *lab) const
virtual CDenseFeatures< float64_t > * transform(CDenseFeatures< float64_t > *data)
float64_t get_dropout_hidden() const
all of classes and functions are contained in the shogun namespace
virtual void set_labels(CLabels *lab)
void set_l1_coefficient(float64_t l1_coefficient)
virtual bool train_lbfgs(SGMatrix< float64_t > inputs, SGMatrix< float64_t > targets)
virtual EMachineType get_classifier_type()
The class Features is the base class of all feature objects.
SGMatrix< float64_t > labels_to_matrix(CLabels *labs)
virtual SGMatrix< float64_t > forward_propagate(CFeatures *data, int32_t j=-1)
float64_t get_l1_coefficient() const
int32_t get_num_outputs()
virtual EProblemType get_machine_problem_type() const
void set_gd_learning_rate_decay(float64_t gd_learning_rate_decay)
Binary Labels for binary classification.
virtual void set_layers(CDynamicObjectArray *layers)
void set_optimization_method(ENNOptimizationMethod optimization_method)
SGVector< float64_t > * get_layer_parameters(int32_t i)
float64_t m_gd_learning_rate
float64_t get_epsilon() const
virtual float64_t compute_gradients(SGMatrix< float64_t > inputs, SGMatrix< float64_t > targets, SGVector< float64_t > gradients)
void set_dropout_input(float64_t dropout_input)