rescaledFunctions {MoTBFs}R Documentation

Rescaling MoTBF functions

Description

A collation of function to reescale an MoTBF function to the original offset and scale. This is useful when data was standardized previously to learning.

Usage

rescaledMoTBFs(fx, data)

rescaledMOP(fx, data)

ToStringRe_MOP(parameters, data)

rescaledMTE(fx, data)

ToStringRe_MTE(parameters, data, num = 5)

meanMOP(fx)

Arguments

fx

A function of class "motbf" learned from a scaled data.

data

A "numeric" vector containing the original data (non standardizded).

parameters

A "numeric" vector with the coefficients to create the rescaled MoTBF.

num

A "numeric" value which contains the denominator of the coefficient in the exponential. By default it is 5.

Value

An "motbf" function of the original data.

See Also

univMoTBF

Examples

## 1. EXAMPLE
X <- rchisq(1000, df = 8) ## data
modX <- scale(X) ## scale data

## Learning
f <- univMoTBF(modX, POTENTIAL_TYPE = "MOP", nparam=10) 
plot(f, xlim = range(modX), col=2)
hist(modX, prob = TRUE, add = TRUE)

## Rescale
origF <- rescaledMoTBFs(f, X) 
plot(origF, xlim = range(X), col=2)
hist(X, prob = TRUE, add = TRUE)
meanMOP(origF) 
mean(X)

## 2. EXAMPLE 
X <- rweibull(1000, shape = 20, scale= 10) ## data
modX <- as.numeric(scale(X)) ## scale data

## Learning
f <- univMoTBF(modX, POTENTIAL_TYPE = "MTE", nparam = 9) 
plot(f, xlim = range(modX), col=2, main="")
hist(modX, prob = TRUE, add = TRUE)

## Rescale
origF <- rescaledMoTBFs(f, X) 
plot(origF, xlim = range(X), col=2)
hist(X, prob = TRUE, add = TRUE)


[Package MoTBFs version 1.4.1 Index]