public class MetricFormular
extends java.lang.Object
Constructor and Description |
---|
MetricFormular() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
alignStringLength(int length,
java.lang.String inputString)
align a string to have a fixed length with space
|
double |
computeFitnessBasic(int constraintVariantNum,
boolean[] model,
double[] log)
compute the fitness (one) based on formula: L_{a,b}(M_{a,b}) / L_{a,b}(V);
M_{a,b} is the set of allowed constraint instance variants by the input model;
L_{a,b}(v) indicate the number of reference events in activity a corresponding to variant v;
L_{a,b}(V) indicate the sum of each L_{a,b}(v) where v in V;
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (e.g.,
the third value is true, it means the third variant (2+,0) is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
|
double |
computeFitnessForModelAndLog(double fitnessThreshold,
int constraintVariantNum,
boolean[] modelVariantArray,
double[] logVariantArray,
java.lang.String algorithm)
compute fitness taking model variants and log variants as input;
|
double |
computeFitnessHalfWithNumThreshold(int constraintVariantNum,
boolean[] model,
double[] log,
int threshold)
compute the fitness (three) based on formula: |M_{a,b}| / |M_{a,b} + {v in V | L_{a,b}(v) >= n}|;
M_{a,b} is the set of allowed constraint instance variants by the input model;
L_{a,b}(v) indicate the number of reference events in activity a corresponding to variant v;
V is the set of constraint instance variants;
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (i.g.,
the third value is true, it means the third variant is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
input threshold: a positive value to filter the observed variant
|
double |
computeFitnessWithNumThreshold(int constraintVariantNum,
boolean[] model,
double[] log,
int threshold)
compute the fitness (two) based on formula: |{v in M_{a,b} | L_{a,b}(v) >= n}| / |{v in V | L_{a,b}(v) >= n}|;
M_{a,b} is the set of allowed constraint instance variants by the input model;
L_{a,b}(v) indicate the number of reference events in activity a corresponding to variant v;
V is the set of constraint instance variants;
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (i.g.,
the third value is true, it means the third variant is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
input threshold: a positive value to filter the observed variant
|
double |
computeFitnessWithRatioThreshold(int constraintVariantNum,
boolean[] model,
double[] log,
double threshold)
compute the fitness (three) based on formula: |{v in M_{a,b} | L_{a,b}(v) >= %n}| / |{v in V | L_{a,b}(v) >= %n}|;
M_{a,b} is the set of allowed constraint instance variants by the input model;
L_{a,b}(v) indicate the number of reference events in activity a corresponding to variant v;
V is the set of constraint instance variants;
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (i.g.,
the third value is true, it means the third variant is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
input threshold: a real value (between [0,1]) to filter the observed variant;
|
double |
computeGeneralizationByBetaDistribution(double fitModelProbability,
int logSize,
int violatingCasetNum,
double alhpa,
double beta)
compute generalization (the second method) based on formula: X=Beta(1+n-f,1+f),P(X > p(e.g., 0.95));
p: the probability fitting the model (fitModelProbability), e.g., 0.95;
n: the number of total instances (logSize);
f: the number of violating instances (violatingCasetNum);
|
double |
computeGeneralizationByBinomialDistribution(double fitModelProbability,
int logSize,
int violatingCasetNum)
compute generalization (the first method) based on formula: F(p,n,f)=(all k in [0,n-f], accumulate C_n^k * p^k * q^(n-k));
p: the probability fitting the model (fitModelProbability);
n: the number of total instances (logSize);
f: the number of violating instances (violatingCasetNum);
|
double |
computeGeneralizationForModelAndLog(double fitModelProbability,
int constraintVariantNum,
boolean[] model,
double[] log,
java.lang.String algorithm)
compute generalization taking model and log as input;
fitModelProbability: the probability fitting the model (fitModelProbability);
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (i.g.,
the third value is true, it means the third variant is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
|
double |
computePrecisionForModelAndLog(double precisionThreshold,
int constraintVariantNum,
boolean[] modelVariantArray,
double[] logVariantArray,
java.lang.String algorithm)
compute precision taking model variants and log variants as input;
|
double |
computePrecisionWithEntropy(int constraintVariantNum,
boolean[] model,
double[] log)
compute the precision (three) based on formula: (all v in M_{a,b}, accumulate -p*log_{2}(p)) / log_{2}(|M_{a,b}|);
M_{a,b} is the set of allowed constraint instance variants by the input model;
L_{a,b}(v) indicate the number of reference events in activity a corresponding to variant v;
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (i.g.,
the third value is true, it means the third variant is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
|
double |
computePrecisionWithNumThreshold(int constraintVariantNum,
boolean[] model,
double[] log,
int threshold)
compute the precision (one) based on formula: |{v in M_{a,b} | L_{a,b}(v) >= n}| / |M_{a,b}|;
M_{a,b} is the set of allowed constraint instance variants by the input model;
L_{a,b}(v) indicate the number of reference events in activity a corresponding to variant v;
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (i.g.,
the third value is true, it means the third variant is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
input threshold: a positive value to filter the observed variant
|
double |
computePrecisionWithRatioThreshold(int constraintVariantNum,
boolean[] model,
double[] log,
double threshold)
compute the precision (two) based on formula: |{v in M_{a,b} | L_{a,b}(v) >= n%}| / |M_{a,b}|;
M_{a,b} is the set of allowed constraint instance variants by the input model;
L_{a,b}(v) indicate the number of reference events in activity a corresponding to variant v;
input constraintVariantNum: the number of constraint instance variants;
input model: a set of (9) values in which one is true or false (i.g.,
the third value is true, it means the third variant is allowed by the model);
input log: a set of (9) values in which one is the number of corresponding instances;
input threshold: a real value (between [0,1]) to filter the observed variant
|
static void |
main(java.lang.String[] args) |
public double computeFitnessBasic(int constraintVariantNum, boolean[] model, double[] log)
public double computeFitnessWithNumThreshold(int constraintVariantNum, boolean[] model, double[] log, int threshold)
public double computeFitnessWithRatioThreshold(int constraintVariantNum, boolean[] model, double[] log, double threshold)
public double computeFitnessHalfWithNumThreshold(int constraintVariantNum, boolean[] model, double[] log, int threshold)
public double computePrecisionWithNumThreshold(int constraintVariantNum, boolean[] model, double[] log, int threshold)
public double computePrecisionWithRatioThreshold(int constraintVariantNum, boolean[] model, double[] log, double threshold)
public double computePrecisionWithEntropy(int constraintVariantNum, boolean[] model, double[] log)
public double computeFitnessForModelAndLog(double fitnessThreshold, int constraintVariantNum, boolean[] modelVariantArray, double[] logVariantArray, java.lang.String algorithm)
precisionThreshold:
- the threshold to filter log variant;constraintVariantNum:
- the number of constraint variants, i.e., current 9;modelVariantArray:
- a set of (9) values in which one is true or false (i.g., the third value is true, it means the third variant is allowed by the model);logVariantArray:
- a set of (9) values in which one is the number of corresponding instances;algorithm:
- indicate which algorithm is used to compute the precisionpublic double computePrecisionForModelAndLog(double precisionThreshold, int constraintVariantNum, boolean[] modelVariantArray, double[] logVariantArray, java.lang.String algorithm)
precisionThreshold:
- the threshold to filter log variant;constraintVariantNum:
- the number of constraint variants, i.e., current 9;modelVariantArray:
- a set of (9) values in which one is true or false (i.g., the third value is true, it means the third variant is allowed by the model);logVariantArray:
- a set of (9) values in which one is the number of corresponding instances;algorithm:
- indicate which algorithm is used to compute the precisionpublic double computeGeneralizationForModelAndLog(double fitModelProbability, int constraintVariantNum, boolean[] model, double[] log, java.lang.String algorithm)
fitModelProbability
- constraintVariantNum
- model
- log
- algrithm
- : binomial distribution or beta distributionpublic double computeGeneralizationByBinomialDistribution(double fitModelProbability, int logSize, int violatingCasetNum)
public double computeGeneralizationByBetaDistribution(double fitModelProbability, int logSize, int violatingCasetNum, double alhpa, double beta)
public java.lang.String alignStringLength(int length, java.lang.String inputString)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception