utils_fit {kfino}R Documentation

utils_fit a fonction running the kfino algorithm to filter data and detect outliers under the knowledge of all parameters

Description

utils_fit a fonction running the kfino algorithm to filter data and detect outliers under the knowledge of all parameters

Usage

utils_fit(param, threshold, kappa = 10, Y, Tps, N)

Arguments

param

list, see initial parameter list in kfino_fit

threshold

numeric, threshold for confidence interval, default 0.5

kappa

numeric, truncation setting for likelihood optimization, default 10

Y

character, name of the numeric variable to predict in the data.frame datain

Tps

character, time column name in the data.frame datain, a numeric vector. Tvar can be expressed as a proportion of day in seconds

N

numeric, length of the numeric vector of Y values

Details

utils_fit is a tool function used in the main kfino_fit function. It uses the same input parameter list than the main function.

Value

a list

prediction

vector, the prediction of weights

label

vector, probability to be an outlier

likelihood

numeric, the calculated likelihood

lwr

vector of lower bound confidence interval of the prediction

upr

vector of upper bound confidence interval of the prediction

flag

char, is an outlier or not

Examples

set.seed(1234)
Y<-rnorm(n=10,mean=50,4)
Tps<-seq(1,10)
N=10
param2<-list(m0=41,
             mm=45,
             pp=0.5,
             aa=0.001,
             expertMin=30,
             expertMax=75,
             sigma2_m0=1,
             sigma2_mm=0.05,
             sigma2_pp=5,
             K=2,
            seqp=seq(0.5,0.7,0.1))
print(Y)
utils_fit(param=param2,threshold=0.5,kappa=10,Y=Y,Tps=Tps,N=N)

[Package kfino version 1.0.0 Index]