{"id":19509902,"url":"https://github.com/dattali18/cpp-math-library","last_synced_at":"2025-07-20T01:34:25.606Z","repository":{"id":241554024,"uuid":"806063409","full_name":"dattali18/CPP-Math-Library","owner":"dattali18","description":"This is a repo for learning to code a math library in cpp to 1. better my cpp skills 2. better my deep-learning \u0026 ML understanding","archived":false,"fork":false,"pushed_at":"2024-06-05T15:53:10.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T22:46:54.815Z","etag":null,"topics":["cmake","cpp","deep-learning","ml","neural-network"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dattali18.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-26T09:17:10.000Z","updated_at":"2024-11-29T07:09:50.000Z","dependencies_parsed_at":"2024-06-05T17:38:27.014Z","dependency_job_id":null,"html_url":"https://github.com/dattali18/CPP-Math-Library","commit_stats":null,"previous_names":["dattali18/cpp-math-library"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dattali18/CPP-Math-Library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FCPP-Math-Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FCPP-Math-Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FCPP-Math-Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FCPP-Math-Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dattali18","download_url":"https://codeload.github.com/dattali18/CPP-Math-Library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dattali18%2FCPP-Math-Library/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266053859,"owners_count":23869498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cpp","deep-learning","ml","neural-network"],"created_at":"2024-11-10T23:13:52.069Z","updated_at":"2025-07-20T01:34:25.581Z","avatar_url":"https://github.com/dattali18.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Math Library\n\nIn this project we will be building a math library in `cpp`\nThis library will be used in building simple Neural Network library in the future.\n\n## Structure\n\nThe library will be divided into the following parts:\n\n1. Vector\n2. Matrix\n3. Activation Functions\n4. Layer\n5. Linear Regression\n6. Logistic Regression\n\n## UML\n\n```mermaid\nclassDiagram\n    class Vector {\n        +Vector(size_t size)\n        +Vector(const std::vector~double~\u0026 data)\n        +Vector(const Vector\u0026 other)\n\n        -std::vector~double~ data_\n    }\n\n    class Matrix {\n        +Matrix(size_t rows, size_t cols)\n        +Matrix(const std::vector~std::vector~double~~\u0026 data)\n        +Matrix(const Vector\u0026 vec)\n        +Matrix mult(const Matrix\u0026 other) const\n        +Matrix transpose() const\n        -std::vector~std::vector~double~~ data_\n    }\n\n    class Activation {\n        \u003c\u003cabstract\u003e\u003e\n        +double call(double x) const\n        +double derivative(double x) const\n    }\n\n    class ReLU_ {\n        +double call(double x) const\n        +double derivative(double x) const\n    }\n\n    class Sigmoid_ {\n        +double call(double x) const\n        +double derivative(double x) const\n    }\n\n    class Tanh_ {\n        +double call(double x) const\n        +double derivative(double x) const\n    }\n\n    class Functions {\n        +static Activation* ReLU\n        +static Activation* Sigmoid\n        +static Activation* Tanh\n    }\n\n    class Layer {\n        +Layer(size_t input_size, size_t output_size)\n        +Vector forward(const Vector\u0026 input)\n        +void backward(const Vector\u0026 grad, double learning_rate)\n        -Matrix weights_\n        -Vector biases_\n        -Vector last_input_\n        -Vector last_output_\n        -Activation* activation_\n    }\n\n    class LinearRegression {\n        +LinearRegression(std::vector\u003cVector\u003e\u0026 x, std::vector\u003cVector\u003e\u0026 y)\n        +void fit()\n        +Vector predict(std::vector\u003cVector\u003e\u0026 x)\n        -std::vector\u003cVector\u003e x_\n        -std::vector\u003cvector\u003e y_\n        -Vector theta_\n        -double beta_\n    }\n\n    class LogisticRegression {\n        +LogisticRegression(std::vector\u003cVector\u003e\u0026 x, std::vector\u003cVector\u003e\u0026 y)\n        +void fit(std::vector\u003cVector\u003e\u0026 x, std::vector\u003cVector\u003e\u0026 y)\n        +Vector predict(std::vector\u003cVector\u003e\u0026 x)\n        -std::vector\u003cVector\u003e x_\n        -std::vector\u003cvector\u003e y_\n        -Vector theta_\n        -double beta_\n    }\n\n    Vector --\u003e Matrix\n    Matrix --\u003e Vector\n    Layer --\u003e Matrix\n    Layer --\u003e Vector\n    Layer --\u003e Activation\n    Activation \u003c|-- ReLU_\n    Activation \u003c|-- Sigmoid_\n    Activation \u003c|-- Tanh_\n    Functions --\u003e Activation\n\n    LinearRegression --\u003e Vector\n    LogisticRegression --\u003e Vector\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdattali18%2Fcpp-math-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdattali18%2Fcpp-math-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdattali18%2Fcpp-math-library/lists"}