{"id":24983888,"url":"https://github.com/team-fastml/fastml","last_synced_at":"2025-04-11T21:14:12.760Z","repository":{"id":37645671,"uuid":"266398271","full_name":"Team-fastML/fastML","owner":"Team-fastML","description":"A Python package built on sklearn for running a series of classification Algorithms in a faster and easier way.  ","archived":false,"fork":false,"pushed_at":"2023-07-06T22:00:35.000Z","size":138,"stargazers_count":52,"open_issues_count":9,"forks_count":23,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-11T21:14:05.987Z","etag":null,"topics":["algorithms","data-science","deep-learning","machine-learning","machine-learning-algorithms","neural-network","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/fastML/","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/Team-fastML.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-23T18:43:01.000Z","updated_at":"2025-03-09T04:03:48.000Z","dependencies_parsed_at":"2023-01-17T16:47:20.592Z","dependency_job_id":"72ed5101-c70d-46ad-a438-63a11fe5a44f","html_url":"https://github.com/Team-fastML/fastML","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-fastML%2FfastML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-fastML%2FfastML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-fastML%2FfastML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team-fastML%2FfastML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Team-fastML","download_url":"https://codeload.github.com/Team-fastML/fastML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480426,"owners_count":21110937,"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":["algorithms","data-science","deep-learning","machine-learning","machine-learning-algorithms","neural-network","python"],"created_at":"2025-02-04T09:39:58.286Z","updated_at":"2025-04-11T21:14:12.733Z","avatar_url":"https://github.com/Team-fastML.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastML [![Downloads](https://static.pepy.tech/personalized-badge/fastml?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=blue\u0026left_text=Downloads)](https://pepy.tech/project/fastml)\n\n--------\nA Python package built with sklearn for running multiple classification algorithms in as little as 4 lines. This package drastically makes the work of Data Scientists, AI and ML engineers very easy and fast by saving them the physical stress of writing close to 200 lines of code as they would if not for this package.\n# Algorithms\n\n------------\n- ### Logistic Regression\n- ### Support Vector Machine\n- ### Decision Tree Classifier\n- ### Random Forest Classifier\n- ### K-Nearest Neighbors\n- ### NeuralNet Classifier\n--------------------------\n# Getting started\n\n-----------------\n\n## Install the package\n```bash\npip install fastML\n```\nNavigate to folder and install requirements: \n```bash\npip install -r requirements.txt\n```\n## Usage\nAssign the variables X and Y to the desired columns and assign the variable size to the desired test_size.  \n```python\nX = \u003c df.features \u003e\nY = \u003c df.target \u003e\nsize = \u003c test_size \u003e\n```\n## Encoding Categorical Data \nEncode target variable if non-numerical:\n```python\nfrom fastML import EncodeCategorical\nY = EncodeCategorical(Y)\n```\n## Using the Neural Net Classifier\n```\nfrom nnclassifier import neuralnet\n```\n## Running fastML\n```python\nfastML(X, Y, size, RandonForestClassifier(), DecisionTreeClassifier(), KNeighborsClassifier(), SVC(),\n        include_special_classifier = True, # to include the neural net classifier\n        special_classifier_epochs=200,\n        special_classifier_nature ='fixed'\n)\n```\nYou may also check the test.py file to see the use case.\n\n## Example output\n```python\nUsing TensorFlow backend.\n\n    \n   __          _   __  __ _      \n  / _|        | | |  \\/  | |     \n | |_ __ _ ___| |_| \\  / | |        \n |  _/ _` / __| __| |\\/| | |     \n | || (_| \\__ \\ |_| |  | | |____ \n |_| \\__,_|___/\\__|_|  |_|______|\n                                 \n                                 \n\n____________________________________________________\n____________________________________________________\nAccuracy Score for SVC is \n0.9811320754716981\n\n\nConfusion Matrix for SVC is \n[[16  0  0]\n [ 0 20  1]\n [ 0  0 16]]\n\n\nClassification Report for SVC is \n              precision    recall  f1-score   support\n\n           0       1.00      1.00      1.00        16\n           1       1.00      0.95      0.98        21\n           2       0.94      1.00      0.97        16\n\n    accuracy                           0.98        53\n   macro avg       0.98      0.98      0.98        53\nweighted avg       0.98      0.98      0.98        53\n\n\n\n____________________________________________________\n____________________________________________________\n____________________________________________________\n____________________________________________________\nAccuracy Score for RandomForestClassifier is \n0.9622641509433962\n\n\nConfusion Matrix for RandomForestClassifier is \n[[16  0  0]\n [ 0 20  1]\n [ 0  1 15]]\n\n\nClassification Report for RandomForestClassifier is \n              precision    recall  f1-score   support\n\n           0       1.00      1.00      1.00        16\n           1       0.95      0.95      0.95        21\n           2       0.94      0.94      0.94        16\n\n    accuracy                           0.96        53\n   macro avg       0.96      0.96      0.96        53\nweighted avg       0.96      0.96      0.96        53\n\n\n\n____________________________________________________\n____________________________________________________\n____________________________________________________\n____________________________________________________\nAccuracy Score for DecisionTreeClassifier is \n0.9622641509433962\n\n\nConfusion Matrix for DecisionTreeClassifier is \n[[16  0  0]\n [ 0 20  1]\n [ 0  1 15]]\n\n\nClassification Report for DecisionTreeClassifier is \n              precision    recall  f1-score   support\n\n           0       1.00      1.00      1.00        16\n           1       0.95      0.95      0.95        21\n           2       0.94      0.94      0.94        16\n\n    accuracy                           0.96        53\n   macro avg       0.96      0.96      0.96        53\nweighted avg       0.96      0.96      0.96        53\n\n\n\n____________________________________________________\n____________________________________________________\n____________________________________________________\n____________________________________________________\nAccuracy Score for KNeighborsClassifier is \n0.9811320754716981\n\n\nConfusion Matrix for KNeighborsClassifier is \n[[16  0  0]\n [ 0 20  1]\n [ 0  0 16]]\n\n\nClassification Report for KNeighborsClassifier is \n              precision    recall  f1-score   support\n\n           0       1.00      1.00      1.00        16\n           1       1.00      0.95      0.98        21\n           2       0.94      1.00      0.97        16\n\n    accuracy                           0.98        53\n   macro avg       0.98      0.98      0.98        53\nweighted avg       0.98      0.98      0.98        53\n\n\n\n____________________________________________________\n____________________________________________________\n____________________________________________________\n____________________________________________________\nAccuracy Score for LogisticRegression is \n0.9811320754716981\n\n\nConfusion Matrix for LogisticRegression is \n[[16  0  0]\n [ 0 20  1]\n [ 0  0 16]]\n\n\nClassification Report for LogisticRegression is \n              precision    recall  f1-score   support\n\n           0       1.00      1.00      1.00        16\n           1       1.00      0.95      0.98        21\n           2       0.94      1.00      0.97        16\n\n    accuracy                           0.98        53\n   macro avg       0.98      0.98      0.98        53\nweighted avg       0.98      0.98      0.98        53\n\n\n\n____________________________________________________\n____________________________________________________\nIncluded special classifier with fixed nature\nModel: \"sequential_1\"\n_________________________________________________________________\nLayer (type)                 Output Shape              Param #   \n=================================================================\ndense_1 (Dense)              (None, 4)                 20        \n_________________________________________________________________\ndense_2 (Dense)              (None, 16)                80        \n_________________________________________________________________\ndense_3 (Dense)              (None, 3)                 51        \n=================================================================\nTotal params: 151\nTrainable params: 151\nNon-trainable params: 0\n_________________________________________________________________\nTrain on 97 samples, validate on 53 samples\nEpoch 1/200\n97/97 [==============================] - 0s 1ms/step - loss: 1.0995 - accuracy: 0.1443 - val_loss: 1.1011 - val_accuracy: 0.3019\n97/97 [==============================] - 0s 63us/step - loss: 0.5166 - accuracy: 0.7010 - val_loss: 0.5706 - val_accuracy: 0.6038\nEpoch 100/200\n97/97 [==============================] - 0s 88us/step - loss: 0.5128 - accuracy: 0.7010 - val_loss: 0.5675 - val_accuracy: 0.6038\nEpoch 200/200\n97/97 [==============================] - 0s 79us/step - loss: 0.3375 - accuracy: 0.8969 - val_loss: 0.3619 - val_accuracy: 0.9057\n97/97 [==============================] - 0s 36us/step\n____________________________________________________\n____________________________________________________\nAccuracy Score for neuralnet is \n0.8969072103500366\n\n\nConfusion Matrix for neuralnet is \n[[16  0  0]\n [ 0 16  5]\n [ 0  0 16]]\n\n\nClassification Report for neuralnet is \n              precision    recall  f1-score   support\n\n           0       1.00      1.00      1.00        16\n           1       1.00      0.76      0.86        21\n           2       0.76      1.00      0.86        16\n\n    accuracy                           0.91        53\n   macro avg       0.92      0.92      0.91        53\nweighted avg       0.93      0.91      0.91        53\n\n\n\n____________________________________________________\n____________________________________________________\n                    Model            Accuracy\n0                     SVC  0.9811320754716981\n1  RandomForestClassifier  0.9622641509433962\n2  DecisionTreeClassifier  0.9622641509433962\n3    KNeighborsClassifier  0.9811320754716981\n4      LogisticRegression  0.9811320754716981\n5               neuralnet  0.8969072103500366\n\n```\n## Author: [Jerry Buaba](https://linkedin.com/in/jerry-buaba-768351172)\n## Acknowledgements\nThanks to [Vincent Njonge](https://linkedin.com/in/vincent-njonge-528070178), [Emmanuel Amoaku](https://linkedin.com/in/emmanuel-amoaku), [Divine Alorvor](https://www.linkedin.com/in/divine-kofi-alorvor-86775117b), [Philemon Johnson](https://linkedin.com/in/philemon-johnson-b95009171), [William Akuffo](https://linkedin.com/in/william-akuffo-26b430159), [Labaran Mohammed](https://linkedin.com/in/adam-labaran-111358181), [Benjamin Acquaah](https://linkedin.com/in/benjamin-acquaah-9294aa14b), [Silas Bempong](https://www.linkedin.com/in/silas-bempong-604916120) and [Gal Giacomelli](https://linkedin.com/in/gal-giacomelli-221679136) for making this project a success.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam-fastml%2Ffastml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteam-fastml%2Ffastml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam-fastml%2Ffastml/lists"}