S4 class structure of the xnet package

Meys Joris

2019-12-20

This document describes the S4 class structure used in the xnet package. It’s mainly a reference for package developers. Users are advised to use the appropriate functions for extracting the information they need.

Virtual classes

The xnet package has three virtual classes that each define a number of slots necessary for that specific type of model:

  1. the class tskrr for general two step kernel ridge regressions
  2. the class tskrrTune for tuned two step kernel ridge regressions
  3. the class tskrrImpute for two step kernel ridge regressions with imputed data.

Each of these classes defines the necessary slots for that specific type of action. The actual classes returned by the functions tskrr(), tune() and impute() inherit from (a combination of) these virtual classes.

Actual classes

Inheritance from tskrr

After using the function tskrr(), one of the following classes is returned:

These classes have similar slots, but the homogeneous models don’t need information on the column kernel matrix. The slots are listed below. In general the following design principles hold:

Slots defined by tskrrHomogeneous

Slots defined by tskrrHeterogeneous

Both classes inherit directly from the class tskrr. But these classes also function as parent classes from which tune() related and impute() related classes inherit.

Inheritance from tskrrTune

When using the function tune(), you get one of the following classes:

Apart from the slots of the respective tskrr class, the inheritance from tskrrTune adds the following slots:

These slots use the following design principles:

Inheritance from tskrrImpute

When using the function impute(), you get one of the following classes:

Apart from the slots of the respective tskrr class, the inheritance from tskrrImpute adds the following slots:

The slot imputeid treats the Y matrix as a vector and stores the position of the imputed values as a integer vector. The other two slots just store the settings used during imputation.