easyvvuq.analysis.base
Provides a base class for all analysis elements.
1"""Provides a base class for all analysis elements. 2""" 3from .. import BaseElement 4 5__copyright__ = """ 6 7 Copyright 2018 Robin A. Richardson, David W. Wright 8 9 This file is part of EasyVVUQ 10 11 EasyVVUQ is free software: you can redistribute it and/or modify 12 it under the terms of the Lesser GNU General Public License as published by 13 the Free Software Foundation, either version 3 of the License, or 14 (at your option) any later version. 15 16 EasyVVUQ is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 Lesser GNU General Public License for more details. 20 21 You should have received a copy of the Lesser GNU General Public License 22 along with this program. If not, see <https://www.gnu.org/licenses/>. 23 24""" 25__license__ = "LGPL" 26 27 28class BaseAnalysisElement(BaseElement): 29 """Base class for all EasyVVUQ analysis elements. 30 31 Attributes 32 ---------- 33 34 """ 35 36 def analyse(self, data_frame=None): 37 """Perform analysis on input `data_frame`. 38 39 Parameters 40 ---------- 41 data_frame : pandas DataFrame 42 Input data for analysis. 43 44 Returns 45 ------- 46 AnalysisResults instance 47 """ 48 raise NotImplementedError 49 50 def element_category(self): 51 """Element type for logging and verification. 52 53 Returns 54 ------- 55 str 56 Element category. 57 """ 58 return "analysis" 59 60 def element_name(self): 61 """Name for this element for logging purposes. 62 63 Returns 64 ------- 65 str 66 Element name. 67 """ 68 raise NotImplementedError 69 70 def element_version(self): 71 """Version of this element for logging purposes. 72 73 Returns 74 ------- 75 str 76 Element version. 77 """ 78 raise NotImplementedError
29class BaseAnalysisElement(BaseElement): 30 """Base class for all EasyVVUQ analysis elements. 31 32 Attributes 33 ---------- 34 35 """ 36 37 def analyse(self, data_frame=None): 38 """Perform analysis on input `data_frame`. 39 40 Parameters 41 ---------- 42 data_frame : pandas DataFrame 43 Input data for analysis. 44 45 Returns 46 ------- 47 AnalysisResults instance 48 """ 49 raise NotImplementedError 50 51 def element_category(self): 52 """Element type for logging and verification. 53 54 Returns 55 ------- 56 str 57 Element category. 58 """ 59 return "analysis" 60 61 def element_name(self): 62 """Name for this element for logging purposes. 63 64 Returns 65 ------- 66 str 67 Element name. 68 """ 69 raise NotImplementedError 70 71 def element_version(self): 72 """Version of this element for logging purposes. 73 74 Returns 75 ------- 76 str 77 Element version. 78 """ 79 raise NotImplementedError
Base class for all EasyVVUQ analysis elements.
Attributes
def
analyse(self, data_frame=None):
37 def analyse(self, data_frame=None): 38 """Perform analysis on input `data_frame`. 39 40 Parameters 41 ---------- 42 data_frame : pandas DataFrame 43 Input data for analysis. 44 45 Returns 46 ------- 47 AnalysisResults instance 48 """ 49 raise NotImplementedError
Perform analysis on input data_frame.
Parameters
- data_frame (pandas DataFrame): Input data for analysis.
Returns
- AnalysisResults instance
def
element_category(self):
51 def element_category(self): 52 """Element type for logging and verification. 53 54 Returns 55 ------- 56 str 57 Element category. 58 """ 59 return "analysis"
Element type for logging and verification.
Returns
- str: Element category.