MannLabs / alphadia

modular & open DIA search
https://alphadia.readthedocs.io
Apache License 2.0
41 stars 3 forks source link

Selecting classifier version #282

Closed odespard closed 1 month ago

odespard commented 2 months ago

I have added an instance variable, FDRManager.current_version, which increments at each call of the FDRManager.fit_predict() method and is included in the hash assigned to the classifier when saved. I have also added a version parameter to the FDRManager.fit_predict() method which allows the selection of which version of the classifier to use, and another method, FDRManager.get_current_version(), to get the current version.

Note that at present the new FDRManager changes the workflow, as the base classifier will be used repeatedly with this code (as opposed to the classifier being iteratively updated with each run as before). This could be changed by making the default argument for the version parameter None and including a statement along the lines of if version is None then version = self.current_version in the method, but I thought it worthwhile discuss this before adding it.