| |
- builtins.object
-
- ProjectVectorABC
- enum.Enum(builtins.object)
-
- Datasource
- VectorType
class Datasource(enum.Enum) |
|
Datasource(value, names=None, *, module=None, qualname=None, type=None, start=1)
Defines the source of a project vector. The source does not neccesarily indicate that the data
comes directly from that source, it can be a transformation of data from the source or data that
is associated with the source in some other way.
uninitialized --- Only used to indicate that a variable hasn't been initialized to a valid value yet.
dataset --- The source of the data is a dataset.
Project vectors with this source will be available in the plot/list dialogs when a
dataset is selected.
model --- The source of the data is a model.
Project vectors with this source will be available in the plot/list dialogs when a
model is selected. |
|
- Method resolution order:
- Datasource
- enum.Enum
- builtins.object
Data and other attributes defined here:
- dataset = <Datasource.dataset: 1>
- model = <Datasource.model: 2>
- uninitialized = <Datasource.uninitialized: -1>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class ProjectVectorABC(builtins.object) |
|
Abstract base class for project vectors.
Properties:
name --- The short name of the data. This string will show up in the plot list dialog.
The name should be short and can not contain blanks or comma (,).
Must be set in the inherited class.
vectortype --- See VectorType.
Must be set in the inherited class.
datasource --- See Datasource.
Must be set in the inherited class.
help_string --- A short help string (one or two lines).
Setting the help is optional. |
|
Methods defined here:
- get_data(self, project)
- This method must be implemented in the inherited class and must return a umetrics.simca.ProjectData object.
The inherited class can have other arguments than in the base class. SIMCA uses the names of the arguments
to evaluate what information the method needs to be able to produce the data.
Allowed argument names are:
self --- This is mandatory and must be the first argument.
model --- A model number.
comp --- A (predictive) component number
comp_end --- Used with 'comp' to specify a sequence of components from 'comp' to and including 'comp_end'.
comp_ortho_x --- An orthogonal component in the X block. Only available for OPLS and O2PLS models.
comp_ortho_y --- An orthogonal component in the Y block. Only available for OPLS and O2PLS models.
selcv --- A cross validation group number.
variable --- A variable name.
xvariable --- The name of an X-variable in a model.
yvariable --- The name of an Y-variabel in a model.
observation --- An observation name.
project --- The project associated with the data
dataset --- A dataset number
Depending on what arguments the metod takes, controls in the Plot/List dialogs will be enabled to
select them.
Not all combinations of arguments are allowed:
model can not be combined with dataset.
comp_end must be used with comp.
observation and variable can not be used together.
xvariable and yvariable can only be used with models.
The order of the arguments are not important, just the names. get_data(model, project, comp)
and get_data(comp, model, project) will behave the same way.
- get_ids(self, project)
- This method must be implemented in the inherited class and must return a umetrics.simca.ValueIDs object.
See get_data for an explanation of the arguments.
get_ids does not need to take all of the arguments of get_data, it can use a subset of them.
- is_valid_dataset(self, project, dataset_info)
- Override this method in the inherited class if the vector is only to be available
for certain datasets.
If the vector can be used with the dataset, return True, otherwise False.
- is_valid_model(self, project, model_info)
- Override this method in the inherited class if the vector is only to be available
for certain models.
If the vector can be used with the model, return True, otherwise False.
- is_valid_project(self, project)
- Override this method in the inherited class if the vector is only to be available
for certain projects.
If the vector can be used with the project, return True, otherwise False.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- __abstractmethods__ = frozenset({'get_data', 'get_ids'})
- datasource = <Datasource.uninitialized: -1>
- help_string = ''
- name = ''
- vectortype = <VectorType.uninitialized: -1>
|
class VectorType(enum.Enum) |
|
VectorType(value, names=None, *, module=None, qualname=None, type=None, start=1)
Defines the type of a project vector.
This determines what each value corresponds to.
uninitialized --- Only used to indicate that a variable hasn't been initialized to a valid value yet.
variable_type --- The vector will be available in the Plot/List dialogs if 'Variable and Scores'
is seelcted.
observation_type --- The vector will be available in the Plot/List dialogs if 'Observations and Loadings'
is selected. |
|
- Method resolution order:
- VectorType
- enum.Enum
- builtins.object
Data and other attributes defined here:
- observation_type = <VectorType.observation_type: 2>
- uninitialized = <VectorType.uninitialized: -1>
- variable_type = <VectorType.variable_type: 1>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
| |