Classes#

class CategoricalProcess#

Categorical observation process.

Collection of univariate categorical emission distributions. In the multivariate case, use a collection of conditionally independent CategoricalProcesses observations[k] is a pointer to emission distribution for state k

Public Functions

void copy(const CategoricalProcess &process)#

Copy of a CategoricalProcess object.

Parameters:

process[in] reference on a CategoricalProcess object.

void remove()#

Destruction of the data members of a CategoricalProcess object.

CategoricalProcess(int inb_state = 0, int inb_value = 0, bool observation_flag = false)#

Constructor of the CategoricalProcess class.

Parameters:
  • inb_state[in] number of states,

  • inb_value[in] number of categories,

  • observation_flag[in] flag on the construction of the observation distributions.

CategoricalProcess(int inb_state, int inb_value, double **observation_probability)#

Constructor of the CategoricalProcess class.

Parameters:
  • inb_state[in] number of states,

  • inb_value[in] number of categories,

  • observation_probability[in] pointer on the observation probabilities.

CategoricalProcess(int inb_state, Distribution **pobservation)#

Constructor of the CategoricalProcess class.

Parameters:
  • inb_state[in] number of states,

  • pobservation[in] pointer on the observation distributions.

~CategoricalProcess()#

Destructor of the CategoricalProcess class.

CategoricalProcess &operator=(const CategoricalProcess &process)#

Assignment operator of the CategoricalProcess class.

Parameters:

process[in] reference on a CategoricalProcess object.

Returns:

CategoricalProcess object.

std::ostream &ascii_print(std::ostream &os, FrequencyDistribution **empirical_observation, FrequencyDistribution *marginal_distribution, bool exhaustive, bool file_flag, model_type model = HIDDEN_MARKOV) const#

Writing of a CategoricalProcess object.

Parameters:
  • os[inout] stream,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • exhaustive[in] flag detail level,

  • file_flag[in] flag file,

  • model[in] model type.

std::ostream &spreadsheet_print(std::ostream &os, FrequencyDistribution **empirical_observation = NULL, FrequencyDistribution *marginal_distribution = NULL, model_type model = HIDDEN_MARKOV) const#

Writing of a CategoricalProcess object at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • model[in] model type.

bool plot_print(const char *prefix, const char *title, int process, FrequencyDistribution **empirical_observation = NULL, FrequencyDistribution *marginal_distribution = NULL, model_type model = HIDDEN_MARKOV) const#

Plot of a CategoricalProcess object using Gnuplot.

Parameters:
  • prefix[in] file prefix,

  • title[in] figure title,

  • process[in] observation process index,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • model[in] model type.

Returns:

error status.

void plotable_write(MultiPlotSet &plot, int &index, int process, FrequencyDistribution **empirical_observation = NULL, FrequencyDistribution *marginal_distribution = NULL, model_type model = HIDDEN_MARKOV) const#

Plot of a CategoricalProcess object.

Parameters:
  • plot[in] reference on a MultiPlotSet object,

  • index[in] MultiPlot index,

  • process[in] observation process index,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • model[in] model type.

bool test_hidden() const#

test of the overlap between the categories observed in each state.

Returns:

hidden process or not.

void thresholding(double min_probability)#

Application of a threshold on the observation probabilities.

Parameters:

min_probability[in] minimum probability.

void state_permutation(int *permut) const#

Permutation of observation distributions. The permutation validity should be checked by the calling function.

Parameters:

permut[in] permutation.

int nb_parameter_computation(double min_probability) const#

Computation of the number of free parameters of a categorical observation process.

Parameters:

min_probability[in] minimum probability.

Returns:

number of free parameters.

Distribution *mixture_computation(Distribution *pweight)#

Computation of a mixture of categorical observation distributions.

Parameters:

pweight[in] pointer on the weight distribution.

Returns:

mixture of categorical observation distributions.

void init()#

Initialization of the observation probabilities.

Public Members

int nb_state#

number of states

int nb_value#

number of categories

Distribution **observation#

categorical observation distributions

Distribution *weight#

theoretical weights of observation distributions

Distribution *mixture#

mixture of observation distributions

Distribution *restoration_weight#

weights of observation distributions deduced from the restoration

Distribution *restoration_mixture#

mixture of observation distributions

Public Static Functions

static CategoricalProcess *parsing(StatError &error, ifstream &in_file, int &line, int nb_state, model_type model, bool hidden)#

Analysis of the format of categorical observation distributions.

Parameters:
  • error[in] reference on a StatError object,

  • in_file[in] stream,

  • line[in] reference on the file line index,

  • nb_state[in] number of states,

  • model[in] model type,

  • hidden[in] flag on the overlap of observation distributions.

Returns:

CategoricalProcess object.

static CategoricalProcess **old_parsing(StatError &error, ifstream &in_file, int &line, int nb_state, int &nb_output_process)#

Analysis of the format of observation distributions for a collection of categorical observation processes.

Parameters:
  • error[in] reference on a StatError object,

  • in_file[in] stream,

  • line[in] reference on the file line index,

  • nb_state[in] number of states,

  • nb_output_process[in] number of observation processes.

Returns:

categorical observation processes.

class Chain#

Markov chain.

Public Functions

void parameter_copy(const Chain&)#

Copy of Markov chain parameters.

Parameters:

chain[in] reference on a Chain object.

void copy(const Chain&)#

Copy of a Chain object.

Parameters:

chain[in] reference on a Chain object.

void remove()#

Destruction of the data members of a Chain object.

Chain(process_type itype = ORDINARY, int inb_state = 0, bool init_flag = true)#

Constructor of the Chain class.

Parameters:
  • itype[in] type,

  • inb_state[in] number of states,

  • init_flag[in] flag initialization.

Chain(process_type itype, int inb_state, int inb_row, bool init_flag)#

Constructor of the Chain class.

Parameters:
  • itype[in] type,

  • inb_state[in] number of states,

  • inb_row[in] number of rows of the transition probability matrix,

  • init_flag[in] flag initialization.

~Chain()#

Destructor of the Chain class.

Chain &operator=(const Chain &chain)#

Assignment operator of the Chain class.

Parameters:

chain[in] reference on a Chain object.

Returns:

Chain object.

std::ostream &ascii_print(std::ostream &os, bool file_flag = false) const#

Writing of a Chain object.

Parameters:
  • os[inout] stream,

  • file_flag[in] file flag.

std::ostream &spreadsheet_print(std::ostream &os) const#

Writing of a Chain object at the spreadsheet format.

Parameters:

os[inout] stream.

void create_cumul()#

Construction of the cumulative initial and transition distribution functions of a Chain object.

void cumul_computation()#

Computation of cumulative initial and transition distribution functions.

void remove_cumul()#

Destruction of the cumulative initial and transition distribution functions of a Chain object.

void log_computation()#

Log transform of Markov chain parameters.

bool **logic_transition_computation() const#

Construction of the matrix of possible transitions between states (adjacency matrix of the graph of possible transitions).

Returns:

matrix of possible transitions.

bool strongly_connected_component_research(StatError &error, bool **ilogic_transition = NULL) const#

Determination of the strongly connected components of a Markov chain.

Parameters:
  • error[in] reference on a StatError object,

  • ilogic_transition[in] matrix of possible transitions between states.

Returns:

error status.

void graph_accessibility_computation(bool **ilogic_transition)#

Computation of the accessibility of Markov chain states (graph-based approach).

Parameters:

ilogic_transition[in] matrix of possible transitions between states.

void probability_accessibility_computation()#

Computation of the accessibility of Markov chain states (probabilistic approach).

void component_computation(bool **ilogic_transition = NULL)#

Extraction of the Markov chain classes (transient/recurrent/absorbing) from state accessibility.

Parameters:

ilogic_transition[in] matrix of possible transitions between states.

bool parallel_initial_state() const#

Computation of the number of initial states in parallel (clustering structure).

void thresholding(double min_probability, bool semi_markov = false)#

Application of a threshold on the Markov chain parameters.

Parameters:
  • min_probability[in] minimum probability,

  • semi_markov[in] flag semi-Markov chain.

int nb_parameter_computation(double min_probability = 0.) const#

Computation of the number of free transition probabilities.

Parameters:

min_probability[in] minimum probability.

Returns:

number of free transition probabilities.

double chi2_value_computation(const ChainData &chain_data) const#

Computation of the chi2 value for a Markov chain (goodness of fit test).

Parameters:

chain_data[in] reference on a ChainData object.

Returns:

chi2 value.

void init(bool left_right, double self_transition)#

Initialization of Markov chain parameters.

Parameters:
  • left_right[in] flag on the Markov chain structure,

  • self_transition[in] self-transition probability.

double likelihood_computation(const ChainData &chain_data, bool initial_flag = true) const#

Computation of the log-likelihood of a Markov chain.

Parameters:
  • chain_data[in] reference on a ChainData object,

  • initial_flag[in] flag inclusion or not of the initial distribution in the log-likelihood computation.

Returns:

log-likelihood.

void chi2_fit(const ChainData &chain_data, Test &test) const#

Chi2 goodness of fit test for a Markov chain.

Parameters:
  • chain_data[in] reference on a ChainData object,

  • test[in] reference on a Test object.

int get_nb_state() const#

Return number of states.

Public Members

process_type type#

process type (ORDINARY/EQUILIBRIUM)

int nb_state#

number of states

int nb_row#

number of rows of the transition probability matrix

bool **accessibility#

state accessibility matrix

int nb_component#

number of classes

int *component_nb_state#

numbers of states per class

int **component#

classes

state_type *stype#

state types (TRANSIENT/RECURRENT/ABSORBING)

double *initial#

initial probabilities

double *cumul_initial#

cumulative initial distribution function

double **transition#

transition probability matrix

double **cumul_transition#

cumulative transition distribution functions

Public Static Functions

static Chain *parsing(StatError &error, ifstream &in_file, int &line, process_type type)#

Analysis of the format of a Chain object.

Parameters:
  • error[in] reference on a StatError object,

  • in_file[in] stream,

  • line[in] reference on the file line index,

  • type[in] process type (ORDINARY/EQUILIBRIUM).

Returns:

Chain object.

class ChainData : public stat_tool::ChainReestimation<int>#

Data structure corresponding to a Markov chain.

Public Functions

ChainData(const ChainData &chain_data)#

Constructor by copy of the ChainData class.

Parameters:

chain_data[in] reference on a ChainData object.

int nb_parameter_computation() const#

Computation of the number of free transition probabilities.

Returns:

number of free transition probabilities.

void estimation(Chain &chain) const#

Estimation of first-order Markov chain parameters on the basis of initial state and transition frequencies.

Parameters:

chain[in] reference on a Chain object.

template<typename Type>
class ChainReestimation#

Data structure corresponding to a Markov chain.

Public Functions

void init()#

Initialization of a ChainReestimation object.

void copy(const ChainReestimation<Type> &chain_data)#

Copy of a ChainReestimation object.

Parameters:

chain_data[in] reference on a ChainReestimation object.

void remove()#

Destruction of the data members of a ChainReestimation object.

ChainReestimation()#

Default constructor of a ChainReestimation object.

ChainReestimation(process_type itype, int inb_state, int inb_row, bool init_flag = false)#

Constructor of the ChainReestimation class.

Parameters:
  • itype[in] type,

  • inb_state[in] number of states,

  • inb_row[in] number of rows of the transition probability matrix,

  • init_flag[in] flag initialization.

~ChainReestimation()#

Destructor of the ChainReestimation class.

ChainReestimation<Type> &operator=(const ChainReestimation<Type> &chain_data)#

Assignment operator of the ChainReestimation class.

Parameters:

chain_data[in] reference on a ChainReestimation object.

Returns:

ChainReestimation object.

std::ostream &print(std::ostream &os) const#

Writing of a ChainReestimation object.

Parameters:

os[inout] stream.

Public Members

process_type type#

process type (ORDINARY/EQUILIBRIUM)

int nb_state#

number of states

int nb_row#

number of rows of the transition frequency matrix

Type *initial#

initial state frequencies

Type **transition#

transition frequency matrix

class Clusters : public stat_tool::DistanceMatrix#

Partitioning clustering results.

Public Functions

Clusters()#

Default constructor of the Clusters class.

Clusters(const DistanceMatrix &dist_matrix, int inb_cluster)#

Constructor of the Clusters class.

Parameters:
  • dist_matrix[in] reference on a DistanceMatrix object,

  • inb_cluster[in] number of clusters.

Clusters(const DistanceMatrix &dist_matrix, int inb_cluster, int *icluster_nb_pattern, int **cluster_pattern)#

Constructor of the Clusters class.

Parameters:
  • dist_matrix[in] reference on a DistanceMatrix object,

  • inb_cluster[in] number of clusters,

  • icluster_nb_pattern[in] pointer on the cluster sizes,

  • cluster_pattern[in] pointer on the cluster compositions.

~Clusters()#

Destructor of the Clusters class.

Clusters &operator=(const Clusters &clusters)#

Assignment operator of the Clusters class.

Parameters:

clusters[in] reference on a Clusters object.

Returns:

Clusters object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a line of a Clusters object.

Parameters:

os[inout] stream.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a Clusters object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a Clusters object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a Clusters object.

Returns:

MultiPlotSet object.

void cluster_nb_pattern_computation()#

Computation of cluster sizes.

void pattern_distance_computation()#

Computation of individual-cluster distances and associated lengths on the basis of individual assignment to clusters.

void cluster_distance_computation_1()#

Computation of between-cluster distances and associated lengths.

void cluster_distance_computation_2()#

Computation of between-cluster distances and associated lengths on the basis of individual-cluster distances and associated lengths.

class Compound : public stat_tool::StatInterface, public stat_tool::Distribution#

Compound distribution.

Public Functions

Compound()#

Default constructor of the Compound class.

Compound(const DiscreteParametric &sum_dist, const DiscreteParametric &dist, double cumul_threshold = COMPOUND_THRESHOLD)#

Constructor of the Compound class.

Parameters:
  • sum_dist[in] reference on the sum distribution,

  • dist[in] reference on the basis distribution,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Compound(const DiscreteParametric &sum_dist, const DiscreteParametric &dist, compound_distribution type)#

Constructor of the Compound class.

Parameters:
  • sum_dist[in] reference on the sum distribution,

  • dist[in] reference on the basis distribution,

  • type[in] unknown distribution type.

~Compound()#

Destructor of the Compound class.

Compound &operator=(const Compound &compound)#

Assignment operator of the Compound class.

Parameters:

compound[in] reference on a Compound object.

Returns:

Compound object.

CompoundData *extract_data(StatError &error) const#

Extraction of the data part of a Compound object.

Parameters:

error[in] reference on a StatError object.

Returns:

CompoundData object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a Compound object.

Parameters:

os[inout] stream.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a Compound object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a Compound object.

Returns:

MultiPlotSet object.

void computation(int min_nb_value = 1, double cumul_threshold = COMPOUND_THRESHOLD, bool sum_flag = true, bool dist_flag = true)#

Computation of a compound distribution.

Parameters:
  • min_nb_value[in] lower bound of the support,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • sum_flag[in] flag for the computation of the sum distribution,

  • dist_flag[in] flag for the computation of the basis distribution.

CompoundData *simulation(StatError &error, int nb_element) const#

Simulation using a compound distribution.

Parameters:
  • error[in] reference on a StatError object,

  • nb_element[in] sample size.

Returns:

sample generated by a compound distribution.

Public Static Functions

static Compound *ascii_read(StatError &error, const std::string path, double cumul_threshold = COMPOUND_THRESHOLD)#

Construction of a Compound object from a file.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

Compound object.

class CompoundData : public stat_tool::StatInterface, public stat_tool::FrequencyDistribution#

Data structure corresponding to a compound distribution.

Public Functions

CompoundData()#

Default constructor of the CompoundData class.

CompoundData(const FrequencyDistribution &histo, const Compound &icompound)#

Constructor of the CompoundData class.

Parameters:
CompoundData(const Compound &icompound)#

Constructor of the CompoundData class.

Parameters:

icompound[in] reference on a Compound object.

~CompoundData()#

Destructor of the CompoundData class.

CompoundData &operator=(const CompoundData &compound_histo)#

Assignment operator of the CompoundData class.

Parameters:

compound_histo[in] reference on a CompoundData object.

Returns:

CompoundData object.

DiscreteDistributionData *extract(StatError &error, compound_distribution type) const#

Extraction of the sum frequency distribution or of the basis frequency distribution.

Parameters:
  • error[in] reference on a StatError object,

  • type[in] frequency distribution type.

Returns:

DiscreteDistributionData object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a CompoundData object.

Parameters:

os[inout] stream.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a CompoundData object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a CompoundData object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a CompoundData object.

Returns:

MultiPlotSet object.

class ContinuousParametric#

Continuous parametric distribution.

Public Functions

void copy(const ContinuousParametric &dist)#

Copy of a ContinuousParametric object.

Parameters:

dist[in] reference on a ContinuousParametric object.

ContinuousParametric(continuous_parametric iident = GAUSSIAN, double ilocation = D_INF, double idispersion = D_DEFAULT, double izero_probability = D_DEFAULT, angle_unit iunit = DEGREE)#

Constructor of the ContinuousParametric class.

