Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests for BigML pmml models #112

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions pmml-bigml/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jpmml</groupId>
<artifactId>jpmml-evaluator</artifactId>
<version>1.4-SNAPSHOT</version>
</parent>

<groupId>org.jpmml</groupId>
<artifactId>pmml-bigml</artifactId>
<packaging>jar</packaging>

<name>JPMML BigML integration tests</name>
<description>JPMML BigML integration tests</description>

<licenses>
<license>
<name>GNU Affero General Public License (AGPL) version 3.0</name>
<url>http://www.gnu.org/licenses/agpl-3.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>

<dependencies>
<dependency>
<groupId>org.jpmml</groupId>
<artifactId>pmml-evaluator-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
41 changes: 41 additions & 0 deletions pmml-bigml/src/test/java/org/jpmml/bigml/ClassificationTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2013 Villu Ruusmann
*
* This file is part of JPMML-Evaluator
*
* JPMML-Evaluator is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* JPMML-Evaluator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with JPMML-Evaluator. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jpmml.bigml;

import org.jpmml.evaluator.IntegrationTest;
import org.jpmml.evaluator.PMMLEquivalence;
import org.junit.Test;

public class ClassificationTest extends IntegrationTest {

public ClassificationTest(){
super(new PMMLEquivalence(1e-13, 1e-13));
}

@Test
public void evaluateDecisionTreeIris() throws Exception {
evaluate("Model", "Iris");
}

@Test
public void evaluateDecisionTreeAudit() throws Exception {
evaluate("Model", "Audit");
}

}
36 changes: 36 additions & 0 deletions pmml-bigml/src/test/java/org/jpmml/bigml/ClusteringTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2013 Villu Ruusmann
*
* This file is part of JPMML-Evaluator
*
* JPMML-Evaluator is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* JPMML-Evaluator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with JPMML-Evaluator. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jpmml.bigml;

import org.jpmml.evaluator.IntegrationTest;
import org.jpmml.evaluator.PMMLEquivalence;
import org.junit.Test;

public class ClusteringTest extends IntegrationTest {

public ClusteringTest(){
super(new PMMLEquivalence(1e-13, 1e-13));
}

@Test
public void evaluateClusteringDiabetes() throws Exception {
evaluate("Cluster", "Diabetes");
}

}
35 changes: 35 additions & 0 deletions pmml-bigml/src/test/java/org/jpmml/bigml/RegressionTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2013 Villu Ruusmann
*
* This file is part of JPMML-Evaluator
*
* JPMML-Evaluator is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* JPMML-Evaluator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with JPMML-Evaluator. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jpmml.bigml;

import org.jpmml.evaluator.IntegrationTest;
import org.jpmml.evaluator.PMMLEquivalence;
import org.junit.Test;

public class RegressionTest extends IntegrationTest {

public RegressionTest(){
super(new PMMLEquivalence(1e-13, 1e-13));
}

@Test
public void evaluateRegressionGrades() throws Exception {
evaluate("Model", "Grades");
}
}
Loading