sarapy 0.3.5__tar.gz → 0.3.6__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.
- {sarapy-0.3.5 → sarapy-0.3.6}/PKG-INFO +5 -1
- {sarapy-0.3.5 → sarapy-0.3.6}/README.md +4 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/pyproject.toml +1 -1
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/preprocessing/DistancesImputer.py +15 -4
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/version.py +1 -1
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy.egg-info/PKG-INFO +5 -1
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/__init__.py +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/dataProcessing/GeoProcessor.py +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/dataProcessing/PlantinFMCreator.py +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/dataProcessing/TLMSensorDataExtractor.py +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/dataProcessing/TimeSeriesProcessor.py +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/dataProcessing/__init__.py +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy/preprocessing/__init__.py +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy.egg-info/SOURCES.txt +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy.egg-info/dependency_links.txt +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy.egg-info/requires.txt +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/sarapy.egg-info/top_level.txt +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/setup.cfg +0 -0
- {sarapy-0.3.5 → sarapy-0.3.6}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sarapy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Library for Sarapico Metadata processing
|
|
5
5
|
Home-page: https://github.com/lucasbaldezzari/sarapy
|
|
6
6
|
Author: Lucas Baldezzari
|
|
@@ -24,6 +24,10 @@ Requires-Dist: geopy
|
|
|
24
24
|
|
|
25
25
|
Library for processing SARAPICO project metadata of _AMG_.
|
|
26
26
|
|
|
27
|
+
#### Version 0.3.6
|
|
28
|
+
|
|
29
|
+
- Se agregan argumentos al constructor de _DistanceImputer_ para que Transform y fit_transform puedan entregar un array de shape (n,1) o bien de (n,6) eligiendo la columna a imputar.
|
|
30
|
+
|
|
27
31
|
#### Version 0.3.5
|
|
28
32
|
|
|
29
33
|
- Se implementa clase _DistanceImputer_.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Library for processing SARAPICO project metadata of _AMG_.
|
|
4
4
|
|
|
5
|
+
#### Version 0.3.6
|
|
6
|
+
|
|
7
|
+
- Se agregan argumentos al constructor de _DistanceImputer_ para que Transform y fit_transform puedan entregar un array de shape (n,1) o bien de (n,6) eligiendo la columna a imputar.
|
|
8
|
+
|
|
5
9
|
#### Version 0.3.5
|
|
6
10
|
|
|
7
11
|
- Se implementa clase _DistanceImputer_.
|
|
@@ -8,7 +8,7 @@ class DistancesImputer(BaseEstimator, TransformerMixin):
|
|
|
8
8
|
"""La clase PlantinDataImuter se encarga de imputar/modificar los datos de telemetría entregados por el sistema. Se utilizan las clases TLMSensorDataExtractor, TimeSeriesProcessor y GeoProcessor para realizar las transformaciones necesarias y luego aplicar las modificaciones necesarias en base a las reglas definidas luego del análisis estadístico.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
def __init__(self, distanciaMedia:float = 1.8, umbral_mismo_lugar:float = 0.3, umbral_ratio_dCdP:float = 0.5, deltaO_medio = 4):
|
|
11
|
+
def __init__(self, distanciaMedia:float = 1.8, umbral_mismo_lugar:float = 0.3, umbral_ratio_dCdP:float = 0.5, deltaO_medio = 4, keepDims = False, columnToImpute = 0):
|
|
12
12
|
"""Constructor de la clase PlantinDataImputer.
|
|
13
13
|
|
|
14
14
|
Args:
|
|
@@ -16,6 +16,8 @@ class DistancesImputer(BaseEstimator, TransformerMixin):
|
|
|
16
16
|
- umbral_mismo_lugar: Umbral para considerar que dos operaciones son el mismo lugar.
|
|
17
17
|
- umbral_ratio_dCdP: Umbral para el ratio entre el delta de caminata y el delta de pico abierto.
|
|
18
18
|
- deltaO_medio: delta de operación medio entre operaciones.
|
|
19
|
+
- columnToImpute: Columna a imputar.
|
|
20
|
+
- keepDims: Si es True, se mantienen las dimensiones del array de entrada. Si es False, se devuelve un array de una dimensión.
|
|
19
21
|
"""
|
|
20
22
|
|
|
21
23
|
self.is_fitted = False
|
|
@@ -23,6 +25,8 @@ class DistancesImputer(BaseEstimator, TransformerMixin):
|
|
|
23
25
|
self._umbral_mismo_lugar = umbral_mismo_lugar
|
|
24
26
|
self._umbral_ratio_dCdP = umbral_ratio_dCdP
|
|
25
27
|
self._deltaO_medio = deltaO_medio
|
|
28
|
+
self._keepDims = keepDims
|
|
29
|
+
self._columnToImpute = columnToImpute
|
|
26
30
|
self._dataPositions = {"distancias":0} #posición de los datos en el array devuelto por transform()
|
|
27
31
|
|
|
28
32
|
def fit(self, X:np.array, y = None):
|
|
@@ -59,9 +63,16 @@ class DistancesImputer(BaseEstimator, TransformerMixin):
|
|
|
59
63
|
- updatedDistances: Array con las distancias imputadas.
|
|
60
64
|
"""
|
|
61
65
|
|
|
66
|
+
|
|
62
67
|
self._updatedDistances = self._imputeDistance()
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
##si keepDims es True, devolvemos x con las mismas dimensiones que el array de entrada. Los valores de self._updatedDistances se colocan en self._columnToImpute
|
|
69
|
+
if not self._keepDims:
|
|
70
|
+
return self._updatedDistances
|
|
71
|
+
|
|
72
|
+
else:
|
|
73
|
+
X[:,self._columnToImpute] = self._updatedDistances
|
|
74
|
+
return X
|
|
75
|
+
|
|
65
76
|
def fit_transform(self, X:np.array, y = None):
|
|
66
77
|
"""Fitea y aplica las imputaciones para transformar el objeto. Retorna el array transformado.
|
|
67
78
|
|
|
@@ -147,7 +158,7 @@ if __name__ == "__main__":
|
|
|
147
158
|
lats = np.array(["-32.331093", "-32.331116", "-32.331131", "-32.331146"]).astype(float)
|
|
148
159
|
lons = np.array(["-57.229733", "-57.229733", "-57.229733", "-57.22974"]).astype(float)
|
|
149
160
|
|
|
150
|
-
precisiones = np.array([
|
|
161
|
+
precisiones = np.array([1, 0.1, 0.1, 1])
|
|
151
162
|
|
|
152
163
|
tlmda_data = tlmda.fit_transform(tlmsbp_sample)
|
|
153
164
|
timesAC = tlmda.ESTAC
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
## Version of the package
|
|
2
|
-
__version__ = "0.3.
|
|
2
|
+
__version__ = "0.3.6"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sarapy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Library for Sarapico Metadata processing
|
|
5
5
|
Home-page: https://github.com/lucasbaldezzari/sarapy
|
|
6
6
|
Author: Lucas Baldezzari
|
|
@@ -24,6 +24,10 @@ Requires-Dist: geopy
|
|
|
24
24
|
|
|
25
25
|
Library for processing SARAPICO project metadata of _AMG_.
|
|
26
26
|
|
|
27
|
+
#### Version 0.3.6
|
|
28
|
+
|
|
29
|
+
- Se agregan argumentos al constructor de _DistanceImputer_ para que Transform y fit_transform puedan entregar un array de shape (n,1) o bien de (n,6) eligiendo la columna a imputar.
|
|
30
|
+
|
|
27
31
|
#### Version 0.3.5
|
|
28
32
|
|
|
29
33
|
- Se implementa clase _DistanceImputer_.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|