Parameters:
  • iident[in] identifier,

  • ilocation[in] location parameter (Gaussian, inverse Gaussian, autoregressive model, von Mises), shape parameter (gamma, zero-inflated gamma) or intercept (linear model),

  • idispersion[in] dispersion parameter (Gaussian, von Mises, linear model, autoregressive model) or scale parameter (gamma, zero-inflated gamma, inverse Gaussian),

  • izero_probability[in] zero probability (zero-inflated gamma), slope (linear model) or autoregressive coefficient (autoregressive model),

  • iunit[in] angle unit (von Mises).

~ContinuousParametric()#

Destructor of the ContinuousParametric class.

ContinuousParametric &operator=(const ContinuousParametric&)#

Assignment operator of the ContinuousParametric class.

Parameters:

dist[in] reference on a ContinuousParametric object.

Returns:

ContinuousParametric object.

std::ostream &ascii_parameter_print(std::ostream &os, bool file_flag = false) const#

Writing of the parameters of a continuous distribution.

Parameters:
  • os[inout] stream,

  • file_flag[in] flag comment.

std::ostream &ascii_characteristic_print(std::ostream &os, bool file_flag = false) const#

Writing of the characteristics of a continuous distribution.

Parameters:
  • os[inout] stream,

  • file_flag[in] flag comment.

std::ostream &ascii_print(std::ostream &os, bool file_flag = false, bool cumul_flag = false, const Histogram *histo1 = NULL, const FrequencyDistribution *histo2 = NULL)#

Writing of a continuous distribution.

Parameters:
  • os[inout] stream,

  • file_flag[in] flag comment,

  • cumul_flag[in] flag on the writing of the cumulative distribution function,

  • histo1[in] pointer on an Histogram object,

  • histo2[in] pointer on a FrequencyDistribution object.

std::ostream &spreadsheet_parameter_print(std::ostream &os) const#

Writing of the parameters of a continuous distribution at the spreadsheet format.

Parameters:

os[inout] stream.

std::ostream &spreadsheet_print(std::ostream &os, bool cumul_flag = false, const Histogram *histo1 = NULL, const FrequencyDistribution *histo2 = NULL)#

Writing of a continuous distribution at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • cumul_flag[in] flag on the writing of the cumulative distribution function,

  • histo1[in] pointer on an Histogram object,

  • histo2[in] pointer on a FrequencyDistribution object.

std::ostream &spreadsheet_characteristic_print(std::ostream &os) const#

Writing of the characteristics of a continuous distribution at the spreadsheet format.

Parameters:

os[inout] stream.

std::ostream &plot_title_print(std::ostream &os) const#

Writing of the parameters of a continuous distribution at the Gnuplot format.

Parameters:

os[inout] stream.

bool plot_print(const char *path, const Histogram *histo1 = NULL, const FrequencyDistribution *histo2 = NULL)#

Writing of a continuous distribution at the Gnuplot format.

Parameters:
Returns:

error status.

bool q_q_plot_print(const char *path, int nb_value, double **empirical_cdf) const#

Writing of a q-q plot at the Gnuplot format.

Parameters:
  • path[in] file path,

  • nb_value[in] number of values,

  • empirical_cdf[in] pointer on the empirical cumulative distribution function.

Returns:

error status.

void plotable_write(SinglePlot &plot, const Histogram *histo1 = NULL, const FrequencyDistribution *histo2 = NULL)#

Plot of a continuous distribution.

Parameters:
void q_q_plotable_write(SinglePlot &plot, int nb_value, double **empirical_cdf) const#

Plot of a q-q plot.

Parameters:
  • plot[in] reference on a SinglePlot object,

  • nb_value[in] number of values,

  • empirical_cdf[in] pointer on the empirical cumulative distribution function.

double **q_q_plot_computation(int nb_value, double **cdf) const#

Computation of a q-q plot.

Parameters:
  • nb_value[in] number of values,

  • empirical_cdf[in] pointer on the empirical cumulative distribution function.

Returns:

q-q plot.

int nb_parameter_computation() const#

Computation of the number of parameters of a continuous distribution.

Returns:

number of parameters.

double von_mises_mass_computation(double inf, double sup) const#

Computation of the density of a von Mises distribution integrated on an interval.

Parameters:
  • inf[in] lower bound,

  • sup[in] upper bound.

Returns:

integrated density.

double mass_computation(double inf, double sup) const#

Computation of the density of a distribution integrated on an interval.

Parameters:
  • inf[in] lower bound,

  • sup[in] upper bound.

Returns:

integrated density.

void von_mises_cumul_computation()#

Computation of the cumulative distribution function of a von Mises distribution.

double sup_norm_distance_computation(ContinuousParametric &dist)#

Computation of the distance between 2 continuous distributions (sup of the absolute difference between the cumulative distribution functions in the case of non-crossing cumulative distribution functions; in the general case, sum of sup on intervals between 2 crossings of cumulative distribution functions).

Parameters:

dist[in] reference on a ContinuousParametric object.

Returns:

distance between 2 continuous distributions

double simulation()#

Simulation using a continuous distribution.

Returns:

generated value.

Public Members

continuous_parametric ident#

identifier

double shape#

shape parameter (gamma, zero-inflated gamma)

double location#

mean (Gaussian, inverse Gaussian, autoregressive model), mean direction (von Mises),

double intercept#

for linear model

double scale#

scale parameter (gamma, inverse Gaussian, zero-inflated gamma)

double dispersion#

standard deviation (Gaussian, linear model, autoregressive model), concentration (von Mises),

double zero_probability#

zero probability (zero-inflated gamma)

double slope#

for linear models

double autoregressive_coeff#

for autoregressive models

double min_value#

minimum value

double max_value#

maximum value

angle_unit unit#

unit (degree/radian - von Mises)

double slope_standard_deviation#

for linear models

double sample_size#

for linear and autoregressive models

double correlation#

for linear models

double determination_coeff#

for autoregressive models

double *cumul#

cumulative distribution function (von Mises)

Public Static Functions

static ContinuousParametric *parsing(StatError &error, std::ifstream &in_file, int &line, continuous_parametric last_ident)#

Analysis of the format of a ContinuousParametric object.

Parameters:
  • error[in] reference on a StatError object,

  • in_file[in] stream,

  • line[in] reference on the file line index,

  • last_ident[in] identifier of the last distribution in the list.

Returns:

ContinuousParametric object.

class ContinuousParametricProcess#

Continuous parametric observation process.

Collection of univariate continuous parametric emission distributions. In the multivariate case, use a collection of conditionally independent ContinuousParametricProcesses observations[k] is a pointer to emission distribution for state k

Public Functions

void copy(const ContinuousParametricProcess &process)#

Copy of a ContinuousParametricProcess object.

Parameters:

process[in] reference on a ContinuousParametricProcess object.

void remove()#

Destruction of the data members of a ContinuousParametricProcess object.

ContinuousParametricProcess(int inb_state = 0)#

Constructor of the ContinuousParametricProcess class.

Parameters:

inb_state[in] number of states.

ContinuousParametricProcess(int inb_state, ContinuousParametric **pobservation)#

Constructor of the ContinuousParametricProcess class.

Parameters:
  • inb_state[in] number of states,

  • pobservation[in] pointer on the observation distributions.

~ContinuousParametricProcess()#

Destructor of the ContinuousParametricProcess class.

ContinuousParametricProcess &operator=(const ContinuousParametricProcess &process)#

Assignment operator of the ContinuousParametricProcess class.

Parameters:

process[in] reference on a ContinuousParametricProcess object.

Returns:

ContinuousParametricProcess object.

std::ostream &ascii_print(std::ostream &os, Histogram **observation_histogram, FrequencyDistribution **observation_distribution, Histogram *marginal_histogram, FrequencyDistribution *marginal_distribution, bool exhaustive, bool file_flag, model_type model = HIDDEN_MARKOV) const#

Writing of a ContinuousParametricProcess object.

Parameters:
  • os[inout] stream,

  • observation_histogram[in] pointer on the observation histograms,

  • observation_distribution[in] pointer on the observation frequency distributions,

  • marginal_histogram[in] pointer on the marginal histogram,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • exhaustive[in] flag detail level,

  • file_flag[in] flag file,

  • model[in] model type.

std::ostream &spreadsheet_print(std::ostream &os, Histogram **observation_histogram = NULL, FrequencyDistribution **observation_distribution = NULL, Histogram *marginal_histogram = NULL, FrequencyDistribution *marginal_distribution = NULL, model_type model = HIDDEN_MARKOV) const#

Writing of a ContinuousParametricProcess object at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • observation_histogram[in] pointer on the observation histograms,

  • observation_distribution[in] pointer on the observation frequency distributions,

  • marginal_histogram[in] pointer on the marginal histogram,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • model[in] model type.

bool plot_print(const char *prefix, const char *title, int process, Histogram **observation_histogram = NULL, FrequencyDistribution **observation_distribution = NULL, Histogram *marginal_histogram = NULL, FrequencyDistribution *marginal_distribution = NULL, int nb_value = I_DEFAULT, double **empirical_cdf = NULL, model_type model = HIDDEN_MARKOV) const#

Plot of a ContinuousParametricProcess object at the Gnuplot format.

Parameters:
  • prefix[in] file prefix,

  • title[in] figure title,

  • process[in] observation process index,

  • observation_histogram[in] pointer on the observation histograms,

  • observation_distribution[in] pointer on the observation frequency distributions,

  • marginal_histogram[in] pointer on the marginal histogram,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • nb_value[in] number of values,

  • empirical_cdf[in] pointer on the empirical cumulative distribution function,

  • model[in] model type.

Returns:

error status.

void plotable_write(MultiPlotSet &plot, int &index, int process, Histogram **observation_histogram = NULL, FrequencyDistribution **observation_distribution = NULL, Histogram *marginal_histogram = NULL, FrequencyDistribution *marginal_distribution = NULL, int nb_value = I_DEFAULT, double **empirical_cdf = NULL, model_type model = HIDDEN_MARKOV) const#

Plot of a ContinuousParametricProcess object.

Parameters:
  • plot[in] reference on a MultiPlotSet object,

  • index[in] MultiPlot index,

  • process[in] observation process index,

  • observation_histogram[in] pointer on the observation histograms,

  • observation_distribution[in] pointer on the observation frequency distributions,

  • marginal_histogram[in] pointer on the marginal histogram,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • nb_value[in] number of values,

  • empirical_cdf[in] pointer on the empirical cumulative distribution function,

  • model[in] model type.

int nb_parameter_computation() const#

Computation of the number of free parameters of a continuous observation process.

Returns:

number of free parameters.

double mean_computation(Distribution *pweight) const#

Computation of the mean of a mixture of continuous observation distributions.

Parameters:

pweight[in] pointer on the weight distribution.

Returns:

mixture mean.

double variance_computation(Distribution *pweight, double mean = D_INF) const#

Computation of the variance of a mixture of continuous observation distributions.

Parameters:
  • pweight[in] pointer on weight distribution,

  • mean[in] mean.

Returns:

mixture variance.

void select_unit(angle_unit iunit)#

Choice of the unit for von Mises observation distributions.

Parameters:

iunit[in] unit (DEGREE/RADIAN).

void init(continuous_parametric iident, double min_value, double max_value, double mean, double variance)#

Initialization of continuous observation distributions.

Parameters:
  • iident[in] distribution identifier,

  • min_value[in] minimum value,

  • max_value[in] maximum value,

  • mean[in] empirical mean

  • variance[in] empirical variance.

std::ostream &interval_computation(std::ostream &os)#

Computation of intervals on the basis of quantile and posterior probability criteria for a uniform weight distribution.

Parameters:

os[inout] stream.

Public Members

int nb_state#

number of states

continuous_parametric ident#

identifiers of observation distributions

bool tied_location#

flag tied means (gamma, Gaussian)

bool tied_dispersion#

flag tied dispersion parameters (gamma, Gaussian, von Mises)

double offset#

offset for Gaussian mixture with evenly spaced means

angle_unit unit#

unit (degree/radian) for von Mises distributions

ContinuousParametric **observation#

continuous observation distributions

Distribution *weight#

theoretical weights of observation distributions

Distribution *restoration_weight#

weights of observation distributions deduced from the restoration

Public Static Functions

static ContinuousParametricProcess *parsing(StatError &error, ifstream &in_file, int &line, int nb_state, model_type model, continuous_parametric last_ident = VON_MISES)#

Analysis of the format of continuous observation distributions.

Parameters:
  • error[in] reference on a StatError object,

  • in_file[in] stream,

  • line[in] reference on the file line index,

  • nb_state[in] number of states,

  • model[in] model type,

  • last_ident[in] identifier of the last distribution in the list.

Returns:

ContinuousParametricProcess object.

class Convolution : public stat_tool::StatInterface, public stat_tool::Distribution#

Convolution of discrete distributions.

Public Functions

Convolution()#

Default constructor of the Convolution class.

Convolution(int nb_dist, const DiscreteParametric **pdist)#

Constructor of the Convolution class.

Parameters:
  • nb_dist[in] number of distributions,

  • pdist[in] pointer on the elementary distributions.

Convolution(const DiscreteParametric &known_dist, const DiscreteParametric &unknown_dist)#

Constructor of the Convolution class.

Parameters:
  • known_dist[in] reference on the known distribution,

  • unknown_dist[in] reference on the unknown distribution.

~Convolution()#

Destructor of the Convolution class.

Convolution &operator=(const Convolution &convol)#

Assignment operator of the Convolution class.

Parameters:

convol[in] reference on a Convolution object.

Returns:

Convolution object.

DiscreteParametricModel *extract(StatError &error, int index) const#

Extraction of an elementary distribution.

Parameters:
  • error[in] reference on a StatError object,

  • index[in] distribution index.

Returns:

DiscreteParametricModel object.

ConvolutionData *extract_data(StatError &error) const#

Extraction of the data part of a Convolution object.

Parameters:

error[in] reference on a StatError object.

Returns:

ConvolutionData object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a Convolution object.

Parameters:

os[inout] stream.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a Convolution object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a Convolution object.

Returns:

MultiPlotSet object.

void computation(int min_nb_value = 1, double cumul_threshold = CONVOLUTION_THRESHOLD, bool *dist_flag = NULL)#

Computation of a convolution of discrete distributions.

Parameters:
  • min_nb_value[in] upper bound of the elementary distribution supports,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • dist_flag[in] flags for computing elementary distributions.

ConvolutionData *simulation(StatError &error, int nb_element) const#

Simulation using a convolution of discrete distributions.

Parameters:
  • error[in] reference on a StatError object,

  • nb_element[in] sample size.

Returns:

ConvolutionData object.

Public Static Functions

static Convolution *build(StatError &error, int nb_dist, const DiscreteParametric **dist)#

Construction of a Convolution object on the basis of elementary distributions.

Parameters:
  • error[in] reference on a StatError object,

  • nb_dist[in] number of distributions,

  • dist[in] pointer on the distributions.

Returns:

Convolution object.

static Convolution *ascii_read(StatError &error, const std::string path, double cumul_threshold = CONVOLUTION_THRESHOLD)#

Construction of a Convolution object from a file.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

Convolution object.

class ConvolutionData : public stat_tool::StatInterface, public stat_tool::FrequencyDistribution#

Data structure corresponding to a convolution of discrete distributions.

Public Functions

ConvolutionData()#

Default constructor of the ConvolutionData class.

ConvolutionData(const FrequencyDistribution &histo, int nb_dist)#

Constructor of the ConvolutionData class.

Parameters:
  • histo[in] reference on a FrequencyDistribution object,

  • nb_dist[in] number of frequency distributions.

ConvolutionData(const Convolution &convol)#

Constructor of the ConvolutionData class.

Parameters:

convol[in] reference on a Convolution object.

~ConvolutionData()#

Destructor of the ConvolutionData class.

ConvolutionData &operator=(const ConvolutionData &convol_histo)#

Assignment operator of the ConvolutionData class.

Parameters:

convol_histo[in] reference on a ConvolutionData object.

Returns:

ConvolutionData object.

DiscreteDistributionData *extract(StatError &error, int index) const#

Extraction of an elementary frequency distribution.

Parameters:
  • error[in] reference on a StatError object,

  • index[in] frequency distribution index.

Returns:

DiscreteDistributionData object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a ConvolutionData object.

Parameters:

os[inout] stream.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a ConvolutionData object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a ConvolutionData object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a ConvolutionData object.

Returns:

MultiPlotSet object.

class Curves#

Family of curves with frequencies.

Public Functions

void copy(const Curves&)#

Copy of a Curves object.

Parameters:

curves[in] reference on a Curves object.

void smooth(const Curves &curves, int max_frequency)#

Copy of a Curves object with curve smoothing.

Parameters:
  • curves[in] reference on a Curves object,

  • max_frequency[in] threshold on the frequencies for the smoothing.

void remove()#

Destruction of data members of a Curves object.

Curves()#

Default constructor of the Curves class.

Curves(int inb_curve, int ilength, bool frequency_flag = false, bool index_parameter_flag = false, bool init_flag = true)#

Constructor of the Curves class.

Parameters:
  • inb_curve[in] number of curves,

  • ilength[in] curve length,

  • frequency_flag[in] flag on the frequencies,

  • index_parameter_flag[in] flag on the index parameters,

  • init_flag[in] flag initialization.

