Skip to contents

Retrieve the optimal fitness (or objective function) value used by an algorithm

Usage

# S3 method for seg_basket
fitness(object, ...)

# S3 method for seg_cpt
fitness(object, ...)

# S3 method for tidycpt
fitness(object, ...)

fitness(object, ...)

# S3 method for ga
fitness(object, ...)

# S3 method for cpt
fitness(object, ...)

# S3 method for wbs
fitness(object, ...)

Arguments

object

A segmenter object, typically returned by segment()

...

currently ignored

See also

Other tidychangepoint-generics: changepoints.mod_cpt(), diagnose.mod_cpt(), exceedances()

Examples

x <- segment(DataCPSim, method = "ga", maxiter = 10)
fitness(x)
#>      BIC 
#> 16208.93 

x <- segment(DataCPSim, method = "wbs")
fitness(x)
#> MBIC 
#>    0