TemporalNet
Bases: EconomicNetwork
Source code in wt_ml/networks/temporal_net.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 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 |
|
build(input_shapes)
Build the layers needed for temporal net.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_shapes |
Tuple[Tensor, ...]
|
Tuple of tensor shapes of positional arguments passed to |
required |
Source code in wt_ml/networks/temporal_net.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
create_network_phs(batch, training=False)
Method to convert dataset object data into tensors for network inputs. Also handles data objects passed in kwargs externally.
Source code in wt_ml/networks/temporal_net.py
74 75 76 77 78 79 80 |
|
get_baseline(impacts, training=False, debug=False, skip_metrics=False)
Calling the linear baseline layer to compute the baseline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
impacts |
ImpactsIntermediaries
|
Additive or multiplicative impacts on baseline |
required |
training |
bool
|
Whether training the model parameters or not. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
Tensor
|
tf.Tensor: calculated baseline |
dict[str, LinearBaselineIntermediaries]
|
dict[str,LinearBaselineIntermediaries]: Dictionary of intermediate calculations for baseline, like slope, intercept, etc. |
Source code in wt_ml/networks/temporal_net.py
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 |
|