Class MySQLDatasetMapper

    • Constructor Summary

      Constructors 
      Constructor Description
      MySQLDatasetMapper​(ai.libs.jaicore.db.IDatabaseAdapter adapter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema convertInstanceSchemaIntoLabeledInstanceSchema​(org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema schema, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery)  
      org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaFromResultList​(java.util.List<org.api4.java.datastructure.kvstore.IKVStore> data)  
      org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaFromResultList​(java.util.List<org.api4.java.datastructure.kvstore.IKVStore> data, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName)  
      org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery)  
      org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromTable​(java.lang.String tableName)  
      org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromTable​(java.lang.String tableName, java.lang.String labelField)  
      void writeDatasetToDatabase​(org.api4.java.ai.ml.core.dataset.IDataset<?> dataset, java.lang.String tableName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MySQLDatasetMapper

        public MySQLDatasetMapper​(ai.libs.jaicore.db.IDatabaseAdapter adapter)
    • Method Detail

      • readDatasetFromTable

        public org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromTable​(java.lang.String tableName)
                                                                          throws java.sql.SQLException
        Specified by:
        readDatasetFromTable in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • readDatasetFromTable

        public org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromTable​(java.lang.String tableName,
                                                                                                   java.lang.String labelField)
                                                                                            throws java.sql.SQLException
        Specified by:
        readDatasetFromTable in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • readDatasetFromQuery

        public org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery)
                                                                          throws java.sql.SQLException
        Specified by:
        readDatasetFromQuery in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • readDatasetFromQuery

        public org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery,
                                                                                                   java.lang.String labelField)
                                                                                            throws java.sql.SQLException
        Specified by:
        readDatasetFromQuery in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • writeDatasetToDatabase

        public void writeDatasetToDatabase​(org.api4.java.ai.ml.core.dataset.IDataset<?> dataset,
                                           java.lang.String tableName)
                                    throws java.sql.SQLException,
                                           java.io.IOException
        Specified by:
        writeDatasetToDatabase in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
        java.io.IOException
      • getInstanceSchemaOfTable

        public org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName)
                                                                                         throws java.sql.SQLException
        Specified by:
        getInstanceSchemaOfTable in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • getInstanceSchemaOfTable

        public org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName,
                                                                                                       java.lang.String labelField)
                                                                                                throws java.sql.SQLException
        Specified by:
        getInstanceSchemaOfTable in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • getInstanceSchemaForQuery

        public org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery)
                                                                                          throws java.sql.SQLException
        Specified by:
        getInstanceSchemaForQuery in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • getInstanceSchemaForQuery

        public org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery,
                                                                                                        java.lang.String labelField)
                                                                                                 throws java.sql.SQLException
        Specified by:
        getInstanceSchemaForQuery in interface ISQLDatasetMapper
        Throws:
        java.sql.SQLException
      • getInstanceSchemaFromResultList

        public org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaFromResultList​(java.util.List<org.api4.java.datastructure.kvstore.IKVStore> data)
      • convertInstanceSchemaIntoLabeledInstanceSchema

        public org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema convertInstanceSchemaIntoLabeledInstanceSchema​(org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema schema,
                                                                                                                             java.lang.String labelField)
      • getInstanceSchemaFromResultList

        public org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaFromResultList​(java.util.List<org.api4.java.datastructure.kvstore.IKVStore> data,
                                                                                                              java.lang.String labelField)