Skip to content

(:snake: vs R) Using RStudio and the reticulate package to benchamark important algorithms across R and Python environments

Notifications You must be signed in to change notification settings

Polkas/RPbenchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmarks R vs Python - There's no difference

Using RStudio and the reticulate package to benchmark important algorithms across R and Python environments

reticulate

Environment: Ubuntu 18 openblas R 3.6.3 python 3.7.4 i7 6700HQ 24G DDR4 2133

sudo apt-get install libopenblas-dev

Hypothesis: There is no significant gap in an algorithms performance between R and Python environments.

Algebra operations, OLS and in development phase RandomForest,random numbers generators (Mersenne-Twister, ...), NN and Xgb

Proc usage was calculated by R function microbenchmark::get_nanotime and Python method time.clock

Algebra - X'X

X'X takes around mn^2 flops ( the 2 power were reduced during last years but it will be always exponential).
So time growing linear with additional rows and quadratic with additional columns.

Algebra - solve linear system with a left multiplication by X'

XB=Y - mostly it is a overdetermined system
or X'XB=X'Y - where X'X is a square matrix

OLS - Ordinary Least Squares

OLS consists of solving linear systems with usage of cholesky,QR or LU matrix decomposition

Example under QR decomposition:

Random Forest

NN

XGB

About

(:snake: vs R) Using RStudio and the reticulate package to benchamark important algorithms across R and Python environments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages