Class SparkMLEncoderBatch

  • All Implemented Interfaces:
    AutoCloseable, org.jpmml.evaluator.testing.Batch

    public abstract class SparkMLEncoderBatch
    extends org.jpmml.converter.testing.ModelEncoderBatch
    • Constructor Detail

      • SparkMLEncoderBatch

        public SparkMLEncoderBatch​(String algorithm,
                                   String dataset,
                                   Predicate<org.jpmml.evaluator.ResultField> columnFilter,
                                   com.google.common.base.Equivalence<Object> equivalence)
    • Method Detail

      • getArchiveBatchTest

        public abstract SparkMLEncoderBatchTest getArchiveBatchTest()
        Specified by:
        getArchiveBatchTest in class org.jpmml.converter.testing.ModelEncoderBatch
      • getOptionsMatrix

        public List<Map<String,​Object>> getOptionsMatrix()
        Overrides:
        getOptionsMatrix in class org.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:
        getPMML in class org.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