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()
DatabaseService
getMlConfiguration
in interface DatabaseService
public void insertDatasetSchema(org.wso2.carbon.ml.commons.domain.MLDataset dataset) throws DatabaseHandlerException
DatabaseService
insertDatasetSchema
in interface DatabaseService
dataset
- MLDataset to be insertedDatabaseHandlerException
public void insertDatasetVersion(org.wso2.carbon.ml.commons.domain.MLDatasetVersion datasetVersion) throws DatabaseHandlerException
DatabaseService
insertDatasetVersion
in interface DatabaseService
datasetVersion
- MLDatasetVersion to be insertedDatabaseHandlerException
public void insertProject(org.wso2.carbon.ml.commons.domain.MLProject project) throws DatabaseHandlerException
DatabaseService
insertProject
in interface DatabaseService
project
- MLProject to be insertedDatabaseHandlerException
public void insertAnalysis(org.wso2.carbon.ml.commons.domain.MLAnalysis analysis) throws DatabaseHandlerException
DatabaseService
insertAnalysis
in interface DatabaseService
analysis
- MLAnalysis to be insertedDatabaseHandlerException
public void insertModel(org.wso2.carbon.ml.commons.domain.MLModelData model) throws DatabaseHandlerException
DatabaseService
insertModel
in interface DatabaseService
model
- MLModelNew to be insertedDatabaseHandlerException
public String getDatasetVersionUri(long datasetVersionId) throws DatabaseHandlerException
getDatasetVersionUri
in interface DatabaseService
datasetVersionId
- Unique Identifier of the value-setDatabaseHandlerException
public String getDatasetUri(long datasetId) throws DatabaseHandlerException
getDatasetUri
in interface DatabaseService
datasetId
- Unique Identifier of the value-setDatabaseHandlerException
public long getDatasetId(String datasetName, int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
getDatasetId
in interface DatabaseService
datasetName
- Name of the data-settenantId
- Tenant IduserName
- Tenant user nameDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLDatasetVersion getVersionSetWithVersion(long datasetId, String version, int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
getVersionSetWithVersion
in interface DatabaseService
datasetId
- ID of the datasetversion
- Version of the dataset versiontenantId
- ID of the tenantuserName
- Username of the tenantMLDatasetVersion
objectDatabaseHandlerException
public long getVersionsetId(String datasetVersionName, int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
getVersionsetId
in interface DatabaseService
datasetVersionName
- Name of the dataset versiontenantId
- ID of the tenantuserName
- Username of the tenantDatabaseHandlerException
public long getDatasetVersionIdOfModel(long modelId) throws DatabaseHandlerException
DatabaseService
getDatasetVersionIdOfModel
in interface DatabaseService
modelId
- ID of the modelDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLDatasetVersion> getAllVersionsetsOfDataset(int tenantId, String userName, long datasetId) throws DatabaseHandlerException
getAllVersionsetsOfDataset
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantdatasetId
- dataset schema idMLDatasetVersion
objectsDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLDatasetVersion getVersionset(int tenantId, String userName, long datasetVersionId) throws DatabaseHandlerException
getVersionset
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantdatasetVersionId
- ID of the dataset versionMLDatasetVersion
objectDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLDataset> getAllDatasets(int tenantId, String userName) throws DatabaseHandlerException
getAllDatasets
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantMLDataset
objectsDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLDataset getDataset(int tenantId, String userName, long datasetId) throws DatabaseHandlerException
getDataset
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantdatasetId
- Dataset schema IDMLDataset
objectDatabaseHandlerException
public long getDatasetId(long datasetVersionId) throws DatabaseHandlerException
getDatasetId
in interface DatabaseService
datasetVersionId
- Unique ID of the dataset versionDatabaseHandlerException
public String getDataTypeOfModel(long modelId) throws DatabaseHandlerException
DatabaseService
getDataTypeOfModel
in interface DatabaseService
modelId
- ID of the modelDatabaseHandlerException
public void updateModelSummary(long modelId, org.wso2.carbon.ml.commons.domain.ModelSummary modelSummary) throws DatabaseHandlerException
updateModelSummary
in interface DatabaseService
modelId
- model idmodelSummary
- ModelSummaryDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.ModelSummary getModelSummary(long modelId) throws DatabaseHandlerException
getModelSummary
in interface DatabaseService
modelId
- ID of the modelModelSummary
objectDatabaseHandlerException
public void updateModelStorage(long modelId, String storageType, String location) throws DatabaseHandlerException
updateModelStorage
in interface DatabaseService
modelId
- Model IdstorageType
- Storage typelocation
- Storage locationDatabaseHandlerException
public void updateModelStatus(long modelId, String status) throws DatabaseHandlerException
updateModelStatus
in interface DatabaseService
modelId
- Unique id of the modelstatus
- Status to be updatedDatabaseHandlerException
public void updateModelError(long modelId, String error) throws DatabaseHandlerException
updateModelError
in interface DatabaseService
modelId
- Unique id of the modelerror
- Error value to be updatedDatabaseHandlerException
public List<Object> getScatterPlotPoints(org.wso2.carbon.ml.commons.domain.ScatterPlotPoints scatterPlotPoints) throws DatabaseHandlerException
getScatterPlotPoints
in interface DatabaseService
scatterPlotPoints
- Scatter plot pointsDatabaseHandlerException
public List<Object> getChartSamplePoints(int tenantId, String user, long versionsetId, String featureListString) throws DatabaseHandlerException
getChartSamplePoints
in interface DatabaseService
versionsetId
- Unique Identifier of the value-setfeatureListString
- String containing feature name listtenantId
- Tenant iduser
- Tenant user nameDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.SamplePoints getVersionsetSample(int tenantId, String user, long versionsetId) throws DatabaseHandlerException
getVersionsetSample
in interface DatabaseService
tenantId
- Tenant iduser
- Tenant user nameversionsetId
- Unique Identifier of the dataset versionDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.FeatureSummary> getFeatures(int tenantId, String userName, long analysisId, int startIndex, int numberOfFeatures) throws DatabaseHandlerException
getFeatures
in interface DatabaseService
tenantId
- 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 indexDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> getCustomizedFeatures(int tenantId, String userName, long analysisId, int startIndex, int numberOfFeatures) throws DatabaseHandlerException
getCustomizedFeatures
in interface DatabaseService
tenantId
- 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 indexDatabaseHandlerException
public String getFeatureNamesInOrderUsingDatasetVersion(long datasetVersionId, String columnSeparator) throws DatabaseHandlerException
getFeatureNamesInOrderUsingDatasetVersion
in interface DatabaseService
datasetVersionId
- Unique id of the dataset versioncolumnSeparator
- Column separator (CSV or TSV)DatabaseHandlerException
public String getFeatureNamesInOrder(long datasetId, String columnSeparator) throws DatabaseHandlerException
getFeatureNamesInOrder
in interface DatabaseService
datasetId
- Unique id of datasetcolumnSeparator
- Column separator (CSV or TSV)DatabaseHandlerException
public List<String> getFeatureNames(long datasetId) throws DatabaseHandlerException
getFeatureNames
in interface DatabaseService
datasetId
- Unique id of the dataset.DatabaseHandlerException
public List<String> getFeatureNames(String analysisId, String featureType) throws DatabaseHandlerException
getFeatureNames
in interface DatabaseService
analysisId
- Unique identifier of the current analysisfeatureType
- Type of the featureDatabaseHandlerException
public List<String> getFeatureNames(String analysisId) throws DatabaseHandlerException
getFeatureNames
in interface DatabaseService
analysisId
- Unique identifier of the current analysisDatabaseHandlerException
public List<String> getFeatureNames(long datasetId, String featureType) throws DatabaseHandlerException
getFeatureNames
in interface DatabaseService
datasetId
- Unique identifier of a datasetfeatureType
- Type of the featureDatabaseHandlerException
public String getSummaryStats(int tenantId, String user, long analysisId, String featureName) throws DatabaseHandlerException
getSummaryStats
in interface DatabaseService
tenantId
- Tenant iduser
- Tenant user nameanalysisId
- Unique identifier of the analysisfeatureName
- Name of the feature of which summary statistics are neededDatabaseHandlerException
public Map<String,String> getSummaryStats(long datasetVersionId) throws DatabaseHandlerException
getSummaryStats
in interface DatabaseService
datasetVersionId
- Unique identifier of the data-set versionDatabaseHandlerException
public String getSummaryStats(long datasetId, String featureName) throws DatabaseHandlerException
getSummaryStats
in interface DatabaseService
datasetId
- Unique identifier of a datasetfeatureName
- Name of the feature of which summary statistics are neededDatabaseHandlerException
public int getFeatureCount(long datasetSchemaId) throws DatabaseHandlerException
getFeatureCount
in interface DatabaseService
datasetSchemaId
- Unique identifier of the data-set versionDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLProject getProject(int tenantId, String userName, String projectName) throws DatabaseHandlerException
DatabaseService
getProject
in interface DatabaseService
tenantId
- tenant iduserName
- usernameprojectName
- project nameMLProject
objectDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLProject getProject(int tenantId, String userName, long projectId) throws DatabaseHandlerException
getProject
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantprojectId
- ID of the projectDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLProject> getAllProjects(int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
getAllProjects
in interface DatabaseService
tenantId
- tenant iduserName
- usernameMLProject
objectsDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLModelData> getProjectModels(int tenantId, String userName, long projectId) throws DatabaseHandlerException
getProjectModels
in interface DatabaseService
tenantId
- tenant IDuserName
- usernameprojectId
- Project IDMLModelData
objectsDatabaseHandlerException
public void deleteProject(int tenantId, String userName, long projectId) throws DatabaseHandlerException
DatabaseService
deleteProject
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantprojectId
- ID of the projectDatabaseHandlerException
public void deleteModel(int tenantId, String userName, long modelId) throws DatabaseHandlerException
DatabaseService
deleteModel
in interface DatabaseService
tenantId
- tenant iduserName
- usernamemodelId
- model idDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLAnalysis getAnalysis(int tenantId, String userName, long analysisId) throws DatabaseHandlerException
DatabaseService
getAnalysis
in interface DatabaseService
tenantId
- Tenant iduserName
- Tenant user nameanalysisId
- Unique id of the analysisMLAnalysis
objectDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLAnalysis> getAllAnalyses(int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
getAllAnalyses
in interface DatabaseService
tenantId
- tenant iduserName
- usernameMLAnalysis
objectsDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLAnalysis> getAllAnalysesOfProject(int tenantId, String userName, long projectId) throws DatabaseHandlerException
DatabaseService
getAllAnalysesOfProject
in interface DatabaseService
tenantId
- tenant iduserName
- user nameprojectId
- project idMLAnalysis
objectsDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLModelData getModel(int tenantId, String userName, String modelName) throws DatabaseHandlerException
DatabaseService
getModel
in interface DatabaseService
tenantId
- tenant iduserName
- usernamemodelName
- model nameMLModelData
objectDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLModelData getModel(int tenantId, String userName, long modelId) throws DatabaseHandlerException
DatabaseService
getModel
in interface DatabaseService
tenantId
- tenant iduserName
- usernamemodelId
- model idMLModelData
objectDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLModelData> getAllModels(int tenantId, String userName, long analysisId) throws DatabaseHandlerException
DatabaseService
getAllModels
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantanalysisId
- ID of the analysisMLModelData
objectsDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLModelData> getAllModels(int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
getAllModels
in interface DatabaseService
tenantId
- tenant iduserName
- usernameMLModelData
objectsDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLStorage getModelStorage(long modelId) throws DatabaseHandlerException
DatabaseService
getModelStorage
in interface DatabaseService
modelId
- unique id of the modelMLStorage
objectDatabaseHandlerException
public boolean isValidModelId(int tenantId, String userName, long modelId) throws DatabaseHandlerException
DatabaseService
isValidModelId
in interface DatabaseService
tenantId
- ID of the tenantuserName
- Username of the tenantmodelId
- ID of the modelDatabaseHandlerException
public void deleteAnalysis(int tenantId, String userName, long analysisId) throws DatabaseHandlerException
DatabaseService
deleteAnalysis
in interface DatabaseService
tenantId
- Tenant iduserName
- Tenant user nameanalysisId
- Unique id of the analysisDatabaseHandlerException
public void insertModelConfigurations(long analysisId, List<org.wso2.carbon.ml.commons.domain.MLModelConfiguration> modelConfigs) throws DatabaseHandlerException
DatabaseService
insertModelConfigurations
in interface DatabaseService
analysisId
- Analysis IDmodelConfigs
- MLModelConfiguration listDatabaseHandlerException
public void insertHyperParameters(long analysisId, List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> hyperParameters, String algorithmName) throws DatabaseHandlerException
DatabaseService
insertHyperParameters
in interface DatabaseService
analysisId
- Analysis IDhyperParameters
- MLHyperParameter listalgorithmName
- Algorithm nameDatabaseHandlerException
public List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> getHyperParametersOfModel(long analysisId, String algorithmName) throws DatabaseHandlerException
DatabaseService
getHyperParametersOfModel
in interface DatabaseService
analysisId
- Unique ID of the analysisalgorithmName
- Algorithm nameMLHyperParameter
objectsDatabaseHandlerException
public Map<String,String> getHyperParametersOfModelAsMap(long analysisId) throws DatabaseHandlerException
DatabaseService
getHyperParametersOfModelAsMap
in interface DatabaseService
analysisId
- unique id of the modelDatabaseHandlerException
public long getDatasetSchemaIdFromAnalysisId(long analysisId) throws DatabaseHandlerException
DatabaseService
getDatasetSchemaIdFromAnalysisId
in interface DatabaseService
analysisId
- ID of the analysisDatabaseHandlerException
public void insertDefaultsIntoFeatureCustomized(long analysisId, org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedValues) throws DatabaseHandlerException
DatabaseService
insertDefaultsIntoFeatureCustomized
in interface DatabaseService
analysisId
- ID of the analysiscustomizedValues
- customized featureDatabaseHandlerException
public void insertFeatureCustomized(long analysisId, List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> customizedFeatures, int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
insertFeatureCustomized
in interface DatabaseService
analysisId
- Analysis IdcustomizedFeatures
- MLCustomizedFeature listtenantId
- Tenant IduserName
- UsernameDatabaseHandlerException
public void updateSummaryStatistics(long datasetSchemaId, long datasetVersionId, org.wso2.carbon.ml.commons.domain.SummaryStats summaryStats) throws DatabaseHandlerException
DatabaseService
updateSummaryStatistics
in interface DatabaseService
datasetSchemaId
- Unique id of the dataset schemadatasetVersionId
- Unique Id of the data-set-versionsummaryStats
- Summary statsDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.Workflow getWorkflow(long analysisId) throws DatabaseHandlerException
DatabaseService
getWorkflow
in interface DatabaseService
analysisId
- unique id of the analysisWorkflow
objectDatabaseHandlerException
public String getAStringModelConfiguration(long analysisId, String configKey) throws DatabaseHandlerException
DatabaseService
getAStringModelConfiguration
in interface DatabaseService
analysisId
- Unique ID of the analysisconfigKey
- Model configuration keyDatabaseHandlerException
public double getADoubleModelConfiguration(long analysisId, String configKey) throws DatabaseHandlerException
DatabaseService
getADoubleModelConfiguration
in interface DatabaseService
analysisId
- unique id of the analysisconfigKey
- model configuration keyDatabaseHandlerException
public boolean getABooleanModelConfiguration(long analysisId, String configKey) throws DatabaseHandlerException
DatabaseService
getABooleanModelConfiguration
in interface DatabaseService
analysisId
- unique id of the analysisconfigKey
- model configuration keyDatabaseHandlerException
public void deleteDataset(long datasetId) throws DatabaseHandlerException
DatabaseService
deleteDataset
in interface DatabaseService
datasetId
- unique id of dataset schemaDatabaseHandlerException
public void deleteDatasetVersion(long datasetVersionId) throws DatabaseHandlerException
DatabaseService
deleteDatasetVersion
in interface DatabaseService
datasetVersionId
- unique id of dataset versionDatabaseHandlerException
public org.wso2.carbon.ml.commons.domain.MLAnalysis getAnalysisOfProject(int tenantId, String userName, long projectId, String analysisName) throws DatabaseHandlerException
DatabaseService
getAnalysisOfProject
in interface DatabaseService
tenantId
- Tenant iduserName
- Tenant user nameprojectId
- Unique id of the projectanalysisName
- Name of the analysisMLAnalysis
objectDatabaseHandlerException
public void updateSamplePoints(long datasetVersionId, org.wso2.carbon.ml.commons.domain.SamplePoints samplePoints) throws DatabaseHandlerException
DatabaseService
updateSamplePoints
in interface DatabaseService
datasetVersionId
- Unique Id of the data-set-versionsamplePoints
- Sample points of this dataset versionDatabaseHandlerException
public boolean isValidModelStatus(long modelId, int tenantId, String userName) throws DatabaseHandlerException
DatabaseService
isValidModelStatus
in interface DatabaseService
modelId
- ID of the modeltenantId
- Tenant iduserName
- Tenant user nameDatabaseHandlerException
public void shutdown() throws DatabaseHandlerException
DatabaseService
shutdown
in interface DatabaseService
DatabaseHandlerException
Copyright © 2016 WSO2, Inc.. All Rights Reserved.