Home

Getting the Right Library for Machine Learning

|
Updated:  
2016-07-18 1:51:33
|
TensorFlow For Dummies
Explore Book
Buy On Amazon
When working with R and Python for machine learning, you gain the benefit of not having to reinvent the wheel when it comes to algorithms. There is a library available to meet your specific needs — you just need to know which one to use. This table provides you with a listing of the libraries used for machine learning for both R and Python. When you want to perform any algorithm-related task, simply load the library needed for that task into your programming environment.
Algorithm Python implementation R implementation
Adaboost sklearn.ensemble.AdaBoostClassifier
sklearn.ensemble.AdaBoostRegressor
library(ada) : ada
Gradient Boosting sklearn.ensemble.GradientBoostingClassifier
sklearn.ensemble.GradientBoostingRegressor
library(gbm) : gbm
K-means sklearn.cluster.KMeans
sklearn.cluster.MiniBatchKMeans
library(stats) : kmeans
K-nearest Neighbors sklearn.neighbors.KNeighborsClassifier
sklearn.neighbors.KNeighborsRegressor
library(class): knn
Linear regression sklearn.linear_model.LinearRegression
sklearn.linear_model.Ridge
sklearn.linear_model.Lasso
sklearn.linear_model.ElasticNet
sklearn.linear_model.SGDRegressor
library(stats) : lm
library(stats) : glm
library(MASS) : lm.ridge
library(lars) : lars
library(glmnet) : glmnet
Logistic regression sklearn.linear_model.LogisticRegression
sklearn.linear_model.SGDClassifier
library(stats) : glm
library(glmnet) : glmnet
Naive Bayes sklearn.naive_bayes.GaussianNB
sklearn.naive_bayes.MultinomialNB
sklearn.naive_bayes.BernoulliNB
library(klaR) : NaiveBayes
library(e1071) : naiveBayes
Neural Networks sklearn.neural_network.BernoulliRBM
(in version 0.18 of Scikit-learn, a new implementation of supervised neural network will be introducted)
library(neuralnet) : neuralnet
library(AMORE) : train
library(nnet) : nnet
PCA sklearn.decomposition.PCA library(stats): princomp
library(stats) : stats
Random Forest sklearn.ensemble.RandomForestClassifier
sklearn.ensemble.RandomForestRegressor
sklearn.ensemble.ExtraTreesClassifier
sklearn.ensemble.ExtraTreesRegressor
library(randomForest) : randomForest
Support Vector Machines sklearn.svm.SVC
sklearn.svm.LinearSVC
sklearn.svm.NuSVC
sklearn.svm.SVR
sklearn.svm.LinearSVR
sklearn.svm.NuSVR
sklearn.svm.OneClassSVM
library(e1071) : svm
SVD sklearn.decomposition.TruncatedSVD
sklearn.decomposition.NMF
library(irlba) : irlba
library(svd) : svd

About This Article

This article is from the book: 

About the book author:

John Paul Mueller is a freelance author and technical editor. He has writing in his blood, having produced 100 books and more than 600 articles to date. The topics range from networking to home security and from database management to heads-down programming. John has provided technical services to both Data Based Advisor and Coast Compute magazines.

Luca Massaron is a data scientist specialized in organizing and interpreting big data and transforming it into smart data by means of the simplest and most effective data mining and machine learning techniques. Because of his job as a quantitative marketing consultant and marketing researcher, he has been involved in quantitative data since 2000 with different clients and in various industries, and is one of the top 10 Kaggle data scientists.