Greetings scikit-learn-general,

Long time fan of scikit-learn, but my first post on this list. Appreciate
any insight or guidance you can share.

I'm trying to implement my own scoring function for cross_val_score using
the make_scorer factory function. The evaluation I'm trying to build is for
a normalized weighted gini, which requires a "weights" array passed in to
calculate the relative weight of each row.

The function works fine when called manually with (y_true, y_pred), but
raises an AssertionError when called as a parameter on
cross_val_score(scoring=gini_function)... I think the error might be due to
the weights array being its original size, while the (y_true, y_pred)
arrays might be reduced sizes for cross-validation folds.

Here's my code and the stack trace:

   - https://dpaste.de/Zk6n

Appreciate any suggestions,
-Michael
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to