All Projects → Team-fastML → fastML

Team-fastML / fastML

Licence: MIT License
A Python package built on sklearn for running a series of classification Algorithms in a faster and easier way.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to fastML

Machine-Learning
A repo to explain algorithm in machine learning with CHINESE
Stars: ✭ 24 (-40%)
Mutual labels:  machine-learning-algorithms
FB-Ads-Opt-UCB
The easiest way to optimize Facebook Ads using Upper Confidence Bound Algorithm. 💻
Stars: ✭ 23 (-42.5%)
Mutual labels:  machine-learning-algorithms
reweighted-ws
Implementation of the reweighted wake-sleep machine learning algorithm
Stars: ✭ 39 (-2.5%)
Mutual labels:  machine-learning-algorithms
SWBlog
machine learning practitioner, android and python
Stars: ✭ 33 (-17.5%)
Mutual labels:  machine-learning-algorithms
genieclust
Genie++ Fast and Robust Hierarchical Clustering with Noise Point Detection - for Python and R
Stars: ✭ 34 (-15%)
Mutual labels:  machine-learning-algorithms
OpencvInstallation
shell script for openCV installation and configuration in linux based system. Most easy way to configue openCV, you only need to run opencv.sh shell file.
Stars: ✭ 16 (-60%)
Mutual labels:  machine-learning-algorithms
Python-TensorFlow-WebApp
Emerging Technologies Project - 4th Year 2017
Stars: ✭ 16 (-60%)
Mutual labels:  machine-learning-algorithms
data-algorithms-with-spark
O'Reilly Book: [Data Algorithms with Spark] by Mahmoud Parsian
Stars: ✭ 34 (-15%)
Mutual labels:  machine-learning-algorithms
COVID19
Using Kalman Filter to Predict Corona Virus Spread
Stars: ✭ 78 (+95%)
Mutual labels:  machine-learning-algorithms
glossary
https://machinelearning.wtf/ - An online glossary of machine learning terms.
Stars: ✭ 28 (-30%)
Mutual labels:  machine-learning-algorithms
DA Tutorial
This is a 'hands-on' tutorial for the RIKEN International School on Data Assimilation (RISDA2018).
Stars: ✭ 23 (-42.5%)
Mutual labels:  machine-learning-algorithms
pycorels
Public home of pycorels, the python binding to CORELS
Stars: ✭ 51 (+27.5%)
Mutual labels:  machine-learning-algorithms
interactive-simple-linear-regression
A PureScript, browser-based implementation of simple linear regression.
Stars: ✭ 15 (-62.5%)
Mutual labels:  machine-learning-algorithms
neptune-examples
Examples of using Neptune to keep track of your experiments (maintenance only).
Stars: ✭ 22 (-45%)
Mutual labels:  machine-learning-algorithms
adventures-with-ann
All the code for a series of Medium articles on Approximate Nearest Neighbors
Stars: ✭ 40 (+0%)
Mutual labels:  machine-learning-algorithms
genie
Genie: A Fast and Robust Hierarchical Clustering Algorithm (this R package has now been superseded by genieclust)
Stars: ✭ 21 (-47.5%)
Mutual labels:  machine-learning-algorithms
PyImpetus
PyImpetus is a Markov Blanket based feature subset selection algorithm that considers features both separately and together as a group in order to provide not just the best set of features but also the best combination of features
Stars: ✭ 83 (+107.5%)
Mutual labels:  machine-learning-algorithms
Seating Chart
Optimizing a Wedding Reception Seating Chart Using a Genetic Algorithm
Stars: ✭ 25 (-37.5%)
Mutual labels:  machine-learning-algorithms
ZS-Data-Science-Challenge
A Data science challenge - "Mekktronix Sales Forecasting" organised by ZS through Hackerearth platform. Rank: 223 out of 4743.
Stars: ✭ 21 (-47.5%)
Mutual labels:  machine-learning-algorithms
Customer segmentation
Analysing the content of an E-commerce database that contains list of purchases. Based on the analysis, I develop a model that allows to anticipate the purchases that will be made by a new customer, during the following year from its first purchase.
Stars: ✭ 80 (+100%)
Mutual labels:  machine-learning-algorithms

fastML Downloads


A 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.

Algorithms


  • Logistic Regression

  • Support Vector Machine

  • Decision Tree Classifier

  • Random Forest Classifier

  • K-Nearest Neighbors

  • NeuralNet Classifier


Getting started


Install the package

pip install fastML

Navigate to folder and install requirements:

pip install -r requirements.txt

Usage

Assign the variables X and Y to the desired columns and assign the variable size to the desired test_size.

X = < df.features >
Y = < df.target >
size = < test_size >

Encoding Categorical Data

Encode target variable if non-numerical:

from fastML import EncodeCategorical
Y = EncodeCategorical(Y)

Using the Neural Net Classifier

from nnclassifier import neuralnet

Running fastML

fastML(X, Y, size, RandonForestClassifier(), DecisionTreeClassifier(), KNeighborsClassifier(), SVC(),
        include_special_classifier = True, # to include the neural net classifier
        special_classifier_epochs=200,
        special_classifier_nature ='fixed'
)

You may also check the test.py file to see the use case.

Example output

