subgroups.quality_measures package
Submodules
subgroups.quality_measures.absolute_wracc module
This file contains a modification of the Weighted Relative Accuracy (WRAcc) quality measure. This new quality measure called AbsoluteWRAcc always returns the absolute value of the original WRAcc quality measure.
- class subgroups.quality_measures.absolute_wracc.AbsoluteWRAcc[source]
Bases:
WRAcc
This class defines the AbsoluteWRAcc quality measure. This new quality measure always returns the absolute value of the original WRAcc quality measure.
- compute(dict_of_parameters)[source]
Method to compute the AbsoluteWRAcc quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the AbsoluteWRAcc quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.binomial_test module
This file contains the implementation of the Binomial Test quality measure.
- class subgroups.quality_measures.binomial_test.BinomialTest[source]
Bases:
QualityMeasure
This class defines the Binomial Test quality measure.
- compute(dict_of_parameters)[source]
Method to compute the BinomialTest quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the BinomialTest quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.binomial_test_optimistic_estimate_1 module
This file contains the implementation of an Optimistic Estimate of the Binomial Test quality measure.
- class subgroups.quality_measures.binomial_test_optimistic_estimate_1.BinomialTestOptimisticEstimate1[source]
Bases:
QualityMeasure
This class defines an Optimistic Estimate of the Binomial Test quality measure.
- compute(dict_of_parameters)[source]
Method to compute the BinomialTestOptimisticEstimate1 quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the BinomialTestOptimisticEstimate1 quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.coverage module
This file contains the implementation of the Coverage quality measure.
- class subgroups.quality_measures.coverage.Coverage[source]
Bases:
QualityMeasure
This class defines the Coverage quality measure.
- compute(dict_of_parameters)[source]
Method to compute the Coverage quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the Coverage quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.f1_score module
This file contains the implementation of the F1 Score. This quality measure is also called as F1 Measure.
- class subgroups.quality_measures.f1_score.F1Score[source]
Bases:
QualityMeasure
This class defines the F1 Score. This quality measure is also called as F1 Measure.
- compute(dict_of_parameters)[source]
Method to compute the F1Score quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the F1Score quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.irr module
This file contains the implementation of the Incremental Response Rate (IRR) quality measure.
- class subgroups.quality_measures.irr.IRR[source]
Bases:
QualityMeasure
This class defines the Incremental Response Rate (IRR) quality measure.
- compute(dict_of_parameters)[source]
Method to compute the IRR quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the IRR quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.npv module
This file contains the implementation of the Negative Predictive Value (NPV) quality measure.
- class subgroups.quality_measures.npv.NPV[source]
Bases:
QualityMeasure
This class defines the Negative Predictive Value (NPV) quality measure.
- compute(dict_of_parameters)[source]
Method to compute the NPV quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the NPV quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.piatetsky_shapiro module
This file contains the implementation of the Piatetsky-Shapiro quality measure.
- class subgroups.quality_measures.piatetsky_shapiro.PiatetskyShapiro[source]
Bases:
QualityMeasure
This class defines the Piatetsky-Shapiro quality measure.
- compute(dict_of_parameters)[source]
Method to compute the PiatetskyShapiro quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the PiatetskyShapiro quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.piatetsky_shapiro_optimistic_estimate_1 module
This file contains the implementation of an Optimistic Estimate of the Piatetsky-Shapiro quality measure.
- class subgroups.quality_measures.piatetsky_shapiro_optimistic_estimate_1.PiatetskyShapiroOptimisticEstimate1[source]
Bases:
QualityMeasure
This class defines an Optimistic Estimate of the Piatetsky-Shapiro quality measure.
- compute(dict_of_parameters)[source]
Method to compute the PiatetskyShapiroOptimisticEstimate1 quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the PiatetskyShapiroOptimisticEstimate1 quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.piatetsky_shapiro_optimistic_estimate_2 module
This file contains the implementation of an Optimistic Estimate of the Piatetsky-Shapiro quality measure.
- class subgroups.quality_measures.piatetsky_shapiro_optimistic_estimate_2.PiatetskyShapiroOptimisticEstimate2[source]
Bases:
QualityMeasure
This class defines an Optimistic Estimate of the Piatetsky-Shapiro quality measure.
- compute(dict_of_parameters)[source]
Method to compute the PiatetskyShapiroOptimisticEstimate2 quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the PiatetskyShapiroOptimisticEstimate2 quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.ppv module
This file contains the implementation of the Positive Predictive Value (PPV) quality measure.
- class subgroups.quality_measures.ppv.PPV[source]
Bases:
QualityMeasure
This class defines the Positive Predictive Value (PPV) quality measure.
- compute(dict_of_parameters)[source]
Method to compute the PPV quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the PPV quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.qg module
This file contains the implementation of the Qg quality measure.
- class subgroups.quality_measures.qg.Qg[source]
Bases:
QualityMeasure
This class defines the Qg quality measure.
- compute(dict_of_parameters)[source]
Method to compute the Qg quality measure (you can also call to the instance for this purpose). IMPORTANT: the generalisation parameter ‘g’ is needed in order to compute this quality measure. It also has to be in the dict of parameters.
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure. IMPORTANT: the generalisation parameter ‘g’ needs to be included.- Return type:
float
- Returns:
the computed value for the Qg quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.quality_measure module
This file contains the implementation of the root class of all the implemented quality measures. This class is an abstract class and cannot be instantiated.
- class subgroups.quality_measures.quality_measure.QualityMeasure[source]
Bases:
ABC
This abstract class defines the root class of all the implemented quality measures.
-
FALSE_POPULATION:
typing.ClassVar
[str
] = 'FP'
-
FALSE_POSITIVES:
typing.ClassVar
[str
] = 'fp'
-
TRUE_POPULATION:
typing.ClassVar
[str
] = 'TP'
-
TRUE_POSITIVES:
typing.ClassVar
[str
] = 'tp'
- abstract compute(dict_of_parameters)[source]
Method to compute the corresponding quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the corresponding quality measure.
- abstract get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- abstract optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
-
FALSE_POPULATION:
subgroups.quality_measures.sensitivity module
This file contains the implementation of the Sensitivity quality measure. This quality measure is also called as Recall or True Positive Rate.
- class subgroups.quality_measures.sensitivity.Sensitivity[source]
Bases:
QualityMeasure
This class defines the Sensitivity quality measure. This quality measure is also called as Recall or True Positive Rate.
- compute(dict_of_parameters)[source]
Method to compute the Sensitivity quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the Sensitivity quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.specificity module
This file contains the implementation of the Specificity quality measure. This quality measure is also called as True Negative Rate.
- class subgroups.quality_measures.specificity.Specificity[source]
Bases:
QualityMeasure
This class defines the Specificity quality measure. This quality measure is also called as True Negative Rate.
- compute(dict_of_parameters)[source]
Method to compute the Specificity quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the Specificity quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.support module
This file contains the implementation of the Support quality measure.
- class subgroups.quality_measures.support.Support[source]
Bases:
QualityMeasure
This class defines the Support quality measure.
- compute(dict_of_parameters)[source]
Method to compute the Support quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the Support quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.wracc module
This file contains the implementation of the Weighted Relative Accuracy (WRAcc) quality measure.
- class subgroups.quality_measures.wracc.WRAcc[source]
Bases:
QualityMeasure
This class defines the Weighted Relative Accuracy (WRAcc) quality measure.
- compute(dict_of_parameters)[source]
Method to compute the WRAcc quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the WRAcc quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.wracc_optimistic_estimate_1 module
This file contains the implementation of an Optimistic Estimate of the Weighted Relative Accuracy (WRAcc) quality measure.
- class subgroups.quality_measures.wracc_optimistic_estimate_1.WRAccOptimisticEstimate1[source]
Bases:
QualityMeasure
This class defines an Optimistic Estimate of the Weighted Relative Accuracy (WRAcc) quality measure.
- compute(dict_of_parameters)[source]
Method to compute the WRAccOptimisticEstimate1 quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the WRAccOptimisticEstimate1 quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.
subgroups.quality_measures.youden module
This file contains the implementation of the Youden quality measure.
- class subgroups.quality_measures.youden.Youden[source]
Bases:
QualityMeasure
This class defines the Youden quality measure.
- compute(dict_of_parameters)[source]
Method to compute the Youden quality measure (you can also call to the instance for this purpose).
- Parameters:
dict_of_parameters (
dict
[str
,typing.Union
[int
,float
]]) – python dictionary which contains all the necessary parameters used to compute this quality measure.- Return type:
float
- Returns:
the computed value for the Youden quality measure.
- get_name()[source]
Method to get the quality measure name (equal to the class name).
- Return type:
str
- optimistic_estimate_of()[source]
Method to get a python dictionary with the quality measures of which this one is an optimistic estimate.
- Return type:
dict
[str
,subgroups.quality_measures.quality_measure.QualityMeasure
]- Returns:
a python dictionary in which the keys are the quality measure names and the values are the instances of those quality measures.