in reply to plotting roc curve using roc package

($a,$b)=split/,/; push @AoA, [ split ];

is bogus. It should probably be:

chomp; push @AoA, [split /,/];

In addition, shouldn't you have at least one x, 0 value? Looks to me like the module doesn't handle cases where all truth values are the same.

Premature optimization is the root of all job security

Replies are listed 'Best First'.
Re^2: plotting roc curve using roc package
by Athanasius (Archbishop) on Aug 02, 2015 at 08:26 UTC

    Hello GrandFather,

    chomp; push @AoA, [split /,/];

    This will work only if there is no more than one pair of values on each line of input data (which, from the OP, I’m guessing is not the case). Otherwise, @AoA will end up like this:

    [ 0.9883817, "1 0.770431568", "1 0.983195895", "1 0.812109932", "1 0.901505931", "1 0.72431528", "1 0.73553418", "1 0.724572657", 1, ]

    :-(

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

      I cheated wearing my Janitor hat and looked at the raw text for the OP's node - the data is one pair per line as implied by the OP's code, but without code tags gets flattened into a single line inside p tags.

      Premature optimization is the root of all job security

        GrandFather:

        As I'm not a janitor, I frequently just use the browser's view|source to see what the OP puts in a node. Perhaps it's not generally known that much (not all!) of the original formatting from the poster is visible that way...

        ...roboticus

        When your only tool is a hammer, all problems look like your thumb.