FreeHEP API
Version current

hep.aida.ref.pdf
Class NonParametricPdf

java.lang.Object
  extended byhep.aida.ref.pdf.Variable
      extended byhep.aida.ref.pdf.Function
          extended byhep.aida.ref.pdf.NonParametricPdf
All Implemented Interfaces:
FunctionDispatcher, HasName, HasUnits, HasValue, hep.aida.IFunction, hep.aida.IModelFunction, VariableListener

public class NonParametricPdf
extends Function

A Pdf builtg from a given data set. The Pdf is evaluated using the idea of adaptive kernel estimation presented at http://www-wisconsin.cern.ch/~cranmer/keys.html Mirroring is to be performed when distributions don't naturally taper to zero on one or both sides. With abrupt interruptions of the distribution there is a leak of probability due to the way the kernel is built (gaussian). By mirroring the distribution on the side of the abrupt edge the loss of probability is minimized.

Author:
The FreeHEP team @ SLAC.
Source Code:
NonParametricPdf.java

Field Summary
static int MIRROR_BOTH
           
static int MIRROR_LEFT
           
static int MIRROR_RIGHT
           
static int NO_MIRROR
           
 
Fields inherited from class hep.aida.ref.pdf.Variable
DEPENDENT, FUNCTION, PARAMETER
 
Constructor Summary
NonParametricPdf(String name, FitData data, Dependent x)
           
NonParametricPdf(String name, FitData data, Dependent x, int mirrorCode)
           
 
Method Summary
 double evaluateAnalyticalNormalization(Dependent dep)
           
 double functionValue()
           
 boolean hasAnalyticalNormalization(Dependent dep)
          FIXME Should the normalization be left to 1?
 boolean hasAnalyticalVariableGradient(Variable var)
          To be overwritten by classes extending Function.
 void variableChanged(Variable var)
          This method is invoked when a variable in the function has changed its value.
 
Methods inherited from class hep.aida.ref.pdf.Function
addFunctionListener, addVariable, addVariables, annotation, codeletString, dimension, evaluateAnalyticalVariableGradient, excludeNormalizationAll, functionMaxValue, functionValue, getDependent, getDependent, getNormalizationParameter, getParameter, getParameter, gradient, gradient, hasDependent, hasParameter, hasVariable, includeNormalizationAll, indexOfParameter, isComposite, isEqual, isNormalized, maxValue, normalizationParameter, normalizationRange, normalizationRangeChanged, normalize, notifyFunctionChanged, numberOfDependents, numberOfParameters, parameter, parameterGradient, parameterGradient, parameterNames, parameters, providesGradient, providesGradientWithRespectToVariable, providesNormalization, providesParameterGradient, removeFunctionListener, setCodeletString, setNormalizationParamter, setParameter, setParameters, setTitle, setValue, setVariableValue, title, updateNormalization, value, value, variableChangedName, variableChangedRange, variableChangedUnits, variableChangedValue, variableChangingName, variableChangingUnits, variableChangingValue, variableName, variableNames
 
Methods inherited from class hep.aida.ref.pdf.Variable
addVariableListener, name, removeVariableListener, setName, setUnits, type, units
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_MIRROR

public static final int NO_MIRROR
See Also:
Constant Field Values

MIRROR_LEFT

public static final int MIRROR_LEFT
See Also:
Constant Field Values

MIRROR_RIGHT

public static final int MIRROR_RIGHT
See Also:
Constant Field Values

MIRROR_BOTH

public static final int MIRROR_BOTH
See Also:
Constant Field Values
Constructor Detail

NonParametricPdf

public NonParametricPdf(String name,
                        FitData data,
                        Dependent x)

NonParametricPdf

public NonParametricPdf(String name,
                        FitData data,
                        Dependent x,
                        int mirrorCode)
Method Detail

variableChanged

public void variableChanged(Variable var)
Description copied from class: Function
This method is invoked when a variable in the function has changed its value.

Overrides:
variableChanged in class Function

functionValue

public double functionValue()
Overrides:
functionValue in class Function

hasAnalyticalVariableGradient

public boolean hasAnalyticalVariableGradient(Variable var)
Description copied from class: Function
To be overwritten by classes extending Function. This method is used internally by this class to determine if a function has can provide an analytical gradient with respect to a given Variable.

Overrides:
hasAnalyticalVariableGradient in class Function

hasAnalyticalNormalization

public boolean hasAnalyticalNormalization(Dependent dep)
FIXME Should the normalization be left to 1? or should we evaluate it numerically? The problem is the leaking of probability at the edge.

Overrides:
hasAnalyticalNormalization in class Function

evaluateAnalyticalNormalization

public double evaluateAnalyticalNormalization(Dependent dep)
Overrides:
evaluateAnalyticalNormalization in class Function

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.