Package org.jpmml.sparkml.testing
Class SparkMLEncoderBatch
- java.lang.Object
-
- org.jpmml.evaluator.testing.ArchiveBatch
-
- org.jpmml.converter.testing.ModelEncoderBatch
-
- org.jpmml.sparkml.testing.SparkMLEncoderBatch
-
- All Implemented Interfaces:
AutoCloseable,org.jpmml.evaluator.testing.Batch
public abstract class SparkMLEncoderBatch extends org.jpmml.converter.testing.ModelEncoderBatch
-
-
Constructor Summary
Constructors Constructor Description SparkMLEncoderBatch(String algorithm, String dataset, Predicate<org.jpmml.evaluator.ResultField> columnFilter, com.google.common.base.Equivalence<Object> equivalence)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract SparkMLEncoderBatchTestgetArchiveBatchTest()List<Map<String,Object>>getOptionsMatrix()StringgetPipelineModelZipPath()org.dmg.pmml.PMMLgetPMML()StringgetSchemaJsonPath()org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>getVerificationDataset(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> inputDataset)protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>loadInput(org.apache.spark.sql.SparkSession sparkSession, List<File> tmpResources)protected org.apache.spark.ml.PipelineModelloadPipelineModel(org.apache.spark.sql.SparkSession sparkSession, List<File> tmpResources)protected org.apache.spark.sql.types.StructTypeloadSchema(org.apache.spark.sql.SparkSession sparkSession, List<File> tmpResources)protected static FiletoTmpFile(InputStream is, String prefix, String suffix)protected org.apache.spark.sql.types.StructTypeupdateSchema(org.apache.spark.sql.types.StructType schema, org.apache.spark.ml.PipelineModel pipelineModel)-
Methods inherited from class org.jpmml.converter.testing.ModelEncoderBatch
getEvaluator, getEvaluatorBuilder, getOptions, getValidators, open, setOptions, truncate, validatePMML
-
-
-
-
Method Detail
-
getArchiveBatchTest
public abstract SparkMLEncoderBatchTest getArchiveBatchTest()
- Specified by:
getArchiveBatchTestin classorg.jpmml.converter.testing.ModelEncoderBatch
-
getOptionsMatrix
public List<Map<String,Object>> getOptionsMatrix()
- Overrides:
getOptionsMatrixin classorg.jpmml.converter.testing.ModelEncoderBatch
-
getPipelineModelZipPath
public String getPipelineModelZipPath()
-
getSchemaJsonPath
public String getSchemaJsonPath()
-
getVerificationDataset
public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getVerificationDataset(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> inputDataset)
-
getPMML
public org.dmg.pmml.PMML getPMML() throws Exception- Specified by:
getPMMLin classorg.jpmml.converter.testing.ModelEncoderBatch- Throws:
Exception
-
loadSchema
protected org.apache.spark.sql.types.StructType loadSchema(org.apache.spark.sql.SparkSession sparkSession, List<File> tmpResources) throws IOException- Throws:
IOException
-
loadPipelineModel
protected org.apache.spark.ml.PipelineModel loadPipelineModel(org.apache.spark.sql.SparkSession sparkSession, List<File> tmpResources) throws IOException- Throws:
IOException
-
updateSchema
protected org.apache.spark.sql.types.StructType updateSchema(org.apache.spark.sql.types.StructType schema, org.apache.spark.ml.PipelineModel pipelineModel)
-
loadInput
protected org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> loadInput(org.apache.spark.sql.SparkSession sparkSession, List<File> tmpResources) throws IOException- Throws:
IOException
-
toTmpFile
protected static File toTmpFile(InputStream is, String prefix, String suffix) throws IOException
- Throws:
IOException
-
-