Curves(const Curves &curves, curve_transformation transform = CURVE_COPY, int max_frequency = MAX_FREQUENCY)#

Constructor by copy of the Curves class.

Parameters:
  • curves[in] reference on a Curves object,

  • transform[in] type of transform (CURVE_COPY/SMOOTHING),

  • max_frequency[in] threshold on the frequencies for the smoothing.

Curves(const Distribution &dist)#

Construction of a Curves object from a Distribution object.

Parameters:

dist[in] reference on a Distribution object.

Curves(const FrequencyDistribution &histo)#

Construction of a Curves object from a FrequencyDistribution object.

Parameters:

histo[in] reference on a FrequencyDistribution object.

~Curves()#

Destructor of the Curves class.

Curves &operator=(const Curves &curves)#

Assignment operator of the Curves class.

Parameters:

curves[in] reference on a Curves object.

Returns:

Curves object.

std::ostream &ascii_print(std::ostream &os, bool file_flag = false, const Curves *curves = NULL) const#

Writing of 2 families of curves of the same length.

Parameters:
  • os[inout] stream,

  • file_flag[in] flag file,

  • curves[in] pointer on a Curves object.

std::ostream &spreadsheet_print(std::ostream &os, const Curves *curves = NULL) const#

Writing of 2 families of curves of the same length at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • curves[in] pointer on a Curves object.

int plot_length_computation() const#

Computation of the curve length to be plotted (Gnuplot output).

Returns:

curve length.

bool plot_print(const char *path, int ilength = I_DEFAULT, const Curves *curves_0 = NULL, const Curves *curves_1 = NULL) const#

Writing of 2 families of curves at the Gnuplot format.

Parameters:
  • path[in] file path,

  • ilength[in] curve length,

  • curves_0[in] pointer on a Curves object,

  • curves_1[in] pointer on a Curves object.

Returns:

error status.

bool plot_print_standard_residual(const char *path, double *standard_residual = NULL) const#

Writing of a curve and the corresponding standardized residuals at the Gnuplot format.

Parameters:
  • path[in] file path,

  • standard_residual[in] pointer on the standardized residuals.

Returns:

error status.

void plotable_write(int index, SinglePlot &plot) const#

Writing of a curve.

Parameters:
  • index[in] curve index,

  • plot[in] reference on a SinglePlot object.

void plotable_write(MultiPlot &plot) const#

Writing of the curve family.

Parameters:

plot[in] reference on a MultiPlot object.

void plotable_frequency_write(SinglePlot &plot) const#

Writing of frequencies.

Parameters:

plot[in] reference on a SinglePlot object.

int max_frequency_computation() const#

Computation of the maximum frequency of a Curves object.

Returns:

maximum frequency.

int nb_element_computation() const#

Computation of the cumulative frequency of a Curves object.

Returns:

cumulative frequency.

double mean_computation(int index) const#

Computation of the curve mean.

Parameters:

index[in] curve index.

Returns:

mean.

double total_square_sum_computation(int index, double mean) const#

Computation of the total variation for a curve.

Parameters:
  • index[in] curve index,

  • mean[in] mean.

Returns:

total variation.

Public Members

int nb_curve#

number of curves

int length#

curve length

int offset#

index of the beginning of the curves

int *index_parameter#

explicit index parameters

int *frequency#

frequency for each index

double **point#

curves

class Dendrogram : public stat_tool::StatInterface#

Hierarchical clustering results.

Public Functions

Dendrogram()#

Default constructor of the Dendrogram class.

Dendrogram(const DistanceMatrix &dist_matrix, cluster_scale iscale)#

Constructor of the Dendrogram class.

Parameters:
  • dist_matrix[in] reference on a DistanceMatrix object,

  • iscale[in] cluster distance scale.

~Dendrogram()#

Destructor of the Dendrogram class.

Dendrogram &operator=(const Dendrogram &dendrogram)#

Assignment operator of the Dendrogram class.

Parameters:

dendrogram[in] reference on a Dendrogram object.

Returns:

Dendrogram object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a Dendrogram object.

Parameters:

os[inout] stream.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a Dendrogram object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

class DiscreteDistributionData : public stat_tool::StatInterface, public stat_tool::FrequencyDistribution#

Public Functions

DiscreteDistributionData(const FrequencyDistribution &histo, const Distribution *dist)#

Construction of a DiscreteDistributionData object from a FrequencyDistribution and a Distribution objects.

Parameters:
DiscreteDistributionData(const FrequencyDistribution &histo, const DiscreteParametric *dist)#

Construction of a DiscreteDistributionData object from a FrequencyDistribution and a DiscreteParametric objects.

Parameters:
DiscreteDistributionData(const DiscreteDistributionData &histo, bool model_flag = true)#

Constructor by copy of the DiscreteDistributionData class.

Parameters:
~DiscreteDistributionData()#

Destructor of the DiscreteDistributionData class.

DiscreteDistributionData &operator=(const DiscreteDistributionData &histo)#

Assignment operator of the DiscreteDistributionData class.

Parameters:

histo[in] reference on a DiscreteDistributionData object.

Returns:

DiscreteDistributionData object.

DiscreteParametricModel *extract_model(StatError &error) const#

Extraction of the DiscreteParametricModel object included in a DiscreteDistributionData object.

Parameters:

error[in] reference on a StatError object.

Returns:

DiscreteParametricModel object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a DiscreteDistributionData object.

Parameters:

os[inout] stream.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a DiscreteDistributionData object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a DiscreteDistributionData object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a DiscreteDistributionData object.

Returns:

MultiPlotSet object.

Public Static Functions

static DiscreteDistributionData *ascii_read(StatError &error, const std::string path)#

Construction of a FrequencyDistribution object from a file. Format: n rows with ordered value and associated frequency.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

class DiscreteMixture : public stat_tool::StatInterface, public stat_tool::Distribution#

Mixture of discrete distributions.

Public Functions

DiscreteMixture()#

Default constructor of the DiscreteMixture class.

DiscreteMixture(int inb_component, double *pweight, const DiscreteParametric **pcomponent)#

Constructor of the DiscreteMixture class.

Parameters:
  • inb_component[in] number of components,

  • iweight[in] weights,

  • pcomponent[in] pointer on the components.

DiscreteMixture(const DiscreteMixture &mixt, bool *component_flag, int inb_value)#

Constructor of the DiscreteMixture class.

Parameters:
  • mixt[in] reference on a DiscreteMixture object,

  • component_flag[in] flags on the components to be copied,

  • inb_value[in] upper bound of the support.

DiscreteMixture(int inb_component, const DiscreteParametric **pcomponent)#

Constructor of the DiscreteMixture class.

Parameters:
  • inb_component[in] number of components,

  • pcomponent[in] pointer on the components.

~DiscreteMixture()#

Destructor of the DiscreteMixture class.

DiscreteMixture &operator=(const DiscreteMixture &mixt)#

Assignment operator of the DiscreteMixture class.

Parameters:

mixt[in] reference on a DiscreteMixture object.

Returns:

DiscreteMixture object.

DiscreteParametricModel *extract(StatError &error, int index) const#

Extraction of a component.

Parameters:
  • error[in] reference on a StatError object,

  • index[in] component index.

Returns:

DiscreteParametricModel object.

DiscreteMixtureData *extract_data(StatError &error) const#

Extraction of the DiscreteMixtureData object included in a DiscreteMixture object.

Parameters:

error[in] reference on a StatError object.

Returns:

DiscreteMixtureData object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a DiscreteMixture object.

Parameters:

os[inout] stream.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a DiscreteMixture object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figures title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a DiscreteMixture object.

Returns:

MultiPlotSet object.

void computation(int min_nb_value = 1, double cumul_threshold = CUMUL_THRESHOLD, bool component_flag = true)#

Computation of a mixture of discrete distributions.

Parameters:
  • min_nb_value[in] lower bound of the component support,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • component_flag[in] flag for the component computation.

double likelihood_computation(const DiscreteMixtureData &mixt_histo) const#

Computation of the log-likelihood of a mixture of discrete distributions for a DiscreteMixtureData object.

Parameters:

mixt_histo[in] reference on a DiscreteMixtureData object.

Returns:

log-likelihood.

DiscreteMixtureData *simulation(StatError &error, int nb_element) const#

Simulation using a mixture of discrete distributions.

Parameters:
  • error[in] reference on a StatError object,

  • nb_element[in] sample size.

Returns:

DiscreteMixtureData object.

Public Static Functions

static DiscreteMixture *build(StatError &error, int nb_component, double *weight, const DiscreteParametric **component)#

Construction of a DiscreteMixture object on the basis of weights and components.

Parameters:
  • error[in] reference on a StatError object,

  • nb_component[in] number of components,

  • weight[in] component weights,

  • component[in] pointer on the components.

Returns:

DiscreteMixture object.

static DiscreteMixture *ascii_read(StatError &error, const std::string path, double cumul_threshold = CUMUL_THRESHOLD)#

Construction of a DiscreteMixture object from a file.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

DiscreteMixture object.

class DiscreteMixtureData : public stat_tool::StatInterface, public stat_tool::FrequencyDistribution#

Data structure corresponding to a mixture of discrete distributions.

Public Functions

DiscreteMixtureData()#

Default constructor of the DiscreteMixtureData class.

DiscreteMixtureData(const FrequencyDistribution &histo, int inb_component)#

Constructor of the DiscreteMixtureData class.

Parameters:
  • histo[in] reference on a FrequencyDistribution object,

  • inb_component[in] number of components.

DiscreteMixtureData(const FrequencyDistribution &histo, const DiscreteMixture *pmixture)#

Constructor of the DiscreteMixtureData class.

Parameters:
DiscreteMixtureData(const DiscreteMixture &mixt)#

Constructor of the DiscreteMixtureData class.

Parameters:

mixt[in] reference on a DiscreteMixture object.

~DiscreteMixtureData()#

Destructor of the DiscreteMixtureData class.

DiscreteMixtureData &operator=(const DiscreteMixtureData &mixt_histo)#

Assignment operator of the DiscreteMixtureData class.

Parameters:

mixt_histo[in] reference on a DiscreteMixtureData object.

Returns:

DiscreteMixtureData object.

DiscreteDistributionData *extract(StatError &error, int index) const#

Extraction of a component frequency distribution.

Parameters:
  • error[in] reference on a StatError object,

  • index[in] component index.

Returns:

DiscreteDistributionData object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a DiscreteMixtureData object.

Parameters:

os[inout] stream.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a DiscreteMixtureData object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a DiscreteMixtureData object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a DiscreteMixtureData object.

Returns:

MultiPlotSet object.

double information_computation() const#

Computation of the information quantity of a DiscreteMixtureData object.

Returns:

information quantity.

class DiscreteParametric : public stat_tool::Distribution#

Discrete parametric distribution.

Subclassed by stat_tool::DiscreteParametricModel, stat_tool::Forward

Public Functions

void init(int iinf_bound, int isup_bound, double iparameter, double iprobability)#

Initialization of the parameters of a discrete parametric distribution.

Parameters:
  • iinf_bound[in] lower bound,

  • isup_bound[in] upper bound (binomial, uniform),

  • iparameter[in] parameter (Poisson, negative binomial, Poisson geometric),

  • iprobability[in] probability (binomial, negative binomial, Poisson geometric).

void init(discrete_parametric iident, int iinf_bound, int isup_bound, double iparameter, double iprobability)#

Initialization of the identifier and parameters of a discrete parametric distribution.

Parameters:
  • iident[in] identifier,

  • iinf_bound[in] lower bound,

  • isup_bound[in] upper bound (binomial, uniform),

  • iparameter[in] parameter (Poisson, negative binomial, Poisson geometric),

  • iprobability[in] probability (binomial, negative binomial, Poisson geometric).

void copy(const DiscreteParametric &dist)#

Copy of a DiscreteParametric object.

Parameters:

dist[in] reference on a DiscreteParametric object.

DiscreteParametric(int inb_value = 0, discrete_parametric iident = CATEGORICAL, int iinf_bound = I_DEFAULT, int isup_bound = I_DEFAULT, double iparameter = D_DEFAULT, double iprobability = D_DEFAULT)#

Constructor of the DiscreteParametric class.

Parameters:
  • inb_value[in] number of values,

  • iident[in] identifier,

  • iinf_bound[in] lower bound,

  • isup_bound[in] upper bound (binomial, uniform),

  • iparameter[in] parameter (Poisson, negative binomial, Poisson geometric),

  • iprobability[in] probability (binomial, negative binomial, Poisson geometric).

DiscreteParametric(discrete_parametric iident, int iinf_bound, int isup_bound, double iparameter, double iprobability, double cumul_threshold = CUMUL_THRESHOLD)#

Constructor of the DiscreteParametric class.

Parameters:
  • iident[in] identifier,

  • iinf_bound[in] lower bound,

  • isup_bound[in] upper bound (binomial, uniform),

  • iparameter[in] parameter (Poisson, negative binomial, Poisson geometric),

  • iprobability[in] probability (binomial, negative binomial, Poisson geometric),

  • cumul_threshold[in] threshold on the cumulative distribution function.

DiscreteParametric(int iinf_bound, int ino_segment, int isequence_length)#

Constructor of the DiscreteParametric class (prior segment length distribution).

Parameters:
  • iinf_bound[in] lower bound,

  • ino_segment[in] number of segments,

  • isequence_length[in] sequence length.

DiscreteParametric(const Distribution &dist, int ialloc_nb_value = I_DEFAULT)#

Construction of a DiscreteParametric object from a Distribution object.

Parameters:
  • dist[in] reference on a Distribution object,

  • ialloc_nb_value[in] number of allocated values.

DiscreteParametric(const Distribution &dist, double scaling_coeff)#

Construction of a DiscreteParametric object from a Distribution object applying a scaling operation.

Parameters:
  • dist[in] reference on a Distribution object,

  • scaling_coeff[in] scaling factor.

DiscreteParametric(const DiscreteParametric &dist, double scaling_coeff)#

Construction of an inter-event distribution from an initial inter-event distribution up- or down-scaling the time scale.

Parameters:
  • dist[in] reference on an inter-event distribution,

  • scaling_coeff[in] scaling factor.

DiscreteParametric(const FrequencyDistribution &histo)#

Construction of a DiscreteParametric object from a FrequencyDistribution object.

Parameters:

histo[in] reference on a FrequencyDistribution object.

DiscreteParametric(const DiscreteParametric &dist, distribution_transformation transform = DISTRIBUTION_COPY, int ialloc_nb_value = I_DEFAULT)#

Constructor by copy of the DiscreteParametric class.

Parameters:
  • dist[in] reference on a DiscreteParametric object,

  • transform[in] type of transform (DISTRIBUTION_COPY/NORMALIZATION),

  • ialloc_nb_value[in] number of allocated values.

DiscreteParametric &operator=(const DiscreteParametric &dist)#

Assignment operator of the DiscreteParametric class.

Parameters:

dist[in] reference on a DiscreteParametric object.

Returns:

DiscreteParametric object.

std::ostream &ascii_print(std::ostream &os) const#

Writing of the parameters of a discrete distribution.

Parameters:

os[inout] stream.

std::ostream &ascii_parametric_characteristic_print(std::ostream &os, bool shape = false, bool comment_flag = false) const#

Writing of the characteristics of a discrete parametric distribution.

Parameters:
  • os[inout] stream,

  • shape[in] flag on the writing of the shape characteristics,

  • comment_flag[in] flag comment.

std::ostream &spreadsheet_print(std::ostream &os) const#

Writing of the parameters of a discrete distribution at the spreadsheet format.

Parameters:

os[inout] stream.

std::ostream &spreadsheet_parametric_characteristic_print(std::ostream &os, bool shape = false) const#

Writing of the characteristics of a discrete parametric distribution at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • shape[in] flag on the writing of the shape characteristics.

virtual std::ostream &plot_title_print(std::ostream &os) const#

Writing of the parameters of a discrete parametric distribution at the Gnuplot format.

Parameters:

os[inout] stream.

int nb_parameter_computation()#

Computation of the number of parameters of a discrete parametric distribution.

Returns:

number of parameters.

void nb_parameter_update()#

Update of the number of parameters of a discrete parametric distribution.

double parametric_mean_computation() const#

Computation of the theooretical mean of a discrete parametric distribution.

Returns:

theoretical mean

double parametric_variance_computation() const#

Computation of the theoretical variance of a discrete parametric distribution.

Returns:

theoretical variance.

double parametric_skewness_computation() const#

Computation of the theoretical coefficient of skewness of a discrete parametric distribution.

Returns:

theoretical coefficient of skewness.

double parametric_kurtosis_computation() const#

Computation of the theoretical excess kurtosis of a discrete parametric distribution: excess kurtosis = coefficient of kurtosis - 3.

Returns:

theoretical excess kurtosis

double sup_norm_distance_computation(const DiscreteParametric &dist) const#

Computation of the distance between 2 discrete parametric distributions (sup of the absolute difference between the cumulative distribution functions in the case of non-crossing cumulative distribution functions; in the general case, sum of sup on intervals between 2 crossings of cumulative distribution functions).

Parameters:

dist[in] reference on a DiscreteParametric object.

Returns:

distance between 2 discrete parametric distributions

void binomial_computation(int inb_value, distribution_computation mode)#

Computation of the probability mass function of a binomial distribution.

