capsa-tf

Submodules

Top-Level Attributes

class capsa_tf.RiskOutput
RiskOutput(pred, risk): Namedtuple representing the output of a model with Risk. Returned by wrapped model’s when the

return_risk=True argument is passed. Can be treated as regular tuple.

# Automatically unpacks like a regular tuple
pred, risk = wrapped_model(..., return_risk=True)

out = wrapped_model(..., return_risk=True)
type(out) # RiskOutput
out.pred # (or out[0]) Access model prediction
out.risk # (or out[1]) Access risk associated with model prediction
static __new__(_cls, pred, risk)

Create new instance of RiskOutput(pred, risk)

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

pred

Alias for field number 0

risk

Alias for field number 1