Orderbook Simulation
OrderbookSim is a C++ application simulating a financial market order book. It efficiently manages and matches buy and sell orders while calculating the Volume-Weighted Average Price (VWAP).
|
Manages a neural network's structure, data, and training process. More...
#include <NeuralNetwork.hpp>
Public Member Functions | |
NeuralNetwork ()=default | |
Default constructor for the NeuralNetwork class. More... | |
void | loadTogology (const std::vector< unsigned > &topology) |
Loads the topology of the neural network. More... | |
void | Run (std::vector< double > &inputVals, std::vector< double > &targetVals, std::vector< double > &resultVals) |
Runs a single training pass through the network. More... | |
std::vector< double > | RunWithReturn (std::vector< double > &inputVals, std::vector< double > &targetVals, std::vector< double > &resultVals) |
Runs the network with input and target values, and returns the result. More... | |
Manages a neural network's structure, data, and training process.
The NeuralNetwork class provides functionality to set up the network topology, run the network with input and target values, and retrieve the results. It acts as a high-level manager for the neural network operations.
|
default |
Default constructor for the NeuralNetwork class.
Initializes an empty NeuralNetwork object.
void NeuralNetwork::loadTogology | ( | const std::vector< unsigned > & | topology | ) |
Loads the topology of the neural network.
Sets up the network structure based on the provided topology, where each element in the vector specifies the number of neurons in each layer.
topology | A vector representing the number of neurons in each layer of the network. |
void NeuralNetwork::Run | ( | std::vector< double > & | inputVals, |
std::vector< double > & | targetVals, | ||
std::vector< double > & | resultVals | ||
) |
Runs a single training pass through the network.
This function performs forward propagation with the input values, retrieves the results, and then executes backpropagation with the target values to adjust weights.
inputVals | A vector containing input values for the network. |
targetVals | A vector containing target values for the network's output neurons. |
resultVals | A vector to store the output values produced by the network. |
std::vector< double > NeuralNetwork::RunWithReturn | ( | std::vector< double > & | inputVals, |
std::vector< double > & | targetVals, | ||
std::vector< double > & | resultVals | ||
) |
Runs the network with input and target values, and returns the result.
This function is similar to Run but also returns the result values vector. It performs forward and backward propagation to adjust network weights.
inputVals | A vector containing input values for the network. |
targetVals | A vector containing target values for the network's output neurons. |
resultVals | A vector to store the output values produced by the network. |