Documentation of exe_kg_lib.classes.tasks package
Overview¶
This package contains classes that correspond to entities of type owl:class
that are rdfs:subClassOf AtomicTask
in the KG.
They implement the abstract run_method()
like so:
- The input is taken either from outputs of previously executed Tasks (parameter:
other_task_output_dict
) or a dataframe (parameter:input_data
). - An algorithm is executed using the input.
There are two conventions: - The algorithm is related to ML, Statistics or Visualization, depending on the Python file's prefix. - The algorithm's implementation is placed in utils.task_utils
package in the Python file with the corresponding prefix. 3. The output is returned as a dictionary with pairs of output name and value.
Naming conventions¶
-
Each class name is a concatenation of 2 strings:
- The name of an
owl:class
that isrdfs:subClassOf AtomicTask
. - The name of an
owl:class
that isrdfs:subClassOf AtomicMethod
and is associated with the aboveowl:class
via a property that isrdfs:subPropertyOf hasMethod
.
For example, the below KG property associates
CanvasMethod
withCanvasTask
. So, the corresponding class name will beCanvasTaskCanvasMethod
.visu:hasCanvasMethod a owl:ObjectProperty ; rdfs:domain visu:CanvasTask ; rdfs:range visu:CanvasMethod ; rdfs:subPropertyOf ds:hasMethod .
- The name of an
-
The class fields that contain
_
are the snake-case conversions of the equivalent camel-case property names in the KG.
e.g. has_split_ratio
field corresponds to hasSplitRatio
property in the KG.
The above conventions are necessary for automatically mapping KG tasks with methods and properties to Python objects while parsing the KG.