{"id":34049202,"url":"https://github.com/becxer/pytrain","last_synced_at":"2026-04-09T00:31:09.054Z","repository":{"id":57458007,"uuid":"44314384","full_name":"becxer/pytrain","owner":"becxer","description":"Machine Learning library for python","archived":false,"fork":false,"pushed_at":"2022-09-04T06:38:19.000Z","size":41362,"stargazers_count":21,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-15T18:05:20.490Z","etag":null,"topics":["apriori","clustering","crf","dbscan","decision-trees","feedforward-neural-network","hmm","kmeans","knn","linear-regression","logistic-regression","machine-learning","naive-bayes","neural-network","numpy","pattern-recognition","python","svm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/becxer.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}},"created_at":"2015-10-15T11:58:11.000Z","updated_at":"2025-07-22T05:38:36.000Z","dependencies_parsed_at":"2022-09-06T14:41:25.611Z","dependency_job_id":null,"html_url":"https://github.com/becxer/pytrain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/becxer/pytrain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becxer%2Fpytrain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becxer%2Fpytrain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becxer%2Fpytrain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becxer%2Fpytrain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/becxer","download_url":"https://codeload.github.com/becxer/pytrain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becxer%2Fpytrain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apriori","clustering","crf","dbscan","decision-trees","feedforward-neural-network","hmm","kmeans","knn","linear-regression","logistic-regression","machine-learning","naive-bayes","neural-network","numpy","pattern-recognition","python","svm"],"created_at":"2025-12-14T00:25:22.062Z","updated_at":"2026-04-09T00:31:09.046Z","avatar_url":"https://github.com/becxer.png","language":"Python","readme":"# pytrain\n\nMachine Learning library for python \n\nThis library implemented only with python and numpy\n\n![alt text](https://github.com/becxer/pytrain/raw/master/tmp/logo_pytrain.png \"pytrain\")\n\n## Algorithms\n\n+ Decision Tree(ID3)\n+ Gaussian NaiveBayes\n+ NaiveBayes\n+ KNN\n+ Neural Network(FNN)\n+ Logistic Regression\n+ Linear Regression\n+ DBSCAN\n+ Apriori\n+ Kmeans\n+ HierarchicalClustering\n+ SVM\n+ SVC (SVM classifier)\n+ HMM \n+ CRF \n\n## Requirements\n\n - Numpy\n - Python 2 or 3\n\n## Installation\n\n    $ sudo pip install --upgrade pytrain\n    \n## Basic Usage\n\n    import numpy as np\n    from pytrain.NeuralNetwork import FNN\n\n    # Simple dataset\n    train_mat = [[0.12,0.25],[3.24,4.33],[0.14,0.45],[7.30,4.23]]\n    train_label = [[0,1],[1,0],[0,1],[1,0]]\n\n    test_a = [0.10,0.33]\n    test_b = [4.0,4.5]\n\n    # Train model (FNN)\n    hidden_layer = [3,2]\n    fnn = FNN(train_mat, train_label, hidden_layer)\n    fnn.fit(lr = 0.01, epoch = 2000, err_th = 0.001, batch_size = 4)\n\n    # Test model (FNN)\n    res_a = np.rint(fnn.predict(test_a))\n    res_b = np.rint(fnn.predict(test_b))\n\n    print(\"X %s =\u003e Y %s\" % (test_a, res_a))\n    print(\"X %s =\u003e Y %s\" % (test_b, res_b))\n\n    ———————— output ————————\n\n    X [0.1, 0.33] =\u003e Y [ 0.  1.]\n    X [4.0, 4.5] =\u003e Y [ 1.  0.]\n\n[See more examples here](https://github.com/becxer/pytrain/tree/master/examples)\n\n## How to contribute\n\n    Fork this repository, and write your algorithm, pull request.\n    Don't forgot proper test code in test_pytrain.\n    Test code should be work successfully in below command.\n    \n    $ python test.py\n\n## Reference\n\n - Machine Learning in Action by Peter Harrington (2013)\n - Pattern Recognition by Ohilseok (2008)\n - Machine Learning to Deep Learning by Deepcumen (2015)\n - Pattern Recognition and Machine Learning by Christopher M. Bishop (2006)\n - Sequential Minimal Optimization for SVM by John C.Platt (1998)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecxer%2Fpytrain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbecxer%2Fpytrain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecxer%2Fpytrain/lists"}