pyamr.metrics package

Submodules

pyamr.metrics.scores module

pyamr.metrics.weights module

Classes:

SigmoidA([r, g, offset, scale, percentiles, ...])

class pyamr.metrics.weights.SigmoidA(r=200, g=0.5, offset=0.0, scale=1.0, percentiles=None, thresholds=None)[source]

Bases: object

Methods:

approximated_sigmoid(x[, x_curves])

This function computes the approximated sigmoid.

threshold(r, x[, thresholds])

This function thresholds the r given the values of x.

weights(x)

This cuntion computes the weights.

weights_percentile(x, percentiles)

This function returns the weights.

weights_standard(x)

This function returns the weights.

approximated_sigmoid(x, x_curves=None)[source]

This function computes the approximated sigmoid.

Note: The approximated sigmoid is defined within the interval [0,1].

Parameters:
  • x (numpy.array) – The values to be converted to weights.

  • x_curves (tuple) – The values indicating where the low/upper curves should start.

Returns:

r – The weights.

Return type:

numpy.array

threshold(r, x, thresholds=(None, None))[source]

This function thresholds the r given the values of x.

Parameters:
  • x (numpy.array) – The values to be converted to weights.

  • r (numpy.array) – The weights to be thresholded.

  • threshold_low (number;) – The values in x lower will have minimum weight.

  • treshold_high (number;) – The values in x higher will have maximum weight.

weights(x)[source]

This cuntion computes the weights.

Parameters:
  • x

  • x_percentiles

  • x_threshold_low

  • x_threshold_high

weights_percentile(x, percentiles)[source]

This function returns the weights.

Parameters:
  • x

  • x_percentiles

Return type:

weights

weights_standard(x)[source]

This function returns the weights.

Module contents