NcmStatsDist1dEPDF

NcmStatsDist1dEPDF — One dimensional probability distribution based on an EPDF

Functions

Properties

NcmStatsDist1dEPDFBw bandwidth Read / Write / Construct
double h-fixed Read / Write / Construct
guint max-obs Read / Write / Construct Only
guint n-obs Read
double outliers-threshold Read / Write / Construct Only
double sd-min-scale Read / Write / Construct Only

Types and Values

Object Hierarchy

    GEnum
    ╰── NcmStatsDist1dEPDFBw
    GObject
    ╰── NcmStatsDist1d
        ╰── NcmStatsDist1dEPDF

Description

Reconstruction of an arbitrary one dimensional probability distribution based on a Empirical Probability Distribution Function (EPDF).

Functions

ncm_stats_dist1d_epdf_new_full ()

NcmStatsDist1dEPDF *
ncm_stats_dist1d_epdf_new_full (guint max_obs,
                                NcmStatsDist1dEPDFBw bw,
                                gdouble h_fixed,
                                gdouble sd_min_scale);

Creates a new EPDF object, it creates an interpolated PDF from the observations.

Parameters

max_obs

maximum observations before compacting

 

bw

a NcmStatsDist1dEPDFBw

 

h_fixed

fixed bandwidth

 

sd_min_scale

scale of the minimum distance

 

Returns

a new NcmStatsDist1dEPDF.

[transfer full]


ncm_stats_dist1d_epdf_new ()

NcmStatsDist1dEPDF *
ncm_stats_dist1d_epdf_new (gdouble sd_min_scale);

Creates a new EPDF object, it creates an interpolated PDF from the observations.

Parameters

sd_min_scale

scale of the minimum distance

 

Returns

a new NcmStatsDist1dEPDF.

[transfer full]


ncm_stats_dist1d_epdf_ref ()

NcmStatsDist1dEPDF *
ncm_stats_dist1d_epdf_ref (NcmStatsDist1dEPDF *epdf1d);

Increases the reference count of epdf1d by one.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

Returns

epdf1d .

[transfer full]


ncm_stats_dist1d_epdf_free ()

void
ncm_stats_dist1d_epdf_free (NcmStatsDist1dEPDF *epdf1d);

Atomically decrements the reference count of epdf1d by one. If the reference count drops to 0, all memory allocated by epdf1d is released.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

ncm_stats_dist1d_epdf_clear ()

void
ncm_stats_dist1d_epdf_clear (NcmStatsDist1dEPDF **epdf1d);

Atomically decrements the reference count of epdf1d by one. If the reference count drops to 0, all memory allocated by epdf1d is released. Set the pointer to NULL;

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

ncm_stats_dist1d_epdf_set_bw_type ()

void
ncm_stats_dist1d_epdf_set_bw_type (NcmStatsDist1dEPDF *epdf1d,
                                   NcmStatsDist1dEPDFBw bw);

Sets the bandwidth computation type to bw . The object must be (re)prepared after the call to this method to be used.

Parameters


ncm_stats_dist1d_epdf_get_bw_type ()

NcmStatsDist1dEPDFBw
ncm_stats_dist1d_epdf_get_bw_type (NcmStatsDist1dEPDF *epdf1d);

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

Returns

the current bandwidth computation type NcmStatsDist1dEPDFBw.


ncm_stats_dist1d_epdf_set_h_fixed ()

void
ncm_stats_dist1d_epdf_set_h_fixed (NcmStatsDist1dEPDF *epdf1d,
                                   gdouble h_fixed);

Sets the fixed bandwidth to h_fixed . The object must be (re)prepared after the call to this method to be used. This value is used only if the bandwidth computation type is NCM_STATS_DIST1D_EPDF_BW_FIXED.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

h_fixed

fixed bandwidth

 

ncm_stats_dist1d_epdf_get_h_fixed ()

gdouble
ncm_stats_dist1d_epdf_get_h_fixed (NcmStatsDist1dEPDF *epdf1d);

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

Returns

the current fixed bandwidth.


