Skip to content

A library in C++ tailored for implementing machine learning algorithms.

Notifications You must be signed in to change notification settings

B-Manitas/NeuralCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralCPP: A Neural Network Library in C++

License: MIT Status

NeuralCPP is a Neural Network Library written in C++. It offers a simple API to create and train neural networks.

Table of Contents

  1. Installation
  2. Example
  3. Hierarchical Structure
  4. Documentation
  5. Libraries Used
  6. See Also
  7. License

Installation

To add NeuralCPP to your project, follow these steps:

  1. Add NeuralCPP as a submodule to your project:
git submodule add -b main https://github.com/B-Manitas/NeuralCPP.git
git submodule update --init --recursive
  1. Include the NeuralCPP/include/NeuralCPP.hpp file in your project.

  2. Compile your project with the following flags:

-std=c++11 -fopenmp

Example

#include "include/NeuralCPP.hpp"

int main()
{
    // Create the dataset
    cmatrix<float> X, y;
    NeuralCPP::create_dataset(X, y, 100000, 2, 2);

    // Create the neural network model (2 hidden layers with 32 neurons each)
    NeuralLayers nn({32, 32});

    // Train the model
    nn.fit(X, y, 10000, .01, true);

    // Predict the output
    cmatrix<cbool> y_pred = nn.predict(X);

    return 0;
}

Hierarchical Structure

NeuralCPP is structured as follows:

Class Description
include
NeuralCPP.hpp Includes all the other headers.
NeuralLoss.hpp Defines the loss functions.
NeuralActivation.hpp Defines the activation functions.
NeuralPerceptron.hpp The Perceptron model.
src
This folder contains the implementation of the library.

Documentation

For detailed information on how to use CMatrix, consult the documentation.

Libraries Used

  • CMatrix: A C++ library for matrix operations. (Required for compile CMatrix)
  • OpenMP: An API for parallel programming. (Required for compile CMatrix)
  • Doxygen: A documentation generator.
  • Matplot++: A C++ Graphics Library for Data Visualization.

See Also

  • CMatrix: A C++ library for matrix operations.
  • CDataFrame: A C++ DataFrame library for Data Science and Machine Learning projects.

License

This project is licensed under the MIT License, ensuring its free and open availability to the community.

About

A library in C++ tailored for implementing machine learning algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published