Currently only implemented for Cort models. Compute the L2 quadratic product of 2 trees

quad_prod(object, other_tree)

# S4 method for class 'Cort,Cort'
quad_prod(object, other_tree)

Arguments

object

: the tree

other_tree

: the other tree

Value

the quadratic product between the trees

Functions

  • quad_prod,Cort,Cort-method: Method for the class Cort

Examples

cop <- Cort(LifeCycleSavings[,1:3])
#> Splitting...
#> 
#>      1 leaves to split...
#>      5 leaves to split...
#>      10 leaves to split...
#>      3 leaves to split...
#> Enforcing constraints...
#> Done !
all.equal(quad_prod(cop,cop),quad_norm(cop))
#> [1] TRUE