Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs @ 3038

Last change on this file since 3038 was 2530, checked in by mkommend, 15 years ago

changed modeling database backend to use a shared read connection => notification by exception if another program is connected to the database (ticket #759)

File size: 3.5 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using System.Linq;
25using System.Text;
26using HeuristicLab.DataAnalysis;
27
28namespace HeuristicLab.Modeling.Database {
29  public interface IModelingDatabase {
30    bool ReadOnly { get; set; }
31    void Connect();
32    void Commit();
33    void EmptyDatabase();
34    void Disconnect();
35
36    IEnumerable<IModel> GetAllModels();
37    IEnumerable<int> GetAllModelIds();
38    IEnumerable<IVariable> GetAllVariables();
39    IEnumerable<IResult> GetAllResults();
40    IEnumerable<IResult> GetAllResultsForInputVariables();
41    IEnumerable<IMetaData> GetAllMetaData();
42    IEnumerable<IAlgorithm> GetAllAlgorithms();
43
44    void Persist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription);
45
46    IModel CreateModel(string modelName, ModelType modelType, IAlgorithm algorithm, IVariable targetVariable,
47      int trainingSamplesStart, int trainingSamplesEnd, int validationSamplesStart, int validationSamplesEnd, int testSamplesStart, int testSamplesEnd);
48    IModel CreateModel(int id, string modelName, ModelType modelType, IAlgorithm algorithm, IVariable targetVariable,
49    int trainingSamplesStart, int trainingSamplesEnd, int validationSamplesStart, int validationSamplesEnd, int testSamplesStart, int testSamplesEnd);
50    void PersistModel(IModel model);
51    void DeleteModel(IModel model);
52
53    Dataset GetDataset();
54    void PersistProblem(Dataset dataset);
55    IVariable GetVariable(string variableName);
56
57    IModel GetModel(int id);
58    IPredictor GetModelPredictor(IModel model);
59    void PersistPredictor(IModel model, IPredictor predictor);
60    IInputVariable GetInputVariable(IModel model, string inputVariableName);
61
62    IAlgorithm GetOrPersistAlgorithm(string algorithmName);
63
64    IResult GetOrPersistResult(string resultName);
65    IMetaData GetOrPersistMetaData(string metaDataName);
66
67    IEnumerable<IModelResult> GetModelResults(IModel model);
68    IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model);
69    IEnumerable<IModelMetaData> GetModelMetaData(IModel model);
70
71    IModelResult CreateModelResult(IModel model, IResult result, double value);
72    void PersistModelResults(IModel model, IEnumerable<IModelResult> modelResults);
73    IInputVariableResult CreateInputVariableResult(IInputVariable inputVariable, IResult result, double value);
74    void PersistInputVariableResults(IModel model, IEnumerable<IInputVariableResult> inputVariableResults);
75    IModelMetaData CreateModelMetaData(IModel model, IMetaData metadata, double value);
76    void PersistModelMetaData(IModel model, IEnumerable<IModelMetaData> modelMetaData);
77    IInputVariable CreateInputVariable(IModel model, IVariable variable);
78  }
79}
Note: See TracBrowser for help on using the repository browser.