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).
Public Member Functions | List of all members
NeuralNetwork Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ NeuralNetwork()

NeuralNetwork::NeuralNetwork ( )
default

Default constructor for the NeuralNetwork class.

Initializes an empty NeuralNetwork object.

Member Function Documentation

◆ loadTogology()

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.

Parameters
topologyA vector representing the number of neurons in each layer of the network.

◆ Run()

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.

Parameters
inputValsA vector containing input values for the network.
targetValsA vector containing target values for the network's output neurons.
resultValsA vector to store the output values produced by the network.

◆ RunWithReturn()

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.

Parameters
inputValsA vector containing input values for the network.
targetValsA vector containing target values for the network's output neurons.
resultValsA vector to store the output values produced by the network.
Returns
A vector containing the output values from the network after running.

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