nkululeko 0.93.9__py3-none-any.whl → 0.93.11__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 +1 -1
- nkululeko/feat_extract/feats_import.py +6 -1
- nkululeko/models/model.py +1 -0
- nkululeko/plots.py +1 -2
- nkululeko/reporting/reporter.py +12 -0
- nkululeko/segment.py +6 -6
- {nkululeko-0.93.9.dist-info → nkululeko-0.93.11.dist-info}/METADATA +10 -1
- {nkululeko-0.93.9.dist-info → nkululeko-0.93.11.dist-info}/RECORD +12 -12
- {nkululeko-0.93.9.dist-info → nkululeko-0.93.11.dist-info}/WHEEL +1 -1
- {nkululeko-0.93.9.dist-info → nkululeko-0.93.11.dist-info}/LICENSE +0 -0
- {nkululeko-0.93.9.dist-info → nkululeko-0.93.11.dist-info}/entry_points.txt +0 -0
- {nkululeko-0.93.9.dist-info → nkululeko-0.93.11.dist-info}/top_level.txt +0 -0
nkululeko/constants.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
VERSION="0.93.
|
1
|
+
VERSION="0.93.11"
|
2
2
|
SAMPLING_RATE = 16000
|
@@ -30,7 +30,7 @@ class ImportSet(Featureset):
|
|
30
30
|
"feature type == import needs import_file = ['file1', 'filex']"
|
31
31
|
)
|
32
32
|
except SyntaxError:
|
33
|
-
if type(feat_import_files)
|
33
|
+
if type(feat_import_files) is str:
|
34
34
|
feat_import_files = [feat_import_files]
|
35
35
|
else:
|
36
36
|
self.util.error(f"import_file is wrong: {feat_import_files}")
|
@@ -40,6 +40,11 @@ class ImportSet(Featureset):
|
|
40
40
|
if not os.path.isfile(feat_import_file):
|
41
41
|
self.util.error(f"no import file: {feat_import_file}")
|
42
42
|
df = audformat.utils.read_csv(feat_import_file)
|
43
|
+
if df.isnull().values.any():
|
44
|
+
self.util.warn(
|
45
|
+
f"imported features contain {df.isna().sum()} NAN, filling with zero."
|
46
|
+
)
|
47
|
+
df = df.fillna(0)
|
43
48
|
df = self.util.make_segmented_index(df)
|
44
49
|
df = df[df.index.isin(self.data_df.index)]
|
45
50
|
if import_files_append:
|
nkululeko/models/model.py
CHANGED
nkululeko/plots.py
CHANGED
@@ -628,8 +628,7 @@ class Plots:
|
|
628
628
|
# one up because of the runs
|
629
629
|
fig_dir = self.util.get_path("fig_dir") + "../"
|
630
630
|
exp_name = self.util.get_exp_name(only_data=True)
|
631
|
-
|
632
|
-
filename = f"{fig_dir}{exp_name}EXPL_tree-plot.{format}"
|
631
|
+
filename = f"{fig_dir}{exp_name}EXPL_tree-plot.{self.format}"
|
633
632
|
fig = ax.figure
|
634
633
|
fig.savefig(filename)
|
635
634
|
fig.clear()
|
nkululeko/reporting/reporter.py
CHANGED
@@ -380,6 +380,18 @@ class Reporter:
|
|
380
380
|
def set_filename_add(self, my_string):
|
381
381
|
self.filenameadd = f"_{my_string}"
|
382
382
|
|
383
|
+
def print_logo(self, results):
|
384
|
+
res_dir = self.util.get_path("res_dir")
|
385
|
+
result_str = f"LOGO results: [{','.join(results.astype(str))}]"
|
386
|
+
file_name = f"{res_dir}/logo_results.txt"
|
387
|
+
with open(file_name, "w") as text_file:
|
388
|
+
text_file.write(
|
389
|
+
f"LOGO: mean {results.mean():.3f}, std: " + f"{results.std():.3f}"
|
390
|
+
)
|
391
|
+
text_file.write("\n")
|
392
|
+
text_file.write(result_str)
|
393
|
+
self.util.debug(result_str)
|
394
|
+
|
383
395
|
def print_results(self, epoch=None):
|
384
396
|
if epoch is None:
|
385
397
|
epoch = self.epoch
|
nkululeko/segment.py
CHANGED
@@ -62,6 +62,11 @@ def main():
|
|
62
62
|
expr.fill_train_and_tests()
|
63
63
|
util.debug(f"train shape : {expr.df_train.shape}, test shape:{expr.df_test.shape}")
|
64
64
|
|
65
|
+
def calc_dur(x):
|
66
|
+
starts = x[1]
|
67
|
+
ends = x[2]
|
68
|
+
return (ends - starts).total_seconds()
|
69
|
+
|
65
70
|
# segment
|
66
71
|
segmented_file = util.config_val("SEGMENT", "result", "segmented.csv")
|
67
72
|
|
@@ -104,16 +109,11 @@ def main():
|
|
104
109
|
df_seg = df_seg.drop(columns=[target])
|
105
110
|
df_seg = df_seg.rename(columns={"class_label": target})
|
106
111
|
# save file
|
112
|
+
df_seg["duration"] = df_seg.index.to_series().map(lambda x: calc_dur(x))
|
107
113
|
df_seg.to_csv(f"{expr.data_dir}/{segmented_file}")
|
108
114
|
|
109
|
-
def calc_dur(x):
|
110
|
-
starts = x[1]
|
111
|
-
ends = x[2]
|
112
|
-
return (ends - starts).total_seconds()
|
113
|
-
|
114
115
|
if "duration" not in df.columns:
|
115
116
|
df["duration"] = df.index.to_series().map(lambda x: calc_dur(x))
|
116
|
-
df_seg["duration"] = df_seg.index.to_series().map(lambda x: calc_dur(x))
|
117
117
|
num_before = df.shape[0]
|
118
118
|
num_after = df_seg.shape[0]
|
119
119
|
util.debug(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nkululeko
|
3
|
-
Version: 0.93.
|
3
|
+
Version: 0.93.11
|
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
|
@@ -353,6 +353,15 @@ If you use it, please mention the Nkululeko paper:
|
|
353
353
|
Changelog
|
354
354
|
=========
|
355
355
|
|
356
|
+
Version 0.93.11
|
357
|
+
--------------
|
358
|
+
* bugfix: silero segmenter assigned file duration values
|
359
|
+
|
360
|
+
Version 0.93.10
|
361
|
+
--------------
|
362
|
+
* added nan check for imported features
|
363
|
+
* added LOGO result output
|
364
|
+
|
356
365
|
Version 0.93.9
|
357
366
|
--------------
|
358
367
|
* added manual seed to torch models
|
@@ -2,7 +2,7 @@ nkululeko/__init__.py,sha256=62f8HiEzJ8rG2QlTFJXUCMpvuH3fKI33DoJSj33mscc,63
|
|
2
2
|
nkululeko/aug_train.py,sha256=FoMbBrfyOZd4QAw7oIHl3X6-UpsqAKWVDIolCA7qOWs,3196
|
3
3
|
nkululeko/augment.py,sha256=3RzaxB3gRxovgJVjHXi0glprW01J7RaHhUkqotW2T3U,2955
|
4
4
|
nkululeko/cacheddataset.py,sha256=XFpWZmbJRg0pvhnIgYf0TkclxllD-Fctu-Ol0PF_00c,969
|
5
|
-
nkululeko/constants.py,sha256=
|
5
|
+
nkululeko/constants.py,sha256=RFv_MnQuDew9o2GQ6vQEZEZj1JoIn68nAUZQ1_9S_yw,40
|
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
|
@@ -20,12 +20,12 @@ nkululeko/modelrunner.py,sha256=lJy-xM4QfDDWeL0dLTE_VIb4sYrnd_Z_yJRK3wwohQA,1119
|
|
20
20
|
nkululeko/multidb.py,sha256=sO6OwJn8sn1-C-ig3thsIL8QMWHdV9SnJhDodKjeKrI,6876
|
21
21
|
nkululeko/nkuluflag.py,sha256=PGWSmZz-PiiHLgcZJAoGOI_Y-sZDVI1ksB8p5r7riWM,3725
|
22
22
|
nkululeko/nkululeko.py,sha256=M7baIq2nAoi6dEoBL4ATEuqAs5U1fvl_hyqAl5DybAQ,2040
|
23
|
-
nkululeko/plots.py,sha256=
|
23
|
+
nkululeko/plots.py,sha256=Mm30pDLBb55iE9SYaSg76KFBKnebZTlypFQIBo26wuY,25991
|
24
24
|
nkululeko/predict.py,sha256=MLnHEyFmSiHLLs-HDczag8Vu3zKF5T1rXLKdZZJ6py8,2083
|
25
25
|
nkululeko/resample.py,sha256=rn3-M1A-iwVGibfQNGyeYNa7briD24lIN9Szq_1uTJo,5194
|
26
26
|
nkululeko/runmanager.py,sha256=AswmORVUkCIH0gTx6zEyufvFATQBS8C5TXo2erSNdVg,7611
|
27
27
|
nkululeko/scaler.py,sha256=7VOZ4sREMoQtahfETt9RyuR29Fb7PCwxlYVjBbdCVFc,4101
|
28
|
-
nkululeko/segment.py,sha256=
|
28
|
+
nkululeko/segment.py,sha256=7UrJEwdLmh9wDL5iBwpdJyJm9dwSxidHrHt-_D2qtxw,4949
|
29
29
|
nkululeko/syllable_nuclei.py,sha256=5w_naKxNxz66a_qLkraemi2fggM-gWesiiBPS47iFcE,9931
|
30
30
|
nkululeko/test.py,sha256=1w624vo5KTzmFC8BUStGlLDmIEAFuJUz7J0W-gp7AxI,1677
|
31
31
|
nkululeko/test_predictor.py,sha256=DEHE_D3A6m6KJTrpDKceA1n655t_UZV3WQd57K4a3Ho,2863
|
@@ -60,7 +60,7 @@ nkululeko/feat_extract/feats_auddim.py,sha256=CGLp_aYhudfwoU5522vjrvjPxfZcyw593A
|
|
60
60
|
nkululeko/feat_extract/feats_audmodel.py,sha256=OsZyB1rdcG0Fai2gAwBlbuubmWor1_-P4IDkZLqgPKE,3161
|
61
61
|
nkululeko/feat_extract/feats_clap.py,sha256=1tttpfm2SJmQgYm2u8eUVpDiDOpWdKqFChpY3ZZokNs,3395
|
62
62
|
nkululeko/feat_extract/feats_hubert.py,sha256=F3vrPCkx8EimJjFWYCZ7Yg9uo1G3NjYt4UKrGIUev8k,5172
|
63
|
-
nkululeko/feat_extract/feats_import.py,sha256=
|
63
|
+
nkululeko/feat_extract/feats_import.py,sha256=cPi4XRuRs71npB8YGXr7rYOvkeTU_oZEl3GrGncdiqY,2222
|
64
64
|
nkululeko/feat_extract/feats_mld.py,sha256=5aRoYiGDm5ApoFntxAMQYPjEelXHHRBHZcAJR9dxaeI,1945
|
65
65
|
nkululeko/feat_extract/feats_mos.py,sha256=3UXCKe86F49yHpZMQnLfDWXx9XdmlXHOy8efoa3WaOk,4138
|
66
66
|
nkululeko/feat_extract/feats_opensmile.py,sha256=BLj5sUaBPz7vLPfNlt9LdQurSypmViqgSpPK-6aXGhQ,4029
|
@@ -81,7 +81,7 @@ nkululeko/losses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
81
81
|
nkululeko/losses/loss_ccc.py,sha256=NOK0y0fxKUnU161B5geap6Fmn8QzoPl2MqtPiV8IuJE,976
|
82
82
|
nkululeko/losses/loss_softf1loss.py,sha256=5gW-PuiqeAZcRgfwjueIOQtMokOjZWgQnVIv59HKTCo,1309
|
83
83
|
nkululeko/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
|
-
nkululeko/models/model.py,sha256=
|
84
|
+
nkululeko/models/model.py,sha256=2STBD3jtLKeNSk7arCFJdaV6FL-nuLR1qpsjvZ4W-9A,12975
|
85
85
|
nkululeko/models/model_bayes.py,sha256=tQUXEsXoS6WnfapQjP78S_gxNBssTOqE78A2iG8SfLU,407
|
86
86
|
nkululeko/models/model_cnn.py,sha256=lu6ZSGqJBL69PdrgwwgzjGmu_DaBaiATkz6oVqQpKhc,10498
|
87
87
|
nkululeko/models/model_gmm.py,sha256=mhHFNtTzHuJvqYSA0h5YhvjA--KhnN6MTU_S0G3-d1c,1332
|
@@ -102,7 +102,7 @@ nkululeko/reporting/defines.py,sha256=0vh-Tlx4fAPpk1o6mP_4x3EkIoqzYMr38IZnj-JM5z
|
|
102
102
|
nkululeko/reporting/latex_writer.py,sha256=NGwSIfd4nfslDkNUOSZSdqY_VDLA8634thyhe-vj1bY,1824
|
103
103
|
nkululeko/reporting/report.py,sha256=bYN8B66gg3IWHAyfd6uIVjpYKy3rOI6aEwgfXU0LSAY,1006
|
104
104
|
nkululeko/reporting/report_item.py,sha256=AqKD40AlZpRuHLbggn5PkH6ctGJwh9rGNBNgOvgUODg,534
|
105
|
-
nkululeko/reporting/reporter.py,sha256=
|
105
|
+
nkululeko/reporting/reporter.py,sha256=CxRXXDfil5C7K0LyaGJZGFDUwfqxdd6Eun8QRTs-Ckk,20875
|
106
106
|
nkululeko/reporting/result.py,sha256=G63a2tHCwHhM6NBJgYzsWKWJm4Yu3r4hsCHA2Km7eHU,1073
|
107
107
|
nkululeko/segmenting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
108
108
|
nkululeko/segmenting/seg_inaspeechsegmenter.py,sha256=b3t0zdpJYofKWMyKRMtMMX91xeR-k8d5pbnNaQHcsOE,1902
|
@@ -112,9 +112,9 @@ nkululeko/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
112
112
|
nkululeko/utils/files.py,sha256=SrrYaU7AB80MZHiV1jcB0h_zigvYLYgSVNTXV4ao38g,4593
|
113
113
|
nkululeko/utils/stats.py,sha256=vCRzhCR0Gx5SiJyAGbj1TIto8ocGz58CM5Pr3LltagA,2948
|
114
114
|
nkululeko/utils/util.py,sha256=wFDslqxpCVDwi6LBakIFDDy1kYsxt5G7ykE38CocmtA,16880
|
115
|
-
nkululeko-0.93.
|
116
|
-
nkululeko-0.93.
|
117
|
-
nkululeko-0.93.
|
118
|
-
nkululeko-0.93.
|
119
|
-
nkululeko-0.93.
|
120
|
-
nkululeko-0.93.
|
115
|
+
nkululeko-0.93.11.dist-info/LICENSE,sha256=0zGP5B_W35yAcGfHPS18Q2B8UhvLRY3dQq1MhpsJU_U,1076
|
116
|
+
nkululeko-0.93.11.dist-info/METADATA,sha256=pMKMenPiE34afU4cUaCXCsi6wqi8OJH5YsHp9Q2pmos,42733
|
117
|
+
nkululeko-0.93.11.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
118
|
+
nkululeko-0.93.11.dist-info/entry_points.txt,sha256=lNTkFEdh6Kjo5o95ZAWf_0Lq-4ztGoAoMVSDuPtuyS0,442
|
119
|
+
nkululeko-0.93.11.dist-info/top_level.txt,sha256=DPFNNSHPjUeVKj44dVANAjuVGRCC3MusJ08lc2a8xFA,10
|
120
|
+
nkululeko-0.93.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|