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
utils_fit(param, threshold, kappa = 10, Y, Tps, N)
param |
list, see initial parameter list in |
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 |
utils_fit is a tool function used in the main kfino_fit
function. It uses the same input parameter list than the main function.
a list
vector, the prediction of weights
vector, probability to be an outlier
numeric, the calculated likelihood
vector of lower bound confidence interval of the prediction
vector of upper bound confidence interval of the prediction
char, is an outlier or not
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)