get_full_context {contextual}R Documentation

Get full context matrix over all arms

Description

Given matrix or d dimensional vector X, number of arms k and number of features d returns a matrix with d x k context matrix

Usage

get_full_context(context, select_features = NULL, prepend_arm_matrix = FALSE)

Arguments

context

a context list containing a d x k Matrix or d dimensional context vector X, the number of features d and number of arms k.

select_features

indices of to be returned feature rows.b

prepend_arm_matrix

prepend a diagonal arm matrix to the returned context vector. That is, when k = 5 arms, prepend diag(5) to the top of the matrix.

Value

A d x k context Matrix


[Package contextual version 0.9.8.4 Index]