predict_inspre_G_h5X: Calculates model predictions given new data, with...

View source: R/inspre_h5.R

predict_inspre_G_h5XR Documentation

Calculates model predictions given new data, with cross-validation errors.

Description

This function uses the mean((X - XG - ZB)**2) error formulation. TODO: At the moment this pulls all the data into memory which is probably fine since its normally only 10-20 modifying to pull one target at a time to match fit functionality.

Usage

predict_inspre_G_h5X(
  res,
  X,
  X_ntc,
  beta,
  X_targets,
  X_vars,
  vars_to_use = NULL,
  obs_to_use = NULL
)

Arguments

res

Inspre result. Result of running fit_inspre for a single or sequence of hyperparameter values.

X

H5D. Example: ‘X=hfile[[’X']]' where hfile is an hdf5r object containing a data matrix stored under label 'X'.

beta

Sequence of floats. Obsevered scale estimates of instrument effects.

X_targets

Sequence of strings with length equal to number of columns in X. Entries correspond to the target of the instrument applied to that entry.

X_vars

Sequence of strings with length equal to the number of rows in X. Name of the feature measured in that row.

vars_to_use

Sequence of strings. Entries in X_vars to keep. Default NULL to keep all.

obs_to_use

Sequence of bools. Indicator of columns of X to use in calculations. Useful for cross validation. NULL to keep all.


brielin/inspre documentation built on Dec. 3, 2023, 4:55 a.m.