Package: fastML
fastMLA 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.AlgorithmsLogistic RegressionSupport Vector MachineDecision Tree ClassifierRandom Forest ClassifierK-Nearest NeighborsNeuralNet ClassifierGetting startedInstall the packagepipinstallfastMLNavigate to folder and install requirements:pipinstall-rrequirements.txtUsageAssign 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 DataEncode target variable if non-numerical:fromfastMLimportEncodeCategoricalY=EncodeCategorical(Y)Using the Neural Net Classifierfrom nnclassifier import neuralnetRunning fastMLfastML(X,Y,size,RandonForestClassifier(),DecisionTreeClassifier(),KNeighborsClassifier(),SVC(),include_special_classifier=True,# to include the neural net classifierspecial_classifier_epochs=200,special_classifier_nature='fixed')You may also check the test.py file to see the use case.Example outputUsingTensorFlowbackend.________/_||||\/||||_______||_|\/|||_/_`/__|__||\/||||||(_|\__\|_|||||____|_|\__,_|___/\__|_||_|______|________________________________________________________________________________________________________AccuracyScoreforSVCis0.9811320754716981ConfusionMatrixforSVCis[[1600][0201][0016]]ClassificationReportforSVCisprecisionrecallf1-scoresupport01.001.001.001611.000.950.982120.941.000.9716accuracy0.9853macroavg0.980.980.9853weightedavg0.980.980.9853________________________________________________________________________________________________________________________________________________________________________________________________________________AccuracyScoreforRandomForestClassifieris0.9622641509433962ConfusionMatrixforRandomForestClassifieris[[1600][0201][0115]]ClassificationReportforRandomForestClassifierisprecisionrecallf1-scoresupport01.001.001.001610.950.950.952120.940.940.9416accuracy0.9653macroavg0.960.960.9653weightedavg0.960.960.9653________________________________________________________________________________________________________________________________________________________________________________________________________________AccuracyScoreforDecisionTreeClassifieris0.9622641509433962ConfusionMatrixforDecisionTreeClassifieris[[1600][0201][0115]]ClassificationReportforDecisionTreeClassifierisprecisionrecallf1-scoresupport01.001.001.001610.950.950.952120.940.940.9416accuracy0.9653macroavg0.960.960.9653weightedavg0.960.960.9653________________________________________________________________________________________________________________________________________________________________________________________________________________AccuracyScoreforKNeighborsClassifieris0.9811320754716981ConfusionMatrixforKNeighborsClassifieris[[1600][0201][0016]]ClassificationReportforKNeighborsClassifierisprecisionrecallf1-scoresupport01.001.001.001611.000.950.982120.941.000.9716accuracy0.9853macroavg0.980.980.9853weightedavg0.980.980.9853________________________________________________________________________________________________________________________________________________________________________________________________________________AccuracyScoreforLogisticRegressionis0.9811320754716981ConfusionMatrixforLogisticRegressionis[[1600][0201][0016]]ClassificationReportforLogisticRegressionisprecisionrecallf1-scoresupport01.001.001.001611.000.950.982120.941.000.9716accuracy0.9853macroavg0.980.980.9853weightedavg0.980.980.9853________________________________________________________________________________________________________IncludedspecialclassifierwithfixednatureModel:"sequential_1"_________________________________________________________________Layer(type)OutputShapeParam#=================================================================dense_1(Dense)(None,4)20_________________________________________________________________dense_2(Dense)(None,16)80_________________________________________________________________dense_3(Dense)(None,3)51=================================================================Totalparams:151Trainableparams:151Non-trainableparams:0_________________________________________________________________Trainon97samples,validateon53samplesEpoch1/20097/97[==============================]-0s1ms/step-loss:1.0995-accuracy:0.1443-val_loss:1.1011-val_accuracy:0.301997/97[==============================]-0s63us/step-loss:0.5166-accuracy:0.7010-val_loss:0.5706-val_accuracy:0.6038Epoch100/20097/97[==============================]-0s88us/step-loss:0.5128-accuracy:0.7010-val_loss:0.5675-val_accuracy:0.6038Epoch200/20097/97[==============================]-0s79us/step-loss:0.3375-accuracy:0.8969-val_loss:0.3619-val_accuracy:0.905797/97[==============================]-0s36us/step________________________________________________________________________________________________________AccuracyScoreforneuralnetis0.8969072103500366ConfusionMatrixforneuralnetis[[1600][0165][0016]]ClassificationReportforneuralnetisprecisionrecallf1-scoresupport01.001.001.001611.000.760.862120.761.000.8616accuracy0.9153macroavg0.920.920.9153weightedavg0.930.910.9153________________________________________________________________________________________________________ModelAccuracy0SVC0.98113207547169811RandomForestClassifier0.96226415094339622DecisionTreeClassifier0.96226415094339623KNeighborsClassifier0.98113207547169814LogisticRegression0.98113207547169815neuralnet0.8969072103500366Author:Jerry BuabaAcknowledgementsThanks toVincent Njonge,Emmanuel Amoaku,Divine Alorvor,Philemon Johnson,William Akuffo,Labaran Mohammed,Benjamin Acquaah,Silas BempongandGal Giacomellifor making this project a success.