Feature Selection Methods
SelectionMethod
Bases: ABC
SelectionMethod abstract class
Source code in fpcmci/selection_methods/SelectionMethod.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
name
property
Returns Selection Method name
Returns:
Type | Description |
---|---|
str
|
Selection Method name |
compute_dependencies()
abstractmethod
abstract method
Source code in fpcmci/selection_methods/SelectionMethod.py
70 71 72 73 74 75 |
|
initialise(data, alpha, min_lag, max_lag, graph)
Initialises the selection method
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Data
|
Data |
required |
alpha |
float
|
significance threshold |
required |
min_lag |
int
|
min lag time |
required |
max_lag |
int
|
max lag time |
required |
Source code in fpcmci/selection_methods/SelectionMethod.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
Corr
Bases: SelectionMethod
Feature selection method based on Correlation analysis
Source code in fpcmci/selection_methods/Corr.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
__init__()
Corr contructor class
Source code in fpcmci/selection_methods/Corr.py
9 10 11 12 13 |
|
compute_dependencies()
compute list of dependencies for each target by correlation analysis
Returns:
Type | Description |
---|---|
dict
|
dictonary(TARGET: list SOURCES) |
Source code in fpcmci/selection_methods/Corr.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
ParCorr
Bases: SelectionMethod
Feature selection method based on Partial Correlation analysis
Source code in fpcmci/selection_methods/ParCorr.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 76 77 78 79 80 81 82 83 |
|
__init__()
ParCorr class contructor
Source code in fpcmci/selection_methods/ParCorr.py
10 11 12 13 14 |
|
compute_dependencies()
compute list of dependencies for each target by partial correlation analysis
Returns:
Type | Description |
---|---|
dict
|
dictonary(TARGET: list SOURCES) |
Source code in fpcmci/selection_methods/ParCorr.py
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 76 77 78 79 80 81 82 83 |
|
get_residual(covar, target)
Calculate residual of the target variable obtaining conditioning on the covar variables
Parameters:
Name | Type | Description | Default |
---|---|---|---|
covar |
np.array
|
conditioning variables |
required |
target |
np.array
|
target variable |
required |
Returns:
Type | Description |
---|---|
np.array
|
residual |
Source code in fpcmci/selection_methods/ParCorr.py
17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
partial_corr(X, Y, Z)
Calculate Partial correlation between X and Y conditioning on Z
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
np.array
|
source candidate variable |
required |
Y |
np.array
|
target variable |
required |
Z |
np.array
|
conditioning variable |
required |
Returns:
Type | Description |
---|---|
(float, float)
|
partial correlation, p-value |
Source code in fpcmci/selection_methods/ParCorr.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
MI
Bases: SelectionMethod
Feature selection method based on Mutual Information analysis
Source code in fpcmci/selection_methods/MI.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
__init__(estimator)
MI class contructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
estimator |
MIestimator
|
Gaussian/Kraskov |
required |
Source code in fpcmci/selection_methods/MI.py
15 16 17 18 19 20 21 22 23 |
|
compute_dependencies()
compute list of dependencies for each target by mutual information analysis
Returns:
Type | Description |
---|---|
dict
|
dictonary(TARGET: list SOURCES) |
Source code in fpcmci/selection_methods/MI.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
TE
Bases: SelectionMethod
Feature selection method based on Trasfer Entropy analysis
Source code in fpcmci/selection_methods/TE.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 76 77 78 79 80 81 82 83 84 85 86 87 |
|
__init__(estimator)
TE class contructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
estimator |
TEestimator
|
Gaussian/Kraskov |
required |
Source code in fpcmci/selection_methods/TE.py
19 20 21 22 23 24 25 26 27 |
|
compute_dependencies()
compute list of dependencies for each target by transfer entropy analysis
Returns:
Type | Description |
---|---|
dict
|
dictonary(TARGET: list SOURCES) |
Source code in fpcmci/selection_methods/TE.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 76 77 78 79 80 81 82 83 84 85 86 87 |
|