Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
16d6ce1
Start implementing MRIQC adapted for audio
ibevers Jan 31, 2025
0791b20
Add RFC
ibevers Jan 31, 2025
ac19c68
Start audioqc train module
ibevers Jan 31, 2025
ec933f0
Add skeleton train code
ibevers Jan 31, 2025
e9e2c1b
Add site_wise_normalization to train
ibevers Jan 31, 2025
e6faeb8
Add preprocessing functions
ibevers Jan 31, 2025
5dab9c4
Add grid_search_cross_val
ibevers Jan 31, 2025
aa84441
add inner loop
ibevers Jan 31, 2025
e3a42b3
outer_loop
ibevers Jan 31, 2025
5618246
Merge pull request #118 from sensein/117-audioqc-training-iteration-one
ibevers Jan 31, 2025
66bacd0
Fix training loop
ibevers Feb 7, 2025
8e82f8a
Add minimum number of features to keep in elimination
ibevers Feb 7, 2025
d7f1276
Update winnow function with min features to keep
ibevers Feb 7, 2025
9525a92
Add all preprocessing permutations
ibevers Feb 7, 2025
56e6c34
Replace prints with log statements
ibevers Feb 7, 2025
a7104d8
Update to calculate inner loop performance on test_df
ibevers Feb 7, 2025
45036b0
Correct model selection from inner fold
ibevers Feb 7, 2025
0b4ca1f
Eliminate redundant calls to preprocess_data
ibevers Feb 7, 2025
0b92e33
Update to return training params
ibevers Feb 7, 2025
6c2b006
Add final model training at the end on all data
ibevers Feb 7, 2025
a641903
Store preprocessing steps
ibevers Feb 7, 2025
105a564
Apply best preprocessing steps to final model
ibevers Feb 7, 2025
282e19e
Apply final model preprocessing in correct order
ibevers Feb 7, 2025
c26a085
Refactor final model training into separate function
ibevers Feb 7, 2025
8e3a804
Make grid searches more comprehensive
ibevers Feb 7, 2025
070812b
Update return format of training functions
ibevers Feb 7, 2025
c96cf1d
Add debug mode and update preprocess_data
ibevers Feb 7, 2025
f34f383
Refactor preprocessing
ibevers Feb 7, 2025
cbe33f7
Add train debug parameter grid for svm_train
ibevers Feb 7, 2025
7d556be
Fix preprocessing order issue and add sample model
ibevers Feb 8, 2025
9753d7e
Merge pull request #123 from sensein/122-train-sample-model
ibevers Feb 8, 2025
adbda4c
Add saving functions
ibevers Feb 13, 2025
6600175
Integrate saving functionality into training code
ibevers Feb 14, 2025
e8f9de5
Add training_metadata saving
ibevers Feb 14, 2025
78835e5
Add hyperparameter saving
ibevers Feb 14, 2025
bb001c9
Ensure inner_loop dir saved under site
ibevers Feb 14, 2025
9c70f89
Add selected_features saving
ibevers Feb 14, 2025
30818b1
Fix issue with selected_features column filtering
ibevers Feb 14, 2025
1178b4d
Fix dropped columns and inconsistent preprocessing on site train
ibevers Feb 17, 2025
11e65c4
Make runnable on command line
ibevers Feb 17, 2025
e0ffa63
Update import and training function name
ibevers Feb 17, 2025
9b4aa5c
Update commands to run train qc temporarily
ibevers Feb 17, 2025
29e9772
Parallelize inner_loop calls with joblib
ibevers Feb 17, 2025
7c41767
Remove tqdm from parallelized loop
ibevers Feb 18, 2025
c65e651
Add example model training output
ibevers Feb 18, 2025
0c3b4c1
Drop non-numeric columns
ibevers Feb 19, 2025
0393a3d
Replace inf with NaNs
ibevers Feb 19, 2025
45a7994
Move inf replace with nan
ibevers Feb 19, 2025
5cced9d
Refactor missing value imputation
ibevers Feb 20, 2025
ddddf4f
Update impute and fix bugs
ibevers Feb 20, 2025
6eeafb3
Change how column names are selected to exclude transcriptions
ibevers Feb 20, 2025
80e02cc
Add logging for NaNs
ibevers Feb 20, 2025
a428932
Add impute before site predictability elimination
ibevers Feb 20, 2025
63b48a9
Add impute before winnow
ibevers Feb 21, 2025
bdcfe36
Update grid search parameters to increase training speed
ibevers Feb 21, 2025
4234504
Move audioqc training results out of src
ibevers Feb 21, 2025
bbabb67
Merge pull request #126 from sensein/125-add-comprehensive-audioqc-tr…
ibevers Feb 21, 2025
0bbd2ce
Merge branch 'main' into 119-audioqc-training
ibevers Feb 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
823 changes: 823 additions & 0 deletions docs/audioqc.ipynb

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"best_preprocessing_steps": [
[
"eliminate",
"normalize"
],
"scale"
],
"best_model_score": 0.55,
"model_type": "SVC",
"hyperparameters": {
"C": 1,
"break_ties": false,
"cache_size": 200,
"class_weight": null,
"coef0": 0.0,
"decision_function_shape": "ovr",
"degree": 3,
"gamma": "scale",
"kernel": "linear",
"max_iter": -1,
"probability": false,
"random_state": null,
"shrinking": true,
"tol": 0.001,
"verbose": false
},
"selected_features": [
"F0semitoneFrom27.5Hz_sma3nz_stddevNorm",
"F0semitoneFrom27.5Hz_sma3nz_stddevRisingSlope",
"F0semitoneFrom27.5Hz_sma3nz_meanFallingSlope",
"shimmerLocaldB_sma3nz_amean",
"shimmerLocaldB_sma3nz_stddevNorm",
"F1frequency_sma3nz_stddevNorm",
"F1bandwidth_sma3nz_stddevNorm",
"F1amplitudeLogRelF0_sma3nz_amean",
"F1amplitudeLogRelF0_sma3nz_stddevNorm",
"F2frequency_sma3nz_amean",
"F2frequency_sma3nz_stddevNorm",
"F2bandwidth_sma3nz_stddevNorm",
"F2amplitudeLogRelF0_sma3nz_amean",
"F2amplitudeLogRelF0_sma3nz_stddevNorm",
"F3amplitudeLogRelF0_sma3nz_amean",
"F3amplitudeLogRelF0_sma3nz_stddevNorm",
"hammarbergIndexV_sma3nz_stddevNorm",
"slopeV500-1500_sma3nz_stddevNorm",
"mfcc1V_sma3nz_stddevNorm",
"MeanVoicedSegmentLengthSec",
"StddevUnvoicedSegmentLength",
"duration",
"speaking_rate",
"articulation_rate",
"phonation_ratio",
"pause_rate",
"mean_pause_duration",
"mean_f0_hertz",
"std_f0_hertz",
"mean_intensity_db",
"std_intensity_db",
"range_ratio_intensity_db",
"mean_hnr_db",
"std_hnr_db",
"spectral_slope",
"spectral_tilt",
"cepstral_peak_prominence_mean",
"cepstral_peak_prominence_std",
"mean_f1_loc",
"std_f1_loc",
"mean_b1_loc",
"std_b1_loc",
"mean_f2_loc",
"std_f2_loc",
"mean_b2_loc",
"std_b2_loc",
"spectral_gravity",
"spectral_std_dev",
"spectral_skewness",
"spectral_kurtosis",
"local_jitter",
"localabsolute_jitter",
"rap_jitter",
"ppq5_jitter",
"ddp_jitter",
"local_shimmer",
"localDB_shimmer",
"apq3_shimmer",
"apq5_shimmer",
"apq11_shimmer",
"dda_shimmer",
"stoi",
"pesq",
"si_sdr"
]
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"preprocessing_steps": [
"eliminate"
],
"mode": null,
"cv_score": 0.3,
"model_type": "RandomForestClassifier",
"hyperparameters": {
"bootstrap": true,
"ccp_alpha": 0.0,
"class_weight": null,
"criterion": "gini",
"max_depth": 5,
"max_features": "sqrt",
"max_leaf_nodes": null,
"max_samples": null,
"min_impurity_decrease": 0.0,
"min_samples_leaf": 1,
"min_samples_split": 2,
"min_weight_fraction_leaf": 0.0,
"monotonic_cst": null,
"n_estimators": 10,
"n_jobs": null,
"oob_score": false,
"random_state": 42,
"verbose": 0,
"warm_start": false
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"preprocessing_steps": [
"eliminate"
],
"mode": null,
"cv_score": 0.475,
"model_type": "SVC",
"hyperparameters": {
"C": 1,
"break_ties": false,
"cache_size": 200,
"class_weight": null,
"coef0": 0.0,
"decision_function_shape": "ovr",
"degree": 3,
"gamma": "scale",
"kernel": "linear",
"max_iter": -1,
"probability": false,
"random_state": null,
"shrinking": true,
"tol": 0.001,
"verbose": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
"F0semitoneFrom27.5Hz_sma3nz_stddevNorm",
"F0semitoneFrom27.5Hz_sma3nz_percentile50.0",
"F0semitoneFrom27.5Hz_sma3nz_stddevRisingSlope",
"F0semitoneFrom27.5Hz_sma3nz_stddevFallingSlope",
"shimmerLocaldB_sma3nz_amean",
"HNRdBACF_sma3nz_amean",
"HNRdBACF_sma3nz_stddevNorm",
"F1frequency_sma3nz_stddevNorm",
"F1bandwidth_sma3nz_stddevNorm",
"F1amplitudeLogRelF0_sma3nz_amean",
"F1amplitudeLogRelF0_sma3nz_stddevNorm",
"F2amplitudeLogRelF0_sma3nz_amean",
"F2amplitudeLogRelF0_sma3nz_stddevNorm",
"F3amplitudeLogRelF0_sma3nz_amean",
"F3amplitudeLogRelF0_sma3nz_stddevNorm",
"hammarbergIndexV_sma3nz_stddevNorm",
"slopeV500-1500_sma3nz_stddevNorm",
"mfcc1V_sma3nz_stddevNorm",
"MeanVoicedSegmentLengthSec",
"StddevVoicedSegmentLengthSec",
"StddevUnvoicedSegmentLength",
"duration",
"speaking_rate",
"articulation_rate",
"phonation_ratio",
"pause_rate",
"mean_pause_duration",
"mean_f0_hertz",
"std_f0_hertz",
"mean_intensity_db",
"std_intensity_db",
"range_ratio_intensity_db",
"mean_hnr_db",
"std_hnr_db",
"spectral_slope",
"spectral_tilt",
"cepstral_peak_prominence_mean",
"cepstral_peak_prominence_std",
"mean_f1_loc",
"std_f1_loc",
"mean_b1_loc",
"std_b1_loc",
"mean_f2_loc",
"std_f2_loc",
"mean_b2_loc",
"std_b2_loc",
"spectral_gravity",
"spectral_std_dev",
"spectral_skewness",
"spectral_kurtosis",
"local_jitter",
"localabsolute_jitter",
"rap_jitter",
"ppq5_jitter",
"ddp_jitter",
"local_shimmer",
"localDB_shimmer",
"apq3_shimmer",
"apq5_shimmer",
"apq11_shimmer",
"dda_shimmer",
"stoi",
"pesq",
"si_sdr"
]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"preprocessing_steps": [
"eliminate",
"normalize"
],
"mode": "both",
"cv_score": 0.35,
"model_type": "RandomForestClassifier",
"hyperparameters": {
"bootstrap": true,
"ccp_alpha": 0.0,
"class_weight": null,
"criterion": "gini",
"max_depth": 5,
"max_features": "sqrt",
"max_leaf_nodes": null,
"max_samples": null,
"min_impurity_decrease": 0.0,
"min_samples_leaf": 1,
"min_samples_split": 2,
"min_weight_fraction_leaf": 0.0,
"monotonic_cst": null,
"n_estimators": 10,
"n_jobs": null,
"oob_score": false,
"random_state": 42,
"verbose": 0,
"warm_start": false
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"preprocessing_steps": [
"eliminate",
"normalize"
],
"mode": "both",
"cv_score": 0.475,
"model_type": "SVC",
"hyperparameters": {
"C": 1,
"break_ties": false,
"cache_size": 200,
"class_weight": null,
"coef0": 0.0,
"decision_function_shape": "ovr",
"degree": 3,
"gamma": "scale",
"kernel": "linear",
"max_iter": -1,
"probability": false,
"random_state": null,
"shrinking": true,
"tol": 0.001,
"verbose": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
"F0semitoneFrom27.5Hz_sma3nz_stddevNorm",
"F0semitoneFrom27.5Hz_sma3nz_pctlrange0-2",
"F0semitoneFrom27.5Hz_sma3nz_meanRisingSlope",
"F0semitoneFrom27.5Hz_sma3nz_stddevRisingSlope",
"F0semitoneFrom27.5Hz_sma3nz_stddevFallingSlope",
"logRelF0-H1-H2_sma3nz_amean",
"F1amplitudeLogRelF0_sma3nz_stddevNorm",
"F2amplitudeLogRelF0_sma3nz_stddevNorm",
"F3amplitudeLogRelF0_sma3nz_stddevNorm",
"alphaRatioV_sma3nz_stddevNorm",
"slopeV0-500_sma3nz_amean",
"slopeV500-1500_sma3nz_amean",
"slopeV500-1500_sma3nz_stddevNorm",
"mfcc1V_sma3nz_stddevNorm",
"mfcc3V_sma3nz_amean",
"mfcc3V_sma3nz_stddevNorm",
"mfcc4V_sma3nz_amean",
"mfcc4V_sma3nz_stddevNorm",
"VoicedSegmentsPerSec",
"StddevVoicedSegmentLengthSec",
"StddevUnvoicedSegmentLength",
"duration",
"speaking_rate",
"articulation_rate",
"phonation_ratio",
"pause_rate",
"mean_pause_duration",
"mean_f0_hertz",
"std_f0_hertz",
"mean_intensity_db",
"std_intensity_db",
"range_ratio_intensity_db",
"mean_hnr_db",
"std_hnr_db",
"spectral_slope",
"spectral_tilt",
"cepstral_peak_prominence_mean",
"cepstral_peak_prominence_std",
"mean_f1_loc",
"std_f1_loc",
"mean_b1_loc",
"std_b1_loc",
"mean_f2_loc",
"std_f2_loc",
"mean_b2_loc",
"std_b2_loc",
"spectral_gravity",
"spectral_std_dev",
"spectral_skewness",
"spectral_kurtosis",
"local_jitter",
"localabsolute_jitter",
"rap_jitter",
"ppq5_jitter",
"ddp_jitter",
"local_shimmer",
"localDB_shimmer",
"apq3_shimmer",
"apq5_shimmer",
"apq11_shimmer",
"dda_shimmer",
"stoi",
"pesq",
"si_sdr"
]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"preprocessing_steps": [
"eliminate",
"normalize",
"winnow"
],
"mode": "both",
"cv_score": 0.475,
"model_type": "RandomForestClassifier",
"hyperparameters": {
"bootstrap": true,
"ccp_alpha": 0.0,
"class_weight": null,
"criterion": "gini",
"max_depth": 5,
"max_features": "sqrt",
"max_leaf_nodes": null,
"max_samples": null,
"min_impurity_decrease": 0.0,
"min_samples_leaf": 1,
"min_samples_split": 2,
"min_weight_fraction_leaf": 0.0,
"monotonic_cst": null,
"n_estimators": 10,
"n_jobs": null,
"oob_score": false,
"random_state": 42,
"verbose": 0,
"warm_start": false
}
}
Binary file not shown.
Loading