coef.mop {MoTBFs}R Documentation

Extract coefficients from MOPs

Description

It extracts the parameters of the learned mixtures of polynomial models.

Usage

coeffMOP(fx)

coeffPol(fx)

Arguments

fx

An "motbf" function of subclass 'mop'.

Details

coeffMOP() return the coefficients of the terms in the function.

coeffPol() returns the coefficients of the potential of the polynomial basis in the function.

Value

An array with the parameters of the function.

See Also

coef.motbf and univMoTBF

Examples


## 1. EXAMPLE
data <- rchisq(1000, df=5)
fx1 <- univMoTBF(data, POTENTIAL_TYPE = "MOP")
hist(data, prob=TRUE, main="")
plot(fx1, xlim=range(data), col="red", add=TRUE)
coeffMOP(fx1) ## coef(fx1)
coeffPol(fx1)

## 2. EXAMPLE
data <- rexp(1000, rate=1/2)
fx2 <- univMoTBF(data, POTENTIAL_TYPE = "MOP")
hist(data, prob=TRUE, main="")
plot(fx2, xlim=range(data), col="red", add=TRUE)
coeffMOP(fx2) ## coef(fx2)
coeffPol(fx2)

[Package MoTBFs version 1.4.1 Index]