ncm_stats_dist1d_epdf_add_obs_weight ()

void
ncm_stats_dist1d_epdf_add_obs_weight (NcmStatsDist1dEPDF *epdf1d,
                                      const gdouble x,
                                      const gdouble w);

Adds a new observation x with weight w to the epdf1d updating the internal approximation of the EPDF when necessary.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

x

an observation

 

w

observation weight

 

ncm_stats_dist1d_epdf_add_obs ()

void
ncm_stats_dist1d_epdf_add_obs (NcmStatsDist1dEPDF *epdf1d,
                               const gdouble x);

Adds a new observation x (weight 1.0) to the epdf1d updating the internal approximation of the EPDF when necessary.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

x

an observation

 

ncm_stats_dist1d_epdf_reset ()

void
ncm_stats_dist1d_epdf_reset (NcmStatsDist1dEPDF *epdf1d);

Empty the object epdf1d discarding all observations.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

ncm_stats_dist1d_epdf_set_min ()

void
ncm_stats_dist1d_epdf_set_min (NcmStatsDist1dEPDF *epdf1d,
                               const gdouble min);

Sets the lower bound for the distribution. It may be updated if a observation with value smaller than min is added.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

min

sets min observation value

 

ncm_stats_dist1d_epdf_set_max ()

void
ncm_stats_dist1d_epdf_set_max (NcmStatsDist1dEPDF *epdf1d,
                               const gdouble max);

Sets the upper bound for the distribution. It may be updated if a observation with value larger than max is added.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

max

sets max observation value

 

ncm_stats_dist1d_epdf_get_obs_mean ()

gdouble
ncm_stats_dist1d_epdf_get_obs_mean (NcmStatsDist1dEPDF *epdf1d);

Calculates the mean value of the observations.

Parameters

epdf1d

a NcmStatsDist1dEPDF

 

Returns

the mean value.

Types and Values

NCM_TYPE_STATS_DIST1D_EPDF

#define NCM_TYPE_STATS_DIST1D_EPDF (ncm_stats_dist1d_epdf_get_type ())

enum NcmStatsDist1dEPDFBw

Gaussian kernel bandwidth type.

Members

NCM_STATS_DIST1D_EPDF_BW_FIXED

Uses the given value of bandwidth.

 

NCM_STATS_DIST1D_EPDF_BW_RoT

Uses the Silverman's rule of thumb to determine the bandwidth.

 

NCM_STATS_DIST1D_EPDF_BW_AUTO

Uses Botev's et al method to automatically determine the best bandwidth.

 

NcmStatsDist1dEPDF

typedef struct _NcmStatsDist1dEPDF NcmStatsDist1dEPDF;

Property Details

The “bandwidth” property

  “bandwidth”                NcmStatsDist1dEPDFBw

Bandwidth method.

Owner: NcmStatsDist1dEPDF

Flags: Read / Write / Construct

Default value: NCM_STATS_DIST1D_EPDF_BW_AUTO


The “h-fixed” property

  “h-fixed”                  double

Fixed bandwidth.

Owner: NcmStatsDist1dEPDF

Flags: Read / Write / Construct

Allowed values: [1e-05,100000]

Default value: 0.1


The “max-obs” property

  “max-obs”                  guint

Maximum observations before compacting.

Owner: NcmStatsDist1dEPDF

Flags: Read / Write / Construct Only

Allowed values: >= 10

Default value: 100000


The “n-obs” property

  “n-obs”                    guint

Number of observations.

Owner: NcmStatsDist1dEPDF

Flags: Read

Default value: 0


The “outliers-threshold” property

  “outliers-threshold”       double

How many sigmas to consider an outlier.

Owner: NcmStatsDist1dEPDF

Flags: Read / Write / Construct Only

Allowed values: [1,1000]

Default value: 20


The “sd-min-scale” property

  “sd-min-scale”             double

Percentage of the standard deviation to use as minimum distance.

Owner: NcmStatsDist1dEPDF

Flags: Read / Write / Construct Only

Allowed values: [1e-20,1e+20]

Default value: 0.001