Compute Indicator error - name 'self' is not defined
Closed this issue · 3 comments
Hi I tried to run this:
define custom filter condition
filter_conditions_config = [
{'condition_1':[
(0.0, 0.1), # tc_range
(0,1), # m_range
(4,25), # w_range
2.5, # O_min
0.5, # D_min
]},
]
compute the confidence indicator
res = lppls_model.mp_compute_indicator(
workers=32,
window_size=120,
smallest_window_size=30,
increment=5,
max_searches=25,
filter_conditions_config=filter_conditions_config
)
res_df = self.res_to_df(res, 'condition_1')
lppls_model.plot_confidence_indicators(res_df, title='Short Term Indicator 30-120')
And got this error:
NameError Traceback (most recent call last)
in ()
19 filter_conditions_config=filter_conditions_config
20 )
---> 21 res_df = self.res_to_df(res, 'condition_1')
22 lppls_model.plot_confidence_indicators(self, res_df, title='Short Term Indicator 30-120')
23
NameError: name 'self' is not defined
This is due to the most recent PR I merged. I will get a fix out shortly.
Actually, if you change res_df = self.res_to_df(res, 'condition_1')
to res_df = res_to_df(res, 'condition_1')
, things should work. Sorry about the delay and misinformation. I just had a typo in the readme. Let me know if you experience further complications.
19 filter_conditions_config=filter_conditions_config
20 )
---> 21 res_df = res_to_df(res, 'condition_1')
22 lppls_model.plot_confidence_indicators(res_df, title='Short Term Indicator 120-30')
23
NameError: name 'res_to_df' is not defined
still getting Name Error