sarapy 1.1.0__py3-none-any.whl → 1.1.1__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.
@@ -2,7 +2,6 @@
2
2
 
3
3
  import numpy as np
4
4
  from sklearn.base import BaseEstimator, TransformerMixin
5
- import warnings
6
5
 
7
6
  class TimeSeriesProcessor(BaseEstimator, TransformerMixin):
8
7
  """"
@@ -36,7 +35,7 @@ class TimeSeriesProcessor(BaseEstimator, TransformerMixin):
36
35
  self._deltaO = np.diff(X[:,0])
37
36
  self._deltaP = X[:,1]
38
37
  self._deltaC = self._deltaO - self._deltaP[1:]
39
- ##agregamos un 0 al principio de deltaO y deltaC - versión 0.2.6
38
+ ##agregamos un 0 al principio de deltaO y deltaC
40
39
  self._deltaO = np.insert(self._deltaO, 0, 0)
41
40
  self._deltaC = np.insert(self._deltaC, 0, 0)
42
41
  ##computamos el ratio entre deltaC y deltaP. Usamos np.vectorize para que compute el ratio para cada elemento del array
@@ -44,10 +43,6 @@ class TimeSeriesProcessor(BaseEstimator, TransformerMixin):
44
43
  ##cambiamos primer valor de ratio_dCdP por 1
45
44
  self._ratio_dCdP[0] = 1
46
45
 
47
- ##versión 0.2.5
48
- # self._deltaO = np.hstack((self._deltaO, 0))
49
- # self._deltaC = np.hstack((self._deltaC, 0))
50
-
51
46
  elif X.shape[0] == 1:
52
47
  self._deltaO = np.array([0])
53
48
  self._deltaC = np.array([0])
@@ -73,12 +68,15 @@ class TimeSeriesProcessor(BaseEstimator, TransformerMixin):
73
68
  def fit_transform(self, X: np.array, y=None):
74
69
  self.fit(X)
75
70
  return self.transform(X)
76
-
71
+
77
72
  def compute_ratio_dCdP(self, deltaC, deltaP):
78
73
  """Devuelve el ratio entre el tiempo de caminata y el tiempo de pico abierto."""
79
-
80
- return (deltaC - deltaP)/(deltaC + deltaP) if deltaC + deltaP != 0 else 1
81
-
74
+
75
+ numerator = deltaC - deltaP
76
+ denominator = deltaC + deltaP
77
+ ##reemplazo valores 0 del denominador por 1
78
+ denominator[denominator == 0] = 1
79
+ return numerator/denominator
82
80
 
83
81
  @property
84
82
  def deltaO(self):
@@ -4,7 +4,6 @@ import warnings
4
4
  import numpy as np
5
5
  from sklearn.base import BaseEstimator, TransformerMixin
6
6
  from sarapy.dataProcessing import TLMSensorDataProcessor, TimeSeriesProcessor, GeoProcessor
7
- from sarapy.preprocessing import DistancesImputer
8
7
 
9
8
  class PlantinFMCreator(BaseEstimator, TransformerMixin):
10
9
  """La clase FMCreator se encarga de crear la Feature Matrix (FM) a partir de los datos de telemetría. Se utilizan las clases TLMSensorDataExtractor, TimeSeriesProcessor y GeoProcessor para realizar las transformaciones necesarias.
@@ -69,11 +68,9 @@ class PlantinFMCreator(BaseEstimator, TransformerMixin):
69
68
  - 4: precision del GPS
70
69
 
71
70
  Returns:
72
- - featureMatrix: Es un array con la matriz de características. La forma de featureMatrix es (n,5). Las columnas de featureMatrix son,
73
- - 0: DST_PT: Distorsión de plantín
74
- - 1: deltaO: delta operación
75
- - 2: ratio_dCdP: Ratio entre el delta de caminata y delta de pico abierto
76
- - 3: distances: Distancias entre operaciones
71
+ - 0: feature_matrix: (deltaO, ratio_dCdP, distances)
72
+ - 1: dst_pt
73
+ - 2: inest_pt
77
74
  """
78
75
 
79
76
  if not self.is_fitted:
@@ -129,11 +126,9 @@ class PlantinFMCreator(BaseEstimator, TransformerMixin):
129
126
  - 4: precision del GPS
130
127
 
131
128
  Returns:
132
- - featureMatrix: Es un array con la matriz de características. La forma de featureMatrix es (n,5). Las columnas de featureMatrix son,
133
- - 0: DST_PT: Distorsión de plantín
134
- - 1: deltaO: delta operación
135
- - 2: ratio_dCdP: Ratio entre el delta de caminata y delta de pico abierto
136
- - 3: distances: Distancias entre operaciones
129
+ - 0: feature_matrix: (deltaO, ratio_dCdP, distances)
130
+ - 1: dst_pt
131
+ - 2: inest_pt
137
132
  """
138
133
  self.fit(X)
139
134
  return self.transform(X)
sarapy/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  ## Version of the package
2
- __version__ = "1.1.0"
2
+ __version__ = "1.1.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sarapy
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Home-page: https://github.com/lucasbaldezzari/sarapy
5
5
  Author: Lucas Baldezzari
6
6
  Author-email: Lucas Baldezzari <lmbaldezzari@gmail.com>
