Open londumas opened 4 years ago
In /code/synthetic_experiments/mixture_noisy.ipynb
/code/synthetic_experiments/mixture_noisy.ipynb
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-9-36146f7a43bc> in <module>() 9 t_indices = get_truth(pts, means, covs) 10 iso_indices = get_iso(noisy_pts) ---> 11 gsw_indices = get_density(noisy_pts) 12 em_indices = get_em(noisy_pts, n_Gaussians) 13 us = len(set(t_indices).intersection(set(gsw_indices))) <ipython-input-6-0ae6d3397a6f> in get_density(noisy_pts) 23 _, n_p = np.shape(noisy_pts) 24 kwargs = {'max_depth': 20, 'n_trees':int(n_p / 50), 'max_samples': 100, 'max_buckets': 2, 'epsilon': 0.1, 'sample_axis': 1} ---> 25 forest = Forest(**kwargs) 26 forest.fit(noisy_pts) 27 gsw_indices, outliers, scores , pst = forest.predict(noisy_pts, 0.1) <HOME>/pidforest/code/scripts/forest.py in __init__(self, **kwargs) 30 self.epsilon = kwargs['epsilon'] 31 self.sample_axis = kwargs['sample_axis'] ---> 32 self.threshold = kwargs['threshold'] 33 self.tree = [] 34 # np.random.seed(seed = 17) KeyError: 'threshold'
In
/code/synthetic_experiments/mixture_noisy.ipynb