public class MLDatabaseService extends Object implements DatabaseService
| Constructor and Description |
|---|
MLDatabaseService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTenantToProject(int tenantID,
String projectID)
Assign a tenant to a given project.
|
void |
deleteAnalysis(int tenantId,
String userName,
long analysisId) |
void |
deleteAnalysis(int tenantId,
String userName,
String analysisName)
Delete the 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,
String projectName)
Delete the project
|
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.MLModelNew> |
getAllModels(int tenantId,
String userName)
Get all models of the given tenant and username
|
List<org.wso2.carbon.ml.commons.domain.MLModelNew> |
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) |
org.wso2.carbon.ml.commons.domain.MLAnalysis |
getAnalysis(int tenantId,
String userName,
String analysisName)
Get the Analysis having the given analysis name
|
long |
getAnalysisId(int tenantId,
String userName,
String analysisName)
Get the analysis Id of a given tenant id, username, analysis combination
|
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
|
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) |
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 |
getDatasetVersionId(long datasetId,
String datasetVersion) |
long |
getDatasetVersionId(long datasetId,
String version,
int tenantId,
String userName)
Get the unique identifier of the dataset version given the dataset schema and the version
|
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
|
List<org.wso2.carbon.ml.commons.domain.FeatureSummary> |
getDefaultFeatures(long datasetVersionId,
int startIndex,
int numberOfFeatures)
This method extracts and returns default features available in a given dataset version
|
int |
getFeatureCount(long datasetSchemaId)
Returns the number of features of a given data-set version
|
List<String> |
getFeatureNames(long modelId)
Returns the names of the features of the model
|
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.
|
String |
getFeatureType(long modelId,
String featureName)
Retrieves the type of a feature.
|
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.MLModelNew |
getModel(int tenantId,
String userName,
long modelId)
Get the model name identified by the given model id
|
org.wso2.carbon.ml.commons.domain.MLModelNew |
getModel(int tenantId,
String userName,
String modelName)
Get the Model having the given model name
|
String |
getModelConfigurationValue(long modelId,
String name)
retrieve a model configuration
|
long |
getModelId(int tenantId,
String userName,
String modelName)
Get the Id of the model
|
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,
String projectName)
Get the project having the given project name
|
long |
getProjectId(int tenantId,
String userName,
String projectName)
Get the unique Id of the 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.
|
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)
Get the dataset-version id
|
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 |
insertDatasetDetails(String name,
int tenantID,
String username,
String comments,
String sourceType,
String targetType,
String dataType) |
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 |
insertDataSource(long datasetVersionId,
int tenantId,
String username,
String key,
String value)
Insert data source to 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 |
insertFeatureCustomized(long analysisId,
org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedFeature)
Insert cutomized feature to 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.MLModelNew 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 |
isDatasetNameExist(int tenantId,
String userName,
String datasetName)
Check whether the given database name exists in the given tenantId
|
boolean |
isDatasetVersionExist(int tenantId,
String datasetName,
String datasetVersion)
Check whether the given database version exists for the given data-set name and tenant ID
|
boolean |
isValidModelId(int tenantId,
String userName,
long modelId)
Check whether the given modelId is valid
|
void |
updateDataType(String featureName,
long modelId,
String featureType)
Update the data type of a given feature.
|
void |
updateFeatureInclusion(String featureName,
long modelId,
boolean isInput)
Change whether a feature should be included as an input or not.
|
void |
updateImputeOption(String featureName,
long modelId,
String imputeOption)
Update the impute method option of a given feature.
|
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 |
updateSummaryStatistics(long datasetSchemaId,
long datasetVersionId,
org.wso2.carbon.ml.commons.domain.SummaryStats summaryStats)
Update the database with the summary stats of data-set-version
|
void |
updateVersionsetSample(long datasetVesionId,
org.wso2.carbon.ml.commons.domain.SamplePoints valueSetSample)
Update the dataset version table with a sample points
|
public 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.MLModelNew 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 void insertDatasetDetails(String name, int tenantID, String username, String comments, String sourceType, String targetType, String dataType) throws DatabaseHandlerException
name - tenantID - username - comments - sourceType - targetType - dataType - DatabaseHandlerExceptionpublic long getDatasetId(String datasetName, int tenantId, String userName) throws DatabaseHandlerException
getDatasetId in interface DatabaseServicedatasetName - Name of the data-settenantId - Tenant IdDatabaseHandlerExceptionpublic long getDatasetVersionId(long datasetId,
String version,
int tenantId,
String userName)
throws DatabaseHandlerException
DatabaseServicegetDatasetVersionId in interface DatabaseServicedatasetId - dataset schema idversion - versiontenantId - tenant iduserName - usernameDatabaseHandlerExceptionpublic long getVersionsetId(String datasetVersionName, int tenantId) throws DatabaseHandlerException
DatabaseServicegetVersionsetId in interface DatabaseServicedatasetVersionName - name of the dataset-versiontenantId - tenant idDatabaseHandlerExceptionpublic long getDatasetVersionIdOfModel(long modelId)
throws DatabaseHandlerException
DatabaseServicegetDatasetVersionIdOfModel in interface DatabaseServicemodelId - unique id of the modelDatabaseHandlerExceptionpublic void insertDataSource(long datasetVersionId,
int tenantId,
String username,
String key,
String value)
throws DatabaseHandlerException
DatabaseServiceinsertDataSource in interface DatabaseServicedatasetVersionId - unique id of the dataset-versiontenantId - tenant idusername - usernamekey - keyvalue - valueDatabaseHandlerExceptionpublic boolean isDatasetNameExist(int tenantId,
String userName,
String datasetName)
throws DatabaseHandlerException
DatabaseServiceisDatasetNameExist in interface DatabaseServicetenantId - tenant IddatasetName - name of the data-setDatabaseHandlerExceptionpublic boolean isDatasetVersionExist(int tenantId,
String datasetName,
String datasetVersion)
throws DatabaseHandlerException
DatabaseServiceisDatasetVersionExist in interface DatabaseServicetenantId - tenantIddatasetName - name of the data-setdatasetVersion - version of the data-setDatabaseHandlerExceptionpublic long getDatasetVersionId(long datasetId,
String datasetVersion)
throws DatabaseHandlerException
getDatasetVersionId in interface DatabaseServiceDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLDatasetVersion> getAllVersionsetsOfDataset(int tenantId, String userName, long datasetId) throws DatabaseHandlerException
getAllVersionsetsOfDataset in interface DatabaseServicetenantId - tenant iduserName - usernamedatasetId - dataset schema idDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLDatasetVersion getVersionset(int tenantId,
String userName,
long datasetVersionId)
throws DatabaseHandlerException
getVersionset in interface DatabaseServicetenantId - tenant iduserName - usernamedatasetVersionId - dataset-version idDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLDataset> getAllDatasets(int tenantId, String userName) throws DatabaseHandlerException
getAllDatasets in interface DatabaseServicetenantId - tenant iduserName - usernameDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLDataset getDataset(int tenantId,
String userName,
long datasetId)
throws DatabaseHandlerException
getDataset in interface DatabaseServicetenantId - tenant iduserName - usernamedatasetId - dataset schema idDatabaseHandlerExceptionpublic 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 - unique id of the modelDatabaseHandlerExceptionpublic void updateVersionsetSample(long datasetVesionId,
org.wso2.carbon.ml.commons.domain.SamplePoints valueSetSample)
throws DatabaseHandlerException
updateVersionsetSample in interface DatabaseServicedatasetVesionId - Unique Identifier of the dataset-versionvalueSetSample - SamplePoints object of the dataset-versionDatabaseHandlerExceptionpublic 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 modelDatabaseHandlerExceptionpublic 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 DatabaseServiceDatabaseHandlerExceptionpublic void updateModelError(long modelId,
String error)
throws DatabaseHandlerException
updateModelError in interface DatabaseServiceDatabaseHandlerExceptionpublic List<Object> getScatterPlotPoints(org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints) throws DatabaseHandlerException
getScatterPlotPoints in interface DatabaseServicescatterPlotPoints - TODODatabaseHandlerExceptionpublic 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 listDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.FeatureSummary> getFeatures(int tenantId, String userName, long analysisId, int startIndex, int numberOfFeatures) throws DatabaseHandlerException
getFeatures in interface DatabaseServicedatasetID - Unique Identifier of the data-setstartIndex - Starting index of the set of features needednumberOfFeatures - Number of features needed, from the starting indexDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.FeatureSummary> getDefaultFeatures(long datasetVersionId, int startIndex, int numberOfFeatures) throws DatabaseHandlerException
getDefaultFeatures in interface DatabaseServicedatasetVersionId - The dataset version idDatabaseHandlerExceptionpublic String getFeatureNamesInOrderUsingDatasetVersion(long datasetVersionId, String columnSeparator) throws DatabaseHandlerException
getFeatureNamesInOrderUsingDatasetVersion in interface DatabaseServiceDatabaseHandlerExceptionpublic String getFeatureNamesInOrder(long datasetId, String columnSeparator) throws DatabaseHandlerException
getFeatureNamesInOrder in interface DatabaseServiceDatabaseHandlerExceptionpublic List<String> getFeatureNames(long modelId) throws DatabaseHandlerException
getFeatureNames in interface DatabaseServicemodelId - Unique identifier of the current modelDatabaseHandlerExceptionpublic 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 String getSummaryStats(int tenantId, String user, long analysisId, String featureName) throws DatabaseHandlerException
getSummaryStats in interface DatabaseServicedatasetVersionId - Unique identifier of the data-set versionfeatureName - 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 long getProjectId(int tenantId,
String userName,
String projectName)
throws DatabaseHandlerException
DatabaseServicegetProjectId in interface DatabaseServicetenantId - tenant IduserName - username of the projectprojectName - name of the projectDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLProject getProject(int tenantId,
String userName,
String projectName)
throws DatabaseHandlerException
DatabaseServicegetProject in interface DatabaseServicetenantId - tenant iduserName - usernameprojectName - project nameDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLProject> getAllProjects(int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetAllProjects in interface DatabaseServicetenantId - tenant iduserName - usernameDatabaseHandlerExceptionpublic void deleteProject(int tenantId,
String userName,
String projectName)
throws DatabaseHandlerException
DatabaseServicedeleteProject in interface DatabaseServiceDatabaseHandlerExceptionpublic void deleteModel(int tenantId,
String userName,
long modelId)
throws DatabaseHandlerException
DatabaseServicedeleteModel in interface DatabaseServicetenantId - tenant iduserName - usernamemodelId - model idDatabaseHandlerExceptionpublic long getAnalysisId(int tenantId,
String userName,
String analysisName)
throws DatabaseHandlerException
DatabaseServicegetAnalysisId in interface DatabaseServiceDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLAnalysis getAnalysis(int tenantId,
String userName,
String analysisName)
throws DatabaseHandlerException
DatabaseServicegetAnalysis in interface DatabaseServicetenantId - tenant iduserName - usernameanalysisName - analysis nameDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLAnalysis getAnalysis(int tenantId,
String userName,
long analysisId)
throws DatabaseHandlerException
getAnalysis in interface DatabaseServiceDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLAnalysis> getAllAnalyses(int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetAllAnalyses in interface DatabaseServicetenantId - tenant iduserName - usernameDatabaseHandlerExceptionpublic 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 idMLAnalysisDatabaseHandlerExceptionpublic long getModelId(int tenantId,
String userName,
String modelName)
throws DatabaseHandlerException
DatabaseServicegetModelId in interface DatabaseServicetenantId - Tenant IduserName - UsernamemodelName - Model nameDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLModelNew getModel(int tenantId,
String userName,
String modelName)
throws DatabaseHandlerException
DatabaseServicegetModel in interface DatabaseServicetenantId - tenant iduserName - usernamemodelName - model nameDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLModelNew getModel(int tenantId,
String userName,
long modelId)
throws DatabaseHandlerException
DatabaseServicegetModel in interface DatabaseServicetenantId - tenant iduserName - usernamemodelId - model idDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLModelNew> getAllModels(int tenantId, String userName, long analysisId) throws DatabaseHandlerException
DatabaseServicegetAllModels in interface DatabaseServiceDatabaseHandlerExceptionpublic List<org.wso2.carbon.ml.commons.domain.MLModelNew> getAllModels(int tenantId, String userName) throws DatabaseHandlerException
DatabaseServicegetAllModels in interface DatabaseServicetenantId - tenant iduserName - usernameDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.MLStorage getModelStorage(long modelId)
throws DatabaseHandlerException
DatabaseServicegetModelStorage in interface DatabaseServicemodelId - unique id of the modelDatabaseHandlerExceptionpublic boolean isValidModelId(int tenantId,
String userName,
long modelId)
throws DatabaseHandlerException
DatabaseServiceisValidModelId in interface DatabaseServiceDatabaseHandlerExceptionpublic void deleteAnalysis(int tenantId,
String userName,
String analysisName)
throws DatabaseHandlerException
DatabaseServicedeleteAnalysis in interface DatabaseServiceDatabaseHandlerExceptionpublic void deleteAnalysis(int tenantId,
String userName,
long analysisId)
throws DatabaseHandlerException
deleteAnalysis in interface DatabaseServiceDatabaseHandlerExceptionpublic void insertModelConfigurations(long analysisId,
List<org.wso2.carbon.ml.commons.domain.MLModelConfiguration> modelConfigs)
throws DatabaseHandlerException
DatabaseServiceinsertModelConfigurations in interface DatabaseServiceanalysisId - Analysis IdmodelConfigs - MLModelConfiguration listDatabaseHandlerExceptionpublic String getModelConfigurationValue(long modelId, String name) throws DatabaseHandlerException
getModelConfigurationValue in interface DatabaseServicemodelId - Unique identifier of the current modelname - config nameDatabaseHandlerExceptionpublic 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 nameDatabaseHandlerExceptionpublic 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 - Unique id of the analysisDatabaseHandlerExceptionpublic void insertDefaultsIntoFeatureCustomized(long analysisId,
org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedValues)
throws DatabaseHandlerException
DatabaseServiceinsertDefaultsIntoFeatureCustomized in interface DatabaseServiceanalysisId - unique 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 insertFeatureCustomized(long analysisId,
org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedFeature)
throws DatabaseHandlerException
DatabaseServiceinsertFeatureCustomized in interface DatabaseServiceanalysisId - analysis idcustomizedFeature - customized featureDatabaseHandlerExceptionpublic void addTenantToProject(int tenantID,
String projectID)
throws DatabaseHandlerException
tenantID - Unique identifier for the current tenant.projectID - Unique identifier for the project.DatabaseHandlerExceptionpublic void updateSummaryStatistics(long datasetSchemaId,
long datasetVersionId,
org.wso2.carbon.ml.commons.domain.SummaryStats summaryStats)
throws DatabaseHandlerException
DatabaseServiceupdateSummaryStatistics in interface DatabaseServicedatasetVersionId - Unique Id of the data-set-versionsummaryStats - Summary statsDatabaseHandlerExceptionpublic String getFeatureType(long modelId, String featureName) throws DatabaseHandlerException
getFeatureType in interface DatabaseServicemodelId - Unique identifier of the modelfeatureName - Name of the featureDatabaseHandlerExceptionpublic void updateFeatureInclusion(String featureName, long modelId, boolean isInput) throws DatabaseHandlerException
updateFeatureInclusion in interface DatabaseServicefeatureName - Name of the feature to be updatedmodelId - Unique identifier of the current modelisInput - Boolean value indicating whether the feature is an input or notDatabaseHandlerExceptionpublic void updateImputeOption(String featureName, long modelId, String imputeOption) throws DatabaseHandlerException
updateImputeOption in interface DatabaseServicefeatureName - Name of the feature to be updatedmodelId - Unique identifier of the current modelimputeOption - Updated impute option of the featureDatabaseHandlerExceptionpublic void updateDataType(String featureName, long modelId, String featureType) throws DatabaseHandlerException
updateDataType in interface DatabaseServicefeatureName - Name of the feature to be updatedmodelId - Unique identifier of the current modelfeatureType - Updated type of the featureDatabaseHandlerExceptionpublic org.wso2.carbon.ml.commons.domain.Workflow getWorkflow(long analysisId)
throws DatabaseHandlerException
DatabaseServicegetWorkflow in interface DatabaseServiceanalysisId - unique id of the analysisDatabaseHandlerExceptionpublic 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 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 DatabaseServiceDatabaseHandlerExceptionCopyright © 2015 WSO2, Inc.. All rights reserved.