NHPP | R Documentation |
Class for NHPP-based software reliability model
Class for NHPP-based software reliability model
R6Class
object.
name
A character string for the name of model.
params
A numeric vector for the model parameters.
df
An integer for the degrees of freedom of the model.
data
Data to esimate parameters.
print()
Print model parameters.
NHPP$print(digits = max(3, getOption("digits") - 3), ...)
digits
An integer to determine the number of digits for print.
...
Others
omega()
The number of total faults.
NHPP$omega()
The number of total faults.
mvf()
The mean value function.
NHPP$mvf(t)
t
Time
The expected number of faults detected before time t.
dmvf()
The difference of mean value function on discrete time domain.
NHPP$dmvf(t)
t
A vector for time series.
A vector of the expected number of faults in each time interval.
inv_mvf()
The inverse of mean value function.
NHPP$inv_mvf(x)
x
The number of faults.
The first passage time at which the mean value function exceeds x.
intensity()
The intensity function.
NHPP$intensity(t)
t
Time
The intensity (the first derivative of mean value function) at time t.
sample()
Generate samples of fault-detection times following the NHPP over [lower,upper). If diff is true, the method provides time interval of samples.
NHPP$sample(diff = TRUE, lower = 0, upper = +Inf)
diff
A logical meaning the generated samples are time intervals or not.
lower
A value indicating the minimum of time domain.
upper
A value indicating the maximum of time domain.
A vector of samples following NHPP.
reliab()
The reliability function.
NHPP$reliab(t, s)
t
A value of time from s.
s
A value of current time.
The probability that no fault is detected during [s, t+s)
residual()
The expected number of residual faults at time t.
NHPP$residual(t)
t
A value of time.
The expected residual number of faults at time t.
ffp()
The fault-free probability at time t.
NHPP$ffp(t)
t
A value of time.
The probability that software does not have any fault at time t.
imtbf()
The instantaneous MTBF at time t.
NHPP$imtbf(t)
t
A value of time.
The inverse of intensity at time t.
cmtbf()
The cumulative MTBF at time t.
NHPP$cmtbf(t)
t
A value of time.
the cumulative MTBF.
median()
The time at which the software reliability attains the probability p from the orign s.
NHPP$median(s, p = 0.5)
s
A value of origin time.
p
A value of probability.
the time at which the software reiability become p.
get_params()
Make a flatten parameter vector.
NHPP$get_params(params)
params
A vector of parameters.
init_params()
Set initial parameters from a given data. This is used to set the initial value for the fitting algorithm.
NHPP$init_params(data)
data
Data.
set_params()
Set model parameters.
NHPP$set_params(params)
params
Parameters.
set_omega()
Set omega parameter.
NHPP$set_omega(params, x)
params
Parameters.
x
A value of omega.
Parameters.
set_data()
Set data to be used in the fitting algorithm.
NHPP$set_data(data)
data
Data.
em()
Execute an EM step.
NHPP$em(params, data)
params
Parameters.
data
Data.
A list with the following
Updated parameters.
Absolute difference of parameter vector.
Log-likelihood function for a given parameter vector.
The number of total faults.
llf()
The log-likelihood function for a given data.
NHPP$llf(data)
data
Data.
Log-likelihood function.
comp_error()
Provides the absolute error and relative error from the the two results. The default is the difference of log-likelihood.
NHPP$comp_error(res0, res1)
res0
One result
res1
Another result
A vector of abusolute error, relative error and the difference.
clone()
The objects of this class are cloneable with this method.
NHPP$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> ExpSRM
rate()
Get a rate parameter.
ExpSRM$rate()
new()
Constructor
ExpSRM$new(omega = 1, rate = 1)
omega
A value of omega parameter.
rate
A value of rate parameter.
init_params()
ExpSRM$init_params(data)
em()
ExpSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
ExpSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> GammaSRM
shape()
Get a shape parameter.
GammaSRM$shape()
rate()
Get a rate parameter.
GammaSRM$rate()
new()
Constructor.
GammaSRM$new(omega = 1, shape = 1, rate = 1)
omega
A value of omega parameter.
shape
A value of shape parameter.
rate
A value of rate parameter.
init_params()
GammaSRM$init_params(data)
em()
GammaSRM$em(params, data, divide = 15)
clone()
The objects of this class are cloneable with this method.
GammaSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> ParetoSRM
shape()
ParetoSRM$shape()
scale()
ParetoSRM$scale()
new()
ParetoSRM$new(omega = 1, shape = 1, scale = 1)
init_params()
ParetoSRM$init_params(data)
em()
ParetoSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
ParetoSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> TNormSRM
mean()
TNormSRM$mean()
sd()
TNormSRM$sd()
new()
TNormSRM$new(omega = 1, mean = 0, sd = 1)
init_params()
TNormSRM$init_params(data)
em()
TNormSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
TNormSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> LNormSRM
meanlog()
LNormSRM$meanlog()
sdlog()
LNormSRM$sdlog()
new()
LNormSRM$new(omega = 1, meanlog = 0, sdlog = 1)
init_params()
LNormSRM$init_params(data)
em()
LNormSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
LNormSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> TLogisSRM
location()
TLogisSRM$location()
scale()
TLogisSRM$scale()
new()
TLogisSRM$new(omega = 1, location = 0, scale = 1)
init_params()
TLogisSRM$init_params(data)
em()
TLogisSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
TLogisSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> LLogisSRM
locationlog()
LLogisSRM$locationlog()
scalelog()
LLogisSRM$scalelog()
new()
LLogisSRM$new(omega = 1, locationlog = 0, scalelog = 1)
init_params()
LLogisSRM$init_params(data)
em()
LLogisSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
LLogisSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> TXVMaxSRM
loc()
TXVMaxSRM$loc()
scale()
TXVMaxSRM$scale()
new()
TXVMaxSRM$new(omega = 1, loc = 0, scale = 1)
init_params()
TXVMaxSRM$init_params(data)
em()
TXVMaxSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
TXVMaxSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> LXVMaxSRM
loclog()
LXVMaxSRM$loclog()
scalelog()
LXVMaxSRM$scalelog()
new()
LXVMaxSRM$new(omega = 1, loclog = 0, scalelog = 1)
init_params()
LXVMaxSRM$init_params(data)
em()
LXVMaxSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
LXVMaxSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> TXVMinSRM
loc()
TXVMinSRM$loc()
scale()
TXVMinSRM$scale()
new()
TXVMinSRM$new(omega = 1, loc = 0, scale = 1)
init_params()
TXVMinSRM$init_params(data)
em()
TXVMinSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
TXVMinSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rsrat::NHPP
-> LXVMinSRM
loclog()
LXVMinSRM$loclog()
scalelog()
LXVMinSRM$scalelog()
new()
LXVMinSRM$new(omega = 1, loclog = 0, scalelog = 1)
init_params()
LXVMinSRM$init_params(data)
em()
LXVMinSRM$em(params, data)
clone()
The objects of this class are cloneable with this method.
LXVMinSRM$clone(deep = FALSE)
deep
Whether to make a deep clone.
srm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.