{"id":22266889,"url":"https://github.com/coderham/data558-machinelearning","last_synced_at":"2025-04-05T22:34:58.972Z","repository":{"id":93309293,"uuid":"135614239","full_name":"CoderHam/data558-MachineLearning","owner":"CoderHam","description":"Polished python code required for one of the assignments for DATA558 - Statistical Machine Learning For Data Scientists at University of Washington.","archived":false,"fork":false,"pushed_at":"2018-06-01T08:44:52.000Z","size":16639,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-19T05:17:32.911Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/CoderHam.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":"2018-05-31T17:18:31.000Z","updated_at":"2018-06-01T08:44:53.000Z","dependencies_parsed_at":"2023-06-28T05:17:14.463Z","dependency_job_id":null,"html_url":"https://github.com/CoderHam/data558-MachineLearning","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/CoderHam%2Fdata558-MachineLearning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderHam%2Fdata558-MachineLearning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderHam%2Fdata558-MachineLearning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderHam%2Fdata558-MachineLearning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoderHam","download_url":"https://codeload.github.com/CoderHam/data558-MachineLearning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411266,"owners_count":20934650,"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":[],"created_at":"2024-12-03T10:36:36.250Z","updated_at":"2025-04-05T22:34:58.955Z","avatar_url":"https://github.com/CoderHam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DATA558 - Machine Learning\n\nPolished python code required for one of the assignments for DATA558 - Statistical Machine Learning For Data Scientists at University of Washington.\n\n## Linear Support Vector Machine with Square Hinge Loss (Classification)\n\nThe model is implemented in [linear_svm.py]models/linear_svm.py. It uses fast gradient descent with backtracking and simplifies the usage to sklearn style .fit and .predict functions. Cross validation is used to find the optimal value of the regularization parameter.\n\n## Demos\n\nFor testing with the Spam dataset (from the book The Elements of Statistical Learning) - Binary classifier\n```\npython3 demo_spam.py\n```\n\nFor testing with the Vowel dataset (from the book The Elements of Statistical Learning) - Multinomial classifier is built using binary classifiers in one-vs-one style.\n```\npython3 demo_vowel.py\n```\n\nFor testing with a custom generated dataset (simulated) - Binary classifier. Bonus - compare performance with sklearn\n```\npython3 demo_simulated.py\n```\n\nFor comparing custom implemented with sklearn on spam dataset (real world) - Binary classifier\n```\npython3 compare_spam.py\n```\n\n## Usage\n\n```python\nfrom models import LinearSVM\nLSVM = LinearSVM()\nweights = LSVM.fit(train_features,train_labels)\ntest_predictions = LSVM.predict(weights,test_features)\n```\n\n\n## Data\n\nThe data is present in the __data__ folder and can also be downloaded from https://web.stanford.edu/~hastie/ElemStatLearn/data.html. There are a few other datasets available there to play around with.\n\n# Required Libraries (Python 3)\n\nnumpy\nsklearn\nscipy\nmatplotlib\npandas\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderham%2Fdata558-machinelearning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderham%2Fdata558-machinelearning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderham%2Fdata558-machinelearning/lists"}