Closed smilesun closed 6 years ago
@berndbischl answer requested.
this is not urgent, please fix ALL of the other stuff first
look at code of imputation.R by Michell which is using the strategy pattern
Work in progress
This is solved in the branch #2005
@berndbischl Currently in "TSfeatures.R" We are using the following function to convert a TimeseriesClassif Task into a normal task, the problem is we're passing a String called "method" as an argument which lets the user choose which method they want to use with the " switch" statement.
From my side, this is against the basic OO principle and create high dependencies. To get the inversion of control we could use dependency injection here. Let "convertTSTaskToNormalTask" to be an S3 method, and let method to be an Object that convert the task itself.
So parameter "method" becomes independent from other methods. We code difference "method" object to operate on the task. I would like to change the code like this:
The point to discuss is that maybe we could just pass the mpars into mmethod = newFourier(mpars), which is more compact?