10 R6 objects
.:rtemis 0.79: Welcome, egenn [x86_64-apple-darwin15.6.0 (64-bit): Defaulting to 4/4 available cores] Online documentation & vignettes: https://rtemis.netlify.com
rtemis makes extensive use of R6 classes. (Early in development, methods were created for all available class systems - S3, S4, RC, R6 - and R6 was the winner).
The following classes are defined - you don’t need to learn or remember these, they are created automatically, as appropriate:
rtMod: Supervised model class
rtModClass: Inherits from
rtModand adds support for classification models
rtModBag: Inherits from
rtModand adds support for bagged models
rtMeta: Inherits from
rtModand adds support for meta models
rtModLite: A “lite”, bare-bones version of
rtMod, used internally in some applications
rtModCV: Cross-validated models
rtModCVclass: Inherits from
rtModCVand adds support for cross-validated classification models
rtClust: Clustering class
rtDecom: Decomposition class
rtXDecom: Cross-decomposition class
rtMeta: Meta model class
One of the advantages of such a class system is that it allows storing both attributes (e.g. data like fitted values) and methods (functions that can be performed on the object, like plotting) in an object. Regular R methods (like predict, summary, etc), known as S3 generics, are fully compatible with the R6 system.
Let’s look at an example object.
[2019-08-02 17:14:20 s.GLM] Hello, egenn [[ Regression Input Summary ]] Training features: 200 x 5 Training outcome: 200 x 1 Testing features: Not available Testing outcome: Not available [2019-08-02 17:14:23 s.GLM] Training GLM... [[ GLM Regression Training Summary ]] MSE = 1.06 (86.57%) RMSE = 1.03 (63.35%) MAE = 0.81 (63.42%) r = 0.93 (p = 3e-88) rho = 0.92 (p = 0) R sq = 0.87
[2019-08-02 17:14:23 s.GLM] Run completed in 0.04 minutes (Real: 2.62; User: 1.28; System: 0.11)
 "rtMod" "R6"
Let’s look at some of the object attributes
Remember, in rtemis,
fitted refers to the estimated values for the training set and
predicted referes to the estimated values for the test set.
 3.7422285 1.7064415 -2.6451228 -0.6943794 0.1826146 -1.9019420
MSE = 1.06 (86.57%) RMSE = 1.03 (63.35%) MAE = 0.81 (63.42%) r = 0.93 (p = 3e-88) rho = 0.92 (p = 0) R sq = 0.87
By the way - you notice the error was custom printed.
 "regError" "data.frame"
It is a simple S3 object of class
regError to allow this pretty-printing. You can view the data.frame itself too. In this case, it holds some more information.
MAE MSE RMSE NRMSE MAE.EXP MAE.RED MSE.EXP 1 0.8146782 1.064633 1.031811 0.07339965 2.227209 0.6342156 7.925781 MSE.RED RMSE.EXP RMSE.RED r r.p SSE SSR 1 0.8656747 2.815276 0.6334958 0.9304164 2.962631e-88 212.9266 1372.23 SST Rsq stderr rho rho.p 1 1585.156 0.8656747 1.031811 0.9229356 0