#region License Information /* HeuristicLab * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion using System; using System.Collections.Generic; using System.Linq; using System.Text; using HeuristicLab.DataAnalysis; namespace HeuristicLab.Modeling.Database { public interface IModelingDatabase { bool ReadOnly { get; set; } void Connect(); void Commit(); void EmptyDatabase(); void Disconnect(); IEnumerable GetAllModels(); IEnumerable GetAllModelIds(); IEnumerable GetAllVariables(); IEnumerable GetAllResults(); IEnumerable GetAllResultsForInputVariables(); IEnumerable GetAllMetaData(); IEnumerable GetAllAlgorithms(); void Persist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription); IModel CreateModel(string modelName, ModelType modelType, IAlgorithm algorithm, IVariable targetVariable, int trainingSamplesStart, int trainingSamplesEnd, int validationSamplesStart, int validationSamplesEnd, int testSamplesStart, int testSamplesEnd); IModel CreateModel(int id, string modelName, ModelType modelType, IAlgorithm algorithm, IVariable targetVariable, int trainingSamplesStart, int trainingSamplesEnd, int validationSamplesStart, int validationSamplesEnd, int testSamplesStart, int testSamplesEnd); void PersistModel(IModel model); void DeleteModel(IModel model); Dataset GetDataset(); void PersistProblem(Dataset dataset); IVariable GetVariable(string variableName); IModel GetModel(int id); IPredictor GetModelPredictor(IModel model); void PersistPredictor(IModel model, IPredictor predictor); IInputVariable GetInputVariable(IModel model, string inputVariableName); IAlgorithm GetOrPersistAlgorithm(string algorithmName); IResult GetOrPersistResult(string resultName); IMetaData GetOrPersistMetaData(string metaDataName); IEnumerable GetModelResults(IModel model); IEnumerable GetInputVariableResults(IModel model); IEnumerable GetModelMetaData(IModel model); IModelResult CreateModelResult(IModel model, IResult result, double value); void PersistModelResults(IModel model, IEnumerable modelResults); IInputVariableResult CreateInputVariableResult(IInputVariable inputVariable, IResult result, double value); void PersistInputVariableResults(IModel model, IEnumerable inputVariableResults); IModelMetaData CreateModelMetaData(IModel model, IMetaData metadata, double value); void PersistModelMetaData(IModel model, IEnumerable modelMetaData); IInputVariable CreateInputVariable(IModel model, IVariable variable); } }