Skip to content

Commit

Permalink
Removing non-numerical points.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Apr 26, 2018
1 parent ed9a05e commit 2a8e947
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ROCFunctions.m
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ computes ROC associations (for ROCPlot)."
xFuncName_String, yFuncName_String,
parValsArg : (Automatic | {_?NumericQ..}),
aROCs : {_?ROCAssociationQ..}, opts : OptionsPattern[]] :=
Block[{xFunc, yFunc, psize, rocc, pt, pc, pj, rocpcf, points, parVals=parValsArg},
Block[{xFunc, yFunc, psize, rocc, pt, pc, pj, rocpcf, points, parVals=parValsArg, pred},

psize = OptionValue["ROCPointSize"];
rocc = OptionValue["ROCColor"];
Expand All @@ -382,6 +382,10 @@ computes ROC associations (for ROCPlot)."
Return[$Failed]
];

pred = Map[VectorQ[#,NumericQ]&, points ];
points = Pick[points, pred];
parVals = Pick[parVals, pred];

Graphics[{
If[pj, {Lighter[rocc],Line[points]},{}],

Expand Down Expand Up @@ -413,7 +417,7 @@ computes ROC associations (for ROCPlot)."

If[ pc,
MapThread[
Text[#2, Through[{xFunc,yFunc}[#1]], {-1, 2}] &, {aROCs, parVals}],
Text[#2, #1, {-1, 2}] &, {points, parVals}],
{}
]},

Expand Down

0 comments on commit 2a8e947

Please sign in to comment.