NHPP: Class for NHPP-based software reliability model

NHPPR Documentation

Class for NHPP-based software reliability model

Description

Class for NHPP-based software reliability model

Class for NHPP-based software reliability model

Format

R6Class object.

Public fields

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.

Methods

Public methods


Method print()

Print model parameters.

Usage
NHPP$print(digits = max(3, getOption("digits") - 3), ...)
Arguments
digits

An integer to determine the number of digits for print.

...

Others


Method omega()

The number of total faults.

Usage
NHPP$omega()
Returns

The number of total faults.


Method mvf()

The mean value function.

Usage
NHPP$mvf(t)
Arguments
t

Time

Returns

The expected number of faults detected before time t.


Method dmvf()

The difference of mean value function on discrete time domain.

Usage
NHPP$dmvf(t)
Arguments
t

A vector for time series.

Returns

A vector of the expected number of faults in each time interval.


Method inv_mvf()

The inverse of mean value function.

Usage
NHPP$inv_mvf(x)
Arguments
x

The number of faults.

Returns

The first passage time at which the mean value function exceeds x.


Method intensity()

The intensity function.

Usage
NHPP$intensity(t)
Arguments
t

Time

Returns

The intensity (the first derivative of mean value function) at time t.


Method sample()

Generate samples of fault-detection times following the NHPP over [lower,upper). If diff is true, the method provides time interval of samples.

Usage
NHPP$sample(diff = TRUE, lower = 0, upper = +Inf)
Arguments
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.

Returns

A vector of samples following NHPP.


Method reliab()

The reliability function.

Usage
NHPP$reliab(t, s)
Arguments
t

A value of time from s.

s

A value of current time.

Returns

The probability that no fault is detected during [s, t+s)


Method residual()

The expected number of residual faults at time t.

Usage
NHPP$residual(t)
Arguments
t

A value of time.

Returns

The expected residual number of faults at time t.


Method ffp()

The fault-free probability at time t.

Usage
NHPP$ffp(t)
Arguments
t

A value of time.

Returns

The probability that software does not have any fault at time t.


Method imtbf()

The instantaneous MTBF at time t.

Usage
NHPP$imtbf(t)
Arguments
t

A value of time.

Returns

The inverse of intensity at time t.


Method cmtbf()

The cumulative MTBF at time t.

Usage
NHPP$cmtbf(t)
Arguments
t

A value of time.

Returns

the cumulative MTBF.


Method median()

The time at which the software reliability attains the probability p from the orign s.

Usage
NHPP$median(s, p = 0.5)
Arguments
s

A value of origin time.

p

A value of probability.

Returns

the time at which the software reiability become p.


Method get_params()

Make a flatten parameter vector.

Usage
NHPP$get_params(params)
Arguments
params

A vector of parameters.


Method init_params()

Set initial parameters from a given data. This is used to set the initial value for the fitting algorithm.

Usage
NHPP$init_params(data)
Arguments
data

Data.


Method set_params()

Set model parameters.

Usage
NHPP$set_params(params)
Arguments
params

Parameters.


Method set_omega()

Set omega parameter.

Usage
NHPP$set_omega(params, x)
Arguments
params

Parameters.

x

A value of omega.

Returns

Parameters.


Method set_data()

Set data to be used in the fitting algorithm.

Usage
NHPP$set_data(data)
Arguments
data

Data.


Method em()

Execute an EM step.

Usage
NHPP$em(params, data)
Arguments
params

Parameters.

data

Data.

Returns

A list with the following

param

Updated parameters.

pdiff

Absolute difference of parameter vector.

llf

Log-likelihood function for a given parameter vector.

total

The number of total faults.


Method llf()

The log-likelihood function for a given data.

Usage
NHPP$llf(data)
Arguments
data

Data.

Returns

Log-likelihood function.


Method comp_error()

Provides the absolute error and relative error from the the two results. The default is the difference of log-likelihood.

Usage
NHPP$comp_error(res0, res1)
Arguments
res0

One result

res1

Another result

Returns

A vector of abusolute error, relative error and the difference.


Method clone()

The objects of this class are cloneable with this method.

Usage
NHPP$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> ExpSRM

Methods

Public methods

Inherited methods

Method rate()

Get a rate parameter.

Usage
ExpSRM$rate()

Method new()

Constructor

Usage
ExpSRM$new(omega = 1, rate = 1)
Arguments
omega

A value of omega parameter.

rate

A value of rate parameter.


Method init_params()

Usage
ExpSRM$init_params(data)

Method em()

Usage
ExpSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
ExpSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> GammaSRM

