Skip to content
Snippets Groups Projects
Commit 4c9c2c93 authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Set 'self.fold_len' to protected.

parent f897dc57
No related branches found
No related tags found
No related merge requests found
......@@ -318,23 +318,23 @@ class Boxplot(WaveletDetector):
self.function_name = 'Boxplot'
# Unpack necessary configurations
self.fold_len = config.pop('fold_len', 16)
self._fold_len = config.pop('fold_len', 16)
self._whisker_len = config.pop('whisker_len', 3)
def _get_cells(self, multiwavelet_coeffs, projection):
indexed_coeffs = [[multiwavelet_coeffs[0, i], i]for i in range(self._num_coarse_grid_cells)]
if self._num_coarse_grid_cells < self.fold_len:
self.fold_len = self._num_coarse_grid_cells
if self._num_coarse_grid_cells < self._fold_len:
self._fold_len = self._num_coarse_grid_cells
num_folds = self._num_coarse_grid_cells//self.fold_len
num_folds = self._num_coarse_grid_cells//self._fold_len
troubled_cells = []
for fold in range(num_folds):
sorted_fold = sorted(indexed_coeffs[fold * self.fold_len:(fold+1) * self.fold_len])
sorted_fold = sorted(indexed_coeffs[fold * self._fold_len:(fold+1) * self._fold_len])
boundary_index = self.fold_len//4
balance_factor = self.fold_len/4.0 - boundary_index
boundary_index = self._fold_len//4
balance_factor = self._fold_len/4.0 - boundary_index
first_quartile = (1-balance_factor) * sorted_fold[boundary_index-1][0] \
+ balance_factor * sorted_fold[boundary_index][0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment