Passing An Extra Argument To Genericunivariateselect Without Scope Tricks
EDIT: here is the complete traceback if I apply the make_scorer workaround suggested in the answers... `File '________python/anaconda-2.7.11-64/lib/python2.7/site-packages/spyder/u
Solution 1:
You can simply pass the extra arguement while calling the make_scorer() function.
For example, you check this link. In the example it makes use of fbeta_score.
Now fbeta requires an additional parameter, beta
which is set while calling the make_scorer() function like this :
ftwo_scorer = make_scorer(fbeta_score, beta=2)
So in your case, this should work:
defCustom_Score(X,Y,XX):
# do stuffreturn my_score
my_scorer = make_scorer(Custom_Score,XX=_XX)
Post a Comment for "Passing An Extra Argument To Genericunivariateselect Without Scope Tricks"