http://www.perlmonks.org?node_id=1137154


in reply to plotting roc curve using roc package

Hi Numita,

This code is untested because I have never used Statistics::ROC but hopefully helps.

#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Statistics::ROC; open(my $fh, "<roc_tp_fp.txt") or die "cannot open file 'roc_tp_fp.txt +': $!\n"; my @AoA; while ( <$fh> ) { chomp; push @AoA, [ split /,/ ]; } close $fh; print Dumper( \@AoA ) . "\n"; my @curves = roc('decrease', 0.95, @AoA); print Dumper( \@curves ) . "\n";