Skip to content

← machine_learning package

LinearToProbabilities

Convert linear predictions to (two-class) pseudo-probabilities.

This node can be chained after e.g., ApplyLinearTransform if that node is meant to implement a linear classifier. The resulting data format is then the same as generated by the other classification nodes. Note that this node assumes that your linear scores are signed, i.e., negative scores encode that the first or negative class ("class 0") is more probable and positive scores encode that the second or positive class ("class 1") is more probable, and that they are in a somewhat reasonable range (e.g., the two class means mapping to -1 and +1). The resulting scores will be in a 0-1 range and somewhat behave like probabilities, but be aware that they will not be properly calibrated and thus this procedure should be viewed as a cheap "trick" to get probabilities. For an accurate transformation, use the Probability Calibration node instead. More Info... Version 0.8.0

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
INOUT

replace_axis

Replace prior feature axis (if applicable). This will check if the data contains a prior one-element (i.e., dummy) feature axis and replace it with the new two-class axis. This can be necessary for downstream nodes to recognize the output as well-formed two-class probabilistic predictions.

verbose name
Replace Prior Axis
default value
True
port type
BoolPort
value type
bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)