metacountregressor 0.1.136__tar.gz → 0.1.137__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/PKG-INFO +1 -1
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/helperprocess.py +36 -6
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/PKG-INFO +1 -1
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/LICENSE.txt +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/README.rst +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/solution.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/setup.cfg +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/setup.py +0 -0
- {metacountregressor-0.1.136 → metacountregressor-0.1.137}/tests/test.py +0 -0
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/helperprocess.py
RENAMED
@@ -1,9 +1,12 @@
|
|
1
|
+
from os.path import exists
|
2
|
+
|
1
3
|
import numpy as np
|
2
4
|
import pandas as pd
|
3
5
|
import csv
|
4
6
|
import matplotlib.pyplot as plt
|
5
7
|
from scipy import stats as st
|
6
8
|
from sklearn.preprocessing import StandardScaler
|
9
|
+
from win32comext.shell.demos.IActiveDesktop import existing_item
|
7
10
|
|
8
11
|
plt.style.use('https://github.com/dhaitz/matplotlib-stylesheets/raw/master/pitayasmoothie-dark.mplstyle')
|
9
12
|
|
@@ -179,17 +182,38 @@ config = {
|
|
179
182
|
}
|
180
183
|
}
|
181
184
|
'''
|
182
|
-
def
|
185
|
+
def null_handler(vari):
|
186
|
+
if vari in locals():
|
187
|
+
return vari
|
188
|
+
else:
|
189
|
+
print(f'{vari} does not exist, setting None..')
|
190
|
+
return None
|
191
|
+
|
192
|
+
|
193
|
+
def set_up_analyst_constraints(data_characteristic, model_terms, variable_decisions_alt = None):
|
194
|
+
|
195
|
+
|
183
196
|
name_data_characteristics = data_characteristic.columns.tolist()
|
184
|
-
|
185
|
-
|
197
|
+
# Get non-None values as a list
|
198
|
+
non_none_terms = [value for value in model_terms.values() if value is not None]
|
199
|
+
# how to make name_data_characteristics - non_none_terms
|
200
|
+
|
201
|
+
result = [item for item in name_data_characteristics if item not in non_none_terms]
|
202
|
+
distu = ['Normal', 'Uniform', 'Triangular']
|
203
|
+
tra = ['no', 'sqrt', 'arcsinh']
|
204
|
+
if model_terms.get('grouped') is None:
|
205
|
+
print('cant have grouped rpm, removing level 4 from every item')
|
206
|
+
MAKE_ALL_4_FALSE = True
|
207
|
+
else:
|
208
|
+
MAKE_ALL_4_FALSE = False
|
209
|
+
|
186
210
|
variable_decisions = {
|
187
211
|
name: {
|
188
212
|
'levels': list(range(6)),
|
189
213
|
'distributions': distu,
|
190
214
|
'transformations': tra
|
191
215
|
}
|
192
|
-
for name in
|
216
|
+
for name in result
|
193
217
|
}
|
194
218
|
# Override elements in the original dictionary with the alt dictionary
|
195
219
|
if variable_decisions_alt is not None:
|
@@ -208,7 +232,11 @@ def set_up_analyst_constraints(data_characteristic, variable_decisions_alt = Non
|
|
208
232
|
|
209
233
|
# Add levels as True/False for Level 0 through Level 5
|
210
234
|
for level in range(6): # Assuming Level 0 to Level 5
|
211
|
-
|
235
|
+
|
236
|
+
if level == 4 and MAKE_ALL_4_FALSE:
|
237
|
+
row[f'Level {level}'] = False
|
238
|
+
else:
|
239
|
+
row[f'Level {level}'] = level in details['levels']
|
212
240
|
|
213
241
|
# Add distributions and transformations directly
|
214
242
|
row['distributions'] = details['distributions']
|
@@ -218,7 +246,9 @@ def set_up_analyst_constraints(data_characteristic, variable_decisions_alt = Non
|
|
218
246
|
|
219
247
|
# Create the DataFrame
|
220
248
|
df = pd.DataFrame(rows)
|
221
|
-
|
249
|
+
|
250
|
+
data_new = data_characteristic.rename(columns={v: k for k, v in model_terms.items() if v in data_characteristic.columns})
|
251
|
+
return df, data_new
|
222
252
|
|
223
253
|
# Function to guess Low, Medium, High ranges
|
224
254
|
def guess_low_medium_high(column_name, series):
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.136 → metacountregressor-0.1.137}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|