public class MLDatabaseService extends Object implements DatabaseService
| Constructor and Description |
|---|
MLDatabaseService() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAnalysis(int tenantId,
String userName,
long analysisId)
Delete an analysis.
|
void |
deleteDataset(long datasetId)
Delete the dataset schema.
|
void |
deleteDatasetVersion(long datasetVersionId)
Delete the dataset version.
|
void |
deleteModel(int tenantId,
String userName,
long modelId)
Delete the model from the database.
|
void |
deleteProject(int tenantId,
String userName,
long projectId)
Delete the project.
|
boolean |
getABooleanModelConfiguration(long analysisId,
String configKey)
Get a boolean value of model configuration.
|
double |
getADoubleModelConfiguration(long analysisId,
String configKey)
Get a double value of model configuration.
|
List<org.wso2.carbon.ml.commons.domain.MLAnalysis> |
getAllAnalyses(int tenantId,
String userName)
Get all the analyses of the given tenant and username.
|
List<org.wso2.carbon.ml.commons.domain.MLAnalysis> |
getAllAnalysesOfProject(int tenantId,
String userName,
long projectId)
Get all the analyses of a project.
|
List<org.wso2.carbon.ml.commons.domain.MLDataset> |
getAllDatasets(int tenantId,
String userName)
Retrieve all datasets
|
List<org.wso2.carbon.ml.commons.domain.MLModelData> |
getAllModels(int tenantId,
String userName)
Get all models of the given tenant and username.
|
List<org.wso2.carbon.ml.commons.domain.MLModelData> |
getAllModels(int tenantId,
String userName,
long analysisId)
Get all models of a given analysis.
|
List<org.wso2.carbon.ml.commons.domain.MLProject> |
getAllProjects(int tenantId,
String userName)
Get all the projects of the given tenant and username.
|
List<org.wso2.carbon.ml.commons.domain.MLDatasetVersion> |
getAllVersionsetsOfDataset(int tenantId,
String userName,
long datasetId)
Retrieve all versionset of a dataset
|
org.wso2.carbon.ml.commons.domain.MLAnalysis |
getAnalysis(int tenantId,
String userName,
long analysisId)
Get analysis by id.
|
org.wso2.carbon.ml.commons.domain.MLAnalysis |
getAnalysisOfProject(int tenantId,
String userName,
long projectId,
String analysisName)
Returns an analysis of a given name in a given project.
|
String |
getAStringModelConfiguration(long analysisId,
String configKey)
Get a string value of model configuration.
|
List<Object> |
getChartSamplePoints(int tenantId,
String user,
long versionsetId,
String featureListString)
Returns sample data for selected features
|
List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> |
getCustomizedFeatures(int tenantId,
String userName,
long analysisId,
int startIndex,
int numberOfFeatures)
Returns the customized set of features of an analysis in a given range, from the alphabetically ordered set
of features, of a dataset.
|
org.wso2.carbon.ml.commons.domain.MLDataset |
getDataset(int tenantId,
String userName,
long datasetId)
Retrieve a dataset from ID
|
long |
getDatasetId(long datasetVersionId)
Retrieve the datasetID of a given version set
|
long |
getDatasetId(String datasetName,
int tenantId,
String userName)
Get the dataset id.
|
long |
getDatasetSchemaIdFromAnalysisId(long analysisId)
Get the dataset schema ID of a given analysis.
|
String |
getDatasetUri(long datasetId)
Retrieves the path of the value-set having the given ID, from the database.
|
long |
getDatasetVersionIdOfModel(long modelId)
Get the ID of the dataset version used to generate the model.
|
String |
getDatasetVersionUri(long datasetVersionId)
Retrieves the path of the value-set having the given ID, from the database.
|
String |
getDataTypeOfModel(long modelId)
Get the data type of the model.
|
int |
getFeatureCount(long datasetSchemaId)
Returns the number of features of a given data-set version
|
List<String> |
getFeatureNames(long datasetId)
Get feature names of a given dataset using the dataset ID
|
List<String> |
getFeatureNames(long datasetId,
String featureType)
Returns the names of the features, belongs to a particular type
(Categorical/Numerical), of a dataset.
|
List<String> |
getFeatureNames(String analysisId)
Returns all the feature names of an analysis.
|
List<String> |
getFeatureNames(String analysisId,
String featureType)
Returns the names of the features, belongs to a particular type
(Categorical/Numerical), of the analysis.
|
String |
getFeatureNamesInOrder(long datasetId,
String columnSeparator)
Get feature names in order and separated by the given column separator.
|
String |
getFeatureNamesInOrderUsingDatasetVersion(long datasetVersionId,
String columnSeparator)
Get feature names in order and separated by the given column separator.
|
List<org.wso2.carbon.ml.commons.domain.FeatureSummary> |
getFeatures(int tenantId,
String userName,
long analysisId,
int startIndex,
int numberOfFeatures)
Returns a set of features in a given range, from the alphabetically ordered set of features, of a data-set.
|
List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> |
getHyperParametersOfModel(long analysisId,
String algorithmName)
Get the list of Hyper-parameters of the model.
|
Map<String,String> |
getHyperParametersOfModelAsMap(long analysisId)
Get the Hyper-parameters of the model as a Map.
|
org.wso2.carbon.ml.commons.domain.config.MLConfiguration |
getMlConfiguration()
Returns ML Configuration.
|
org.wso2.carbon.ml.commons.domain.MLModelData |
getModel(int tenantId,
String userName,
long modelId)
Get the model name identified by the given model id.
|
org.wso2.carbon.ml.commons.domain.MLModelData |
getModel(int tenantId,
String userName,
String modelName)
Get the Model having the given model name.
|
org.wso2.carbon.ml.commons.domain.MLStorage |
getModelStorage(long modelId)
Get the Model storage of the model.
|
org.wso2.carbon.ml.commons.domain.ModelSummary |
getModelSummary(long modelId)
Retrieve the model summary
|
org.wso2.carbon.ml.commons.domain.MLProject |
getProject(int tenantId,
String userName,
long projectId)
Returns project object for a given project ID from the database.
|
org.wso2.carbon.ml.commons.domain.MLProject |
getProject(int tenantId,
String userName,
String projectName)
Get the project having the given project name.
|
List<org.wso2.carbon.ml.commons.domain.MLModelData> |
getProjectModels(int tenantId,
String userName,
long projectId)
Get all models of a given project
|
List<Object> |
getScatterPlotPoints(org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints)
Returns data points of the selected sample as coordinates of three features, needed for the scatter plot.
|
String |
getSummaryStats(int tenantId,
String user,
long analysisId,
String featureName)
Retrieve and returns the Summary statistics for a given feature of a given data-set version, from the database.
|
Map<String,String> |
getSummaryStats(long datasetVersionId)
Retrieve and returns the Summary statistics for a given feature of a given data-set version, from the database.
|
String |
getSummaryStats(long datasetId,
String featureName)
Retrieve and returns summary statistics for a given feature of a given dataset
|
org.wso2.carbon.ml.commons.domain.MLDatasetVersion |
getVersionset(int tenantId,
String userName,
long datasetVersionId)
Retrieve a Versionset from its ID
|
long |
getVersionsetId(String datasetVersionName,
int tenantId,
String userName)
Get the dataset-version id.
|
org.wso2.carbon.ml.commons.domain.SamplePoints |
getVersionsetSample(int tenantId,
String user,
long versionsetId)
Retrieve the SamplePoints object for a given value-set.
|
org.wso2.carbon.ml.commons.domain.MLDatasetVersion |
getVersionSetWithVersion(long datasetId,
String version,
int tenantId,
String userName)
Get the unique identifier of the dataset version given the dataset schema and the version.
|
org.wso2.carbon.ml.commons.domain.Workflow |
getWorkflow(long analysisId)
Get the workflow of the analysis.
|
void |
insertAnalysis(org.wso2.carbon.ml.commons.domain.MLAnalysis analysis)
Insert a new analysis into the database.
|
void |
insertDatasetSchema(org.wso2.carbon.ml.commons.domain.MLDataset dataset)
Insert a new dataset-schema into the database.
|
void |
insertDatasetVersion(org.wso2.carbon.ml.commons.domain.MLDatasetVersion datasetVersion)
Insert a new dataset-version into the database.
|
void |
insertDefaultsIntoFeatureCustomized(long analysisId,
org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedValues)
Insert the default feature attributes into the relevant customized feature attributes of a given analysis.
|
void |
insertFeatureCustomized(long analysisId,
List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> customizedFeatures,
int tenantId,
String userName)
Insert a list of Customized-Features into the database.
|
void |
insertHyperParameters(long analysisId,
List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> hyperParameters,
String algorithmName)
Insert a list of HyperParameters into the database.
|
void |
insertModel(org.wso2.carbon.ml.commons.domain.MLModelData model)
Insert a new model into the database.
|
void |
insertModelConfigurations(long analysisId,
List<org.wso2.carbon.ml.commons.domain.MLModelConfiguration> modelConfigs)
Insert a list of ModelConfiguration into the database.
|
void |
insertProject(org.wso2.carbon.ml.commons.domain.MLProject project)
Insert a new project to the database.
|
boolean |
isValidModelId(int tenantId,
String userName,
long modelId)
Check whether the given modelId is valid.
|
boolean |
isValidModelStatus(long modelId,
int tenantId,
String userName)
Check whether the model is in a valid state.
|
void |
shutdown()
Executes the SHUTDOWN statement.
|
void |
updateModelError(long modelId,
String error)
Update the model storage
|
void |
updateModelStatus(long modelId,
String status)
Update the model status
|
void |
updateModelStorage(long modelId,
String storageType,
String location)
Update the model storage
|
void |
updateModelSummary(long modelId,
org.wso2.carbon.ml.commons.domain.ModelSummary modelSummary)
Update the model summary
|
void |
updateSamplePoints(long datasetVersionId,
org.wso2.carbon.ml.commons.domain.SamplePoints samplePoints)
Update the database with the sample points of data-set-version.
|
void |
updateSummaryStatistics(long datasetSchemaId,
long datasetVersionId,
org.wso2.carbon.ml.commons.domain.SummaryStats summaryStats)
Update the database with the summary stats of data-set-version.
|
public org.wso2.carbon.ml.commons.domain.config.MLConfiguration getMlConfiguration()
DatabaseServicegetMlConfiguration in interface DatabaseServicepublic void insertDatasetSchema(org.wso2.carbon.ml.commons.domain.MLDataset dataset)
throws DatabaseHandlerException
DatabaseServiceinsertDatasetSchema in interface DatabaseServicedataset - MLDataset to be insertedDatabaseHandlerExceptionpublic void insertDatasetVersion(org.wso2.carbon.ml.commons.domain.MLDatasetVersion datasetVersion)
throws DatabaseHandlerException
DatabaseServiceinsertDatasetVersion in interface DatabaseServicedatasetVersion - MLDatasetVersion to be insertedDatabaseHandlerExceptionpublic void insertProject(org.wso2.carbon.ml.commons.domain.MLProject project)
throws DatabaseHandlerException
DatabaseServiceinsertProject in interface DatabaseServiceproject - MLProject to be insertedDatabaseHandlerExceptionpublic void insertAnalysis(org.wso2.carbon.ml.commons.domain.MLAnalysis analysis)
throws DatabaseHandlerException
DatabaseServiceinsertAnalysis in interface DatabaseServiceanalysis - MLAnalysis to be insertedDatabaseHandlerExceptionpublic void insertModel(org.wso2.carbon.ml.commons.domain.MLModelData model)
throws DatabaseHandlerException
DatabaseServiceinsertModel in interface DatabaseServicemodel - MLModelNew to be insertedDatabaseHandlerExceptionpublic String getDatasetVersionUri(long datasetVersionId) throws DatabaseHandlerException
getDatasetVersionUri in interface DatabaseServicedatasetVersionId - Unique Identifier of the value-setDatabaseHandlerExceptionpublic String getDatasetUri(long datasetId) throws DatabaseHandlerException
getDatasetUri in interface DatabaseServicedatasetId - Unique Identifier of the value-setDatabaseHandlerExceptionpublic long getDatasetId(String datasetName, int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetDatasetId in interface DatabaseServicedatasetName - Name of the data-settenantId - Tenant IduserName - Tenant user nameDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLDatasetVersion getVersionSetWithVersion(long datasetId,
String version,
int tenantId,
String userName)
throws DatabaseHandlerException
DatabaseServicegetVersionSetWithVersion in interface DatabaseServicedatasetId - ID of the datasetversion - Version of the dataset versiontenantId - ID of the tenantuserName - Username of the tenantMLDatasetVersion objectDatabaseHandlerExceptionpublic long getVersionsetId(String datasetVersionName, int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetVersionsetId in interface DatabaseServicedatasetVersionName - Name of the dataset versiontenantId - ID of the tenantuserName - Username of the tenantDatabaseHandlerExceptionpublic long getDatasetVersionIdOfModel(long modelId)
throws DatabaseHandlerException
DatabaseServicegetDatasetVersionIdOfModel in interface DatabaseServicemodelId - ID of the modelDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLDatasetVersion> getAllVersionsetsOfDataset(int tenantId, String userName, long datasetId) throws DatabaseHandlerException
getAllVersionsetsOfDataset in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantdatasetId - dataset schema idMLDatasetVersion objectsDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLDatasetVersion getVersionset(int tenantId,
String userName,
long datasetVersionId)
throws DatabaseHandlerException
getVersionset in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantdatasetVersionId - ID of the dataset versionMLDatasetVersion objectDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLDataset> getAllDatasets(int tenantId, String userName) throws DatabaseHandlerException
getAllDatasets in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantMLDataset objectsDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLDataset getDataset(int tenantId,
String userName,
long datasetId)
throws DatabaseHandlerException
getDataset in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantdatasetId - Dataset schema IDMLDataset objectDatabaseHandlerExceptionpublic long getDatasetId(long datasetVersionId)
throws DatabaseHandlerException
getDatasetId in interface DatabaseServicedatasetVersionId - Unique ID of the dataset versionDatabaseHandlerExceptionpublic String getDataTypeOfModel(long modelId) throws DatabaseHandlerException
DatabaseServicegetDataTypeOfModel in interface DatabaseServicemodelId - ID of the modelDatabaseHandlerExceptionpublic void updateModelSummary(long modelId,
org.wso2.carbon.ml.commons.domain.ModelSummary modelSummary)
throws DatabaseHandlerException
updateModelSummary in interface DatabaseServicemodelId - model idmodelSummary - ModelSummaryDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.ModelSummary getModelSummary(long modelId)
throws DatabaseHandlerException
getModelSummary in interface DatabaseServicemodelId - ID of the modelModelSummary objectDatabaseHandlerExceptionpublic void updateModelStorage(long modelId,
String storageType,
String location)
throws DatabaseHandlerException
updateModelStorage in interface DatabaseServicemodelId - Model IdstorageType - Storage typelocation - Storage locationDatabaseHandlerExceptionpublic void updateModelStatus(long modelId,
String status)
throws DatabaseHandlerException
updateModelStatus in interface DatabaseServicemodelId - Unique id of the modelstatus - Status to be updatedDatabaseHandlerExceptionpublic void updateModelError(long modelId,
String error)
throws DatabaseHandlerException
updateModelError in interface DatabaseServicemodelId - Unique id of the modelerror - Error value to be updatedDatabaseHandlerExceptionpublic List<Object> getScatterPlotPoints(org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints) throws DatabaseHandlerException
getScatterPlotPoints in interface DatabaseServicescatterPlotPoints - Scatter plot pointsDatabaseHandlerExceptionpublic List<Object> getChartSamplePoints(int tenantId, String user, long versionsetId, String featureListString) throws DatabaseHandlerException
getChartSamplePoints in interface DatabaseServiceversionsetId - Unique Identifier of the value-setfeatureListString - String containing feature name listtenantId - Tenant iduser - Tenant user nameDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.SamplePoints getVersionsetSample(int tenantId,
String user,
long versionsetId)
throws DatabaseHandlerException
getVersionsetSample in interface DatabaseServicetenantId - Tenant iduser - Tenant user nameversionsetId - Unique Identifier of the dataset versionDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.FeatureSummary> getFeatures(int tenantId, String userName, long analysisId, int startIndex, int numberOfFeatures) throws DatabaseHandlerException
getFeatures in interface DatabaseServicetenantId - Tenant iduserName - Tenant user nameanalysisId - Unique id of the analysisstartIndex - Starting index of the set of features needednumberOfFeatures - Number of features needed, from the starting indexDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> getCustomizedFeatures(int tenantId, String userName, long analysisId, int startIndex, int numberOfFeatures) throws DatabaseHandlerException
getCustomizedFeatures in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantanalysisId - Unique ID of the analysisstartIndex - Starting index of the set of features needednumberOfFeatures - Number of features needed, from the starting indexDatabaseHandlerExceptionpublic String getFeatureNamesInOrderUsingDatasetVersion(long datasetVersionId, String columnSeparator) throws DatabaseHandlerException
getFeatureNamesInOrderUsingDatasetVersion in interface DatabaseServicedatasetVersionId - Unique id of the dataset versioncolumnSeparator - Column separator (CSV or TSV)DatabaseHandlerExceptionpublic String getFeatureNamesInOrder(long datasetId, String columnSeparator) throws DatabaseHandlerException
getFeatureNamesInOrder in interface DatabaseServicedatasetId - Unique id of datasetcolumnSeparator - Column separator (CSV or TSV)DatabaseHandlerExceptionpublic List<String> getFeatureNames(long datasetId) throws DatabaseHandlerException
getFeatureNames in interface DatabaseServicedatasetId - Unique id of the dataset.DatabaseHandlerExceptionpublic List<String> getFeatureNames(String analysisId, String featureType) throws DatabaseHandlerException
getFeatureNames in interface DatabaseServiceanalysisId - Unique identifier of the current analysisfeatureType - Type of the featureDatabaseHandlerExceptionpublic List<String> getFeatureNames(String analysisId) throws DatabaseHandlerException
getFeatureNames in interface DatabaseServiceanalysisId - Unique identifier of the current analysisDatabaseHandlerExceptionpublic List<String> getFeatureNames(long datasetId, String featureType) throws DatabaseHandlerException
getFeatureNames in interface DatabaseServicedatasetId - Unique identifier of a datasetfeatureType - Type of the featureDatabaseHandlerExceptionpublic String getSummaryStats(int tenantId, String user, long analysisId, String featureName) throws DatabaseHandlerException
getSummaryStats in interface DatabaseServicetenantId - Tenant iduser - Tenant user nameanalysisId - Unique identifier of the analysisfeatureName - Name of the feature of which summary statistics are neededDatabaseHandlerExceptionpublic Map<String,String> getSummaryStats(long datasetVersionId) throws DatabaseHandlerException
getSummaryStats in interface DatabaseServicedatasetVersionId - Unique identifier of the data-set versionDatabaseHandlerExceptionpublic String getSummaryStats(long datasetId, String featureName) throws DatabaseHandlerException
getSummaryStats in interface DatabaseServicedatasetId - Unique identifier of a datasetfeatureName - Name of the feature of which summary statistics are neededDatabaseHandlerExceptionpublic int getFeatureCount(long datasetSchemaId)
throws DatabaseHandlerException
getFeatureCount in interface DatabaseServicedatasetSchemaId - Unique identifier of the data-set versionDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLProject getProject(int tenantId,
String userName,
String projectName)
throws DatabaseHandlerException
DatabaseServicegetProject in interface DatabaseServicetenantId - tenant iduserName - usernameprojectName - project nameMLProject objectDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLProject getProject(int tenantId,
String userName,
long projectId)
throws DatabaseHandlerException
getProject in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantprojectId - ID of the projectDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLProject> getAllProjects(int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetAllProjects in interface DatabaseServicetenantId - tenant iduserName - usernameMLProject objectsDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLModelData> getProjectModels(int tenantId, String userName, long projectId) throws DatabaseHandlerException
getProjectModels in interface DatabaseServicetenantId - tenant IDuserName - usernameprojectId - Project IDMLModelData objectsDatabaseHandlerExceptionpublic void deleteProject(int tenantId,
String userName,
long projectId)
throws DatabaseHandlerException
DatabaseServicedeleteProject in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantprojectId - ID of the projectDatabaseHandlerExceptionpublic void deleteModel(int tenantId,
String userName,
long modelId)
throws DatabaseHandlerException
DatabaseServicedeleteModel in interface DatabaseServicetenantId - tenant iduserName - usernamemodelId - model idDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLAnalysis getAnalysis(int tenantId,
String userName,
long analysisId)
throws DatabaseHandlerException
DatabaseServicegetAnalysis in interface DatabaseServicetenantId - Tenant iduserName - Tenant user nameanalysisId - Unique id of the analysisMLAnalysis objectDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLAnalysis> getAllAnalyses(int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetAllAnalyses in interface DatabaseServicetenantId - tenant iduserName - usernameMLAnalysis objectsDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLAnalysis> getAllAnalysesOfProject(int tenantId, String userName, long projectId) throws DatabaseHandlerException
DatabaseServicegetAllAnalysesOfProject in interface DatabaseServicetenantId - tenant iduserName - user nameprojectId - project idMLAnalysis objectsDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLModelData getModel(int tenantId,
String userName,
String modelName)
throws DatabaseHandlerException
DatabaseServicegetModel in interface DatabaseServicetenantId - tenant iduserName - usernamemodelName - model nameMLModelData objectDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLModelData getModel(int tenantId,
String userName,
long modelId)
throws DatabaseHandlerException
DatabaseServicegetModel in interface DatabaseServicetenantId - tenant iduserName - usernamemodelId - model idMLModelData objectDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLModelData> getAllModels(int tenantId, String userName, long analysisId) throws DatabaseHandlerException
DatabaseServicegetAllModels in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantanalysisId - ID of the analysisMLModelData objectsDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLModelData> getAllModels(int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetAllModels in interface DatabaseServicetenantId - tenant iduserName - usernameMLModelData objectsDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLStorage getModelStorage(long modelId)
throws DatabaseHandlerException
DatabaseServicegetModelStorage in interface DatabaseServicemodelId - unique id of the modelMLStorage objectDatabaseHandlerExceptionpublic boolean isValidModelId(int tenantId,
String userName,
long modelId)
throws DatabaseHandlerException
DatabaseServiceisValidModelId in interface DatabaseServicetenantId - ID of the tenantuserName - Username of the tenantmodelId - ID of the modelDatabaseHandlerExceptionpublic void deleteAnalysis(int tenantId,
String userName,
long analysisId)
throws DatabaseHandlerException
DatabaseServicedeleteAnalysis in interface DatabaseServicetenantId - Tenant iduserName - Tenant user nameanalysisId - Unique id of the analysisDatabaseHandlerExceptionpublic void insertModelConfigurations(long analysisId,
List<org.wso2.carbon.ml.commons.domain.MLModelConfiguration> modelConfigs)
throws DatabaseHandlerException
DatabaseServiceinsertModelConfigurations in interface DatabaseServiceanalysisId - Analysis IDmodelConfigs - MLModelConfiguration listDatabaseHandlerExceptionpublic void insertHyperParameters(long analysisId,
List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> hyperParameters,
String algorithmName)
throws DatabaseHandlerException
DatabaseServiceinsertHyperParameters in interface DatabaseServiceanalysisId - Analysis IDhyperParameters - MLHyperParameter listalgorithmName - Algorithm nameDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> getHyperParametersOfModel(long analysisId, String algorithmName) throws DatabaseHandlerException
DatabaseServicegetHyperParametersOfModel in interface DatabaseServiceanalysisId - Unique ID of the analysisalgorithmName - Algorithm nameMLHyperParameter objectsDatabaseHandlerExceptionpublic Map<String,String> getHyperParametersOfModelAsMap(long analysisId) throws DatabaseHandlerException
DatabaseServicegetHyperParametersOfModelAsMap in interface DatabaseServiceanalysisId - unique id of the modelDatabaseHandlerExceptionpublic long getDatasetSchemaIdFromAnalysisId(long analysisId)
throws DatabaseHandlerException
DatabaseServicegetDatasetSchemaIdFromAnalysisId in interface DatabaseServiceanalysisId - ID of the analysisDatabaseHandlerExceptionpublic void insertDefaultsIntoFeatureCustomized(long analysisId,
org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedValues)
throws DatabaseHandlerException
DatabaseServiceinsertDefaultsIntoFeatureCustomized in interface DatabaseServiceanalysisId - ID of the analysiscustomizedValues - customized featureDatabaseHandlerExceptionpublic void insertFeatureCustomized(long analysisId,
List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> customizedFeatures,
int tenantId,
String userName)
throws DatabaseHandlerException
DatabaseServiceinsertFeatureCustomized in interface DatabaseServiceanalysisId - Analysis IdcustomizedFeatures - MLCustomizedFeature listtenantId - Tenant IduserName - UsernameDatabaseHandlerExceptionpublic void updateSummaryStatistics(long datasetSchemaId,
long datasetVersionId,
org.wso2.carbon.ml.commons.domain.SummaryStats summaryStats)
throws DatabaseHandlerException
DatabaseServiceupdateSummaryStatistics in interface DatabaseServicedatasetSchemaId - Unique id of the dataset schemadatasetVersionId - Unique Id of the data-set-versionsummaryStats - Summary statsDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.Workflow getWorkflow(long analysisId)
throws DatabaseHandlerException
DatabaseServicegetWorkflow in interface DatabaseServiceanalysisId - unique id of the analysisWorkflow objectDatabaseHandlerExceptionpublic String getAStringModelConfiguration(long analysisId, String configKey) throws DatabaseHandlerException
DatabaseServicegetAStringModelConfiguration in interface DatabaseServiceanalysisId - Unique ID of the analysisconfigKey - Model configuration keyDatabaseHandlerExceptionpublic double getADoubleModelConfiguration(long analysisId,
String configKey)
throws DatabaseHandlerException
DatabaseServicegetADoubleModelConfiguration in interface DatabaseServiceanalysisId - unique id of the analysisconfigKey - model configuration keyDatabaseHandlerExceptionpublic boolean getABooleanModelConfiguration(long analysisId,
String configKey)
throws DatabaseHandlerException
DatabaseServicegetABooleanModelConfiguration in interface DatabaseServiceanalysisId - unique id of the analysisconfigKey - model configuration keyDatabaseHandlerExceptionpublic void deleteDataset(long datasetId)
throws DatabaseHandlerException
DatabaseServicedeleteDataset in interface DatabaseServicedatasetId - unique id of dataset schemaDatabaseHandlerExceptionpublic void deleteDatasetVersion(long datasetVersionId)
throws DatabaseHandlerException
DatabaseServicedeleteDatasetVersion in interface DatabaseServicedatasetVersionId - unique id of dataset versionDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLAnalysis getAnalysisOfProject(int tenantId,
String userName,
long projectId,
String analysisName)
throws DatabaseHandlerException
DatabaseServicegetAnalysisOfProject in interface DatabaseServicetenantId - Tenant iduserName - Tenant user nameprojectId - Unique id of the projectanalysisName - Name of the analysisMLAnalysis objectDatabaseHandlerExceptionpublic void updateSamplePoints(long datasetVersionId,
org.wso2.carbon.ml.commons.domain.SamplePoints samplePoints)
throws DatabaseHandlerException
DatabaseServiceupdateSamplePoints in interface DatabaseServicedatasetVersionId - Unique Id of the data-set-versionsamplePoints - Sample points of this dataset versionDatabaseHandlerExceptionpublic boolean isValidModelStatus(long modelId,
int tenantId,
String userName)
throws DatabaseHandlerException
DatabaseServiceisValidModelStatus in interface DatabaseServicemodelId - ID of the modeltenantId - Tenant iduserName - Tenant user nameDatabaseHandlerExceptionpublic void shutdown()
throws DatabaseHandlerException
DatabaseServiceshutdown in interface DatabaseServiceDatabaseHandlerExceptionCopyright © 2018 WSO2, Inc.. All rights reserved.