Parameters:
  • inb_value[in] number of values,

  • mode[in] computation mode (STANDARD/RENEWAL).

void poisson_computation(int inb_value, double cumul_threshold, distribution_computation mode)#

Computation of the probability mass function of a Poisson distribution. The number of values is determined using a threshold on the cumulative distribution function or using a predefined bound.

Parameters:
  • inb_value[in] number of values,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • mode[in] computation mode (STANDARD/RENEWAL).

void negative_binomial_computation(int inb_value, double cumul_threshold, distribution_computation mode)#

Computation of the probability mass function of a negative binomial distribution. The number of values is determined using a threshold on the cumulative distribution function or using a predefined bound.

Parameters:
  • inb_value[in] number of values,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • mode[in] computation mode (STANDARD/RENEWAL).

void geometric_poisson_computation(int inb_value, double cumul_threshold)#

Computation of the probability mass function of a Poisson geometric distribution. The number of values is determined using a threshold on the cumulative distribution function or using a predefined bound.

Parameters:
  • inb_value[in] number of values,

  • cumul_threshold[in] threshold on the cumulative distribution function.

void uniform_computation()#

Computation of the probability mass function of a discrete uniform distribution.

void prior_segment_length_computation()#

Computation of the prior segment length distribution corresponding to the assumption of a uniform prior distribution for the possible segmentations.

void computation(int min_nb_value = 1, double cumul_threshold = CUMUL_THRESHOLD)#

Computation of the probability mass function of a parametric discrete distribution (binomial, Poisson, negative binomial, uniform compound Poisson geometric, prior segment length distribution for a multiple change-point model).

Parameters:
  • min_nb_value[in] minimum number of values,

  • cumul_threshold[in] threshold on the cumulative distribution function.

int simulation() const#

Simulation using the rejection sampling method. Principle: A point (x, Px) is drawn in the rectangle [xmin, xmax] x [0. ,Pmax]. If the point is below the distribution, the x value is kept; If not, a new point is drawn.

Returns:

generated value.

double renewal_likelihood_computation(const Forward &forward_dist, const FrequencyDistribution &within, const FrequencyDistribution &backward, const FrequencyDistribution &forward, const FrequencyDistribution *no_event) const#

Computation of the log-likelihood of a discrete-time renewal process for time interval data.

Parameters:
  • forward_dist[in] forward recurrence time distribution,

  • within[in] complete time interval frequency distribution,

  • backward[in] backward recurrence time frequency distribution,

  • forward[in] forward recurrence time frequency distribution,

  • no_event[in] observation period frequency distribution for the case of no event.

Returns:

log-likelihood.

void expectation_step(const FrequencyDistribution &within, const FrequencyDistribution &backward, const FrequencyDistribution &forward, const FrequencyDistribution *no_event, Reestimation<double> *inter_event_reestim, Reestimation<double> *length_bias_reestim, int iter) const#

Computation of the reestimation quantities corresponding to the inter-event distribution (EM algorithm of an equilibrium renewal process estimated on the basis of time interval data).

Parameters:
  • within[in] complete time interval frequency distribution,

  • backward[in] backward recurrence time frequency distribution,

  • forward[in] forward recurrence time frequency distribution,

  • no_event[in] observation period frequency distribution for the case of no event,

  • inter_event_reestim[in] pointer on the reestimation quantities of the inter-event distribution

  • length_bias_reestim[in] pointer on the reestimation quantities of the length-biased distribution,

  • iter[in] EM iteration.

double state_occupancy_likelihood_computation(const FrequencyDistribution &sojourn_time, const FrequencyDistribution &final_run) const#

Computation of the log-likelihood of a state occupancy distribution of an ordinary semi-Markov chain.

Parameters:
  • sojourn_time[in] frequency distribution of complete sojourn times,

  • final_run[in] frequency distribution of right-censored sojourn times.

Returns:

log-likelihood of the estimated distribution.

double state_occupancy_likelihood_computation(const Forward &forward, const FrequencyDistribution &sojourn_time, const FrequencyDistribution &initial_run, const FrequencyDistribution &final_run, const FrequencyDistribution &single_run) const#

Computation of the log-likelihood of a state occupancy distribution of an equilibrium semi-Markov chain.

Parameters:
  • forward[in] forward sojourn time distribution,

  • sojourn_time[in] frequency distribution of complete sojourn times,

  • initial_run[in] frequency distribution of left-censored sojourn times,

  • final_run[in] frequency distribution of right-censored sojourn times,

  • single_run[in] frequency distribution of sequence lengths for the case of a single visited state.

Returns:

log-likelihood of the estimated distribution.

void expectation_step(const FrequencyDistribution &sojourn_time, const FrequencyDistribution &final_run, Reestimation<double> *occupancy_reestim, int iter) const#

Computation of the reestimation quantities of a state occupancy distribution (EM estimator of an ordinary semi-Markov chain).

Parameters:
  • sojourn_time[in] frequency distribution of complete sojourn times,

  • final_run[in] frequency distribution of right-censored sojourn times,

  • occupancy_reestim[in] pointer on the reestimation quantities of the state occupancy distribution,

  • iter[in] EM iteration.

void expectation_step(const FrequencyDistribution &sojourn_time, const FrequencyDistribution &initial_run, const FrequencyDistribution &final_run, const FrequencyDistribution &single_run, Reestimation<double> *occupancy_reestim, Reestimation<double> *length_bias_reestim, int iter, bool combination = false, duration_distribution_mean_estimator mean_estimator = COMPUTED) const#

Computation of the reestimation quantities of a state occupancy distribution (EM estimator of an equilibrium semi-Markov chain).

Parameters:
  • sojourn_time[in] frequency distribution of complete sojourn times,

  • initial_run[in] frequency distribution of left-censored sojourn times,

  • final_run[in] frequency distribution of right-censored sojourn times,

  • single_run[in] frequency distribution of sequence lengths for the case of a single visited state,

  • occupancy_reestim[in] pointer on the reestimation quantities of the state occupancy distribution,

  • length_bias_reestim[in] pointer on the reestimation quantities of the length-biased distribution,

  • iter[in] EM iteration,

  • combination[in] combination or not of the reestimation quantities,

  • mean_estimator[in] method for the computation of the mean of the state occupancy distribution.

Public Members

discrete_parametric ident#

identifier

int inf_bound#

lower bound

int sup_bound#

upper bound (binomial, uniform)

int no_segment#

number of segments (prior segment length distribution)

double parameter#

parameter (Poisson, negative binomial, Poisson geometric)

double probability#

probability of success (binomial, negative binomial, Poisson geometric)

int sequence_length#

sequence length (prior segment length distribution)

Public Static Functions

static DiscreteParametric *parsing(StatError &error, std::ifstream &in_file, int &line, discrete_parametric last_ident = NEGATIVE_BINOMIAL, double cumul_threshold = CUMUL_THRESHOLD, int min_inf_bound = 0)#

Analysis of the format of a DiscreteParametric object.

Parameters:
  • error[in] reference on a StatError object,

  • in_file[in] stream,

  • line[in] reference on the file line index,

  • last_ident[in] identifier of the last distribution in the list,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • min_inf_bound[in] minimum lower bound.

Returns:

DiscreteParametric object.

static int nb_value_computation(discrete_parametric ident, int inf_bound, int sup_bound, double parameter, double probability, double cumul_threshold = CUMUL_THRESHOLD)#

Computation of the number of values of a parametric discrete distribution (binomial, Poisson, negative binomial, uniform, compound Poisson geometric, prior segment length distribution for a multiple change-point model).

Parameters:
  • ident[in] distribution identifier,

  • inf_bound[in] lower bound of the support,

  • sup_bound[in] upper bound of the support (binomial or uniform distribution),

  • parameter[in] parameter (negative binomial distribution),

  • probability[in] probability (binomial or negative binomial distribution),

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

number of values

class DiscreteParametricModel : public stat_tool::StatInterface, public stat_tool::DiscreteParametric#

Discrete parametric distribution with pointer on DiscreteDistributionData.

Public Functions

DiscreteParametricModel(const FrequencyDistribution &histo)#

Construction of a DiscreteParametricModel object from a FrequencyDistribution object.

Parameters:

histo[in] reference on a FrequencyDistribution object.

DiscreteParametricModel(const Distribution &dist, const FrequencyDistribution *histo)#

Construction of a DiscreteParametricModel object from a Distribution object and a FrequencyDistribution object.

Parameters:
DiscreteParametricModel(const DiscreteParametric &dist, const FrequencyDistribution *histo)#

Construction of a DiscreteParametricModel object from a DiscreteParametric object and a FrequencyDistribution object.

Parameters:
DiscreteParametricModel(const DiscreteParametricModel &dist, bool data_flag = true)#

Constructor by copy of the DiscreteParametricModel class.

Parameters:
~DiscreteParametricModel()#

Destructor of the DiscreteParametricModel class.

DiscreteParametricModel &operator=(const DiscreteParametricModel &dist)#

Assignment operator of the DiscreteParametricModel class.

Parameters:

dist[in] reference on a DiscreteParametricModel object.

Returns:

DiscreteParametricModel object.

DiscreteDistributionData *extract_data(StatError &error) const#

Extraction of the DiscreteDistributionData object included in a DiscreteParametricModel object.

Parameters:

error[in] reference on a StatError object.

Returns:

DiscreteDistributionData object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a DiscreteParametricModel object.

Parameters:

os[inout] stream.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a DiscreteParametricModel object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a DiscreteParametricModel object.

Returns:

MultiPlotSet object.

DiscreteDistributionData *simulation(StatError &error, int nb_element) const#

Building of a frequency distribution by simulating a discrete parametric distribution.

Parameters:
  • error[in] reference on a StatError object,

  • nb_element[in] sample size.

Returns:

DiscreteDistributionData object.

Public Static Functions

static DiscreteParametricModel *ascii_read(StatError &error, const std::string path, double cumul_threshold = CUMUL_THRESHOLD)#

Construction of a DiscreteParametricModel object from a file.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

DiscreteParametricModel object.

class DiscreteParametricProcess#

Discrete parametric observation process.

Collection of univariate discrete parametric emission distributions. In the multivariate case, use a collection of conditionally independent DiscreteParametricProcesses observations[k] is a pointer to emission distribution for state k

Public Functions

void copy(const DiscreteParametricProcess &process, bool mass_copy = false)#

Copy of a DiscreteParametricProcess object.

Parameters:
  • process[in] reference on a DiscreteParametricProcess object.

  • mass_copy[in] flag on copying or not probabilities (mass)

void remove()#

Destruction of the data members of a DiscreteParametricProcess object.

DiscreteParametricProcess(int inb_state = 0, int inb_value = 0)#

Constructor of the DiscreteParametricProcess class.

Parameters:
  • inb_state[in] number of states,

  • inb_value[in] number of values.

DiscreteParametricProcess(int inb_state, DiscreteParametric **pobservation)#

Constructor of the DiscreteParametricProcess class.

Parameters:
  • inb_state[in] number of states,

  • pobservation[in] pointer on the observation distributions.

~DiscreteParametricProcess()#

Destructor of the DiscreteParametricProcess class.

DiscreteParametricProcess &operator=(const DiscreteParametricProcess &process)#

Assignment operator of the DiscreteParametricProcess class.

Parameters:

process[in] reference on a DiscreteParametricProcess object.

Returns:

DiscreteParametricProcess object.

std::ostream &ascii_print(std::ostream &os, FrequencyDistribution **empirical_observation, FrequencyDistribution *marginal_distribution, bool exhaustive, bool file_flag, model_type model = HIDDEN_MARKOV) const#

Writing of a DiscreteParametricProcess object.

Parameters:
  • os[inout] stream,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • exhaustive[in] flag detail level,

  • file_flag[in] flag file,

  • model[in] model type.

std::ostream &spreadsheet_print(std::ostream &os, FrequencyDistribution **empirical_observation = NULL, FrequencyDistribution *marginal_distribution = NULL, model_type model = HIDDEN_MARKOV) const#

Writing of a DiscreteParametricProcess object at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • model[in] model type.

bool plot_print(const char *prefix, const char *title, int process, FrequencyDistribution **empirical_observation = NULL, FrequencyDistribution *marginal_distribution = NULL, model_type model = HIDDEN_MARKOV) const#

Plot of a DiscreteParametricProcess object using Gnuplot.

Parameters:
  • prefix[in] file prefix,

  • title[in] figure title,

  • process[in] observation process index,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • model[in] model type.

Returns:

error status.

void plotable_write(MultiPlotSet &plot, int &index, int process, FrequencyDistribution **empirical_observation = NULL, FrequencyDistribution *marginal_distribution = NULL, model_type model = HIDDEN_MARKOV) const#

Plot of a DiscreteParametricProcess object.

Parameters:
  • plot[in] reference on a MultiPlotSet object,

  • index[in] MultiPlot index,

  • process[in] observation process index,

  • empirical_observation[in] pointer on the observation frequency distributions,

  • marginal_distribution[in] pointer on the marginal frequency distribution,

  • model[in] model type.

void nb_value_computation()#

Computation of the support of the observation process.

void state_permutation(int *permut) const#

Permutation of observation distributions. The permutation validity should be checked by the calling function.

Parameters:

permut[in] permutation.

int nb_parameter_computation() const#

Computation of the number of free parameters of a discrete parametric observation process.

Returns:

number of free parameters.

double mean_computation(Distribution *pweight) const#

Computation of the mean of a mixture of discrete parametric observation distributions.

Parameters:

pweight[in] pointer on the weight distribution.

Returns:

mixture mean.

double variance_computation(Distribution *pweight, double mean = D_INF) const#

Computation of the variance of a mixture of discrete parametric observation distributions.

Parameters:
  • pweight[in] pointer on the weight distribution,

  • mean[in] mean.

Returns:

mixture variance.

Distribution *mixture_computation(Distribution *pweight)#

Computation of a mixture of discrete parametric observation distributions.

Parameters:

pweight[in] pointer on the weight distribution.

Returns:

mixture of discrete parametric observation distributions.

void init()#

Initialization of discrete parametric observation distributions using perturbation.

void DiscreteParametricProcess::init()

{ int i , j; double noise_proba , *pmass;

for (i = 0;i < nb_state;i++) { noise_proba = NOISE_PROBABILITY * nb_state / nb_value;

pmass = observation[i]->mass; for (j = 0;j < i * nb_value / nb_state;j++) { pmass++ -= noise_proba / (nb_state - 1); } for (j = i * nb_value / nb_state;j < (i + 1) * nb_value / nb_state;j++) { pmass++ += noise_proba; } for (j = (i + 1) * nb_value / nb_state;j < nb_value;j++) { pmass++ -= noise_proba / (nb_state - 1); } } }

Public Members

int nb_state#

number of states

int nb_value#

number of values

DiscreteParametric **observation#

discrete parametric observation distributions

Distribution *weight#

theoretical weights of observation distributions

Distribution *mixture#

mixture of observation distributions

Distribution *restoration_weight#

weights of observation distributions deduced from the restoration

Distribution *restoration_mixture#

mixture of observation distributions

Public Static Functions

static DiscreteParametricProcess *parsing(StatError &error, ifstream &in_file, int &line, int nb_state, model_type model, double cumul_threshold = OBSERVATION_THRESHOLD)#

Analysis of the format of discrete parametric observation distributions.

Parameters:
  • error[in] reference on a StatError object,

  • in_file[in] stream,

  • line[in] reference on the file line index,

  • nb_state[in] number of states,

  • model[in] model type,

  • cumul_threshold[in] threshold on the cumulative distribution functions.

Returns:

DiscreteParametricProcess object.

class DistanceMatrix : public stat_tool::StatInterface#

Distance matrix.

Subclassed by stat_tool::Clusters

Public Functions

DistanceMatrix()#

Default constructor of the DistanceMatrix class.

DistanceMatrix(int nb_pattern, const char *ilabel, int *pattern_identifier = NULL)#

Constructor of the DistanceMatrix class.

Parameters:
  • nb_pattern[in] number of individuals,

  • ilabel[in] label,

  • pattern_identifier[in] individual identifiers,

DistanceMatrix(int nb_pattern, int irow_identifier, int icolumn_identifier, const char *ilabel, int *pattern_identifier = NULL, bool substitution_flag = true, bool transposition_flag = false)#

Constructor of the DistanceMatrix class.

Parameters:
  • nb_pattern[in] number of individuals,

  • irow_identifier[in] row identifier,

  • icolumn_identifier[in] column identifier,

  • ilabel[in] label,

  • pattern_identifier[in] individual identifiers,

  • substitution_flag[in] flag substitution edit operation,

  • transposition_flag[in] flag transposition edit operation.

DistanceMatrix(const DistanceMatrix &dist_matrix, int inb_pattern, int *iidentifier, bool keep = true)#

Constructor of the DistanceMatrix class.

Parameters:
  • dist_matrix[in] reference on a DistanceMatrix object,

  • inb_pattern[in] number of selected individuals,

  • iidentifier[in] identifiers of selected individuals,

  • keep[in] flag for keeping or rejecting the selected individuals.

DistanceMatrix(const DistanceMatrix &dist_matrix, int nb_cluster, const char *ilabel)#

Constructor of the DistanceMatrix class.

Parameters:
  • dist_matrix[in] reference on a DistanceMatrix object,

  • nb_cluster[in] number of clusters,

  • ilabel[in] label.

