1.1 Install the latest rtemis version from GitHub
You can run the
install_github command as often as you like: it will only work if there is an update available on GitHub. It will install rtemis with a minimal set of dependencies. A dependency check is run each time a function is called and will tell you if a package is missing. Install the following packages to begin with a reasonable lightweight setup:
You can run rtemis in the command line or using the IDE of your choice. RStudio is the preferred environment and can be downloaded here
If you are installing on macOS, make sure you have installed:
1.3.2 Using Apple’s BLAS
You can speed up matrix operations by using Apple’s Basic Linear Algebra Subprograms (BLAS) instead of the default R BLAS. At the MacOS terminal:
Restart R and check the version of BLAS in use:
R version 4.0.0 (2020-04-24) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.5 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib locale:  en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages:  stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached):  compiler_4.0.0 magrittr_1.5 bookdown_0.19 htmltools_0.4.0  tools_4.0.0 yaml_2.2.1 Rcpp_220.127.116.11 fansi_0.4.1  codetools_0.2-16 stringi_1.4.6 rmarkdown_2.3 knitr_1.28  stringr_1.4.0 digest_0.6.25 xfun_0.14 rlang_0.4.6  evaluate_0.14
Benchmarks suggest substantial speed gains for some operations.
1.4 External frameworks
The following are all optional - install as needed.
To use MXNet (
s.MXN), you need to install the MXNet system libraries first and then the R package. Follow instructions on the MXNet website.
This will first require installation of more system dependencies, which can be installed using Brew
To use H2O (
u.H2OKMEANS), you will need to install H2O first. Follow instructions on the H2O website.
To use Spark’s ML framework (
s.MLRF), installation can be performed within R:
1.4.4 Keras + TensorFlow
You can easily install Keras for R and the TensorFlow library:
Learn more on the RStudio website
1.5 Load rtemis
.:rtemis 0.8.0: Welcome, egenn [x86_64-apple-darwin17.0 (64-bit): Defaulting to 4/4 available cores] Documentation & vignettes: https://rtemis.netlify.com
1.6 Setup project directories
rtemis includes a function and RStudio addin to initialize a simple directory structure under the working directory for your data analysis projects with the following:
Directory to save your project
Directory to save your project data files, e.g.
Directory to save your output, e.g. rtemis supervised learning output directories (define using
outdir = "./Results/Dataset_Algorithm")
Log file with R session info
Call the function directly or use RStudio’s Addins drop down menu:
[2020-06-23 08:14:07 rtInitProjectDir] rtemis: Initializing project directory... Working in /Users/egenn/Library/Mobile Documents/com~apple~CloudDocs/Projects/rtemis/rtemisWeb_0.8.0... Creating 'R' folder... Already present Creating 'Data' folder... Already present Creating 'Results' folder... Already present All done
1.7 Notes on this bookdown website format
Graphviz-based graphics, used to plot decision trees and MXNet graphs, appear a little off on this html output. The text is slightly oversized for the given box size - will hopefully be solved in the near future.