Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 3052 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
RevLine 
[2188]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;
[2185]23using System.Collections.Generic;
24using System.Linq;
25using System.Text;
[2304]26using HeuristicLab.DataAnalysis;
[2185]27
[2188]28namespace HeuristicLab.Modeling.Database {
[2185]29  public interface IModelingDatabase {
[2451]30    bool ReadOnly { get; set; }
[2382]31    void Connect();
[2530]32    void Commit();
[2382]33    void EmptyDatabase();
34    void Disconnect();
[2304]35
[2188]36    IEnumerable<IModel> GetAllModels();
[2451]37    IEnumerable<int> GetAllModelIds();
[2382]38    IEnumerable<IVariable> GetAllVariables();
39    IEnumerable<IResult> GetAllResults();
[2207]40    IEnumerable<IResult> GetAllResultsForInputVariables();
[2355]41    IEnumerable<IMetaData> GetAllMetaData();
[2278]42    IEnumerable<IAlgorithm> GetAllAlgorithms();
[2382]43
[2530]44    void Persist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription);
[2382]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);
[2530]48    IModel CreateModel(int id, string modelName, ModelType modelType, IAlgorithm algorithm, IVariable targetVariable,
[2389]49    int trainingSamplesStart, int trainingSamplesEnd, int validationSamplesStart, int validationSamplesEnd, int testSamplesStart, int testSamplesEnd);
[2382]50    void PersistModel(IModel model);
51    void DeleteModel(IModel model);
52
[2304]53    Dataset GetDataset();
[2382]54    void PersistProblem(Dataset dataset);
55    IVariable GetVariable(string variableName);
56
[2451]57    IModel GetModel(int id);
[2292]58    IPredictor GetModelPredictor(IModel model);
[2382]59    void PersistPredictor(IModel model, IPredictor predictor);
[2389]60    IInputVariable GetInputVariable(IModel model, string inputVariableName);
[2382]61
62    IAlgorithm GetOrPersistAlgorithm(string algorithmName);
63
64    IResult GetOrPersistResult(string resultName);
65    IMetaData GetOrPersistMetaData(string metaDataName);
66
[2304]67    IEnumerable<IModelResult> GetModelResults(IModel model);
[2217]68    IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model);
[2355]69    IEnumerable<IModelMetaData> GetModelMetaData(IModel model);
[2217]70
[2382]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);
[2384]77    IInputVariable CreateInputVariable(IModel model, IVariable variable);
[2185]78  }
79}
Note: See TracBrowser for help on using the repository browser.