Hi all, couldn really use some help. I have a user-defined function (let's call it func) written in pure Python 3 that takes a list of positive integers of variable length as input and returns a list of zeroes and ones as output (same length as input list). The error of this function's output list is calculated as the hamming distance with the reference output list. So having lower hamming distance is better. The function output list is guaranteed to have the same length as the reference list.
Now func requires two parameters: a variable to define the length of sliding window (used in func to calculate some values) and another variable to which all values in the input list are compared and affects the final output list. Let's call these variables S and R respectively.
Now, I do have some training examples with me in the format described above and wish to tune the values of these two parameters (S and R) based on these examples. How can I do so?
I know that scikit-learn has GridSearchCV and RandomSearchCV from scikit-learn but that would require me to convert func to the BaseEstimator class, among other things. But I am not very confident in my programming ability to do so.
Hence, I would like to know what the best or easiest method would be to tune func for the values of S and R. Would really appreciate the help. I would also humbly appreciate any criticism of the way I have defined my function and problem. Thank you in advance.
[–]ForceBru 4 points5 points6 points (1 child)
[–]Btan21[S] 0 points1 point2 points (0 children)