metacountregressor 0.1.124__py3-none-any.whl → 0.1.125__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metacountregressor/helperprocess.py +23 -5
- metacountregressor/solution.py +1 -2
- {metacountregressor-0.1.124.dist-info → metacountregressor-0.1.125.dist-info}/METADATA +2 -2
- {metacountregressor-0.1.124.dist-info → metacountregressor-0.1.125.dist-info}/RECORD +7 -7
- {metacountregressor-0.1.124.dist-info → metacountregressor-0.1.125.dist-info}/LICENSE.txt +0 -0
- {metacountregressor-0.1.124.dist-info → metacountregressor-0.1.125.dist-info}/WHEEL +0 -0
- {metacountregressor-0.1.124.dist-info → metacountregressor-0.1.125.dist-info}/top_level.txt +0 -0
@@ -180,6 +180,23 @@ config = {
|
|
180
180
|
'''
|
181
181
|
|
182
182
|
|
183
|
+
# Function to guess Low, Medium, High ranges
|
184
|
+
def guess_low_medium_high(column_name, series):
|
185
|
+
# Compute the tertiles (33rd and 66th percentiles)
|
186
|
+
low_threshold = series.quantile(0.33)
|
187
|
+
high_threshold = series.quantile(0.66)
|
188
|
+
|
189
|
+
# Define the bins and labels
|
190
|
+
bins = [series.min() - 1, low_threshold, high_threshold, series.max()]
|
191
|
+
labels = ['Low', 'Medium', 'High']
|
192
|
+
|
193
|
+
return {
|
194
|
+
'type': 'bin',
|
195
|
+
'bins': bins,
|
196
|
+
'labels': labels,
|
197
|
+
'prefix': f'{column_name}_Binned'
|
198
|
+
}
|
199
|
+
|
183
200
|
def transform_dataframe(df, config):
|
184
201
|
output_df = pd.DataFrame()
|
185
202
|
|
@@ -226,12 +243,13 @@ def guess_column_type(column_name, series):
|
|
226
243
|
return {'type': 'one-hot', 'prefix': column_name}
|
227
244
|
elif pd.api.types.is_numeric_dtype(series):
|
228
245
|
unique_values = series.nunique()
|
229
|
-
if unique_values <
|
246
|
+
if unique_values < 5:
|
247
|
+
return {'type': 'one-hot', 'prefix': column_name}
|
248
|
+
|
249
|
+
|
250
|
+
elif series.range() > 20:
|
230
251
|
# If there are few unique values, assume binning with default bins
|
231
|
-
|
232
|
-
bins = np.linspace(min_val, max_val, num=unique_values + 1)
|
233
|
-
labels = [f'Bin_{i}' for i in range(1, len(bins))]
|
234
|
-
return {'type': 'bin', 'bins': bins, 'labels': labels, 'prefix': f'{column_name}_Binned'}
|
252
|
+
guess_low_medium_high(column_name,series)
|
235
253
|
else:
|
236
254
|
# # Otherwise, assume continuous data with normalization
|
237
255
|
# Otherwise, fallback to continuous standardization
|
metacountregressor/solution.py
CHANGED
@@ -3473,8 +3473,7 @@ class ObjectiveFunction(object):
|
|
3473
3473
|
corr_pairs = list(itertools.combinations(self.Kr, 2))
|
3474
3474
|
else:
|
3475
3475
|
corr_pairs = list(itertools.combinations(corr_indices, 2))
|
3476
|
-
|
3477
|
-
print('maybe get the terms here')
|
3476
|
+
|
3478
3477
|
|
3479
3478
|
for ii, corr_pair in enumerate(corr_pairs):
|
3480
3479
|
# lower cholesky matrix
|
@@ -1,10 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: metacountregressor
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.125
|
4
4
|
Summary: Extensions for a Python package for estimation of count models.
|
5
5
|
Home-page: https://github.com/zahern/CountDataEstimation
|
6
6
|
Author: Zeke Ahern
|
7
|
-
Author-email:
|
7
|
+
Author-email: z.ahern@qut.edu.au
|
8
8
|
License: QUT
|
9
9
|
Requires-Python: >=3.10
|
10
10
|
Description-Content-Type: text/markdown
|
@@ -3,7 +3,7 @@ metacountregressor/_device_cust.py,sha256=759fnKmTYccJm4Lpi9_1reurh6OB9d6q9soPR0
|
|
3
3
|
metacountregressor/app_main.py,sha256=vY3GczTbGbBRalbzMkl_9jVW7RMgEOc6z2Dr1IZJv9c,10014
|
4
4
|
metacountregressor/data_split_helper.py,sha256=M2fIMdIO8znUaYhx5wlacRyNWdQjNYu1z1wkE-kFUYU,3373
|
5
5
|
metacountregressor/halton.py,sha256=jhovA45UBoZYU9g-hl6Lb2sBIx_ZBTNdPrpgkzR9fng,9463
|
6
|
-
metacountregressor/helperprocess.py,sha256=
|
6
|
+
metacountregressor/helperprocess.py,sha256=D5KMFk_OFHvYxFzjQhbwypxks32J7atKpa4J5DThYPE,16661
|
7
7
|
metacountregressor/main.py,sha256=A3XGwbwhhKVgMxnEgbAmMpgYaWkS8Rk30-cYs3FxvEk,22713
|
8
8
|
metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
|
9
9
|
metacountregressor/metaheuristics.py,sha256=Kkx1Jfox6NBlm5zVrI26Vc_NI7NFQSS9dinrZU9SpV8,105871
|
@@ -11,10 +11,10 @@ metacountregressor/pareto_file.py,sha256=whySaoPAUWYjyI8zo0hwAOa3rFk6SIUlHSpqZiL
|
|
11
11
|
metacountregressor/pareto_logger__plot.py,sha256=mEU2QN4wmsM7t39GJ_XhJ_jjsdl09JOmG0U2jICrAkI,30037
|
12
12
|
metacountregressor/setup.py,sha256=5UcQCCLR8Fm5odA3MX78WwahavxFq4mVD6oq0IuQvAY,936
|
13
13
|
metacountregressor/single_objective_finder.py,sha256=jVG7GJBqzSP4_riYr-kMMKy_LE3SlGmKMunNhHYxgRg,8011
|
14
|
-
metacountregressor/solution.py,sha256=
|
14
|
+
metacountregressor/solution.py,sha256=uAwYNfyVbFIpYg23J7Rn6jfDokRYwWsrllIqtS2qeso,277587
|
15
15
|
metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
|
16
|
-
metacountregressor-0.1.
|
17
|
-
metacountregressor-0.1.
|
18
|
-
metacountregressor-0.1.
|
19
|
-
metacountregressor-0.1.
|
20
|
-
metacountregressor-0.1.
|
16
|
+
metacountregressor-0.1.125.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
metacountregressor-0.1.125.dist-info/METADATA,sha256=YT5DEXf9O5CasvuoVesen96osnDRIxZA8a04_yLVYMs,23434
|
18
|
+
metacountregressor-0.1.125.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
metacountregressor-0.1.125.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
20
|
+
metacountregressor-0.1.125.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|