{"id":14969063,"url":"https://github.com/jeff1evesque/machine-learning","last_synced_at":"2025-04-07T13:07:13.187Z","repository":{"id":19669853,"uuid":"22923393","full_name":"jeff1evesque/machine-learning","owner":"jeff1evesque","description":"Web-interface + rest API for classification and regression (https://jeff1evesque.github.io/machine-learning.docs)","archived":false,"fork":false,"pushed_at":"2021-02-17T01:11:33.000Z","size":21751,"stargazers_count":259,"open_issues_count":78,"forks_count":83,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-31T11:06:19.081Z","etag":null,"topics":["d3js","flask","machine-learning","mariadb","mongodb","puppet","python","reactjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeff1evesque.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.json","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-13T16:50:18.000Z","updated_at":"2025-02-25T22:22:59.000Z","dependencies_parsed_at":"2022-08-07T09:15:30.094Z","dependency_job_id":null,"html_url":"https://github.com/jeff1evesque/machine-learning","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff1evesque%2Fmachine-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff1evesque%2Fmachine-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff1evesque%2Fmachine-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff1evesque%2Fmachine-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeff1evesque","download_url":"https://codeload.github.com/jeff1evesque/machine-learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":["d3js","flask","machine-learning","mariadb","mongodb","puppet","python","reactjs"],"created_at":"2024-09-24T13:41:04.601Z","updated_at":"2025-04-07T13:07:13.164Z","avatar_url":"https://github.com/jeff1evesque.png","language":"JavaScript","readme":"# Machine Learning [![Build Status](https://travis-ci.org/jeff1evesque/machine-learning.svg?branch=master)](https://travis-ci.org/jeff1evesque/machine-learning) [![Coverage Status](https://coveralls.io/repos/github/jeff1evesque/machine-learning/badge.svg?branch=master)](https://coveralls.io/github/jeff1evesque/machine-learning?branch=master)\n\nThis project provides a [web-interface](https://github.com/jeff1evesque/machine-learning/blob/master/README.md#web-interface),\n as well as a [programmatic-api](https://github.com/jeff1evesque/machine-learning/blob/master/README.md#programmatic-interface)\n for various machine learning algorithms.\n\n**Supported algorithms**:\n\n- [Support Vector Machine](https://en.wikipedia.org/wiki/Support_vector_machine) (SVM)\n- [Support Vector Regression](https://en.wikipedia.org/wiki/Support_vector_machine#Regression) (SVR)\n\n## Contributing\n\nPlease adhere to [`contributing.md`](https://github.com/jeff1evesque/machine-learning/blob/master/contributing.md),\n when contributing code. Pull requests that deviate from the\n [`contributing.md`](https://github.com/jeff1evesque/machine-learning/blob/master/contributing.md),\n could be [labelled](https://github.com/jeff1evesque/machine-learning/labels)\n as `invalid`, and closed (without merging to master). These best practices\n will ensure integrity, when revisions of code, or issues need to be reviewed.\n\n**Note:** support, and philantropy can be [inquired](https://jeff1evesque.github.io/machine-learning.docs/latest/html/contribution/support),\n to further assist with development.\n\n## Configuration\n\nFork this project, using of the following methods:\n\n- [simple clone](https://jeff1evesque.github.io/machine-learning.docs/latest/html/configuration/setup-clone#simple-clone):\n clone the remote master branch.\n- [commit hash](https://jeff1evesque.github.io/machine-learning.docs/latest/html/configuration/setup-clone#commit-hash):\n clone the remote master branch, then checkout a specific commit hash.\n- [release tag](https://jeff1evesque.github.io/machine-learning.docs/latest/html/configuration/setup-clone#release-tag):\n clone the remote branch, associated with the desired release tag.\n\n## Installation\n\nTo proceed with the installation for this project, users will need to decide\nwhether to use the rancher ecosystem, or use `docker-compose`. The former will\nlikely be less reliable, since the corresponding install script, may not work\nnicely across different operating systems. Additionally, this project will\nassume rancher as the primary method to deploy, and run the application. So,\nwhen using the `docker-compose` alternate, keep track what the corresponding\n[endpoints](https://github.com/jeff1evesque/machine-learning/blob/master/README.md#execution)\nshould be.\n\nIf users choose rancher, both docker and rancher must be installed.\nInstalling docker must be done manually, to fulfill a set of [dependencies](https://jeff1evesque.github.io/machine-learning.docs/latest/html/installation/dependencies).\nOnce completed, rancher can be installed, and automatically configured, by simply\nexecuting a provided bash script, from the docker quickstart terminal:\n\n```bash\ncd /path/to/machine-learning\n./install-rancher\n```\n\n**Note:** the installation, and the configuration of rancher, has been [outlined](https://jeff1evesque.github.io/machine-learning.docs/latest/html/installation/rancher)\nif more explicit instructions are needed.\n\nIf users choose to forgo rancher, and use the `docker-compose`, then simply\ninstall `docker`, as well as `docker-compose`. This will allow the application\nto be deployed from any terminal console:\n\n```bash\ncd /path/to/machine-learning\ndocker-compose up\n```\n\n**Note:** the installation, and the configuration of `docker-compose`, has been [outlined](https://jeff1evesque.github.io/machine-learning.docs/latest/html/installation/docker-compose)\nif more explicit instructions are needed.\n\n## Execution\n\nBoth the web-interface, and the programmatic-api, have corresponding\n [unit tests](https://github.com/jeff1evesque/machine-learning/blob/master/doc/test/pytest.rst)\n which can be reviewed, and implemented. It is important to remember,\n the installation of this application will dictate the endpoint. More\n specifically, if the application was installed via rancher, then the\n endpoint will take the form of `https://192.168.99.101:XXXX`. However,\n if the `docker-compose up` alternate was used, then the endpoint will\n likely change to `https://localhost:XXXX`, or `https://127.0.0.1:XXXX`.\n\n### Web Interface\n\nThe [web-interface](https://github.com/jeff1evesque/machine-learning/blob/master/interface/templates/index.html),\n can be accessed within the browser on `https://192.168.99.101:8080`:\n\n![web-interface](https://user-images.githubusercontent.com/2907085/39499223-97b96fce-4d7a-11e8-96e2-c4e31f6b8e09.JPG 'web-interface')\n\nThe following sessions are available:\n\n- `data_new`: store the provided dataset(s), within the implemented sql\n database.\n- `data_append`: append additional dataset(s), to an existing representation\n (from an earlier `data_new` session), within the implemented sql database.\n- `model_generate`: using previous stored dataset(s) (from an earlier\n- `data_new`, or `data_append` session), generate a corresponding model into\n- `model_predict`: using a previous stored model (from an earlier\n `model_predict` session), from the implemented nosql datastore, along with\n user supplied values, generate a corresponding prediction.\n\nWhen using the web-interface, it is important to ensure the csv, xml, or json\n file(s), representing the corresponding dataset(s), are properly formatted.\n Dataset(s) poorly formatted will fail to create respective json dataset\n representation(s). Subsequently, the dataset(s) will not succeed being stored\n into corresponding database tables. This will prevent any models, and subsequent\n predictions from being made.\n\nThe following dataset(s), show acceptable syntax:\n\n- [CSV sample datasets](https://github.com/jeff1evesque/machine-learning/tree/master/interface/static/data/csv/)\n- [XML sample datasets](https://github.com/jeff1evesque/machine-learning/tree/master/interface/static/data/xml/)\n- [JSON sample datasets](https://github.com/jeff1evesque/machine-learning/tree/master/interface/static/data/json/web_interface)\n\n**Note:** each dependent variable value (for JSON datasets), is an array\n (square brackets), since each dependent variable may have multiple\n observations.\n\n### Programmatic Interface\n\nThe programmatic-interface, or set of API, allow users to implement the\n following sessions:\n\n- `data_new`: store the provided dataset(s), within the implemented sql\n database.\n- `data_append`: append additional dataset(s), to an existing representation\n (from an earlier `data_new` session), within the implemented sql database.\n- `model_generate`: using previous stored dataset(s) (from an earlier\n- `data_new`, or `data_append` session), generate a corresponding model into\n- `model_predict`: using a previous stored model (from an earlier\n `model_predict` session), from the implemented nosql datastore, along with\n user supplied values, generate a corresponding prediction.\n\nA post request, can be implemented in python, as follows:\n\n```python\nimport requests\n\nendpoint = 'https://192.168.99.101:9090/load-data'\nheaders = {\n    'Authorization': 'Bearer ' + token,\n    'Content-Type': 'application/json'\n}\n\nrequests.post(endpoint, headers=headers, data=json_string_here)\n```\n\n**Note:** more information, regarding how to obtain a valid `token`, can be further\n reviewed, in the `/login` [documentation](https://jeff1evesque.github.io/machine-learning.docs/latest/html/programmatic-interface/authentication/login).\n\n**Note:** various `data` [attributes](https://jeff1evesque.github.io/machine-learning.docs/latest/html/programmatic-interface/data-attributes) can be nested in above `POST` request.\n\nIt is important to remember that the [`docker-compose.development.yml`](https://github.com/jeff1evesque/machine-learning/blob/3889788a8343a4b7cef2cf84166f9bd35d83021c/docker-compose.development.yml#L33-L43),\n has defined two port forwards, each assigned to its corresponding reverse\n proxy. This allows port `8080` on the host, to map into the `webserver-web`\n container. A similar case for the programmatic-api, uses port `9090` on the\n host.\n","funding_links":[],"categories":["Python"],"sub_categories":["General-Purpose Machine Learning"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff1evesque%2Fmachine-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeff1evesque%2Fmachine-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff1evesque%2Fmachine-learning/lists"}