Methods

Public methods

Inherited methods

Method shape()

Get a shape parameter.

Usage
GammaSRM$shape()

Method rate()

Get a rate parameter.

Usage
GammaSRM$rate()

Method new()

Constructor.

Usage
GammaSRM$new(omega = 1, shape = 1, rate = 1)
Arguments
omega

A value of omega parameter.

shape

A value of shape parameter.

rate

A value of rate parameter.


Method init_params()

Usage
GammaSRM$init_params(data)

Method em()

Usage
GammaSRM$em(params, data, divide = 15)

Method clone()

The objects of this class are cloneable with this method.

Usage
GammaSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> ParetoSRM

Methods

Public methods

Inherited methods

Method shape()

Usage
ParetoSRM$shape()

Method scale()

Usage
ParetoSRM$scale()

Method new()

Usage
ParetoSRM$new(omega = 1, shape = 1, scale = 1)

Method init_params()

Usage
ParetoSRM$init_params(data)

Method em()

Usage
ParetoSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
ParetoSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> TNormSRM

Methods

Public methods

Inherited methods

Method mean()

Usage
TNormSRM$mean()

Method sd()

Usage
TNormSRM$sd()

Method new()

Usage
TNormSRM$new(omega = 1, mean = 0, sd = 1)

Method init_params()

Usage
TNormSRM$init_params(data)

Method em()

Usage
TNormSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
TNormSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> LNormSRM

Methods

Public methods

Inherited methods

Method meanlog()

Usage
LNormSRM$meanlog()

Method sdlog()

Usage
LNormSRM$sdlog()

Method new()

Usage
LNormSRM$new(omega = 1, meanlog = 0, sdlog = 1)

Method init_params()

Usage
LNormSRM$init_params(data)

Method em()

Usage
LNormSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
LNormSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> TLogisSRM

Methods

Public methods

Inherited methods

Method location()

Usage
TLogisSRM$location()

Method scale()

Usage
TLogisSRM$scale()

Method new()

Usage
TLogisSRM$new(omega = 1, location = 0, scale = 1)

Method init_params()

Usage
TLogisSRM$init_params(data)

Method em()

Usage
TLogisSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
TLogisSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> LLogisSRM

Methods

Public methods

Inherited methods

Method locationlog()

Usage
LLogisSRM$locationlog()

Method scalelog()

Usage
LLogisSRM$scalelog()

Method new()

Usage
LLogisSRM$new(omega = 1, locationlog = 0, scalelog = 1)

Method init_params()

Usage
LLogisSRM$init_params(data)

Method em()

Usage
LLogisSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
LLogisSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> TXVMaxSRM

Methods

Public methods

Inherited methods

Method loc()

Usage
TXVMaxSRM$loc()

Method scale()

Usage
TXVMaxSRM$scale()

Method new()

Usage
TXVMaxSRM$new(omega = 1, loc = 0, scale = 1)

Method init_params()

Usage
TXVMaxSRM$init_params(data)

Method em()

Usage
TXVMaxSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
TXVMaxSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> LXVMaxSRM

Methods

Public methods

Inherited methods

Method loclog()

Usage
LXVMaxSRM$loclog()

Method scalelog()

Usage
LXVMaxSRM$scalelog()

Method new()

Usage
LXVMaxSRM$new(omega = 1, loclog = 0, scalelog = 1)

Method init_params()

Usage
LXVMaxSRM$init_params(data)

Method em()

Usage
LXVMaxSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
LXVMaxSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> TXVMinSRM

Methods

Public methods

Inherited methods

Method loc()

Usage
TXVMinSRM$loc()

Method scale()

Usage
TXVMinSRM$scale()

Method new()

Usage
TXVMinSRM$new(omega = 1, loc = 0, scale = 1)

Method init_params()

Usage
TXVMinSRM$init_params(data)

Method em()

Usage
TXVMinSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
TXVMinSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

Rsrat::NHPP -> LXVMinSRM

Methods

Public methods

Inherited methods

Method loclog()

Usage
LXVMinSRM$loclog()

Method scalelog()

Usage
LXVMinSRM$scalelog()

Method new()

Usage
LXVMinSRM$new(omega = 1, loclog = 0, scalelog = 1)

Method init_params()

Usage
LXVMinSRM$init_params(data)

Method em()

Usage
LXVMinSRM$em(params, data)

Method clone()

The objects of this class are cloneable with this method.

Usage
LXVMinSRM$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

srm


okamumu/Rsrat documentation built on Feb. 10, 2024, 11:07 p.m.