PDFComponentFitter

class PDFComponentFitter(estimators: Set<ParameterEstimatorIfc> = PDFModeler.allEstimators, val automaticShifting: Boolean = defaultAutomaticShifting) : ComponentFitterIfc(source)

Fits continuous families to a group by delegating to KSL's continuous distribution modeler.

Failure is detected using KSL's own signal rather than a re-derived list of preconditions. Every parameter estimator returns an estimation result carrying a success flag and a diagnostic message, and the modeler's own scoring stage discards a result when either the flag is false or no parameters were produced. This class applies the same predicate, for two reasons: a hand-maintained list of conditions drifts from what the estimators actually check, and reimplementing a library idiom works against the goal of lifting this package into the library.

The test is a disjunction because an estimation result is explicitly permitted to report failure while still carrying parameters; checking only for the absence of parameters would admit a fit that the estimator itself disowns.

Parameters

estimators

the candidate families to fit, defaulting to the modeler's full catalog

automaticShifting

whether the modeler may estimate a left shift for a group. A shift costs one additional estimated parameter, which is counted in the candidate.

Constructors

Link copied to clipboard
constructor(estimators: Set<ParameterEstimatorIfc> = PDFModeler.allEstimators, automaticShifting: Boolean = defaultAutomaticShifting)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The candidate families this fitter will attempt.

Functions

Link copied to clipboard
open override fun fitGroup(sortedData: DoubleArray, startIndex: Int, endIndex: Int): GroupFitResult

Fits every candidate family to the observations in the index range from startIndex until endIndex, returning those that succeeded and those that did not.

Link copied to clipboard
open override fun toString(): String