LogarithmFD Component Specification¶
Contents
Overview¶
LogarithmFD component is a feature descriptor. This component produces the logarithm of an input. The scale of the input must be INTEGER or REAL.
Example:
SPD:
dl1 -> log1 --- components: dl1: component: DataLoader log1: component: LogarithmFDComponent features: scale == 'real' or scale == 'integer' base: 10
Input of the component:
_sid
temperature
pressure
0
22.3
1001
1
21.8
1002
2
inf
NaN
3
23.4
1002
4
-inf
1002
Output of the component:
_sid
log1_temperature
log1_pressure
0
1.348305
3.000434
1
1.338456
3.000868
2
inf
NaN
3
1.369216
3.000868
4
-inf
3.000868
This component has no component-specific external formats.
See also
Component-common external format files in convert_process
Parameters¶
Here is the component-specific parameter for the LogarithmFD component. Symbol \(\mathrm{e}\) is the Napier’s constant.
SPD¶
The following parameter is for “components” section of SPD.
Parameter Name |
Type |
Domain |
Default Value |
Description |
---|---|---|---|---|
base |
float |
2, 10, \(\mathrm{e}\) |
\(\mathrm{e}\) |
The base of a logarithm. This component produces logarithm values with respect to the base. If you like to designate \(\mathrm{e}\) (Napier’s constant) as base, please describe it as a character ‘e’ in SPD files as shown below: base: 'e'
|
Output Attributes¶
LogarithmFD component generates the following attribute:
Attribute Name |
Scale |
Description |
---|---|---|
<component_id>_<original_attribute_name> |
REAL |
Logarithm of the original attribute. |
These attributes are in the component output data. These can be loaded in SAMPO API or saved as data.csv after executing convert_process.
See also
Obtaining process results via ProcessResultLoader.
Attribute Metadata¶
The metadata of the output attributes is created with the following rules.
Context Rule¶
Attribute Name |
Context Name |
Description |
---|---|---|
<component_id>_<original_attribute_name> |
base |
Set the value of |
Derivation Rule¶
Each new attribute is derived from the corresponding attribute selected by the features
parameter of the component.
Example¶
{
"nodes": [
{"aid": "_sid", "name": "_sid", ... },
{"aid": "dl1[0]", "name": "temperature", ... },
{"aid": "dl1[1]", "name": "pressure", ... },
{"aid": "log1[0]", "name": "log1_temperature", "scale": "real",
"is_excluded": false, "cid": "log1", "cindex": 0, "values": null,
"is_kept": false, "context": {"base": 10}},
{"aid": "log1[1]", "name": "log1_pressure", "scale": "real",
"is_excluded": false, "cid": "log1", "cindex": 1, "values": null,
"is_kept": false, "context": {"base": 10}}
],
"links": [
{"source": "dl1[0]", "target": "log1[0]"},
{"source": "dl1[1]", "target": "log1[1]"}
]
}
See also
Attribute metadata file format in Attribute Metadata File Specification
Details¶
In the learning phase, this component only checks if the base parameter is valid.
In the running phase, this component produces an output output value from an input input value as shown below:
- input value is NaN:
output value = NaN
- input value \(\leq -\mathrm{e}\):
output value = -log(- input value, base)
- \(-\mathrm{e} \leq\) input value \(\leq \mathrm{e}\):
output value = input value / (\(\mathrm{e} \times\) log(base, \(\mathrm{e}\)))
- \(\mathrm{e} \leq\) input value:
output value = log(input value, base)
where log(x, base) is a function returns the logarithm of x to base.