pm4py.objects.random_variables.random_variable module#

class pm4py.objects.random_variables.random_variable.RandomVariable[source]#

Bases: object

read_from_string(distribution_type, distribution_parameters)[source]#

Read the random variable from string

Parameters:
  • distribution_type – Distribution type

  • distribution_parameters – Distribution parameters splitted by ;

get_distribution_type()[source]#

Get current distribution type

Returns:

String representing the distribution type

Return type:

distribution_type

get_transition_type()[source]#

Get the type of transition associated to the current distribution

Returns:

String representing the type of the transition

Return type:

transition_type

get_distribution_parameters()[source]#

Get a string representing distribution parameters

Returns:

String representing distribution parameters

Return type:

distribution_parameters

calculate_loglikelihood(values)[source]#

Calculate log likelihood

Parameters:

values – Empirical values to work on

Returns:

Log likelihood that the values follows the distribution

Return type:

likelihood

calculate_parameters(values, parameters=None, force_distribution=None)[source]#

Calculate parameters of the current distribution

Parameters:
  • values – Empirical values to work on

  • parameters – Possible parameters of the algorithm

  • force_distribution – If provided, distribution to force usage (e.g. EXPONENTIAL)

get_value()[source]#

Get a random value following the distribution

Returns:

Value obtained following the distribution

Return type:

value

get_values(no_values=400)[source]#

Get some random values following the distribution

Parameters:

no_values – Number of values to return

Returns:

Values extracted according to the probability distribution

Return type:

values

get_weight()[source]#

Getter of weight

Returns:

Weight of the transition

Return type:

weight

set_weight(weight)[source]#

Setter of the weight

Parameters:

weight – Weight of the transition

get_priority()[source]#

Getter of the priority

Returns:

Priority of the transition

Return type:

priority

set_priority(priority)[source]#

Setter of the priority variable

Parameters:

priority – Priority of the transition