-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the glades-ml wiki!
glades-ml is a Feed Forward Neural Network Machine Learning library. glades-ml comes with the NNCreator GUI interface for testing and editing neural networks. We support a variety of optimizations and generalization techniques that you can tune either in our interface or programmatically.
This is the API interface to use the neural networks and meta-networks.
This class contains a Structure and a State class to represent a Feed Forward Neural Network.
A Meta-Network is a collection of NNetworks.
This maintains the weight information and other runtime instance information. This keeps track of edges, nodes, and layers.
This creates the skeleton of the network. This does not contain weights! These set of classes help us create a skeleton of a neural network. This allows us to create many State instances per Structure for repeated testing.
GMath contains machine learning helper functions like one hot encoding and activation functions.
Create and Save a Neural Network
/* ========= Create and Save a NN ========= */
// Create the layers
InputLayerInfo* newInputLayer = new InputLayerInfo(0.0f, 1);
std::vector<HiddenLayerInfo*> newHiddenLayers;
newHiddenLayers.push_back(new HiddenLayerInfo(2, 0.01f, 0.0f, 0.0f, 0.0f, 0, 0.0f));
OutputLayerInfo* newOutputLayer = new OutputLayerInfo(1, OutputLayerInfo::REGRESSION);
NNInfo* formInfo = new glades::NNInfo("NeuralNet1", newInputLayer, newHiddenLayers, newOutputLayer);
// Save the NN here to use or later, we can also run it now
NNetwork cNetwork = NNetwork(formInfo);
glades::saveNeuralNetwork(cNetwork);
Load and Run Neural Network
/* ========= Load and Run a NN ========= */
// Load the neural network
std::string netName = "NeuralNet1";
glades::NNetwork cNetwork;
if (!cNetwork.load(netName))
{
printf("[NN] Unable to load \"%s\"", netName.c_str());
return retList;
}
// Termination Conditions
// Leave as blank (will run forever)
glades::Terminator* Arnold = new glades::Terminator();
// Run the training and retrieve a metanetwork
shmea::GTable inputTable(testFName, ',', importType);
glades::MetaNetwork* newTrainNet = glades::train(&cNetwork, inputTable, Arnold);