~DistanceMatrix()#

Destructor of the DistanceMatrix class.

DistanceMatrix &operator=(const DistanceMatrix &dist_matrix)#

Assignment operator of the DistanceMatrix class.

Parameters:

dist_matrix[in] reference on a DistanceMatrix object.

Returns:

DistanceMatrix object.

DistanceMatrix *select_individual(StatError &error, int inb_pattern, int *iidentifier, bool keep = true) const#

Selection of individuals by their identifiers.

Parameters:
  • error[in] reference on a StatError object,

  • inb_pattern[in] number of individuals,

  • iidentifier[in] individual identifiers,

  • keep[in] flag for keeping or rejecting the selected individuals.

Returns:

DistanceMatrix object.

DistanceMatrix *symmetrize(StatError &error) const#

Symmetrization of a distance matrix.

Parameters:

error[in] reference on a StatError object.

Returns:

DistanceMatrix object.

DistanceMatrix *unnormalize(StatError &error) const#

Unnormalization of a distance matrix.

Parameters:

error[in] reference on a StatError object.

Returns:

DistanceMatrix object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a DistanceMatrix object.

Parameters:

os[inout] stream.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a DistanceMatrix object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a DistanceMatrix object.

Returns:

MultiPlotSet object.

bool test_symmetry() const#

Test of the symmetry of a distance matrix.

Returns:

flag symmetric matrix or not.

void update(int irow_identifier, int icolumn_identifier, double idistance, int alignment_length, double ideletion_distance, int inb_deletion, double iinsertion_distance, int inb_insertion, int inb_match, double isubstitution_distance = 0., int inb_substitution = 0, double itransposition_distance = 0., int inb_transposition = 0)#

Update of a DistanceMatrix object with the result of the alignment of 2 structures.

Parameters:
  • irow_identifier[in] row identifier (1st individual),

  • icolumn_identifier[in] column identifier (2nd individual),

  • idistance[in] distance,

  • alignment_length[in] alignment length,

  • ideletion_distance[in] deletion distance,

  • inb_deletion[in] number of deletions,

  • iinsertion_distance[in] insertion distance,

  • inb_insertion[in] number of insertions,

  • inb_match[in] number of matches,

  • isubstitution_distance[in] substitution distance,

  • inb_substitution[in] number of substitutions,

  • itransposition_distance[in] transposition distance,

  • inb_transposition[in] number of transpositions.

void update(int irow_identifier, int icolumn_identifier, double idistance, int ilength)#

Update of a DistanceMatrix object with the result of a comparison.

Parameters:
  • irow_identifier[in] row identifier (1st individual),

  • icolumn_identifier[in] column identifier (2nd individual),

  • idistance[in] distance,

  • ilength[in] length.

Dendrogram *agglomerative_hierarchical_clustering(hierarchical_strategy strategy, linkage criterion = AVERAGE_NEIGHBOR) const#

Agglomerative hierarchical clustering algorithm (Kaufman & Rousseeuw, pp. 199-208).

Parameters:
  • strategy[in] algorithm type,

  • criterion[in] cluster merging criterion.

Returns:

Dendrogram object.

Dendrogram *divisive_hierarchical_clustering() const#

Divisive hierarchical clustering algorithm (Kaufman & Rousseeuw, pp. 253-259).

Returns:

Dendrogram object.

bool hierarchical_clustering(StatError &error, std::ostream *os, hierarchical_strategy strategy = AGGLOMERATIVE, linkage criterion = AVERAGE_NEIGHBOR, const std::string path = "", output_format format = ASCII) const#

Hierarchical clustering algorithms.

Parameters:
  • error[in] reference on a StatError object,

  • os[in] stream for displaying the hierarchical clustering results,

  • strategy[in] algorithm type (AGGLOMERATIVE/DIVISIVE/ORDERING),

  • criterion[in] cluster merging criterion (agglomerative algorithm),

  • path[in] file path,

  • format[in] output format (ASCII/SPREADSHEET).

Returns:

Dendrogram object.

class Distribution#

Discrete distribution.

Probabilities are represented as an array *mass, with size nb_allocated_value mass[i] is only meaningful for offset <= i < nb_value. For i < offset or i >= nb_value, mass[i] may be either 0 or unspecified. nb_allocated_value has to be greater or equal to nb_value. It may happen that nb_allocated_value > nb_value, particularly when mass[i] is computed for every i <= quantile(0.9999) = nb_value-1, which we do not know in advance, but we allocated nb_allocated_value > nb_value for the sake of safety.

Subclassed by stat_tool::Compound, stat_tool::Convolution, stat_tool::DiscreteMixture, stat_tool::DiscreteParametric

Public Functions

void mass_copy(const Distribution &dist, int inb_value = I_DEFAULT)#

Copy of the probability mass function.

Parameters:
  • dist[in] reference on a Distribution object,

  • inb_value[in] number of values. inb_value can be less than dist.nb_values. In this case, the unnormalized truncated distribution is copied

void equal_size_copy(const Distribution &dist)#

Copy of a Distribution object in the case where the number of allocated values is the same for the 2 Distribution objects.

Parameters:

dist[in] reference on a Distribution object.

void init(int inb_value)#

Initialization of a Distribution object.

Parameters:

inb_value[in] number of values.

void copy(const Distribution &dist, int ialloc_nb_value = I_DEFAULT)#

Copy of a Distribution object.

Parameters:
  • dist[in] reference on a Distribution object,

  • ialloc_nb_value[in] number of allocated values.

void normalization_copy(const Distribution &dist)#

Copy of a Distribution object with renormalization.

Parameters:

dist[in] reference on a Distribution object.

Distribution(int inb_value = 0)#

Constructor of the Distribution class.

Parameters:

inb_value[in] number of values.

Distribution(int inb_value, double *imass)#

Constructor of the Distribution class.

Parameters:
  • inb_value[in] number of values,

  • imass[in] probability mass function.

Distribution(const Distribution &dist, double scaling_coeff)#

Construction of a Distribution object from an initial Distribution object applying a scaling operation.

Parameters:
  • dist[in] reference on a Distribution object,

  • scaling_coeff[in] scaling factor.

Distribution(const FrequencyDistribution &histo)#

Construction of a Distribution object from a FrequencyDistribution object.

Parameters:

histo[in] reference on a FrequencyDistribution object.

Distribution(const Distribution &dist, distribution_transformation transform = DISTRIBUTION_COPY, int ialloc_nb_value = I_DEFAULT)#

Copy constructor of the Distribution class.

Parameters:
  • dist[in] reference on a Distribution object,

  • transform[in] type of transform (DISTRIBUTION_COPY/NORMALIZATION),

  • ialloc_nb_value[in] number of allocated values.

virtual ~Distribution()#

Destructor of the Distribution class.

Distribution &operator=(const Distribution&)#

Assignment operator of the Distribution class.

Parameters:

dist[in] reference on a Distribution object.

Returns:

Distribution object.

bool operator==(const Distribution&) const#

Equality operator of the Distribution class.

Parameters:

dist[in] reference on a Distribution object.

Returns:

equality or not of the discrete distributions.

std::ostream &ascii_characteristic_print(std::ostream &os, bool shape = false, bool comment_flag = false) const#

Writing of the characteristics of a discrete distribution.

Parameters:
  • os[inout] stream,

  • shape[in] flag on the writing of the shape characteristics,

  • comment_flag[in] flag comment.

std::ostream &print(std::ostream &os) const#

Display of a discrete distribution.

Parameters:

os[inout] stream.

std::ostream &spreadsheet_characteristic_print(std::ostream &os, bool shape = false) const#

Writing of the characteristics of a discrete distribution at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • shape[in] flag on the writing of the shape characteristics.

int plot_nb_value_computation(const FrequencyDistribution *histo = NULL) const#

Computation of the number of plotted values (Gnuplot output).

Parameters:

histo[in] pointer a frequency distribution.

Returns:

number of plotted values.

bool plot_print(const char *path, double *concentration, double scale) const#

Writing of a discrete distribution at the Gnuplot format.

Parameters:
  • path[in] file path,

  • concentration[in] pointer on the concentration function,

  • scale[in] scaling factor.

Returns:

error status.

bool plot_print(const char *path, const FrequencyDistribution *histo = NULL) const#

Writing of a discrete distribution and a frequency distribution at the Gnuplot format.

Parameters:
  • path[in] file path,

  • histo[in] pointer on a frequency distribution.

Returns:

error status.

bool survival_plot_print(const char *path, double *survivor) const#

Writing of a discrete distribution and the associated survivor function at the Gnuplot format.

Parameters:
  • path[in] file path,

  • survivor[in] pointer on the survivor function.

Returns:

error status.

bool plot_write(StatError &error, const char *prefix, int nb_dist, const Distribution **idist, const char *title) const#

Plot of family of a discrete distributions using Gnuplot:

  • probability mass functions and cumulative distribution functions,

  • matching of cumulative distribution functions,

  • concentration curves.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • nb_dist[in] number of distributions,

  • idist[in] pointer on the discrete distributions,

  • title[in] figure title.

Returns:

error status.

void plotable_mass_write(SinglePlot &plot, double scale = 1.) const#

Writing of the probability mass function.

Parameters:
  • plot[in] reference on a SinglePlot object,

  • scale[in] scaling factor (default value: 1).

void plotable_cumul_write(SinglePlot &plot) const#

Writing of the cumulative discrete distribution.

Parameters:

plot[in] reference on a SinglePlot object.

void plotable_cumul_matching_write(SinglePlot &plot, const Distribution &reference_dist) const#

Writing of the matching of the cumulative distribution function with the cumulative distribution function of a reference distribution.

Parameters:
  • plot[in] reference on a SinglePlot object

  • reference_dist[in] reference on the reference distribution.

void plotable_concentration_write(SinglePlot &plot) const#

Writing of the concentration curve deduced from a discrete distribution.

Parameters:

plot[in] reference on a SinglePlot object.

void plotable_survivor_write(SinglePlot &plot) const#

Computation and writing of the survivor function of a discrete distribution.

Parameters:

plot[in] reference on a SinglePlot object.

MultiPlotSet *get_plotable() const#

Plot of a discrete distribution.

Returns:

MultiPlotSet object.

MultiPlotSet *get_plotable_distributions(StatError &error, int nb_dist, const Distribution **idist) const#

Plot of family of a discrete distributions:

  • probability mass functions and cumulative distribution functions,

  • matching of cumulative distribution functions,

  • concentration curves.

Parameters:
  • error[in] reference on a StatError object,

  • nb_dist[in] number of distributions,

  • idist[in] pointer on the discrete distributions.

Returns:

MultiPlotSet object.

std::string survival_ascii_write() const#

Computation of the survival rates from a discrete distribution and writing of the result.

Returns:

string.

bool survival_spreadsheet_write(StatError &error, const std::string path) const#

Computation of survival rates from a discrete distribution and writing of the result in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

bool survival_plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Computation of the survival rates from a discrete distribution and plot of the result using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

MultiPlotSet *survival_get_plotable(StatError &error) const#

Computation of survival rates from a discrete distribution and plot of the result.

Parameters:

error[in] reference on a StatError object.

Returns:

MultiPlotSet object.

void max_computation()#

Extraction of the probability at the mode of a discrete distribution.

double mode_computation() const#

Extraction of the mode of a discrete distribution.

Returns:

mode.

void mean_computation()#

Computation of the mean of a discrete distribution.

double quantile_computation(double icumul = 0.5) const#

Computation of a quantile of a discrete distribution.

Parameters:

icumul[in] value of the cumulative distribution function.

Returns:

quantile.

void variance_computation()#

Computation of the variance of a discrete distribution.

void nb_value_computation()#

Computation of the number of possible values from 0.

void offset_computation()#

Computation of the number of values of null probability from 0.

double concentration_computation() const#

Computation of the coefficient of concentration of a discrete distribution.

Returns:

coefficient of concentration.

double mean_absolute_deviation_computation(double location) const#

Computation of the mean absolute deviation of a discrete distribution.

Parameters:

location[in] location measure (e.g. mean or median).

Returns:

mean absolute deviation.

double skewness_computation() const#

Computation of the coefficient of skewness of a discrete distribution.

Returns:

coefficient of skewness.

double kurtosis_computation() const#

Computation of the excess kurtosis of a discrete distribution: excess kurtosis = coefficient of kurtosis - 3.

Returns:

excess kurtosis.

double information_computation() const#

Computation of the information quantity of a discrete distribution.

Returns:

information quantity.

double first_difference_norm_computation() const#

Computation of the sum of squared first-order differences.

Returns:

sum of squared first-order differences.

double second_difference_norm_computation() const#

Computation of the sum of squared second-order differences.

Returns:

sum of squared second-order differences.

void cumul_computation()#

Computation of the cumulative distribution function of a discrete distribution.

double *survivor_function_computation() const#

Computation of the survivor function of a discrete distribution.

Returns:

survivor function.

double *concentration_function_computation() const#

Computation of the concentration function of a discrete distribution.

Returns:

concentration function.

double overlap_distance_computation(const Distribution &dist) const#

Computation of the distance between 2 discrete distributions (1 - overlap).

Returns:

overlap distance.

void log_computation()#

Ccomputation of the log-probability mass function.

double survivor_likelihood_computation(const FrequencyDistribution &histo) const#

Computation of the log-likelihood of the survival function of a given distribution.

Parameters:

histo[in] reference on a FrequencyDistribution object.

Returns:

log-likelihood.

double chi2_value_computation(const FrequencyDistribution &histo) const#

Computation of the chi2 value for a discrete distribution fit (Chi2 goodness of fit test).

Parameters:

histo[in] reference on a FrequencyDistribution object.

Returns:

chi2 value.

void chi2_degree_of_freedom(const FrequencyDistribution &histo, Test &test) const#

Grouping of successive values, computation of the degrees of freedom and the chi2 value (Chi2 goodness of fit test).

Parameters:
void penalty_computation(double weight, penalty_type pen_type, double *penalty, side_effect outside) const#

Computation of the penalty terms in the framework of a penalized likelihood approach.

Parameters:
  • weight[in] penalty weight,

  • pen_type[in] penalty type (1st order, 2nd order difference or entropy),

  • penalty[in] penalties,

  • outside[in] management of side effects (zero outside the support or continuation of the distribution).

void chi2_fit(const FrequencyDistribution &histo, Test &test) const#

Chi2 goodness of fit test for a discrete distribution.

Parameters:
void convolution(Distribution &dist1, Distribution &dist2, int inb_value = I_DEFAULT)#

Convolution of 2 distributions (the convolution can be put in one of the 2 distributions).

Parameters:
  • dist1[in] reference on the 1st distribution,

  • dist2[in] reference on the 2nd distribution,

  • inb_value[in] number of values of the convolution.

int simulation() const#

Simulation using the cumulative distribution function.

Returns:

generated value.

DiscreteParametricModel *truncate(StatError &error, int imax_value) const#

Truncation of a distribution.

Parameters:
  • error[in] reference on a StatError object,

  • imax_value[in] maximum value.

Returns:

DiscreteParametricModel object.

Public Members

int nb_value#

number of values from 0

int alloc_nb_value#

number of allocated values

int offset#

number of values of null probability from 0

double max#

maximum probability

double complement#

complementary probability (> 0. for improper distributions)

double mean#

mean

double variance#

variance

int nb_parameter#

number of free parameters

double *mass#

probability mass function

double *cumul#

cumulative distribution function

class Forward : public stat_tool::DiscreteParametric#

Forward recurrence or sojourn time distribution.

Public Functions

void computation(const DiscreteParametric &dist)#

Computation of the forward recurrence or sojourn time distribution on the basis of the recurrence or sojourn time distribution.

Parameters:

dist[in] recurrence or sojourn time distribution.

class FrequencyDistribution : public stat_tool::Reestimation<int>#

Frequency distribution.

Subclassed by stat_tool::CompoundData, stat_tool::ConvolutionData, stat_tool::DiscreteDistributionData, stat_tool::DiscreteMixtureData

Public Functions

FrequencyDistribution(int inb_element, int *ielement)#

Constructor of the FrequencyDistribution class.

Parameters:
  • inb_element[in] number of individuals,

  • ielement[in] individuals.

FrequencyDistribution(const FrequencyDistribution &histo, frequency_distribution_transformation transform, int param, rounding mode = FLOOR)#

Constructor of the FrequencyDistribution class.

Parameters:
  • histo[in] reference on a FrequencyDistribution object,

  • transform[in] type of transform (SHIFT/CLUSTER),

  • param[in] shifting parameter (SHIFT) / clustering step (CLUSTER),

  • mode[in] clustering mode (FLOOR/ROUND/CEIL).

bool operator==(const FrequencyDistribution&) const#

Equality operator of the FrequencyDistribution class.

Parameters:

histo[in] reference on a FrequencyDistribution object.

Returns:

equality or not of the frequency distributions.

std::ostream &ascii_print(std::ostream &os, int comment_flag = false, bool cumul_flag = false) const#

Writing of a frequency distribution.

Parameters:
  • os[inout] stream,

  • comment_flag[in] flag comment,

  • cumul_flag[in] flag on the writing of the cumulative distribution function.

std::ostream &spreadsheet_characteristic_print(std::ostream &os, bool shape = false) const#

