mlquantify 0.0.11.9__tar.gz → 0.0.11.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/PKG-INFO +1 -1
  2. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/__init__.py +9 -6
  3. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/base.py +2 -2
  4. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/methods/aggregative.py +4 -4
  5. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/methods/mixture_models.py +2 -2
  6. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/methods/threshold_optimization.py +2 -2
  7. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify.egg-info/PKG-INFO +1 -1
  8. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/setup.py +1 -1
  9. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/README.md +0 -0
  10. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/classification/__init__.py +0 -0
  11. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/classification/methods.py +0 -0
  12. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/evaluation/__init__.py +0 -0
  13. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/evaluation/measures.py +0 -0
  14. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/evaluation/protocol.py +0 -0
  15. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/methods/__init__.py +0 -0
  16. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/methods/meta.py +0 -0
  17. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/methods/non_aggregative.py +0 -0
  18. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/model_selection.py +0 -0
  19. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/plots.py +0 -0
  20. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/utils/__init__.py +0 -0
  21. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/utils/general.py +0 -0
  22. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify/utils/method.py +0 -0
  23. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify.egg-info/SOURCES.txt +0 -0
  24. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify.egg-info/dependency_links.txt +0 -0
  25. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify.egg-info/requires.txt +0 -0
  26. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/mlquantify.egg-info/top_level.txt +0 -0
  27. {mlquantify-0.0.11.9 → mlquantify-0.0.11.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mlquantify
3
- Version: 0.0.11.9
3
+ Version: 0.0.11.10
4
4
  Summary: Quantification Library
5
5
  Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
6
  Maintainer: Luiz Fernando Luth Junior
@@ -12,16 +12,19 @@ ARGUMENTS_SETTED = False
12
12
 
13
13
  arguments = {
14
14
  "y_pred": None,
15
- "posteriors": None,
15
+ "posteriors_train": None,
16
+ "posteriors_test": None,
16
17
  "y_labels": None,
17
- "y_train_pred": None,
18
+ "y_pred_train": None,
18
19
  }
19
20
 
20
- def set_arguments(y_pred=None, posteriors=None, y_labels=None, y_train_pred=None):
21
+ def set_arguments(y_pred=None, posteriors_train=None, posteriors_test=None, y_labels=None, y_pred_train=None):
21
22
  global ARGUMENTS_SETTED
22
23
  global arguments
23
24
  arguments["y_pred"] = y_pred
24
- arguments["posteriors"] = posteriors
25
+ arguments["posteriors_train"] = posteriors_train
26
+ arguments["posteriors_test"] = posteriors_test
25
27
  arguments["y_labels"] = y_labels
26
- arguments["y_train_pred"] = y_train_pred
27
- ARGUMENTS_SETTED = True
28
+ arguments["y_pred_train"] = y_pred_train
29
+
30
+ ARGUMENTS_SETTED = True
@@ -315,7 +315,7 @@ class AggregativeQuantifier(Quantifier, ABC):
315
315
  Training labels.
316
316
  """
317
317
  if mq.ARGUMENTS_SETTED:
318
- if self.is_probabilistic and mq.arguments["posteriors"] is not None:
318
+ if self.is_probabilistic and mq.arguments["posteriors_test"] is not None:
319
319
  return
320
320
  elif not self.is_probabilistic and mq.arguments["y_pred"] is not None:
321
321
  return
@@ -343,7 +343,7 @@ class AggregativeQuantifier(Quantifier, ABC):
343
343
  else:
344
344
  if mq.ARGUMENTS_SETTED:
345
345
  if self.is_probabilistic:
346
- return mq.arguments["posteriors"]
346
+ return mq.arguments["posteriors_test"]
347
347
  return mq.arguments["y_pred"]
348
348
  else:
349
349
  raise ValueError("No learner object was set and no arguments were setted")
@@ -385,9 +385,9 @@ class FM(AggregativeQuantifier):
385
385
  The fitted instance of FM.
386
386
  """
387
387
  # Get predicted labels and probabilities using cross-validation
388
- if mq.arguments["y_labels"] is not None and mq.arguments["posteriors"] is not None:
388
+ if mq.arguments["y_labels"] is not None and mq.arguments["posteriors_train"] is not None:
389
389
  y_labels = mq.arguments["y_labels"]
390
- probabilities = mq.arguments["posteriors"]
390
+ probabilities = mq.arguments["posteriors_train"]
391
391
  else:
392
392
  y_labels, probabilities = get_scores(X, y, self.learner, self.cv_folds, self.learner_fitted)
393
393
 
@@ -548,7 +548,7 @@ class GAC(AggregativeQuantifier):
548
548
  y = pd.Series(y)
549
549
 
550
550
  if self.learner_fitted or self.learner is None:
551
- y_pred = mq.arguments["y_train_pred"] if mq.arguments["y_train_pred"] is not None else self.predict_learner(X)
551
+ y_pred = mq.arguments["y_pred_train"] if mq.arguments["y_pred_train"] is not None else self.predict_learner(X)
552
552
  y_label = y
553
553
  else:
554
554
  X_train, X_val, y_train, y_val = train_test_split(
@@ -731,7 +731,7 @@ class GPAC(AggregativeQuantifier):
731
731
  y = pd.Series(y)
732
732
 
733
733
  if self.learner_fitted or self.learner is None:
734
- y_pred = mq.arguments["y_train_pred"] if mq.arguments["y_train_pred"] is not None else self.predict_learner(X)
734
+ y_pred = mq.arguments["y_pred_train"] if mq.arguments["y_pred_train"] is not None else self.predict_learner(X)
735
735
  y_labels = y
736
736
  else:
737
737
  X_train, X_val, y_train, y_val = train_test_split(
@@ -107,9 +107,9 @@ class MixtureModel(AggregativeQuantifier):
107
107
  self : MixtureModel
108
108
  The fitted MixtureModel instance.
109
109
  """
110
- if mq.arguments["y_labels"] is not None and mq.arguments["posteriors"] is not None:
110
+ if mq.arguments["y_labels"] is not None and mq.arguments["posteriors_train"] is not None:
111
111
  y_labels = mq.arguments["y_labels"]
112
- probabilities = mq.arguments["posteriors"]
112
+ probabilities = mq.arguments["posteriors_train"]
113
113
  else:
114
114
  y_labels, probabilities = get_scores(X, y, self.learner, self.cv_folds, self.learner_fitted)
115
115
 
@@ -122,9 +122,9 @@ class ThresholdOptimization(AggregativeQuantifier):
122
122
  The fitted quantifier object with the best threshold, TPR, and FPR.
123
123
  """
124
124
  # Get predicted labels and probabilities
125
- if mq.arguments["y_labels"] is not None and mq.arguments["posteriors"] is not None:
125
+ if mq.arguments["y_labels"] is not None and mq.arguments["posteriors_train"] is not None:
126
126
  y_labels = mq.arguments["y_labels"]
127
- probabilities = mq.arguments["posteriors"]
127
+ probabilities = mq.arguments["posteriors_train"]
128
128
  else:
129
129
  y_labels, probabilities = get_scores(X, y, self.learner, self.cv_folds, self.learner_fitted)
130
130
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mlquantify
3
- Version: 0.0.11.9
3
+ Version: 0.0.11.10
4
4
  Summary: Quantification Library
5
5
  Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
6
  Maintainer: Luiz Fernando Luth Junior
@@ -6,7 +6,7 @@ here = pathlib.Path(__file__).parent.resolve()
6
6
 
7
7
  long_description = (here / 'README.md').read_text(encoding='utf-8')
8
8
 
9
- VERSION = '0.0.11.9'
9
+ VERSION = '0.0.11.10'
10
10
  DESCRIPTION = 'Quantification Library'
11
11
 
12
12
  # Setting up
File without changes
File without changes