eigen_Xt_times_diag_w_times_X {fastLogisticRegressionWrap}R Documentation

A fast Xt [times] diag(w) [times] X function

Description

Via the eigen package

Usage

eigen_Xt_times_diag_w_times_X(X, w, num_cores = 1)

Arguments

X

A numeric matrix of size n x p

w

A numeric vector of length p

num_cores

The number of cores to use. Unless p is large, keep to the default of 1.

Value

The resulting matrix

Examples

  n = 100
  p = 10
  X = matrix(rnorm(n * p), nrow = n, ncol = p)
  w = rnorm(p)
  eigen_Xt_times_diag_w_times_X(t(X), w)

[Package fastLogisticRegressionWrap version 1.2.0 Index]