ods-anomalydetection
ods-anomalydetection copied to clipboard
Error when run DenStream.runOnNewSample() without run DenStream.runInitialization()
Hello,
When I try to run your code without runInitialization function I get the follow error:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "
This error can be resolved changing this line:
self.buffer.append(sample)
for:
self.buffer.append(sample.value)
Solved!
Now I get another error:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "
I noted that the variable numberInitialSamples is not defined. So I'm thinking if I need change the way that a run the code or there are bugs when try to run the code for multicluster operations...
I hope you can help me with this problem. Regards.
Hello, Unfortunately, the algorithm has a very specific purpose right now (anomaly detection) so the initial clustering part is not very well developed. In particular, for now, the algorithm manages two clusters: Normal or abnormal. So if it is able to merge the new sample to the core-micro-clusters the output is 'Normal', 'Abnormal' otherwise.
In the next updates I can add the multicluster support (now, unfortunately, I work on something else). If you wanna contribute any help is welcome. If you try to use the multicluster operations now I think you're going to obtain only bad results.
For what concerns your error: self.numberInitialSamples
is initialized to None thus you have to assign a value during the initialization phase, something like this:
den = DenStream(lamb=0.03, epsilon='auto', beta=0.03, mu='auto', ..., numberInitialSamples=XX)
Hope this can help you, but anyway the code is not ready for multiclustering (just 2 clusters: normal and abnormal in my case.)
Write to me if you need anything else.
Kindly let me know how to run for anomaly detection there is no help for startingBuffer in initialization.. Thnx in advance