Move default parameters to config file
Set the default parameters in a config.py file (e.g., avoid this 0.5 here). An example of configuration in msaf.
@urinieto what other defaults did you see besides the 0.5 that you think need to be abstracted out?
Ideally, any default parameter (like this, this, or this). But I understand how tedious this can become. You may know better than anyone which parameters are the most important ones to play around with melody extraction.
The parameters you mention aren't so important for melody extraction. (For ex. the overlap threshold has almost no effect).
If I understand right though, the larger issue you're trying to solve in the example from msaf is the issue of setting parameters for an algorithm like I do manually here, where an experiment might use different settings and compare them for example. I looked through what you do in msaf and I don't totally understand why all of the configs are necessary. What do think it improved over using parameters with a default value?
For now, I think I'll do the the scikit-learn approach, and set the parameters in the init.