Writing of the characteristics of a frequency distribution at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • shape[in] flag on the writing of the shape characteristics.

std::ostream &spreadsheet_circular_characteristic_print(std::ostream &os) const#

Writing of the characteristics of a frequency distribution of a circular variable at the spreadsheet format.

Parameters:

os[inout] stream.

std::ostream &spreadsheet_print(std::ostream &os, bool cumul_flag = false, bool concentration_flag = false) const#

Writing of a frequency distribution at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • cumul_flag[in] flag on the writing of the cumulative distribution function,

  • concentration_flag[in] flag on the writing of the concentration function.

bool plot_print(const char *path, int nb_histo = 0, const FrequencyDistribution **histo = NULL) const#

Writing of a family of frequency distributions at the Gnuplot format.

Parameters:
  • path[in] file path,

  • nb_histo[in] number of frequency distributions,

  • histo[in] pointer on the frequency distributions.

Returns:

error status.

bool plot_print(const char *path, double *cumul, double *concentration, double shift = 0.) const#

Writing of a frequency distribution at the Gnuplot format.

Parameters:
  • path[in] file path,

  • cumul[in] pointer on the cumulative distribution function,

  • concentration[in] pointer on the concentration function,

  • shift[in] shift of the frequency distribution.

Returns:

error status.

bool survival_plot_print(const char *path, double *survivor) const#

Writing of a frequency distribution, the deduced probability mass and survivor functions at the Gnuplot format.

Parameters:
  • path[in] file path,

  • survivor[in] pointer on the survivor function.

Returns:

error status.

void plotable_frequency_write(SinglePlot &plot) const#

Writing of a frequency distribution.

Parameters:

plot[in] reference on a SinglePlot object.

void plotable_mass_write(SinglePlot &plot) const#

Writing of the probability mass function deduced from a frequency distribution.

Parameters:

plot[in] reference on a SinglePlot object.

void plotable_cumul_write(SinglePlot &plot, double *icumul = NULL, double scale = D_DEFAULT) const#

Writing of the cumulative distribution function deduced from a frequency distribution.

Parameters:
  • plot[in] reference on a SinglePlot object,

  • icumul[in] pointer on the cumulative distribution function,

  • scale[in] scaling factor.

void plotable_cumul_matching_write(SinglePlot &plot, int reference_offset, int reference_nb_value, double *reference_cumul, double *icumul = NULL) const#

Writing of the matching of a cumulative distribution function with a reference cumulative distribution function.

Parameters:
  • plot[in] reference on a SinglePlot object,

  • reference_offset[in] reference minimum value,

  • reference_nb_value[in] reference number of values,

  • reference_cumul[in] pointer on the reference cumulative distribution function,

  • icumul[in] pointer on the cumulative distribution function.

void plotable_concentration_write(SinglePlot &plot, double *icumul = NULL, double scale = D_DEFAULT) const#

Writing of the concentration curve deduced from a frequency distribution.

Parameters:
  • plot[in] reference on a SinglePlot object,

  • icumul[in] pointer on the cumulative distribution function,

  • scale[in] scaling factor.

void plotable_survivor_write(SinglePlot &plot) const#

Computation and writing of the survivor function computed from a frequency distribution.

Parameters:

plot[in] reference on a SinglePlot object.

double *cumul_computation(double scale = D_DEFAULT) const#

Computation de la cumulative distribution function deduced from a frequency distribution.

Parameters:

scale[in] scaling factor.

Returns:

cumulative distribution function.

double concentration_computation() const#

Computation of the coefficient of concentration of a frequency distribution.

Returns:

coefficient of concentration.

double *survivor_function_computation(double scale = D_DEFAULT) const#

Computation of the survivor function deduced from a frequency distribution.

Parameters:

scale[in] scaling factor.

Returns:

survivor function.

double *concentration_function_computation(double scale = D_DEFAULT) const#

Computation of the concentration function deduced from a frequency distribution.

Parameters:

scale[in] scaling factor.

Returns:

concentration function.

Test *kruskal_wallis_test(int nb_histo, const FrequencyDistribution **ihisto) const#

Kruskal-Wallis test (analysis of variance on ranks).

Parameters:
  • nb_histo[in] number of frequency distributions,

  • ihisto[in] pointer on the frequency distributions.

Returns:

Test object.

bool dissimilarity_spreadsheet_write(StatError &error, const std::string path, int nb_histo, const FrequencyDistribution **ihisto, variable_type type, double **dissimilarity) const#

Writing of the results of a comparison of frequency distributions in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path,

  • nb_histo[in] number of frequency distributions,

  • ihisto[in] pointer on the frequency distributions,

  • type[in] variable type (NOMINAL/ORDINAL/NUMERIC),

  • dissimilarity[in] dissimilarities.

Returns:

error status.

void update(const Reestimation<double> *reestim, int inb_element)#

Update of an integer frequency distribution from a real frequency distribution by rounding.

Parameters:
  • reestim[in] pointer on the real frequency distribution,

  • inb_element[in] cumulative frequencies.

FrequencyDistribution *frequency_scale(int inb_element) const#

Computation of a frequency distribution from an initial frequency distribution by scaling frequencies.

Parameters:

inb_element[in] cumulative frequencies.

Returns:

scaled frequency distribution.

double *rank_computation() const#

Computation of ranks of values on the basis of a frequency distribution.

Returns:

ranks.

int cumulative_distribution_function_computation(double **cdf) const#

Computation of the cumulative frequency distribution function.

Parameters:

cdf[in] (values, cumulative frequency distribution function).

Returns:

number of values.

int min_interval_computation() const#

Computation of the minimum interval between 2 values.

Returns:

minimum interval.

DiscreteParametric *parametric_estimation(discrete_parametric ident, int min_inf_bound = 0, bool flag = true, double cumul_threshold = CUMUL_THRESHOLD) const#

Estimation of a discrete parametric distribution (binomial, Poisson or negative binomial).

Parameters:
  • ident[in] distribution identifier,

  • min_inf_bound[in] minimum lower bound,

  • flag[in] flag on the estimation of the lower bound,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

DiscreteParametric object.

double likelihood_computation(const ContinuousParametric &dist, int min_interval = I_DEFAULT) const#

Computation of the log-likelihood of a continuous distribution for a frequency distribution.

Parameters:
  • dist[in] reference on a ContinuousParametric object,

  • min_interval[in] minimum interval between 2 values.

Returns:

log-likelihood.

DiscreteDistributionData *merge(int nb_sample, const std::vector<FrequencyDistribution> &ihisto) const#

Merging of FrequencyDistribution objects.

Parameters:
Returns:

DiscreteDistributionData object.

void shift(const FrequencyDistribution &histo, int shift_param)#

Shifting of a frequency distribution.

Parameters:
void cluster(const FrequencyDistribution &histo, int step, rounding mode)#

Clustering of values of a frequency distribution.

Parameters:
  • histo[in] reference on a FrequencyDistribution object,

  • step[in] clustering step,

  • mode[in] mode (FLOOR/ROUND/CEIL).

DiscreteDistributionData *shift(StatError &error, int shift_param) const#

Shifting of a frequency distribution.

Parameters:
  • error[in] reference on a StatError object,

  • shift_param[in] shifting parameter.

Returns:

DiscreteDistributionData object.

DiscreteDistributionData *cluster(StatError &error, int step, rounding mode = FLOOR) const#

clustering of values of a frequency distribution.

Parameters:
  • error[in] reference on a StatError object,

  • step[in] clustering step,

  • mode[in] mode (FLOOR/ROUND/CEIL).

Returns:

DiscreteDistributionData object.

DiscreteDistributionData *cluster(StatError &error, int nb_class, int *ilimit) const#

Partitioning of values of a frequency distribution.

Parameters:
  • error[in] reference on a StatError object,

  • nb_class[in] number of classes,

  • ilimit[in] limits between classes (beginning of classes).

Returns:

DiscreteDistributionData object.

DiscreteDistributionData *transcode(StatError &error, int *category) const#

Transcoding of categories.

Parameters:
  • error[in] reference on a StatError object,

  • category[in] transcoding table.

Returns:

DiscreteDistributionData object.

DiscreteDistributionData *value_select(StatError &error, int min_value, int max_value, bool keep = true) const#

Selection of a range of values.

Parameters:
  • error[in] reference on a StatError object,

  • min_value[in] lowest value,

  • max_value[in] highest value,

  • keep[in] flag for keeping or rejecting the selected values.

Returns:

DiscreteDistributionData object.

bool plot_write(StatError &error, const char *prefix, int nb_histo, const FrequencyDistribution **ihisto, const char *title) const#

Plot of a family of frequency distributions using Gnuplot:

  • frequency distributions and cumulative frequencies,

  • probability mass functions and cumulative distribution functions,

  • matching of cumulative distribution functions,

  • concentration curves.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • nb_histo[in] number of frequency distributions,

  • ihisto[in] pointer on the frequency distributions,

  • title[in] figure title.

Returns:

error status.

MultiPlotSet *get_plotable() const#

Plot of a frequency distribution.

Returns:

MultiPlotSet object.

MultiPlotSet *get_plotable_frequency_distributions(StatError &error, int nb_histo, const FrequencyDistribution **ihisto) const#

Plot of a family of frequency distributions:

  • frequency distributions and cumulative frequencies,

  • probability mass functions and cumulative distribution functions,

  • matching of cumulative distribution functions,

  • concentration curves.

Parameters:
  • error[in] reference on a StatError object,

  • nb_histo[in] number of frequency distributions,

  • ihisto[in] pointer on the frequency distributions.

Returns:

plots.

std::string survival_ascii_write() const#

Computation of the survival rates from a frequency distribution and writing of the result.

Returns:

string.

bool survival_spreadsheet_write(StatError &error, const std::string path) const#

Computation of the survival rates from a frequency distribution and writing of the result in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

bool survival_plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Computation of the survival rates from a frequency distribution and plot of the result using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

MultiPlotSet *survival_get_plotable(StatError &error) const#

Computation of the survival rates from a frequency distribution and plot of the result.

Parameters:

error[in] reference on a StatError object.

Returns:

plots.

void F_comparison(std::ostream &os, const FrequencyDistribution &histo) const#

F test of variance comparison.

Parameters:
  • os[in] stream for displaying the test results,

  • histo[in] reference on a frequency distribution.

void t_comparison(std::ostream &os, const FrequencyDistribution &histo) const#

Student’s t test of mean comparison.

Parameters:
  • os[in] stream for displaying the test results,

  • histo[in] reference on a frequency distribution.

bool wilcoxon_mann_whitney_comparison(StatError &error, std::ostream &os, const FrequencyDistribution &ihisto) const#

Wilcoxon-Mann-Whitney test of distribution comparison.

Parameters:
  • error[in] reference on a StatError object,

  • os[in] stream for displaying the test results,

  • ihisto[in] reference on a frequency distribution.

Returns:

error status.

DiscreteParametricModel *fit(StatError &error, const DiscreteParametric &idist) const#

Fit of a distribution.

Parameters:
Returns:

DiscreteParametricModel object.

DiscreteParametricModel *parametric_estimation(StatError &error, discrete_parametric ident, int min_inf_bound = 0, bool flag = true, double cumul_threshold = CUMUL_THRESHOLD) const#

Estimation of a discrete parametric distribution (binomial, Poisson or negative binomial).

Parameters:
  • error[in] reference on a StatError object,

  • ident[in] distribution identifier,

  • min_inf_bound[in] minimum lower bound,

  • flag[in] flag on the estimation of the lower bound,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

DiscreteParametricModel object.

DiscreteParametricModel *type_parametric_estimation(StatError &error, int min_inf_bound = 0, bool flag = true, double cumul_threshold = CUMUL_THRESHOLD) const#

Estimation of a discrete parametric distribution (binomial, Poisson or negative binomial).

Parameters:
  • error[in] reference on a StatError object,

  • min_inf_bound[in] minimum lower bound,

  • flag[in] flag on the estimation of the lower bound,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

DiscreteParametricModel object.

DiscreteMixture *discrete_mixture_estimation(StatError &error, const DiscreteMixture &imixt, bool *estimate, int min_inf_bound = 0, bool mixt_flag = true, bool component_flag = true, double weight_step = 0.1) const#

Estimation of a mixture of parametric discrete distributions using the EM algorithm.

Parameters:
  • error[in] reference on a StatError object,

  • imixt[in] pointer on the known components,

  • estimate[in] flags on the known components,

  • min_inf_bound[in] minimum lower bound of the mixture support,

  • mixt_flag[in] flag on the lower bound of the mixture support,

  • component_flag[in] flag on the lower bounds of the component supports,

  • weight_step[in] step for weight initialization.

Returns:

DiscreteMixture object.

DiscreteMixture *discrete_mixture_estimation(StatError &error, const DiscreteMixture &imixt, int min_inf_bound = 0, bool mixt_flag = true, bool component_flag = true, double weight_step = 0.1) const#

Estimation of a mixture of parametric discrete distributions using the EM algorithm.

Parameters:
  • error[in] reference on a StatError object,

  • imixt[in] pointer on the known components,

  • min_inf_bound[in] minimum lower bound of the mixture support,

  • mixt_flag[in] flag on the lower bound of the mixture support,

  • component_flag[in] flag on the lower bounds of the component supports,

  • weight_step[in] step for weight initialization.

Returns:

DiscreteMixture object.

DiscreteMixture *discrete_mixture_estimation(StatError &error, int nb_component, discrete_parametric *ident, int min_inf_bound = 0, bool mixt_flag = true, bool component_flag = true, double weight_step = 0.1) const#

Estimation of a mixture of parametric discrete distributions using the EM algorithm.

Parameters:
  • error[in] reference on a StatError object,

  • nb_component[in] number of components,

  • ident[in] component identifiers,

  • min_inf_bound[in] minimum lower bound of the mixture support,

  • mixt_flag[in] flag on the lower bound of the mixture support,

  • component_flag[in] flag on the lower bounds of the component supports,

  • weight_step[in] step for weight initialization.

Returns:

DiscreteMixture object.

class Histogram#

Histogram.

Histogram are represented as an array *frequency, with size nb_bin

Public Functions

void copy(const Histogram &histo)#

Copy of an Histogram object.

Parameters:

histo[in] reference on an Histogram object.

Histogram(int inb_bin = 0, bool init_flag = true)#

Construction of an Histogram object.

Parameters:
  • inb_bin[in] number of bins,

  • init_flag[in] flag initialization.

Histogram(const FrequencyDistribution &histo)#

Construction of an Histogram object from a FrequencyDistribution object.

Parameters:

histo[in] reference on a FrequencyDistribution object.

~Histogram()#

Destructor of the Histogram class.

Histogram &operator=(const Histogram &histo)#

Assignment operator of the Histogram class.

Parameters:

histo[in] reference on an Histogram object.

Returns:

Histogram object.

std::ostream &ascii_print(std::ostream &os, bool comment_flag = false) const#

Writing of an histogram.

Parameters:
  • os[inout] stream,

  • comment_flag[in] flag comment.

std::ostream &spreadsheet_print(std::ostream &os) const#

Writing of an histogram at the spreadsheet format.

Parameters:

os[inout] stream.

bool plot_print(const char *path) const#

Writing of an histogram at the Gnuplot format.

Parameters:

path[in] file path.

Returns:

error status.

void plotable_write(SinglePlot &plot) const#

Writing of an histogram at the plotable format.

Parameters:

plot[in] reference on a SinglePlot object.

void max_computation()#

Determination of the maximum bin frequency for an histogram.

double *cumul_computation() const#

Computation of a cumulative distribution function from an histogram.

Returns:

cumulative distribution function.

Public Members

int nb_element#

sample size

int nb_bin#

number of bins

double bin_width#

constant bin width

int max#

maximum value in frequency

int *frequency#

frequency for each bin

int type#

variable type (INT_VALUE/REAL_VALUE)

double min_value#

minimum value of support

double max_value#

maximum value of support

class MultiPlot#
class MultivariateMixture : public stat_tool::StatInterface#

Emission distributions are represented by arrays of DiscreteParametricProcess* and CategoricalProcess*. pcomponent[var] == NULL if and only if npcomponent[var] != NULL in which case the variable is represented by a categorical distribution for each mixture components

Public Functions

DiscreteParametricModel *extract_parametric_model(StatError &error, int ivariable, int index) const#

extract parametric component

Distribution *extract_categorical_model(StatError &error, int ivariable, int index) const#

extract categorical component

DiscreteMixture *extract_distribution(StatError &error, int ivariable) const#

extract marginal mixture distribution

void state_permutation(StatError &error, int *perm) const#

Permutation of the states of self

virtual MultiPlotSet *get_plotable() const#

MultivariateMixtureData *cluster(StatError &error, const Vectors &vec, int algorithm = VITERBI, bool add_state_entropy = false) const#

add restored states and state entropy to Vectors

bool is_parametric(int ivariable) const#

return “true” if process ivariable is parametric

class MultivariateMixtureData : public stat_tool::Vectors#
template<typename Type>
class Reestimation#

Frequency distribution with integer or real (for EM algorithms) frequencies.

Frequencies are represented as an array *frequency, with size alloc_nb_value frequency[i] is only meaningful for offset <= i < nb_value. For i < offset, frequency[i] may be either 0 or unspecified.

Public Functions

void init(int inb_value)#

