Preprocessing
Data
Data class manages the preprocess of the data before the causal analysis
Source code in fpcmci/preprocessing/data.py
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 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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
N
property
Number of features
Returns:
Type | Description |
---|---|
int
|
number of features |
T
property
Dataframe length
Returns:
Type | Description |
---|---|
int
|
dataframe length |
features
property
Returns list of features
Returns:
Name | Type | Description |
---|---|---|
list |
str
|
list of feature names |
pretty_features
property
Returns list of features with LATEX symbols
Returns:
Name | Type | Description |
---|---|---|
list |
str
|
list of feature names |
__init__(data, vars=None, fill_nan=True, stand=False, subsampling=None, show_subsampling=False)
Data class constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
str / DataFrame / np.array
|
it can be a string specifing the path of a csv file to load/pandas.DataFrame/numpy.array |
required |
vars |
list(str)
|
List containing variable names. If unset then, if data = (str/DataFrame) vars = data columns name elif data = np.array vars = [X_0 .. X_N] Defaults to None. |
None
|
fill_nan |
bool
|
Fill NaNs bit. Defaults to True. |
True
|
stand |
bool
|
Standardization bit. Defaults to False. |
False
|
subsampling |
SubsamplingMethod
|
Subsampling method. If None not active. Defaults to None. |
None
|
show_subsampling |
bool
|
If True shows subsampling result. Defaults to False. |
False
|
Raises:
Type | Description |
---|---|
TypeError
|
if data is not str - DataFrame - ndarray |
Source code in fpcmci/preprocessing/data.py
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 |
|
plot_timeseries()
Plots timeseries data
Source code in fpcmci/preprocessing/data.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
shrink(selected_features)
Shrinks dataframe d and dependencies based on the selected features
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selected_features |
list(str
|
features selected by the selector |
required |
Source code in fpcmci/preprocessing/data.py
113 114 115 116 117 118 119 120 |
|