junshan-kit 2.2.9__py2.py3-none-any.whl → 2.3.0__py2.py3-none-any.whl

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.
junshan_kit/DataSets.py CHANGED
@@ -12,7 +12,7 @@ import junshan_kit.kit
12
12
  from sklearn.preprocessing import StandardScaler
13
13
 
14
14
  #----------------------------------------------------------
15
- def download_data(data_name):
15
+ def _download_data(data_name):
16
16
  from junshan_kit.kit import JianguoyunDownloaderFirefox, JianguoyunDownloaderChrome
17
17
 
18
18
  # User selects download method
@@ -36,12 +36,12 @@ def download_data(data_name):
36
36
  else:
37
37
  print("❌ Invalid choice. Please enter 1 or 2.\n")
38
38
 
39
- def run(csv_path, data_name, drop_cols, label_col, label_map, print_info):
39
+ def _run(csv_path, data_name, drop_cols, label_col, label_map, print_info):
40
40
  if not os.path.exists(csv_path):
41
41
  print('\n' + '*'*60)
42
42
  print(f"Please download the data.")
43
43
  print(csv_path)
44
- download_data(data_name)
44
+ _download_data(data_name)
45
45
  junshan_kit.kit.unzip_file(f'./exp_data/{data_name}/{data_name}.zip', f'./exp_data/{data_name}')
46
46
 
47
47
  cleaner = junshan_kit.DataProcessor.CSV_TO_Pandas()
@@ -59,10 +59,10 @@ def credit_card_fraud_detection(data_name = "Credit Card Fraud Detection", print
59
59
 
60
60
  csv_path = f'./exp_data/{data_name}/creditcard.csv'
61
61
  drop_cols = []
62
- label_col = 'diagnosed_diabetes'
62
+ label_col = 'Class'
63
63
  label_map = {0: -1, 1: 1}
64
64
 
65
- df = run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
65
+ df = _run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
66
66
 
67
67
  return df
68
68
 
@@ -70,10 +70,10 @@ def credit_card_fraud_detection(data_name = "Credit Card Fraud Detection", print
70
70
  def diabetes_health_indicators_dataset(data_name = "Diabetes Health Indicators Dataset", print_info = False):
71
71
  csv_path = f'./exp_data/{data_name}/diabetes_dataset.csv'
72
72
  drop_cols = []
73
- label_col = 'Class'
73
+ label_col = 'diagnosed_diabetes'
74
74
  label_map = {0: -1, 1: 1}
75
75
 
76
- df = run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
76
+ df = _run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
77
77
 
78
78
  return df
79
79
 
@@ -87,7 +87,7 @@ def electric_vehicle_population_data(data_name = "Electric Vehicle Population Da
87
87
  'Plug-in Hybrid Electric Vehicle (PHEV)': -1
88
88
  }
89
89
 
90
- df = run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
90
+ df = _run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
91
91
 
92
92
  return df
93
93
 
@@ -97,7 +97,7 @@ def global_house_purchase_dataset(data_name = "Global House Purchase Dataset", p
97
97
  label_col = 'Electric Vehicle Type'
98
98
  label_map = {0: -1, 1: 1}
99
99
 
100
- df = run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
100
+ df = _run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
101
101
 
102
102
  return df
103
103
 
@@ -108,7 +108,7 @@ def health_lifestyle_dataset(data_name = "Health_lifestyle_dataset", print_info
108
108
  label_col = 'decision'
109
109
  label_map = {0: -1, 1: 1}
110
110
 
111
- df = run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
111
+ df = _run(csv_path, data_name, drop_cols, label_col, label_map, print_info)
112
112
 
113
113
  return df
114
114
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: junshan_kit
3
- Version: 2.2.9
3
+ Version: 2.3.0
4
4
  Summary: This is an optimization tool.
5
5
  Author-email: Junshan Yin <junshanyin@163.com>
6
6
  Requires-Dist: kaggle==1.7.4.5
@@ -0,0 +1,7 @@
1
+ junshan_kit/DataProcessor.py,sha256=eryVmS5BFZj8wjDN2QWVHqkbFgFuWU0HXV9s6TGf9QM,4442
2
+ junshan_kit/DataSets.py,sha256=rf5AVlA9DxP7wBpXjSO1_xznCMuxEoK50TqExafwHhc,3972
3
+ junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ junshan_kit/kit.py,sha256=tB1TpW9hW1EweK1RQwHOdUo7uG1QU4vSeyR0fdaSydo,9569
5
+ junshan_kit-2.3.0.dist-info/METADATA,sha256=9NlU4YOD0zx5F5tLIMREKKxn-LwYD8-7IFVtp7DvMNM,329
6
+ junshan_kit-2.3.0.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
7
+ junshan_kit-2.3.0.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- junshan_kit/DataProcessor.py,sha256=eryVmS5BFZj8wjDN2QWVHqkbFgFuWU0HXV9s6TGf9QM,4442
2
- junshan_kit/DataSets.py,sha256=BNlXUbsautITelxp35uHSYSq2bTbIbqLyQnmqapaeDc,3963
3
- junshan_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- junshan_kit/kit.py,sha256=tB1TpW9hW1EweK1RQwHOdUo7uG1QU4vSeyR0fdaSydo,9569
5
- junshan_kit-2.2.9.dist-info/METADATA,sha256=oIytayt1Z9OpFOJl8_7cYMl3li3KsphQfZDRqsqat8g,329
6
- junshan_kit-2.2.9.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
7
- junshan_kit-2.2.9.dist-info/RECORD,,