Construction of a Reestimation object.

Parameters:

inb_value[in] number of values from 0.

void copy(const Reestimation<Type> &histo)#

Copy of a Reestimation object.

Parameters:

histo[in] reference on a Reestimation object.

Reestimation(const Reestimation<Type> &histo)#

Constructor by copy of the Reestimation class.

Parameters:

histo[in] reference on a Reestimation object.

Reestimation(int nb_histo, const Reestimation<Type> **histo)#

Constructor by merging of the Reestimation class.

Parameters:
~Reestimation()#

Destructor of the Reestimation class.

Reestimation<Type> &operator=(const Reestimation<Type> &histo)#

Assignment operator of the Reestimation class.

Parameters:

histo[in] reference on a Reestimation object.

Returns:

Reestimation object.

std::ostream &ascii_characteristic_print(std::ostream &os, bool shape = false, bool comment_flag = false) const#

Writing of the characteristics of a Reestimation object.

Parameters:
  • os[inout] stream,

  • shape[in] flag on the writing of the shape characteristics,

  • comment_flag[in] flag comments.

std::ostream &ascii_circular_characteristic_print(std::ostream &os, bool comment_flag = false) const#

Writing of the characteristics of a Reestimation object for a circular variable.

Parameters:
  • os[inout] stream,

  • comment_flag[in] flag comment.

std::ostream &print(std::ostream &os) const#

Display of a Reestimation object.

Parameters:

os[inout] stream.

void nb_value_computation()#

Computation of the number of values from 0.

void offset_computation()#

Computation of the number of values of null frequency from 0.

void nb_element_computation()#

Computation of the sample size.

void max_computation()#

Determination of the maximum frequency.

double mode_computation() const#

Determination of the mode.

Returns:

mode.

void mean_computation()#

Mean computation.

double quantile_computation(double icumul = 0.5) const#

Computation of a quantile.

Parameters:

icumul[in] value of the cumulative distribution function.

Returns:

quantile.

void variance_computation(bool bias = false)#

Variance computation.

Parameters:

bias[in] flag bias.

double mean_absolute_deviation_computation(double location) const#

Computation of the mean absolute deviation.

Parameters:

location[in] location measure (e.g. mean or median).

Returns:

mean absolute deviation.

double log_geometric_mean_computation() const#

Computation of the log of the geometric mean.

Returns:

log geometric mean.

double skewness_computation() const#

Computation of the coefficient of skewness.

Returns:

coefficient of skewness.

double kurtosis_computation() const#

Computation of the excess kurtosis: excess kurtosis = coefficient of kurtosis - 3.

Returns:

excess kurtosis.

void mean_direction_computation(double *mean_direction) const#

Computation of the mean direction for a circular variable.

Parameters:

mean_direction[in] pointer on the mean direction.

double information_computation() const#

Computation of the information quantity.

Returns:

information quantity.

double likelihood_computation(const Distribution &dist) const#

Computation of the log-likelihood of a discrete distribution for a sample.

Parameters:

dist[in] reference on a Distribution object.

Returns:

log-likelihood.

void distribution_estimation(Distribution *pdist) const#

Estimation of a categorical distribution on the basis of a frequency distribution.

Parameters:

dist[in] pointer on a Distribution object.

void penalized_likelihood_estimation(Distribution *dist, double weight, penalty_type pen_type, double *penalty, side_effect outside) const#

Estimation of a discrete distribution on the basis of a frequency distribution using a penalized likelihood estimator.

Parameters:
  • dist[in] pointer on a Distribution object,

  • weight[in] penalty weight,

  • pen_type[in] penalty type (first- or second-order difference or entropy),

  • penalty[in] penalty,

  • outside[in] management of side effects (zero outside the support or continuation of the distribution).

double uniform_estimation(DiscreteParametric *pdist, int min_inf_bound, bool min_inf_bound_flag) const#

Estimation of the parameters of a uniform distribution on the basis of a frequency distribution (estimation is biased)

Parameters:
  • dist[in] pointer on a DiscreteParametric object,

  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift.

Returns:

maximized log-likelihood.

double binomial_estimation(DiscreteParametric *pdist, int min_inf_bound, bool min_inf_bound_flag) const#

Estimation of the parameters of a shifted binomial distribution on the basis of a frequency distribution.

Parameters:
  • dist[in] pointer on a DiscreteParametric object,

  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift.

Returns:

maximized log-likelihood.

double poisson_estimation(DiscreteParametric *pdist, int min_inf_bound, bool min_inf_bound_flag, double cumul_threshold) const#

Estimation of the parameters of a shifted Poisson distribution on the basis of a frequency distribution.

Parameters:
  • dist[in] pointer on a DiscreteParametric object,

  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

maximized log-likelihood.

double negative_binomial_estimation(DiscreteParametric *pdist, int min_inf_bound, bool min_inf_bound_flag, double cumul_threshold) const#

Estimation of the parameters of a shifted negative binomial distribution on the basis of a frequency distribution.

Parameters:
  • dist[in] pointer on a DiscreteParametric object,

  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

maximized log-likelihood.

double geometric_poisson_estimation(DiscreteParametric *pdist, int min_inf_bound, bool min_inf_bound_flag, double cumul_threshold) const#

Estimation of the parameters of a shifted Poisson geometric distribution on the basis of a frequency distribution.

Parameters:
  • dist[in] pointer on a DiscreteParametric object,

  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

maximized log-likelihood.

double parametric_estimation(DiscreteParametric *pdist, int min_inf_bound = 0, bool min_inf_bound_flag = true, double cumul_threshold = CUMUL_THRESHOLD, bool geometric_poisson = false) const#

Estimation of the parameters of a discrete parametric distribution (binomial, Poisson, negative binomial, Poisson geometric) on the basis of a frequency distribution.

Parameters:
  • dist[in] pointer on a DiscreteParametric object,

  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • geometric_poisson[in] flag on the estimation of a Poisson geometric distribution.

Returns:

maximized log-likelihood.

double type_parametric_estimation(DiscreteParametric *pdist, int min_inf_bound = 0, bool min_inf_bound_flag = true, double cumul_threshold = CUMUL_THRESHOLD, bool geometric_poisson = false) const#

Estimation of the type and parameters of a discrete parametric distribution (binomial, Poisson, negative binomial, Poisson geometric) on the basis of a frequency distribution.

Parameters:
  • dist[in] pointer on a DiscreteParametric object,

  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift,

  • cumul_threshold[in] threshold on the cumulative distribution function,

  • geometric_poisson[in] flag on the estimation of a Poisson geometric distribution.

Returns:

maximized log-likelihood.

DiscreteParametric *type_parametric_estimation(int min_inf_bound = 0, bool min_inf_bound_flag = true, double cumul_threshold = CUMUL_THRESHOLD) const#

Estimation of the type and parameters of a discrete parametric distribution (binomial, Poisson, negative binomial) on the basis of a frequency distribution.

Parameters:
  • min_inf_bound[in] minimum lower bound of the support,

  • min_inf_bound_flag[in] flag on the distribution shift,

  • cumul_threshold[in] threshold on the cumulative distribution function.

Returns:

discrete parametric distribution.

void equilibrium_process_combination(const Reestimation<Type> *length_bias_reestim, double imean)#

Combination of the reestimation quantities of the basis time interval distribution and the length-biased distribution (equilibrium stochastic process).

Parameters:
  • length_bias_reestim[in] pointer on the reestimation quantities of the length-biased distribution,

  • imean[in] distribution mean.

void equilibrium_process_estimation(const Reestimation<Type> *length_bias_reestim, Distribution *dist, double imean) const#

Estimation of a discrete distribution on the basis of the reestimation quantities of the basis time interval distribution and the length-biased distribution (equilibrium stochastic process).

Parameters:
  • length_bias_reestim[in] pointer on the reestimation quantities of the length-biased distribution,

  • dist[in] distribution,

  • imean[in] distribution mean.

void penalized_likelihood_equilibrium_process_estimation(const Reestimation<Type> *length_bias_reestim, Distribution *dist, double imean, double weight, penalty_type pen_type, double *penalty, side_effect outside) const#

Estimation of a discrete distribution on the basis of the reestimation quantities of the basis time interval distribution and the length-biased distribution using a penalized likelihood estimator (equilibrium stochastic process).

Parameters:
  • length_bias_reestim[in] pointer on the reestimation quantities of the length-biased distribution,

  • dist[in] distribution,

  • imean[in] distribution mean,

  • weight[in] penalty weight ,

  • pen_type[in] penalty type (first- or second-order difference or entropy),

  • penalty[in] penalty,

  • outside[in] management of side effects (zero outside the support or continuation of the distribution).

void state_occupancy_estimation(const Reestimation<Type> *final_run, Reestimation<double> *occupancy_reestim, Type *occupancy_survivor, Type *censored_occupancy_survivor, bool characteristic_computation = true)#

Estimation of a state occupancy distribution using the Kaplan-Meier estimator.

Parameters:
  • final_run[in] pointer on the right-censored sojourn times,

  • occupancy_reestim[in] pointer on the reestimation quantities,

  • occupancy_survivor[in] pointer on the survival function corresponding to the complete sojourn times,

  • censored_occupancy_survivor[in] pointer on the survival function corresponding to the right-censored sojourn times,

  • characteristic_computation[in] flag for the computation of the characteristics of the reestimation quantities.

void gamma_estimation(ContinuousParametric *dist, int iter) const#

Estimation of a gamma distribution on the basis of a frequency distribution.

Parameters:
  • dist[in] continuous distribution,

  • iter[in] EM iteration.

void zero_inflated_gamma_estimation(ContinuousParametric *dist, int iter) const#

Estimation of a zero-inflated gamma distribution on the basis of a frequency distribution.

Parameters:
  • dist[in] continuous distribution,

  • iter[in] EM iteration.

void inverse_gaussian_estimation(ContinuousParametric *dist) const#

Estimation of an inverse Gaussian distribution on the basis of a frequency distribution.

Parameters:

dist[in] continuous distribution.

Public Members

int nb_value#

number of values from 0

int alloc_nb_value#

number of allocated values

int offset#

number of values of null frequencies from 0

Type nb_element#

sample size

Type max#

maximum frequency

double mean#

mean

double variance#

variance

Type *frequency#

frequency for each value

class Regression : public stat_tool::StatInterface, public stat_tool::RegressionKernel#

Regression function.

Public Functions

Regression()#

Default constructor of the Regression class.

Regression(parametric_function iident, int explanatory_variable, int response_variable, const Vectors &vec)#

Construction of a Regression object from a Vectors object.

Parameters:
  • iident[in] regression function identifier,

  • explanatory_variable[in] explanatory variable index,

  • response_variable[in] response variable index,

  • vec[in] reference on a Vectors object.

Regression(const Regression &regression)#

Constructor by copy of the Regression class.

Parameters:

regression[in] reference on a Regression object.

~Regression()#

Destructor of the Regression class.

Regression &operator=(const Regression &regression)#

Assignment operator of the Regression class.

Parameters:

regression[in] reference on a Regression object.

Returns:

Regression object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a Regression object.

Parameters:

os[inout] stream.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a Regression object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a Regression object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a Regression object.

Returns:

MultiPlotSet object.

class RegressionKernel#

Regression kernel class.

Subclassed by stat_tool::Regression

Public Functions

void copy(const RegressionKernel&)#

Copy of a RegressionKernel object.

Parameters:

regression[in] reference on a RegressionKernel object.

void remove()#

Destruction of the data members of a RegressionKernel object.

RegressionKernel()#

Default constructor of the RegressionKernel class.

RegressionKernel(parametric_function iident, int imin_value, int imax_value)#

Constructor of the RegressionKernel class.

Parameters:
  • iident[in] identifier,

  • imin_value[in] minimum value of the explanatory variable,

  • imax_value[in] maximum value of the explanatory variable.

~RegressionKernel()#

Destructor of the RegressionKernel class.

RegressionKernel &operator=(const RegressionKernel &regression)#

Assignment operator of the RegressionKernel class.

Parameters:

regression[in] reference on a RegressionKernel object.

Returns:

RegressionKernel object.

std::ostream &ascii_parameter_print(std::ostream &os) const#

Writing of the regression function parameters.

Parameters:

os[inout] stream.

std::ostream &ascii_formal_print(std::ostream &os) const#

Formal writing of the regression function.

Parameters:

os[inout] stream.

std::ostream &ascii_print(std::ostream &os) const#

Writing of the regression function.

Parameters:

os[inout] stream.

std::ostream &spreadsheet_print(std::ostream &os) const#

Writing of the regression function at the spreadsheet format.

Parameters:

os[inout] stream.

bool plot_print(const char *path) const#

Writing of the regression function (Gnuplot output).

Parameters:

path[in] file path.

Returns:

error status.

void plotable_write(SinglePlot &plot) const#

Writing of the regression function for plotting.

Parameters:

plot[in] reference on a SinglePlot object.

void computation()#

Computation of a parametric regression function.

double min_computation() const#

Computation of the minimum value of a regression function.

Returns:

minimum value.

double max_computation() const#

Computation of the maximum value of a regression function.

Returns:

maximum value.

Public Members

parametric_function ident#

identifier of the regression function

int min_value#

minimum value

int max_value#

maximum value

double regression_df#

degrees of freedom regression

double residual_df#

degrees of freedom residuals

int nb_parameter#

number of parameters

double *parameter#

parameters

double *point#

points

class SinglePlot#
class StatError#

Class for error management.

Public Functions

StatError(int imax_nb_error = NB_ERROR)#

Constructor of the StatError class.

Parameters:

imax_nb_error[in] maximum number of errors.

~StatError()#

Destructor of the StatError class.

void update(const char *ilabel, int iline = 0, int icolumn = 0)#

Update of a StatError object.

Parameters:
  • ilabel[in] label,

  • iline[in] line,

  • icolumn[in] column.

void correction_update(const char *ilabel, const char *correction, int iline = 0, int icolumn = 0)#

Update of a StatError object.

Parameters:
  • ilabel[in] label,

  • correction[in] correction,

  • iline[in] line,

  • icolumn[in] column.

void correction_update(const char *ilabel, int correction, int iline = 0, int icolumn = 0)#

Update of a StatError object.

Parameters:
  • ilabel[in] label,

  • correction[in] correction,

  • iline[in] line,

  • icolumn[in] column.

class StatInterface#

Abstract class defining a common interface.

Subclassed by stat_tool::Compound, stat_tool::CompoundData, stat_tool::Convolution, stat_tool::ConvolutionData, stat_tool::Dendrogram, stat_tool::DiscreteDistributionData, stat_tool::DiscreteMixture, stat_tool::DiscreteMixtureData, stat_tool::DiscreteParametricModel, stat_tool::DistanceMatrix, stat_tool::MultivariateMixture, stat_tool::Regression, stat_tool::VectorDistance, stat_tool::Vectors

Public Functions

std::string ascii_write(bool exhaustive = false) const#

Writing of a StructureAnalysis object (for display on the console).

Parameters:

exhaustive[in] flag detail level,

Returns:

string.

template<typename Type>
class TemplateMultiPlotSet#

Public Members

std::vector<int> variable#

identifier / number of the variable to be displayed

std::vector<Type> viewpoint#

nature of the graph, for example observation distribution…

class Test#

Test of hypothesis.

Public Functions

void copy(const Test &test)#

Construction by copy of a Test object.

Parameters:

test[in] reference on a Test object.

Test(test_distribution iident, bool ione_side = true)#

Constructor of the Test class.

Parameters:
  • iident[in] identifier,

  • ione_side[in] flag one-sided/two-sided.

Test(test_distribution iident, bool ione_side, int idf1, int idf2, double ivalue)#

Constructor of the Test class.

Parameters:
  • iident[in] identifier,

  • ione_side[in] flag one-sided/two-sided,

  • idf1[in] degrees of freedom,

  • idf2[in] degrees of freedom,

  • ivalue[in] value.

Test(test_distribution iident, bool ione_side, int idf1, int idf2, double ivalue, double icritical_probability)#

Constructor of the Test class.

Parameters:
  • iident[in] identifier,

  • ione_side[in] flag one-sided/two-sided,

  • idf1[in] degrees of freedom,

  • idf2[in] degrees of freedom,

  • ivalue[in] value,

  • icritical_probability[in] critical probability.

Test &operator=(const Test &test)#

Assignment operator of the Test class.

Parameters:

test[in] reference on a Test object.

Returns:

Test object.

std::ostream &ascii_print(std::ostream &os, bool comment_flag = false, bool reference_flag = true) const#

Writing of the results of a test.

Parameters:
  • os[inout] stream,

  • comment_flag[in] flag comment,

  • reference_flag[in] flag reference result.

std::ostream &spreadsheet_print(std::ostream &os, bool reference_flag = true) const#

Writing of the results of a test at the spreadsheet format.

Parameters:
  • os[inout] stream,

  • reference_flag[in] flag reference result.

void standard_normal_critical_probability_computation()#

Computation of the critical probability from the value taken by a standard Gaussian random variable.

void standard_normal_value_computation()#

Computation of the value taken by a standard Gaussian random variable from the critical probability.

void chi2_critical_probability_computation()#

Computation of la critical probability from the value taken by a Chi2 random variable.

void chi2_value_computation()#

Computation of the value taken by a Chi2 random variable from the critical probability.

