Fraction Scan
puma.fraction_scan.get_fx_values
#
Calculate the fraction values which are to be tested.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resolution
|
int
|
Resolution of the fraction values, by default 100 |
100
|
Returns:
Type | Description |
---|---|
numpy.ndarray
|
Array with the fraction values that are to be used. |
Source code in puma/fraction_scan.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
puma.fraction_scan.get_efficiency
#
Calculate the efficiency for a given set of scores that are above a certain threshold.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scores
|
numpy.ndarray
|
Array of the output scores. |
required |
fx
|
float
|
Cut threshold for which needs to be passed. |
required |
Returns:
Type | Description |
---|---|
float
|
Efficiency (in percent) how many scores pass the threshold. |
Source code in puma/fraction_scan.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
puma.fraction_scan.get_optimal_fraction_value
#
After calculating a fraction scan, find the optimal fraction value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fraction_scan
|
numpy.ndarray
|
2D array of efficiency (or rejection) scores for each fraction value. |
required |
fraction_space
|
numpy.ndarray
|
1D array of fraction values. |
required |
rej
|
bool
|
If True, find the maximum rejection values else find the minimum efficiency values, by default False. |
False
|
Returns:
Type | Description |
---|---|
tuple[numpy.ndarray, numpy.ndarray]
|
Returns the optimal fraction value (index) and the actual value. |
Source code in puma/fraction_scan.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|