tsadmetrics 0.1.10__py3-none-any.whl → 0.1.12__py3-none-any.whl

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.
docs/conf.py ADDED
@@ -0,0 +1,43 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+ import os
9
+ import sys
10
+ sys.path.insert(0, os.path.abspath('../../'))
11
+
12
+
13
+ project = 'TSADmetrics'
14
+ copyright = '2025, Pedro Rafael Velasco Priego'
15
+ author = 'Pedro Rafael Velasco Priego'
16
+ release = 'MIT'
17
+
18
+ # -- General configuration ---------------------------------------------------
19
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
20
+
21
+ extensions = [
22
+ 'sphinx.ext.autodoc',
23
+ 'sphinx.ext.viewcode',
24
+ 'sphinx.ext.napoleon'
25
+ ]
26
+
27
+ intersphinx_mapping = {
28
+ 'python': ('https://docs.python.org/3/', None),
29
+ 'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
30
+ }
31
+ intersphinx_disabled_domains = ['std']
32
+
33
+ templates_path = ['_templates']
34
+ exclude_patterns = []
35
+
36
+ epub_show_urls = 'footnote'
37
+ html_theme = 'sphinx_rtd_theme'
38
+ html_static_path = ['_static']
39
+ # -- Options for HTML output -------------------------------------------------
40
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
41
+
42
+ html_theme = 'sphinx_rtd_theme'
43
+ html_static_path = ['_static']
tests/test_binary.py CHANGED
@@ -454,19 +454,19 @@ class TestEnhancedTSAwareMetrics(unittest.TestCase):
454
454
  """
455
455
  Prueba para la función ts_aware_f_score.
456
456
  """
457
- f_score = round(enhanced_ts_aware_f_score(self.y_true1, self.y_pred1,1, 0.5, 0.1),2)
457
+ f_score = round(enhanced_ts_aware_f_score(self.y_true1, self.y_pred1, 0.5, 0.1),2)
458
458
  expected_f_score = 0.67
459
459
  self.assertAlmostEqual(f_score, expected_f_score, places=4)
460
460
 
461
- f_score = round(enhanced_ts_aware_f_score(self.y_true1, self.y_pred2,1, 0.5, 0.1),2)
461
+ f_score = round(enhanced_ts_aware_f_score(self.y_true1, self.y_pred2, 0.5, 0.1),2)
462
462
  expected_f_score = 0.72
463
463
  self.assertAlmostEqual(f_score, expected_f_score, places=4)
464
464
 
465
- f_score = round(enhanced_ts_aware_f_score(self.y_true2, self.y_pred21,1, 0.5, 0.1),2)
465
+ f_score = round(enhanced_ts_aware_f_score(self.y_true2, self.y_pred21, 0.5, 0.1),2)
466
466
  expected_f_score = 0.77
467
467
  self.assertAlmostEqual(f_score, expected_f_score, places=4)
468
468
 
469
- f_score = round(enhanced_ts_aware_f_score(self.y_true2, self.y_pred22,1, 0.5, 0.1),2)
469
+ f_score = round(enhanced_ts_aware_f_score(self.y_true2, self.y_pred22, 0.5, 0.1),2)
470
470
  expected_f_score = 0.67
471
471
  self.assertAlmostEqual(f_score, expected_f_score, places=4)
472
472
 
@@ -474,12 +474,12 @@ class TestEnhancedTSAwareMetrics(unittest.TestCase):
474
474
  try:
475
475
  y_true = np.random.choice([0, 1], size=(100,))
476
476
  y_pred = np.zeros(100)
477
- enhanced_ts_aware_f_score(y_true, y_pred, 1, random.random(), random.random())
477
+ enhanced_ts_aware_f_score(y_true, y_pred, random.random(), random.random())
478
478
  for _ in range(100):
479
479
  y_true = np.random.choice([0, 1], size=(100,))
480
480
  y_pred = np.random.choice([0, 1], size=(100,))
481
481
 
482
- f_score = enhanced_ts_aware_f_score(y_true, y_pred, 1, random.random(), random.random())
482
+ f_score = enhanced_ts_aware_f_score(y_true, y_pred, random.random(), random.random())
483
483
  except Exception as e:
484
484
  self.fail(f"enhanced_ts_aware_f_score raised an exception {e}")
485
485