void F_critical_probability_computation()#

Computation of the critical probability from the value taken by a F random variable.

void F_value_computation()#

Computation of the value taken by a F random variable from the critical probability.

void t_critical_probability_computation()#

Computation of the critical probability from the value taken by a Student’s t-random variable.

void t_value_computation()#

Computation of the value taken by a Student’s t-random variable from the critical probability.

Public Members

test_distribution ident#

identifier (Normal/Chi2/F/Student’s t)

bool one_side#

one-sided/two-sided

int df1#

degrees of freedom (Chi2/F/Student’s t)

int df2#

degrees of freedom (F)

double value#

statistic value

double critical_probability#

critical probability

class VectorDistance : public stat_tool::StatInterface#

Parameterization of a distance between vectors with heterogeneous variables.

Public Functions

VectorDistance()#

Default constructor of the VectorDistance class.

VectorDistance(int inb_variable, variable_type *ivar_type, double *iweight, metric idistance_type = ABSOLUTE_VALUE)#

Constructor of the VectorDistance class.

Parameters:
  • inb_variable[in] number of variables,

  • ivar_type[in] variable types,

  • iweight[in] variable weights,

  • idistance_type[in] distance type (ABSOLUTE_VALUE/QUADRATIC).

VectorDistance(int inb_variable, metric idistance_type, variable_type *ivar_type, double *iweight, int *inb_value, double ***icategory_distance, int *iperiod)#

Constructor of the VectorDistance class.

Parameters:
  • inb_variable[in] number of variables,

  • idistance_type[in] distance type (ABSOLUTE_VALUE/QUADRATIC),

  • ivar_type[in] variable types,

  • iweight[in] variable weights,

  • inb_value[in] number of categories (for categorical variables),

  • icategory_distance[in] between-category distance matrices (for categorical variables),

  • iperiod[in] periods (for circular variables).

~VectorDistance()#

Destructor of the VectorDistance class.

VectorDistance &operator=(const VectorDistance &vector_dist)#

Assignment operator of the VectorDistance class.

Parameters:

vector_dist[in] reference on a VectorDistance object.

Returns:

VectorDistance object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a VectorDistance object.

Parameters:

os[inout] stream.

double *max_category_distance_computation(int variable) const#

Computation of the maximum distance for each category.

Parameters:

variable[in] variable index.

Returns:

maximum distances.

void dispersion_update(int variable, double idispersion) const#

Update of the standardization quantity.

Parameters:
  • variable[in] variable index,

  • idispersion[in] variable dispersion.

void dispersion_computation(int variable, const FrequencyDistribution *marginal_distribution, double *rank = NULL) const#

Computation of the standardization quantity.

Parameters:
  • variable[in] variable index,

  • marginal_distribution[in] marginal frequency distribution,

  • rank[in] ranks.

Public Static Functions

static VectorDistance *ascii_read(StatError &error, const std::string path)#

Construction of a VectorDistance object from a file.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

VectorDistance object.

class Vectors : public stat_tool::StatInterface#

Vectors with integer- and real-valued variables.

Subclassed by stat_tool::MultivariateMixtureData

Public Functions

Vectors()#

Default constructor of the Vectors class.

Vectors(int inb_vector, int *iidentifier, int inb_variable, int **iint_vector)#

Constructor of the Vectors class.

Parameters:
  • inb_vector[in] number of individuals,

  • iidentifier[in] individual identifiers,

  • inb_variable[in] number of variables,

  • iint_vector[in] integer-valued vectors.

Vectors(int inb_vector, int *iidentifier, int inb_variable, double **ireal_vector)#

Constructor of the Vectors class.

Parameters:
  • inb_vector[in] number of individuals,

  • iidentifier[in] individual identifiers,

  • inb_variable[in] number of variables,

  • ireal_vector[in] real-valued vectors.

Vectors(int inb_vector, int *iidentifier, int inb_variable, variable_nature *itype, int **iint_vector, double **ireal_vector, bool variable_index = true)#

Constructor of the Vectors class.

Parameters:
  • inb_vector[in] number of individuals,

  • iidentifier[in] individual identifiers,

  • inb_variable[in] number of variables,

  • itype[in] variable types,

  • iint_vector[in] integer variables,

  • ireal_vector[in] real variables,

  • variable_index[in] variable indexing.

Vectors(const Vectors &vec, int variable, variable_nature itype)#

Constructor of the Vectors class.

Parameters:
  • vec[in] reference on a Vectors object,

  • variable[in] variable index,

  • itype[in] variable type.

Vectors(const Vectors &vec, int inb_vector, int *index)#

Constructor of the Vectors class.

Parameters:
  • vec[in] reference on a Vectors object,

  • inb_vector[in] number of individuals,

  • index[in] indices of the selected individuals.

Vectors(const Vectors &vec, vector_transformation transform = VECTOR_COPY)#

Constructor by copy of the Vectors class.

Parameters:
  • vec[in] reference on a Vectors object,

  • transform[in] type of transform.

~Vectors()#

Destructor of the Vectors class.

Vectors &operator=(const Vectors &vec)#

Assignment operator of the Vectors class.

Parameters:

vec[in] reference on a Vectors object.

Returns:

Vectors object.

void min_interval_computation(int variable)#

Computation of the shortest interval between 2 successive values for a variable.

Parameters:

variable[in] variable index.

DiscreteDistributionData *extract(StatError &error, int variable) const#

Extraction of the marginal frequency distribution for a positive integer-valued variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index.

Returns:

DiscreteDistributionData object.

bool check(StatError &error)#

Checking of the identifiers of a Vectors object.

Parameters:

error[in] reference on a StatError object.

Returns:

error status.

Vectors *merge(StatError &error, int nb_sample, const Vectors **ivec) const#

Merging of Vectors objects.

Parameters:
  • error[in] reference on a StatError object,

  • nb_sample[in] number of Vectors objects,

  • ivec[in] pointer on the Vectors objects.

Returns:

Vectors object.

Vectors *shift(StatError &error, int variable, int shift_param) const#

Shifting of values of a variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • shift_param[in] integer shifting parameter.

Returns:

Vectors object.

Vectors *shift(StatError &error, int variable, double shift_param) const#

Shifting of values of a real-valued variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • shift_param[in] real shifting parameter.

Returns:

Vectors object.

Vectors *thresholding(StatError &error, int variable, int threshold, threshold_direction mode) const#

Thresholding of values of a variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • threshold[in] integer threshold,

  • mode[in] mode (ABOVE/BELOW).

Returns:

Vectors object.

Vectors *thresholding(StatError &error, int variable, double threshold, threshold_direction mode) const#

Thresholding of values of a real-valued variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • threshold[in] real threshold,

  • mode[in] mode (ABOVE/BELOW).

Returns:

Vectors object.

Vectors *transcode(StatError &error, int variable, int *category) const#

Transcoding of categories of an integer-valued variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • category[in] transcoding table.

Returns:

Vectors object.

Vectors *cluster(StatError &error, int variable, int step, rounding mode = FLOOR) const#

Clustering of values of a variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • step[in] clustering step,

  • mode[in] mode (FLOOR/ROUND/CEIL).

Returns:

Vectors object.

Vectors *cluster(StatError &error, int variable, int inb_value, int *ilimit) const#

Partitioning of values of a variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • nb_class[in] number of classes,

  • ilimit[in] integer limits between classes (beginning of classes).

Returns:

Vectors object.

Vectors *cluster(StatError &error, int variable, int nb_class, double *ilimit) const#

Partitioning of values of a real-valued variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • nb_class[in] number of classes,

  • ilimit[in] real limits between classes (beginning of classes).

Returns:

Vectors object.

Vectors *scaling(StatError &error, int variable, int scaling_coeff) const#

Scaling of a variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • scaling_coeff[in] integer scaling factor.

Returns:

Vectors object.

Vectors *scaling(StatError &error, int variable, double scaling_coeff) const#

Scaling of a variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • scaling_coeff[in] real scaling factor.

Returns:

Vectors object.

Vectors *round(StatError &error, int variable = I_DEFAULT, rounding mode = ROUND) const#

Rounding of values of a real-valued variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • mode[in] mode (FLOOR/ROUND/CEIL).

Returns:

Vectors object.

Vectors *log_transform(StatError &error, int variable = I_DEFAULT, log_base base = NATURAL) const#

Log-transform of values.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • base[in] base of the logarithm.

Returns:

Vectors object.

Vectors *select_individual(StatError &error, int inb_vector, int *iidentifier, bool keep = true) const#

Selection of individuals by their identifiers.

Parameters:
  • error[in] reference on a StatError object,

  • inb_vector[in] number of individuals,

  • iidentifier[in] identifiers,

  • keep[in] flag for keeping or rejecting the selected individuals.

Returns:

Vectors object.

Vectors *select_variable(StatError &error, int inb_variable, int *ivariable, bool keep = true) const#

Selection of variables.

Parameters:
  • error[in] reference on a StatError object,

  • inb_variable[in] number of variables,

  • ivariable[in] variable indices,

  • keep[in] flag for keeping or rejecting the selected variables.

Returns:

Vectors object.

Vectors *sum_variable(StatError &error, int nb_summed_variable, int *ivariable) const#

Summation of variables.

Parameters:
  • error[in] reference on a StatError object,

  • nb_summed_variable[in] number of variables to be summed,

  • ivariable[in] variable indices.

Returns:

Vectors object.

Vectors *merge_variable(StatError &error, int nb_sample, const Vectors **ivec, int ref_sample = I_DEFAULT) const#

Merging of variables of Vectors objects.

Parameters:
  • error[in] reference on a StatError object,

  • nb_sample[in] number of Vectors objects,

  • ivec[in] pointer on the Vectors objects,

  • ref_sample[in] reference Vectors object for the identifiers.

Returns:

Vectors object.

virtual std::ostream &line_write(std::ostream &os) const#

Writing on a single line of a Vectors object.

Parameters:

os[inout] stream.

std::string ascii_data_write(bool exhaustive = false) const#

Writing of a Vectors object.

Parameters:

exhaustive[in] flag detail level,

Returns:

string.

virtual bool spreadsheet_write(StatError &error, const std::string path) const#

Writing of a Vectors object in a file at the spreadsheet format.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

error status.

virtual bool plot_write(StatError &error, const char *prefix, const char *title = NULL) const#

Plot of a of a Vectors object using Gnuplot.

Parameters:
  • error[in] reference on a StatError object,

  • prefix[in] file prefix,

  • title[in] figure title.

Returns:

error status.

virtual MultiPlotSet *get_plotable() const#

Plot of a Vectors object.

Returns:

MultiPlotSet object.

bool select_bin_width(StatError &error, int variable, double bin_width, double imin_value = D_INF)#

Change of the bin width of the marginal histogram for a variable.

Parameters:
  • error[in] reference on a StatError object,

  • variable[in] variable index,

  • bin_width[in] bin width,

  • imin_value[in] minimum value,

Returns:

error status.

int cumulative_distribution_function_computation(int variable, double **cdf) const#

Computation of the cumulative frequency distribution function for a variable.

Parameters:
  • variable[in] variable index,

  • cdf[in] (values, cumulative distribution function).

Returns:

cumulative frequency distribution function.

double mean_absolute_deviation_computation(int variable, double location) const#

Computation of the mean absolute deviation for a variable.

Parameters:
  • variable[in] variable index,

  • location[in] location measure (e.g. mean or median).

Returns:

mean absolute deviation.

double mean_absolute_difference_computation(int variable) const#

Computation of the mean absolute difference for a variable.

Parameters:

variable[in] variable index.

Returns:

mean absolute difference.

double skewness_computation(int variable) const#

Computation of the coefficient of skewness for a variable.

Parameters:

variable[in] variable index.

Returns:

coefficient of skewness.

double kurtosis_computation(int variable) const#

Computation of the excess kurtosis for a variable: excess kurtosis = coefficient of kurtosis - 3.

Parameters:

variable[in] variable index.

Returns:

excess kurtosis.

double *mean_direction_computation(int variable, angle_unit unit) const#

Computation of the mean direction for a circular variable.

Parameters:
  • variable[in] variable index,

  • unit[in] unit (DEGREE/RADIAN).

Returns:

mean direction.

double spearman_rank_single_correlation_computation() const#

Computation of the Spearman rank correlation coefficient between 2 variables.

Returns:

correlation coefficient.

double kendall_rank_single_correlation_computation() const#

Computation of the Kendall rank correlation coefficient between 2 variables.

Returns:

correlation coefficient.

bool rank_correlation_computation(StatError &error, std::ostream *os, correlation_type correl_type, const std::string path = "") const#

Computation of a rank correlation coefficient matrix (either in the Spearman or in the Kendall sense).

Parameters:
  • error[in] reference on a StatError object,

  • os[in] stream for displaying the rank correlation coefficient matrix,

  • correl_type[in] rank correlation coefficient type (SPEARMAN/KENDALL),

  • path[in] file path.

Returns:

error status.

DistanceMatrix *comparison(StatError &error, const VectorDistance &ivector_dist, bool standardization = true) const#

Comparison of vectors (computation of the matrix of pairwise distances between vectors).

Parameters:
  • error[in] reference on a StatError object,

  • ivector_dist[in] reference on a VectorDistance object,

  • standardization[in] flag standardization (only for variables of the same type).

Returns:

DistanceMatrix object.

bool contingency_table(StatError &error, std::ostream *os, int variable1, int variable2, const std::string path = "", output_format format = ASCII) const#

Computation of a contingency table for 2 categorical variables.

Parameters:
  • error[in] reference on a StatError object,

  • os[in] stream for displaying the contingency table,

  • variable1[in] variable 1 index,

  • variable2[in] variable 2 index,

  • path[in] file path,

  • format[in] file format (ASCII/SPREADSHEET).

Returns:

error status.

bool variance_analysis(StatError &error, std::ostream *os, int class_variable, int response_variable, int response_type, const std::string path = "", output_format format = ASCII) const#

One-way analysis of variance.

Parameters:
  • error[in] reference on a StatError object,

  • os[in] stream for displaying the ANOVA results,

  • class_variable[in] explanatory variable index,

  • response_variable[in] response variable index,

  • response_type[in] response variable type (ORDINAL/NUMERIC),

  • path[in] file path,

  • format[in] file format (ASCII/SPREADSHEET).

Returns:

error status.

bool sup_norm_distance(StatError &error, std::ostream &os, const Vectors &ivec) const#

Computation of sup norm distance between two empirical continuous distributions.

Parameters:
  • error[in] reference on a StatError object,

  • os[in] stream for displaying the sup norm distance,

  • ivec[in] reference on a Vector object.

Returns:

error status.

Regression *linear_regression(StatError &error, int explanatory_variable, int response_variable) const#

Linear regression.

Parameters:
  • error[in] reference on a StatError object,

  • explanatory_variable[in] explanatory variable index,

  • response_variable[in] response variable index.

Returns:

Regression object.

Regression *moving_average(StatError &error, int explanatory_variable, int response_variable, int nb_point, double *filter, moving_average_method algorithm = AVERAGING) const#

Nonparametric moving-average regression.

Parameters:
  • error[in] reference on a StatError object,

  • explanatory_variable[in] explanatory variable index,

  • response_variable[in] response variable index,

  • nb_point[in] filter half width,

  • filter[in] filter,

  • algorithm[in] response computation (AVERAGING/LEAST_SQUARES).

Returns:

Regression object.

Regression *moving_average(StatError &error, int explanatory_variable, int response_variable, const Distribution &dist, moving_average_method algorithm = AVERAGING) const#

Nonparametric moving-average regression.

Parameters:
  • error[in] reference on a StatError object,

  • explanatory_variable[in] explanatory variable index,

  • response_variable[in] response variable index,

  • dist[in] symmetric distribution,

  • algorithm[in] response computation (AVERAGING/LEAST_SQUARES).

Returns:

Regression object.

Regression *nearest_neighbor_smoother(StatError &error, int explanatory_variable, int response_variable, double span, bool weighting = true) const#

Nonparametric k-nearest-neighbor regression.

Parameters:
  • error[in] reference on a StatError object,

  • explanatory_variable[in] explanatory variable index,

  • response_variable[in] response variable index,

  • span[in] neighboring proportion with respect to the sample size,

  • weighting[in] flag neighbor weighting.

Returns:

Regression object.

inline FrequencyDistribution *get_marginal_distribution(int variable) const#

get marginal counts for a given variable (does not allocate a new object, returns internal pointer)

inline Histogram *get_marginal_histogram(int variable) const#

get marginal histogram for a given variable (does not allocate a new object, returns internal pointer)

Public Static Functions

static Vectors *build(StatError &error, const std::vector<std::vector<int>> &iint_vector, const std::vector<std::vector<double>> &ireal_vector, const std::vector<int> &iidentifier)#

Construction of a Vectors objects from arrays of discrete values, real values and identifiers.

Parameters:
  • error[in] reference on a StatError object,

  • iint_vector[in] integer variables,

  • ireal_vector[in] real variables,

  • iidentifier[in] individual identifiers.

static Vectors *ascii_read(StatError &error, const std::string path)#

Construction of a Vectors object from a file. Format: rows: individuals | columns: variables.

Parameters:
  • error[in] reference on a StatError object,

  • path[in] file path.

Returns:

Vectors object.