Skip to content

Commit

Permalink
add null check before ROCplot function call
Browse files Browse the repository at this point in the history
should not be after (loads axes but no plot other wise...)
  • Loading branch information
Spencer Aiello committed Feb 11, 2014
1 parent 5c28df1 commit fa87f8c
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 10 deletions.
16 changes: 16 additions & 0 deletions experiments/src/main/main.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="target1" level="project" />
<orderEntry type="library" name="h2o" level="project" />
<orderEntry type="module" module-name="test1" />
<orderEntry type="module" module-name="main2" />
</component>
</module>

21 changes: 21 additions & 0 deletions h2o-samples/src/main/main3.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="junit-4.11" level="project" />
<orderEntry type="library" name="junit" level="project" />
<orderEntry type="library" name="gson" level="project" />
<orderEntry type="library" name="target1" level="project" />
<orderEntry type="library" name="jets3t" level="project" />
<orderEntry type="library" name="h2o" level="project" />
<orderEntry type="module" module-name="main" />
<orderEntry type="module" module-name="test1" />
<orderEntry type="module" module-name="main2" />
</component>
</module>

16 changes: 16 additions & 0 deletions h2o-scala/src/main/main4.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="target1" level="project" />
<orderEntry type="library" name="h2o" level="project" />
<orderEntry type="module" module-name="test1" />
<orderEntry type="module" module-name="main2" />
</component>
</module>

28 changes: 28 additions & 0 deletions hadoop/src/main/main1.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="mapr3.0.1" level="project" />
<orderEntry type="library" name="0.23.4" level="project" />
<orderEntry type="library" name="cdh3" level="project" />
<orderEntry type="library" name="target1" level="project" />
<orderEntry type="library" name="hadoop-core-1.2.0.1.3.2.0-111" level="project" />
<orderEntry type="library" name="0.20.2mapr" level="project" />
<orderEntry type="library" name="hdp2.0.6" level="project" />
<orderEntry type="library" name="hadoop-mapreduce-client-core-2.0.0-cdh4.3.0" level="project" />
<orderEntry type="library" name="hadoop-core-1.0.0" level="project" />
<orderEntry type="library" name="hadoop-0.20.2-core" level="project" />
<orderEntry type="library" name="cdh4" level="project" />
<orderEntry type="library" name="mapr2.1.3" level="project" />
<orderEntry type="library" name="h2o" level="project" />
<orderEntry type="library" name="hadoop-common-2.0.0-cdh4.3.0" level="project" />
<orderEntry type="module" module-name="test1" />
<orderEntry type="module" module-name="main2" />
</component>
</module>

12 changes: 12 additions & 0 deletions launcher/launcher.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

16 changes: 16 additions & 0 deletions src/embedded/embedded.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="target1" level="project" />
<orderEntry type="library" name="h2o" level="project" />
<orderEntry type="module" module-name="test1" />
<orderEntry type="module" module-name="main2" />
</component>
</module>

19 changes: 9 additions & 10 deletions src/main/java/water/api/GLMProgressPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ static void validationHTML(GLMModel m, GLMValidation val, StringBuilder sb){
R.replace("CM",R2);
}
sb.append(R);
ROCplot(val, sb);
if (val._cm != null && val._fprs != null && val._tprs != null)
ROCplot(val, sb);
confusionHTML(val.bestCM(),sb);
if(val.fold() > 1){
int nclasses = 2;
Expand Down Expand Up @@ -400,16 +401,14 @@ public static void ROCplot(GLMValidation xval, StringBuilder sb ) {
);
sb.append("var dataset = [");

if(xval != null && xval._cm != null && xval._fprs != null && xval._tprs != null) {
for(int c = 0; c < xval._cm.length; c++) {
if (c == 0) {
sb.append("["+String.valueOf(xval._fprs[c])+",").append(String.valueOf(xval._tprs[c])).append("]");
}
sb.append(", ["+String.valueOf(xval._fprs[c])+",").append(String.valueOf(xval._tprs[c])).append("]");
}
for(int c = 0; c < 2*xval._cm.length; c++) {
sb.append(", ["+String.valueOf(c/(2.0*xval._cm.length))+",").append(String.valueOf(c/(2.0*xval._cm.length))).append("]");
for(int c = 0; c < xval._cm.length; c++) {
if (c == 0) {
sb.append("["+String.valueOf(xval._fprs[c])+",").append(String.valueOf(xval._tprs[c])).append("]");
}
sb.append(", ["+String.valueOf(xval._fprs[c])+",").append(String.valueOf(xval._tprs[c])).append("]");
}
for(int c = 0; c < 2*xval._cm.length; c++) {
sb.append(", ["+String.valueOf(c/(2.0*xval._cm.length))+",").append(String.valueOf(c/(2.0*xval._cm.length))).append("]");
}
sb.append("];\n");

Expand Down
34 changes: 34 additions & 0 deletions src/main/main2.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="mapr3.0.1" level="project" />
<orderEntry type="library" name="poi" level="project" />
<orderEntry type="library" name="Jama" level="project" />
<orderEntry type="library" name="target1" level="project" />
<orderEntry type="library" name="0.23.4" level="project" />
<orderEntry type="library" name="cdh3" level="project" />
<orderEntry type="library" name="log4j" level="project" />
<orderEntry type="library" name="hadoop-core-1.2.0.1.3.2.0-111" level="project" />
<orderEntry type="library" name="jets3t" level="project" />
<orderEntry type="library" name="0.20.2mapr" level="project" />
<orderEntry type="library" name="hdp2.0.6" level="project" />
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="library" name="hadoop-core-1.0.0" level="project" />
<orderEntry type="library" name="s3" level="project" />
<orderEntry type="library" name="hadoop-0.20.2-core" level="project" />
<orderEntry type="library" name="cdh4" level="project" />
<orderEntry type="library" name="gson" level="project" />
<orderEntry type="library" name="apache" level="project" />
<orderEntry type="library" name="jogamp" level="project" />
<orderEntry type="library" name="mapr2.1.3" level="project" />
<orderEntry type="library" name="hadoop-common-2.0.0-cdh4.3.0" level="project" />
<orderEntry type="library" name="h2o" level="project" />
</component>
</module>

21 changes: 21 additions & 0 deletions src/test/test1.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="junit-4.11" level="project" />
<orderEntry type="library" name="junit" level="project" />
<orderEntry type="library" name="gson" level="project" />
<orderEntry type="library" name="Jama" level="project" />
<orderEntry type="library" name="target1" level="project" />
<orderEntry type="library" name="jets3t" level="project" />
<orderEntry type="library" name="apache" level="project" />
<orderEntry type="library" name="h2o" level="project" />
<orderEntry type="module" module-name="main2" />
</component>
</module>

0 comments on commit fa87f8c

Please sign in to comment.