population-trend 5.8.0__tar.gz → 5.9.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: population_trend
3
- Version: 5.8.0
3
+ Version: 5.9.0
4
4
  Summary: A population growth model package
5
5
  Home-page: https://github.com/IslasGECI/population_trend
6
6
  Author: Ciencia de Datos • GECI
@@ -1,6 +1,6 @@
1
1
  """A population growth model package"""
2
2
 
3
- __version__ = "5.8.0"
3
+ __version__ = "5.9.0"
4
4
  from .calculate_growth_rates import * # noqa
5
5
  from .cli import * # noqa
6
6
  from .filter_data import * # noqa
@@ -88,6 +88,16 @@ Bootstrap = dict(
88
88
  )
89
89
 
90
90
 
91
+ def fit_population_model(seasons_series, data_series):
92
+ parameters = lambda_calculator(seasons_series, data_series)
93
+ model = power_law(
94
+ seasons_series - seasons_series.iloc[0],
95
+ parameters[0],
96
+ parameters[1],
97
+ )
98
+ return model
99
+
100
+
91
101
  class Bootstrap_from_time_series:
92
102
  def __init__(self, bootstrap_parametrizer):
93
103
  self.parameters = bootstrap_parametrizer.parameters
@@ -145,12 +155,7 @@ class Bootstrap_from_time_series:
145
155
  return ",".join(seasons_intervals)
146
156
 
147
157
  def fit_population_model(self):
148
- parameters = lambda_calculator(self.season_series, self.data_series)
149
- model = power_law(
150
- self.season_series - self.season_series.iloc[0],
151
- parameters[0],
152
- parameters[1],
153
- )
158
+ model = fit_population_model(self.season_series, self.data_series)
154
159
  return model
155
160
 
156
161
  def get_intermediate_lambdas(self):