@@ -19,6 +19,10 @@ Requires-Dist: geopy
19
19
 
20
20
  Library for processing SARAPICO project metadata of _AMG_.
21
21
 
22
+ #### Version 1.1.1
23
+
24
+ - Se modifica TimeSeriesProcessor.compute_ratio_dCdP() dado que la versión de vectorize al parecer no funcionaba correctamente en ciertos casos.
25
+
22
26
  #### Version 1.1.0
23
27
 
24
28
  Versión 1.1 estable para trabajarse en servidor.
@@ -1,13 +1,13 @@
1
1
  sarapy/__init__.py,sha256=aVoywqGSscYYDycLaYJnz08dlQabl9gH0h4Q5KtHM9o,74
2
- sarapy/version.py,sha256=s61q4qMKCUuPCPfTUqwvvIijwHBDiVMOFSU6VmU1ArI,51
2
+ sarapy/version.py,sha256=Tknd-qgSHJMvoa2LltDqUUVpHvFgGgqVNzxJGi3uvnA,51
3
3
  sarapy/dataProcessing/GeoProcessor.py,sha256=YeNFHZ5sArnSLDxz009SJzgdWuMPgvJPkqtwcivk87A,4654
4
4
  sarapy/dataProcessing/OpsProcessor.py,sha256=-mxZPA7V6r7xkkQBICmNBiT7FJGVs3C3D-DaPN34yHE,16433
5
5
  sarapy/dataProcessing/TLMSensorDataProcessor.py,sha256=GfSIRYD_biFlOMTfSQSwW0HsUouZuUL3ScvL4uUHTPQ,23824
6
- sarapy/dataProcessing/TimeSeriesProcessor.py,sha256=QPvg9vyPSWjVl020zbebqvlM9JnL1uEAuACRsfZweAg,5497
6
+ sarapy/dataProcessing/TimeSeriesProcessor.py,sha256=yNs6C34Ic6rQj0Lr5CcltTxeRhJQqD7109Glrv8Epb4,5417
7
7
  sarapy/dataProcessing/__init__.py,sha256=Kqs5sFtq6RMEa3KLJFbsGRoYsIxHL1UUGMuplyCyQFk,200
8
8
  sarapy/dataProcessing/amg_decoder.py,sha256=JZ7cbu7DlCuatuq2F7aBfUr7S7U-K5poBgxw5nY6rNI,4319
9
9
  sarapy/mlProcessors/PlantinClassifier.py,sha256=ahoDIgxfKiq0sMm4dR1M4rLO-J6SxDMrASjlmswj3QI,6781
10
- sarapy/mlProcessors/PlantinFMCreator.py,sha256=PiDFCW7LQ00OTT0lqHwv03yVfqylHYz-7fPCxWnx5yk,8999
10
+ sarapy/mlProcessors/PlantinFMCreator.py,sha256=Le3Itc2xpRvajs0ws3zd5ZkO_bSpKXy3xiWiRrulXI4,8404
11
11
  sarapy/mlProcessors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  sarapy/preprocessing/DistancesImputer.py,sha256=NvbVAh5m0yFxVgDbEFnEX7RSG13qLjO7i2gqjDAWsf4,9106
13
13
  sarapy/preprocessing/FertilizerImputer.py,sha256=zK6ONAilwPHvj-bC7yxnQYOkDBCCkWh6__57vYK9anM,1490
@@ -18,8 +18,8 @@ sarapy/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  sarapy/utils/amg_decoder.py,sha256=JZ7cbu7DlCuatuq2F7aBfUr7S7U-K5poBgxw5nY6rNI,4319
19
19
  sarapy/utils/amg_ppk.py,sha256=c0GusnxdntU-E0JOezzbIfC7SWoJmKAbad_zYDCJ3-c,1060
20
20
  sarapy/utils/getRawOperations.py,sha256=8aA1fIkNCnUYgiWfnFggRT_U35z432gZBrZ7seGO5w4,817
21
- sarapy-1.1.0.dist-info/LICENCE,sha256=N00sU3vSQ6F5c2vML9_qP4IFTkCPFFj0YGDB2CZP-uQ,840
22
- sarapy-1.1.0.dist-info/METADATA,sha256=oIu6w2r9Yj0EH0aiYLIPmTLarsGTK9ZpqKBXYbGDHWw,2568
23
- sarapy-1.1.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
24
- sarapy-1.1.0.dist-info/top_level.txt,sha256=4mUGZXfX2Fw47fpY6MQkaJeuOs_8tbjLkkNp34DJWiA,7
25
- sarapy-1.1.0.dist-info/RECORD,,
21
+ sarapy-1.1.1.dist-info/LICENCE,sha256=N00sU3vSQ6F5c2vML9_qP4IFTkCPFFj0YGDB2CZP-uQ,840
22
+ sarapy-1.1.1.dist-info/METADATA,sha256=zllWMieHkwqu1NJjBQ0BpIxfPUeWmumkRRSRGlzwiRE,2739
23
+ sarapy-1.1.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
24
+ sarapy-1.1.1.dist-info/top_level.txt,sha256=4mUGZXfX2Fw47fpY6MQkaJeuOs_8tbjLkkNp34DJWiA,7
25
+ sarapy-1.1.1.dist-info/RECORD,,
File without changes