lower_bnd_CP: Calculate the lower bound of the log likelihood for a trained...

Description Usage Arguments Value Examples

View source: R/lower_bnd_CP.R

Description

Calculate the lower bound of the log likelihood for a trained CP model

Usage

1

Arguments

m

object of the class CP_model

d

object of the class input_data

Value

Returns a numerical value (should be negative)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data.params <- get_data_params(c('decomp=CP'))
toy <- mk_toy(data.params)
train.data <- input_data$new(mode1.X=toy$mode1.X[,-1],
                             mode2.X=toy$mode2.X[,-1],
                             mode3.X=toy$mode3.X[,-1],
                             resp=toy$resp)
model.params <- get_model_params(c('decomp=CP'))
toy.model <- mk_model(train.data, model.params)
toy.model$rand_init(model.params)

train(d=train.data, m=toy.model, new.iter=1, params=model.params)

lower_bnd_CP(toy.model, train.data)

BaTFLED3D documentation built on May 2, 2019, 2:38 p.m.