Using TensorFlow backend.

    
   __          _   __  __ _      
  / _|        | | |  \/  | |     
 | |_ __ _ ___| |_| \  / | |        
 |  _/ _` / __| __| |\/| | |     
 | || (_| \__ \ |_| |  | | |____ 
 |_| \__,_|___/\__|_|  |_|______|
                                 
                                 

____________________________________________________
____________________________________________________
Accuracy Score for SVC is 
0.9811320754716981


Confusion Matrix for SVC is 
[[16  0  0]
 [ 0 20  1]
 [ 0  0 16]]


Classification Report for SVC is 
              precision    recall  f1-score   support

           0       1.00      1.00      1.00        16
           1       1.00      0.95      0.98        21
           2       0.94      1.00      0.97        16

    accuracy                           0.98        53
   macro avg       0.98      0.98      0.98        53
weighted avg       0.98      0.98      0.98        53



____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
Accuracy Score for RandomForestClassifier is 
0.9622641509433962


Confusion Matrix for RandomForestClassifier is 
[[16  0  0]
 [ 0 20  1]
 [ 0  1 15]]


Classification Report for RandomForestClassifier is 
              precision    recall  f1-score   support

           0       1.00      1.00      1.00        16
           1       0.95      0.95      0.95        21
           2       0.94      0.94      0.94        16

    accuracy                           0.96        53
   macro avg       0.96      0.96      0.96        53
weighted avg       0.96      0.96      0.96        53



____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
Accuracy Score for DecisionTreeClassifier is 
0.9622641509433962


Confusion Matrix for DecisionTreeClassifier is 
[[16  0  0]
 [ 0 20  1]
 [ 0  1 15]]


Classification Report for DecisionTreeClassifier is 
              precision    recall  f1-score   support

           0       1.00      1.00      1.00        16
           1       0.95      0.95      0.95        21
           2       0.94      0.94      0.94        16

    accuracy                           0.96        53
   macro avg       0.96      0.96      0.96        53
weighted avg       0.96      0.96      0.96        53



____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
Accuracy Score for KNeighborsClassifier is 
0.9811320754716981


Confusion Matrix for KNeighborsClassifier is 
[[16  0  0]
 [ 0 20  1]
 [ 0  0 16]]


Classification Report for KNeighborsClassifier is 
              precision    recall  f1-score   support

           0       1.00      1.00      1.00        16
           1       1.00      0.95      0.98        21
           2       0.94      1.00      0.97        16

    accuracy                           0.98        53
   macro avg       0.98      0.98      0.98        53
weighted avg       0.98      0.98      0.98        53



____________________________________________________
____________________________________________________
____________________________________________________
____________________________________________________
Accuracy Score for LogisticRegression is 
0.9811320754716981


Confusion Matrix for LogisticRegression is 
[[16  0  0]
 [ 0 20  1]
 [ 0  0 16]]


Classification Report for LogisticRegression is 
              precision    recall  f1-score   support

           0       1.00      1.00      1.00        16
           1       1.00      0.95      0.98        21
           2       0.94      1.00      0.97        16

    accuracy                           0.98        53
   macro avg       0.98      0.98      0.98        53
weighted avg       0.98      0.98      0.98        53



____________________________________________________
____________________________________________________
Included special classifier with fixed nature
Model: "sequential_1"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
dense_1 (Dense)              (None, 4)                 20        
_________________________________________________________________
dense_2 (Dense)              (None, 16)                80        
_________________________________________________________________
dense_3 (Dense)              (None, 3)                 51        
=================================================================
Total params: 151
Trainable params: 151
Non-trainable params: 0
_________________________________________________________________
Train on 97 samples, validate on 53 samples
Epoch 1/200
97/97 [==============================] - 0s 1ms/step - loss: 1.0995 - accuracy: 0.1443 - val_loss: 1.1011 - val_accuracy: 0.3019
97/97 [==============================] - 0s 63us/step - loss: 0.5166 - accuracy: 0.7010 - val_loss: 0.5706 - val_accuracy: 0.6038
Epoch 100/200
97/97 [==============================] - 0s 88us/step - loss: 0.5128 - accuracy: 0.7010 - val_loss: 0.5675 - val_accuracy: 0.6038
Epoch 200/200
97/97 [==============================] - 0s 79us/step - loss: 0.3375 - accuracy: 0.8969 - val_loss: 0.3619 - val_accuracy: 0.9057
97/97 [==============================] - 0s 36us/step
____________________________________________________
____________________________________________________
Accuracy Score for neuralnet is 
0.8969072103500366


Confusion Matrix for neuralnet is 
[[16  0  0]
 [ 0 16  5]
 [ 0  0 16]]


Classification Report for neuralnet is 
              precision    recall  f1-score   support

           0       1.00      1.00      1.00        16
           1       1.00      0.76      0.86        21
           2       0.76      1.00      0.86        16

    accuracy                           0.91        53
   macro avg       0.92      0.92      0.91        53
weighted avg       0.93      0.91      0.91        53



____________________________________________________
____________________________________________________
                    Model            Accuracy
0                     SVC  0.9811320754716981
1  RandomForestClassifier  0.9622641509433962
2  DecisionTreeClassifier  0.9622641509433962
3    KNeighborsClassifier  0.9811320754716981
4      LogisticRegression  0.9811320754716981
5               neuralnet  0.8969072103500366

Author: Jerry Buaba

Acknowledgements

Thanks to Vincent Njonge, Emmanuel Amoaku, Divine Alorvor, Philemon Johnson, William Akuffo, Labaran Mohammed, Benjamin Acquaah, Silas Bempong and Gal Giacomelli for making this project a success.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].