Static Expression This kind of feature will load data from provider
| 236 | |
| 237 | |
| 238 | class Feature(Expression): |
| 239 | """Static Expression |
| 240 | |
| 241 | This kind of feature will load data from provider |
| 242 | """ |
| 243 | |
| 244 | def __init__(self, name=None): |
| 245 | if name: |
| 246 | self._name = name |
| 247 | else: |
| 248 | self._name = type(self).__name__ |
| 249 | |
| 250 | def __str__(self): |
| 251 | return "$" + self._name |
| 252 | |
| 253 | def _load_internal(self, instrument, start_index, end_index, freq): |
| 254 | # load |
| 255 | from .data import FeatureD # pylint: disable=C0415 |
| 256 | |
| 257 | return FeatureD.feature(instrument, str(self), start_index, end_index, freq) |
| 258 | |
| 259 | def get_longest_back_rolling(self): |
| 260 | return 0 |
| 261 | |
| 262 | def get_extended_window_size(self): |
| 263 | return 0, 0 |
| 264 | |
| 265 | |
| 266 | class PFeature(Feature): |