slophep.Fitting.CostFuncs
Bases:
FigureOfMeritReturn chi2 for correlated bins, (obs - pred) * invcov * (obs - pred)
Covariance matrix
Inverse covariance matrix
Bases:
FigureOfMerit
- class slophep.Fitting.CostFuncs.FigureOfMerit(pdf: PDFBase, param_manager: ParameterManager, data: ndarray, dataErr: ndarray = array([], dtype=float64), normPDF_before_eval: bool = False, ignore_constraint: bool = False)[source]
Bases:
object- calc_nllW2(paramvals: list[float]) float[source]
Calculate -2LL with SumW2 for particular set of parameters
- Parameters:
paramvals (list[float])
- Return type:
float
Uncorrelated chi2
- property data: ndarray
Data to fit
- property dataErr: ndarray
Uncertainties of data
- property dataNorm: float
Sum of data yield
- get_constraint_term() float[source]
Get FoM constraint term
- Returns:
Gaussian likelihood term. Return 0 if ignore_constraint == True.
- Return type:
float
- property ignore_constraint: bool
Whether to ignore constraint terms in the likelihood/figure of merit
- property param_list: list[str]
List of parameters
- property param_manager: ParameterManager
The parameter manager
- property scaleFactorW2: ndarray
Scale factor for sumW2 likelihood