Skip to content

Commit

Permalink
Add explicit __all__ declaration to specify public API (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 authored Jun 23, 2024
1 parent ade6def commit 5c87546
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cyclops/evaluate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

from cyclops.evaluate.evaluator import evaluate
from cyclops.evaluate.fairness.evaluator import evaluate_fairness


__all__ = ["evaluate", "evaluate_fairness"]
53 changes: 53 additions & 0 deletions cyclops/evaluate/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,56 @@
MultilabelStatScores,
StatScores,
)


__all__ = [
"create_metric",
"MetricCollection",
"Accuracy",
"AUROC",
"BinaryAccuracy",
"BinaryAUROC",
"BinaryAveragePrecision",
"BinaryPrecisionRecallCurve",
"MulticlassPrecisionRecallCurve",
"MultilabelPrecisionRecallCurve",
"PrecisionRecallCurve",
"BinaryF1Score",
"BinaryFbetaScore",
"BinaryPrecision",
"BinaryRecall",
"BinaryROCCurve",
"BinarySensitivity",
"BinarySpecificity",
"F1Score",
"FbetaScore",
"MulticlassAccuracy",
"MulticlassAUROC",
"MulticlassAveragePrecision",
"MulticlassF1Score",
"MulticlassFbetaScore",
"MulticlassPrecision",
"MulticlassRecall",
"MulticlassROCCurve",
"MulticlassSensitivity",
"MulticlassSpecificity",
"MultilabelAccuracy",
"MultilabelAUROC",
"MultilabelAveragePrecision",
"MultilabelF1Score",
"MultilabelFbetaScore",
"MultilabelPrecision",
"MultilabelRecall",
"MultilabelROCCurve",
"MultilabelSensitivity",
"MultilabelSpecificity",
"Precision",
"Recall",
"ROCCurve",
"Sensitivity",
"Specificity",
"StatScores",
"BinaryStatScores",
"MulticlassStatScores",
"MultilabelStatScores",
]
61 changes: 61 additions & 0 deletions cyclops/evaluate/metrics/experimental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,64 @@
from cyclops.evaluate.metrics.experimental.wmape import (
WeightedMeanAbsolutePercentageError,
)


__all__ = [
"BinaryAccuracy",
"MulticlassAccuracy",
"MultilabelAccuracy",
"BinaryAUROC",
"MulticlassAUROC",
"MultilabelAUROC",
"BinaryAveragePrecision",
"MulticlassAveragePrecision",
"MultilabelAveragePrecision",
"BinaryConfusionMatrix",
"MulticlassConfusionMatrix",
"MultilabelConfusionMatrix",
"BinaryF1Score",
"BinaryFBetaScore",
"MulticlassF1Score",
"MulticlassFBetaScore",
"MultilabelF1Score",
"MultilabelFBetaScore",
"MeanAbsoluteError",
"MeanAbsolutePercentageError",
"MeanSquaredError",
"BinaryMCC",
"MulticlassMCC",
"MultilabelMCC",
"MetricDict",
"BinaryNPV",
"MulticlassNPV",
"MultilabelNPV",
"BinaryPPV",
"BinaryPrecision",
"BinaryRecall",
"BinarySensitivity",
"BinaryTPR",
"MulticlassPPV",
"MulticlassPrecision",
"MulticlassRecall",
"MulticlassSensitivity",
"MulticlassTPR",
"MultilabelPPV",
"MultilabelPrecision",
"MultilabelRecall",
"MultilabelSensitivity",
"MultilabelTPR",
"BinaryPrecisionRecallCurve",
"MulticlassPrecisionRecallCurve",
"MultilabelPrecisionRecallCurve",
"BinaryROC",
"MulticlassROC",
"MultilabelROC",
"SymmetricMeanAbsolutePercentageError",
"BinarySpecificity",
"BinaryTNR",
"MulticlassSpecificity",
"MulticlassTNR",
"MultilabelSpecificity",
"MultilabelTNR",
"WeightedMeanAbsolutePercentageError",
]
59 changes: 59 additions & 0 deletions cyclops/evaluate/metrics/experimental/functional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,62 @@
from cyclops.evaluate.metrics.experimental.functional.wmape import (
weighted_mean_absolute_percentage_error,
)


__all__ = [
"binary_accuracy",
"multiclass_accuracy",
"multilabel_accuracy",
"binary_auroc",
"multiclass_auroc",
"multilabel_auroc",
"binary_average_precision",
"multiclass_average_precision",
"multilabel_average_precision",
"binary_confusion_matrix",
"multiclass_confusion_matrix",
"multilabel_confusion_matrix",
"binary_f1_score",
"binary_fbeta_score",
"multiclass_f1_score",
"multiclass_fbeta_score",
"multilabel_f1_score",
"multilabel_fbeta_score",
"mean_absolute_error",
"mean_absolute_percentage_error",
"mean_squared_error",
"binary_mcc",
"multiclass_mcc",
"multilabel_mcc",
"binary_npv",
"multiclass_npv",
"multilabel_npv",
"binary_ppv",
"binary_precision",
"binary_recall",
"binary_tpr",
"multiclass_ppv",
"multiclass_precision",
"multiclass_recall",
"multiclass_tpr",
"multilabel_ppv",
"multilabel_precision",
"multilabel_recall",
"multilabel_tpr",
"PRCurve",
"binary_precision_recall_curve",
"multiclass_precision_recall_curve",
"multilabel_precision_recall_curve",
"ROCCurve",
"binary_roc",
"multiclass_roc",
"multilabel_roc",
"symmetric_mean_absolute_percentage_error",
"binary_specificity",
"binary_tnr",
"multiclass_specificity",
"multiclass_tnr",
"multilabel_specificity",
"multilabel_tnr",
"weighted_mean_absolute_percentage_error",
]
52 changes: 52 additions & 0 deletions cyclops/evaluate/metrics/functional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,55 @@
multilabel_stat_scores,
stat_scores,
)


__all__ = [
"accuracy",
"binary_accuracy",
"multiclass_accuracy",
"multilabel_accuracy",
"auroc",
"binary_auroc",
"multiclass_auroc",
"multilabel_auroc",
"average_precision",
"binary_average_precision",
"binary_f1_score",
"binary_fbeta_score",
"f1_score",
"fbeta_score",
"multiclass_f1_score",
"multiclass_fbeta_score",
"multilabel_f1_score",
"multilabel_fbeta_score",
"binary_precision",
"binary_recall",
"multiclass_precision",
"multiclass_recall",
"multilabel_precision",
"multilabel_recall",
"precision",
"recall",
"PRCurve",
"binary_precision_recall_curve",
"multiclass_precision_recall_curve",
"multilabel_precision_recall_curve",
"precision_recall_curve",
"ROCCurve",
"binary_roc_curve",
"multiclass_roc_curve",
"multilabel_roc_curve",
"roc_curve",
"binary_sensitivity",
"multiclass_sensitivity",
"multilabel_sensitivity",
"sensitivity",
"binary_specificity",
"multiclass_specificity",
"multilabel_specificity",
"specificity",
"binary_stat_scores",
"multiclass_stat_scores",
"multilabel_stat_scores",
"stat_scores",
]

0 comments on commit 5c87546

Please sign in to comment.