metacountregressor 0.1.133__tar.gz → 0.1.136__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/PKG-INFO +1 -1
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/helperprocess.py +45 -5
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/main.py +11 -6
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/PKG-INFO +1 -1
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/LICENSE.txt +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/README.rst +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/solution.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/setup.cfg +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/setup.py +0 -0
- {metacountregressor-0.1.133 → metacountregressor-0.1.136}/tests/test.py +0 -0
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/helperprocess.py
RENAMED
@@ -2,6 +2,7 @@ import numpy as np
|
|
2
2
|
import pandas as pd
|
3
3
|
import csv
|
4
4
|
import matplotlib.pyplot as plt
|
5
|
+
from scipy import stats as st
|
5
6
|
from sklearn.preprocessing import StandardScaler
|
6
7
|
|
7
8
|
plt.style.use('https://github.com/dhaitz/matplotlib-stylesheets/raw/master/pitayasmoothie-dark.mplstyle')
|
@@ -178,15 +179,54 @@ config = {
|
|
178
179
|
}
|
179
180
|
}
|
180
181
|
'''
|
181
|
-
|
182
|
+
def set_up_analyst_constraints(data_characteristic, variable_decisions_alt = None):
|
183
|
+
name_data_characteristics = data_characteristic.columns.tolist()
|
184
|
+
distu = ['n', 'u', 't']
|
185
|
+
tra = ['no']
|
186
|
+
variable_decisions = {
|
187
|
+
name: {
|
188
|
+
'levels': list(range(6)),
|
189
|
+
'distributions': distu,
|
190
|
+
'transformations': tra
|
191
|
+
}
|
192
|
+
for name in name_data_characteristics
|
193
|
+
}
|
194
|
+
# Override elements in the original dictionary with the alt dictionary
|
195
|
+
if variable_decisions_alt is not None:
|
196
|
+
for key, alt_value in variable_decisions_alt.items():
|
197
|
+
if key in variable_decisions:
|
198
|
+
# Update the existing entry
|
199
|
+
variable_decisions[key].update(alt_value)
|
200
|
+
else:
|
201
|
+
# Add new entry if it doesn't exist
|
202
|
+
variable_decisions[key] = alt_value
|
203
|
+
# Prepare the data for the DataFrame
|
204
|
+
rows = []
|
205
|
+
for column_name, details in variable_decisions.items():
|
206
|
+
# Create a row dictionary
|
207
|
+
row = {'Column': column_name}
|
208
|
+
|
209
|
+
# Add levels as True/False for Level 0 through Level 5
|
210
|
+
for level in range(6): # Assuming Level 0 to Level 5
|
211
|
+
row[f'Level {level}'] = level in details['levels']
|
212
|
+
|
213
|
+
# Add distributions and transformations directly
|
214
|
+
row['distributions'] = details['distributions']
|
215
|
+
row['transformations'] = details['transformations']
|
216
|
+
|
217
|
+
rows.append(row)
|
218
|
+
|
219
|
+
# Create the DataFrame
|
220
|
+
df = pd.DataFrame(rows)
|
221
|
+
return df
|
182
222
|
|
183
223
|
# Function to guess Low, Medium, High ranges
|
184
224
|
def guess_low_medium_high(column_name, series):
|
185
225
|
# Compute the tertiles (33rd and 66th percentiles)
|
186
|
-
print('did it make it...')
|
187
|
-
mode_value =
|
188
|
-
print('good')
|
189
|
-
|
226
|
+
#print('did it make it...')
|
227
|
+
#mode_value = st.mode(series) # Get the most frequent value
|
228
|
+
#print('good')
|
229
|
+
# series = pd.to_numeric(series, errors='coerce').fillna(mode_value)
|
190
230
|
low_threshold = np.quantile(series, 0.33)
|
191
231
|
high_threshold = np.quantile(series,0.66)
|
192
232
|
|
@@ -28,11 +28,16 @@ def convert_df_columns_to_binary_and_wide(df):
|
|
28
28
|
return df
|
29
29
|
|
30
30
|
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
31
35
|
def process_arguments(**kwargs):
|
32
36
|
'''
|
33
37
|
TRYING TO TURN THE CSV FILES INTO RELEVANT ARGS
|
34
38
|
'''
|
35
39
|
#dataset
|
40
|
+
'''
|
36
41
|
if kwargs.get('dataset_file', False
|
37
42
|
):
|
38
43
|
dataset = pd.read_csv(kwargs.get('dataset_file'))
|
@@ -71,15 +76,15 @@ def process_arguments(**kwargs):
|
|
71
76
|
|
72
77
|
update_constant = kwargs.get('analyst_constraints')
|
73
78
|
#update the decision_constraints
|
74
|
-
|
79
|
+
'''
|
75
80
|
data_characteristic = pd.read_csv(kwargs.get('problem_data', 'problem_data.csv'))
|
76
81
|
# Extract the column as a list of characteristic names
|
77
|
-
name_data_characteristics = data_characteristic.columns.tolist()
|
82
|
+
#name_data_characteristics = data_characteristic.columns.tolist()
|
78
83
|
|
79
84
|
# Create the dictionary
|
80
|
-
decision_constraints = {name: list(range(7)) for name in name_data_characteristics}
|
85
|
+
#decision_constraints = {name: list(range(7)) for name in name_data_characteristics}
|
81
86
|
|
82
|
-
print('this gets all the features, I need to remove...')
|
87
|
+
#print('this gets all the features, I need to remove...')
|
83
88
|
|
84
89
|
analyst_d = pd.read_csv(kwargs.get('decison_constraints', 'decisions.csv'))
|
85
90
|
hyper = pd.read_csv('setup_hyper.csv')
|
@@ -377,10 +382,10 @@ def main(args, **kwargs):
|
|
377
382
|
#data_info['data']['Panel'][0]
|
378
383
|
args['decisions'] = data_info['analyst']
|
379
384
|
|
380
|
-
if
|
385
|
+
if type(data_info['data']['Grouped'][0]) == str and len(data_info['data']['Grouped'][0]) >1:
|
381
386
|
args['group'] = data_info['data']['Grouped'][0]
|
382
387
|
args['ID'] = data_info['data']['Grouped'][0]
|
383
|
-
if
|
388
|
+
if type(data_info['data']['Panel'][0]) == str and len(data_info['data']['Panel'][0])>1:
|
384
389
|
args['panels'] = data_info['data']['Panel'][0]
|
385
390
|
|
386
391
|
df = pd.read_csv(str(data_info['data']['Problem'][0]))
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.133 → metacountregressor-0.1.136}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|