nkululeko 0.94.0__py3-none-any.whl → 0.94.1__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.
nkululeko/constants.py CHANGED
@@ -1,2 +1,2 @@
1
- VERSION="0.94.0"
1
+ VERSION="0.94.1"
2
2
  SAMPLING_RATE = 16000
nkululeko/filter_data.py CHANGED
@@ -137,7 +137,9 @@ class DataFilter:
137
137
  col = f[0]
138
138
  val = f[1]
139
139
  pre = df.shape[0]
140
- df = df[df[col] == val]
140
+ if not isinstance(val, list):
141
+ val = [val]
142
+ df = df[df[col].isin(val)]
141
143
  post = df.shape[0]
142
144
  self.util.debug(
143
145
  f"{data_name}: filtered {col}={val}, reduced samples from"
@@ -138,7 +138,7 @@ class Reporter:
138
138
  self.util.error(f"unknown metric: {self.metric}")
139
139
  return test_result, upper, lower
140
140
 
141
- def print_probabilities(self, file_name = None):
141
+ def print_probabilities(self, file_name=None):
142
142
  """Print the probabilities per class to a file in the store."""
143
143
  if (
144
144
  self.util.exp_is_classification()
@@ -169,7 +169,7 @@ class Reporter:
169
169
  probas["uncertainty"] = uncertainty
170
170
  probas["correct"] = probas.predicted == probas.truth
171
171
  if file_name is None:
172
- file_name = self.util.get_pred_name()+".csv"
172
+ file_name = self.util.get_pred_name() + ".csv"
173
173
  self.probas = probas
174
174
  probas.to_csv(file_name)
175
175
  self.util.debug(f"Saved probabilities to {file_name}")
@@ -182,7 +182,7 @@ class Reporter:
182
182
  caption,
183
183
  "Uncertainty",
184
184
  "uncertainty_samples",
185
- file_name,
185
+ "samples",
186
186
  )
187
187
 
188
188
  def set_id(self, run, epoch):
@@ -392,13 +392,15 @@ class Reporter:
392
392
  text_file.write(result_str)
393
393
  self.util.debug(result_str)
394
394
 
395
- def print_results(self, epoch=None, file_name = None):
395
+ def print_results(self, epoch=None, file_name=None):
396
396
  if epoch is None:
397
397
  epoch = self.epoch
398
398
  """Print all evaluation values to text file."""
399
399
  res_dir = self.util.get_path("res_dir")
400
400
  if file_name is None:
401
- file_name = f"{res_dir}{self.util.get_exp_name()}_{epoch}{self.filenameadd}.txt"
401
+ file_name = (
402
+ f"{res_dir}{self.util.get_exp_name()}_{epoch}{self.filenameadd}.txt"
403
+ )
402
404
  else:
403
405
  self.util.debug(f"####->{file_name}<-####")
404
406
  file_name = f"{res_dir}{file_name}{self.filenameadd}.txt"
@@ -515,10 +517,10 @@ class Reporter:
515
517
  plt.savefig(f"{fig_dir}{out_name}.{self.format}")
516
518
  plt.close()
517
519
 
518
- def _scaleresults(self, results:np.ndarray) -> np.ndarray:
520
+ def _scaleresults(self, results: np.ndarray) -> np.ndarray:
519
521
  results = results.copy()
520
522
  """Scale results to fit on the plot."""
521
523
  if np.any((results > 1)):
522
- # scale down values
524
+ # scale down values
523
525
  results = results / 100.0
524
- return results
526
+ return results
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nkululeko
3
- Version: 0.94.0
3
+ Version: 0.94.1
4
4
  Summary: Machine learning audio prediction experiments based on templates
5
5
  Home-page: https://github.com/felixbur/nkululeko
6
6
  Author: Felix Burkhardt
@@ -2,7 +2,7 @@ nkululeko/__init__.py,sha256=62f8HiEzJ8rG2QlTFJXUCMpvuH3fKI33DoJSj33mscc,63
2
2
  nkululeko/aug_train.py,sha256=wpiHCJ7zsW38kumg3ypwXZe2HQrhUblAnv7P2QeJnAc,3525
3
3
  nkululeko/augment.py,sha256=3RzaxB3gRxovgJVjHXi0glprW01J7RaHhUkqotW2T3U,2955
4
4
  nkululeko/cacheddataset.py,sha256=XFpWZmbJRg0pvhnIgYf0TkclxllD-Fctu-Ol0PF_00c,969
5
- nkululeko/constants.py,sha256=DRvpIz4j-jN2zlnm3kODLo5WQQDhDpq5rHADx1vRvAY,39
5
+ nkululeko/constants.py,sha256=4_cPNkLfZWa0md1LsHb3_P28dE2j0zAcBid8gDk0hsY,39
6
6
  nkululeko/demo-ft.py,sha256=iD9Pzp9QjyAv31q1cDZ75vPez7Ve8A4Cfukv5yfZdrQ,770
7
7
  nkululeko/demo.py,sha256=4Yzhg6pCPBYPGJrP7JX2TysVosl_R1llpVDKc2P_gUA,4955
8
8
  nkululeko/demo_feats.py,sha256=BvZjeNFTlERIRlq34OHM4Z96jdDQAhB01BGQAUcX9dM,2026
@@ -13,7 +13,7 @@ nkululeko/explore.py,sha256=FPM2CS-LKgcDV-LnjYlD6pEv7HuCQpH_C3KyyiOCdk4,3589
13
13
  nkululeko/export.py,sha256=U-V4acxtuL6qKt6oAsVcM5TTeWogYUJ3GU-lA6rq6d4,4336
14
14
  nkululeko/feature_extractor.py,sha256=UnspIWz3XrNhKnBBhWZkH2bHvD-sROtrQVqB1JvkUyw,4088
15
15
  nkululeko/file_checker.py,sha256=xJY0Q6w47pnmgJVK5rcAKPYBrCpV7eBT4_3YBzTx-H8,3454
16
- nkululeko/filter_data.py,sha256=5AYDtqs_GWGr4V5CbbYQkVVgCD3kq2dpKu8rF3V87NI,7224
16
+ nkululeko/filter_data.py,sha256=4sGrKvMZ_hLnJPrHm_CqjDPKIRV8REWoT7nfSYGXbwo,7305
17
17
  nkululeko/fixedsegment.py,sha256=Tb92QiuiyMsOO3WRWwuGjZGibS8hbHHCrcWAXGk7g04,2868
18
18
  nkululeko/glob_conf.py,sha256=KL9YJQTHvTztxo1vr25qRRgaPnx4NTg0XrdbovKGMmw,525
19
19
  nkululeko/modelrunner.py,sha256=NpDgXfKkn8dOrQzhUiEfGI56Qrb1sOtWTD31II4Zgbk,11550
@@ -103,7 +103,7 @@ nkululeko/reporting/defines.py,sha256=0vh-Tlx4fAPpk1o6mP_4x3EkIoqzYMr38IZnj-JM5z
103
103
  nkululeko/reporting/latex_writer.py,sha256=NGwSIfd4nfslDkNUOSZSdqY_VDLA8634thyhe-vj1bY,1824
104
104
  nkululeko/reporting/report.py,sha256=bYN8B66gg3IWHAyfd6uIVjpYKy3rOI6aEwgfXU0LSAY,1006
105
105
  nkululeko/reporting/report_item.py,sha256=AqKD40AlZpRuHLbggn5PkH6ctGJwh9rGNBNgOvgUODg,534
106
- nkululeko/reporting/reporter.py,sha256=VLLlu8KhploXtvYiaqYlY2lte32aA6Ep9knUGa56NkY,20138
106
+ nkululeko/reporting/reporter.py,sha256=-VyV0TZ0vBAx6UZNegnKS3i3WpkF27ntBRlYvp9NNiQ,20174
107
107
  nkululeko/reporting/result.py,sha256=G63a2tHCwHhM6NBJgYzsWKWJm4Yu3r4hsCHA2Km7eHU,1073
108
108
  nkululeko/segmenting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
109
  nkululeko/segmenting/seg_inaspeechsegmenter.py,sha256=b3t0zdpJYofKWMyKRMtMMX91xeR-k8d5pbnNaQHcsOE,1902
@@ -113,9 +113,9 @@ nkululeko/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
113
113
  nkululeko/utils/files.py,sha256=SrrYaU7AB80MZHiV1jcB0h_zigvYLYgSVNTXV4ao38g,4593
114
114
  nkululeko/utils/stats.py,sha256=3Fyx8q8BSKYmiufT6OkRug9RATWmGrr9BaX_y8jziWo,3074
115
115
  nkululeko/utils/util.py,sha256=nZJtWqzFx3Zdp6Pve_ZAbb01yRTpIsgBXnoPy1VgtRE,17356
116
- nkululeko-0.94.0.dist-info/licenses/LICENSE,sha256=0zGP5B_W35yAcGfHPS18Q2B8UhvLRY3dQq1MhpsJU_U,1076
117
- nkululeko-0.94.0.dist-info/METADATA,sha256=3_HyNuaXzSYp4P6BMf1yWWd3JsT6SS2Yx3XodZtK1NA,1169
118
- nkululeko-0.94.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
119
- nkululeko-0.94.0.dist-info/entry_points.txt,sha256=lNTkFEdh6Kjo5o95ZAWf_0Lq-4ztGoAoMVSDuPtuyS0,442
120
- nkululeko-0.94.0.dist-info/top_level.txt,sha256=DPFNNSHPjUeVKj44dVANAjuVGRCC3MusJ08lc2a8xFA,10
121
- nkululeko-0.94.0.dist-info/RECORD,,
116
+ nkululeko-0.94.1.dist-info/licenses/LICENSE,sha256=0zGP5B_W35yAcGfHPS18Q2B8UhvLRY3dQq1MhpsJU_U,1076
117
+ nkululeko-0.94.1.dist-info/METADATA,sha256=JoeRpOcdclL11EV6vPNmw9gvmlm8VOO8yaoETjs2k-M,1169
118
+ nkululeko-0.94.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
119
+ nkululeko-0.94.1.dist-info/entry_points.txt,sha256=lNTkFEdh6Kjo5o95ZAWf_0Lq-4ztGoAoMVSDuPtuyS0,442
120
+ nkululeko-0.94.1.dist-info/top_level.txt,sha256=DPFNNSHPjUeVKj44dVANAjuVGRCC3MusJ08lc2a8xFA,10
121
+ nkululeko-0.94.1.dist-info/RECORD,,