Hello,
I'm trying to make a small modification to the LinearClassifier so that, before it applies the weight, it removes the mean of that input over a period of time. I tried implementing it by using a 2-dimensional vector (EntriesInTable X BufferLength). I update the buffer for every iteration of the program and calculate the mean before applying the classifier weights.
The problem I have is that my processor usage goes up to 100% even before it reaches the point to update the buffer (before the buffer length is reached). Is there a better way to implement this? I can send chunks of code if necessary.
Thanks,
Gus
Remove the mean continuously
-
gschalk
- Posts: 615
- Joined: 28 Jan 2003, 12:37
mean subtraction ...
Gus,
Calculating the mean for a particular feature for a given period of time should not take much time regardless of how it's implemented, so the 100% CPU load very strongly indicates a programming error.
What you could do is to implement an very simple IIR filter where
mean_new=(1-learning_rate)*mean_old+learning_rate*current_sample
or so. This will be computationally very simple, but as I mentioned, there is most likely a programming error in what you do at the moment.
Gerv
Calculating the mean for a particular feature for a given period of time should not take much time regardless of how it's implemented, so the 100% CPU load very strongly indicates a programming error.
What you could do is to implement an very simple IIR filter where
mean_new=(1-learning_rate)*mean_old+learning_rate*current_sample
or so. This will be computationally very simple, but as I mentioned, there is most likely a programming error in what you do at the moment.
Gerv
Who is online
Users browsing this forum: No registered users and 0 guests
