{"id":18463638,"url":"https://github.com/alvii147/datacheese","last_synced_at":"2025-04-28T13:32:25.978Z","repository":{"id":134303742,"uuid":"610485794","full_name":"alvii147/DataCheese","owner":"alvii147","description":"Python library with implementations of popular data science and machine learning algorithms","archived":false,"fork":false,"pushed_at":"2024-08-11T23:18:58.000Z","size":3091,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T16:57:55.810Z","etag":null,"topics":["data-science","machine-learning","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvii147.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-03-06T21:43:03.000Z","updated_at":"2024-08-11T23:19:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4f71b01-95da-4b83-b94f-7e2dd794aafc","html_url":"https://github.com/alvii147/DataCheese","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvii147%2FDataCheese","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvii147%2FDataCheese/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvii147%2FDataCheese/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvii147%2FDataCheese/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvii147","download_url":"https://codeload.github.com/alvii147/DataCheese/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319791,"owners_count":21570456,"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":["data-science","machine-learning","python"],"created_at":"2024-11-06T09:07:32.525Z","updated_at":"2025-04-28T13:32:25.903Z","avatar_url":"https://github.com/alvii147.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Free Palestine](https://hinds-banner.vercel.app/free-palestine?variant=olive)](https://www.pcrf.net/)\n\n[![Genocide Watch](https://hinds-banner.vercel.app/genocide-watch?variant=olive)](https://www.pcrf.net/)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"DataCheese logo\" src=\"docs/img/logo_full.png\" width=600 /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003e\u003ci\u003eDataCheese\u003c/i\u003e\u003c/strong\u003e is a Python library with implementations of popular data science and machine learning algorithms.\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![](https://img.shields.io/github/actions/workflow/status/alvii147/DataCheese/github-ci.yml?branch=master\u0026label=GitHub%20CI\u0026logo=github)](https://github.com/alvii147/DataCheese/actions) [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Documentation](https://img.shields.io/badge/Sphinx-Documentation-000000?logo=sphinx)](https://alvii147.github.io/DataCheese/build/html/index.html)\n\n\u003c/div\u003e\n\n## Installation\n\n### :one: [Install Python](https://www.python.org/)\n\nPython 3.10 or above required.\n\n### :two: Install package using [pip](https://pypi.org/project/pip/)\n\nInstall directly from the repository:\n\n```bash\npip3 install git+https://github.com/alvii147/DataCheese.git\n```\n\n## Usage\n\nThe `MultiLayerPerceptron` model can be used to train a feed-forward neural network using data:\n\n```python\nimport numpy as np\nfrom datacheese.neural_networks import (\n    MultiLayerPerceptron,\n    SigmoidLayer,\n    ReLULayer,\n)\n\n# number of data patterns\nn_patterns = 5\n# number of feature dimensions\nn_dimensions = 3\n# number of target classes\nn_classes = 2\n\n# generate random data\nrng = np.random.default_rng()\nX = rng.random(size=(n_patterns, n_dimensions))\nY = rng.random(size=(n_patterns, n_classes))\n\n# initialize multi-layer perceptron model\nmodel = MultiLayerPerceptron(lr=0.5)\n# add relu layer\nmodel.add_layer(ReLULayer(n_dimensions, 4))\n# add sigmoid layer\nmodel.add_layer(SigmoidLayer(4, n_classes))\n# fit model to data\nmodel.fit(X, Y, epochs=20, verbose=1)\n```\n\nWhen `verbose` is non-zero, progress is logged:\n\n```\nEpoch: 0, Loss: 0.15181599599950849\nEpoch: 4, Loss: 0.13701115369406147\nEpoch: 8, Loss: 0.11337662383705667\nEpoch: 12, Loss: 0.10121139637335393\nEpoch: 16, Loss: 0.09388681525946835\n```\n\nThe model can then be used to make predictions:\n\n```python\n# predict target values\nY_pred = model.predict(X)\n# compute mean squared loss\nprint(np.mean((Y_pred - Y) ** 2))\n```\n\nThis outputs the following:\n\n```\n0.05310463606057757\n```\n\nFor more details, visit the [documentation pages](https://alvii147.github.io/DataCheese/build/html/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvii147%2Fdatacheese","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvii147%2Fdatacheese","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvii147%2Fdatacheese/lists"}