Richard,

First, I have some additional information about my ECG data.
My ECG device can take 190 samples per second.
And, window size is 500 samples now.
500 sample/window is not based on scientific reason, based on my intuition...

These graphs show the window size.
https://cloud.githubusercontent.com/assets/478824/10927182/fa0e663c-82e0-11e5-92d4-0cf4b3d579b0.png
https://cloud.githubusercontent.com/assets/478824/10927183/fa0e8946-82e0-11e5-9f59-67e86a972966.png
https://cloud.githubusercontent.com/assets/478824/10927181/fa0d72d6-82e0-11e5-9624-82e030690837.png

Each window have 3~4 QRS pars.

Next, noise.
As you write, I found some noise like motion in FFT converted data.
https://www.youtube.com/watch?v=zYTr1Msab7A
This is another visualization for my FFT converted ECG data.
Some noise exist right of the graph.
I’ll read your suggested paper.

Thank you.

2015-11-04 11:33 GMT+09:00 Kentaro Iizuka <[email protected]>:
> Pascal,
>
> Coordinate Encoder looks great.
> Chandan’s youtube is also useful for me.
>
> I found this sample repository.
> https://github.com/numenta/nupic.geospatial
> It’s use Geospatial Coordinate Encoder not Coordinate Encoder,
> But I think it’s useful.
>
> Your Idea that make models for each frequency is interesting.
> I’ll try if Coordinate Encoder dose not work enough good.
>
> Thank you.
>
> 2015-11-03 22:45 GMT+09:00 Richard Crowder <[email protected]>:
>> Hi,
>>
>> I mentioned briefly some things on Numenta Gitter chat [1], and will
>> elaborate further here.
>>
>> You are now at a crucial stage of analyzing continuous time varying signals.
>> Our brains, and neo-cortex, can make us jump too far ahead when seeing these
>> graphs of the time-domain signal plotted in the frequency domain. As babies
>> we work out Newton's laws of motion using complex evolving parts of our old
>> and new (neo) brain (e.g. Force = mass x acceleration, F=ma [2]). Starting
>> to crawl, walk, and catch objects. For example, multiple sensory input
>> (visual, somatosensory, etc) using and adapting Purkinje cells in the
>> cerebellum, and the constant looping and evolving of sensorimotor
>> information to affect our muscle movements. This knowledge from childhood
>> has to an extent hampered progress when machines are programmed to look into
>> the time and frequency domain, using techniques such as Fourier Transforms.
>> We look at the FFT (DFT) data and can see how the graphs change over time,
>> almost automatically seeing the velocity and acceleration as the data
>> changes (motion derivatives).
>>
>> With ECG data the heart makes a lower and upper limit on how the time domain
>> signal changes. As mentioned in the other email thread [3] we can use that
>> to limit the sliding sampling window over the signal (1000 samples a second
>> as possible upper limit?). The repetitive nature of the signal is great for
>> Fourier based spectral analysis. The heart beats also limits upper frequency
>> to go to, with 8000 Hz being ok.
>>
>> One factor that you are aware of is noise. That can leak into the FFT plots
>> and make lower frequencies get messy. Power line noise at 50/60 Hz, for
>> example, can fluctuate and confuse things. And with the low rate of heart
>> beating can interfere with the signal and get messy in the FFT [4]. BUT as
>> you can now see in the FFT, the harmonics can now be 'seen' and add to
>> features that can be tracked over time with Temporal Memories (SP +TM).
>> Along with possible feature tracking of the original ECG signal in the time
>> domain (no one has Max Heart Rate, 220-age beats per minute, unless stressed
>> on a treadmill running very fast). Where those harmonics are is related to
>> how fast the heart is beating. With greater harmonics for the QRS parts of
>> the signal.
>>
>> The use of window and filter function on the ECG signal before Fourier
>> Transform can be used to limit and decrease noise. But care must be taken
>> with the size of windows, how many samples of the signal to consider in the
>> window, and low/high pass and other filter functions (Hamming, Blackman,
>> etc.). All help reduce noise, but never get rid of it. Here again, there is
>> less noise in the higher frequency harmonics. And have helped Apple's Siri
>> out a lot in analyzing speech, for example.
>>
>> Finding features will need information from the signal, e.g. how often the
>> QRS part occurs, and then looking in the FFT data at roughly where the
>> harmonics are (no need to go to too high number of them, up to 5 at max.).
>> Which can tie in with the presentation by Chetan on Coordinate Encoder, but
>> could be done with other encoders. First is finding all the features to
>> track. My knowledge of using NuPIC to do that is limited, so hopefully
>> others like Pascal can help here. The features can include beats per minute
>> from the signal, and then limited information from the FFT (Pascals idea of
>> a TM for a group of frequencies around the harmonics).
>>
>> Enough for now? Best regards, Richard.
>>
>> 1 https://gitter.im/numenta/htm-challenge and
>> https://gitter.im/numenta/public
>> 2 https://en.wikipedia.org/wiki/Newton%27s_laws_of_motion
>> 3
>> http://lists.numenta.org/pipermail/nupic_lists.numenta.org/2015-October/012047.html
>> 4
>> http://www.ijarcce.com/upload/2013/march/8-bhumika%20Chandrakar%20-%20a%20survey%20of%20noise-c.pdf
>>
>> On Tue, Nov 3, 2015 at 5:49 AM, Pascal Weinberger
>> <[email protected]> wrote:
>>>
>>> Hey :)
>>>
>>> Currently there is the coordinate Encoder, which encodes for an
>>> n-dimensional Vektor in n-Dimensional space.
>>> Here is Chandan explaining it or better a slightly modified version
>>> http://youtu.be/KxxHo-FtKRo
>>>
>>> The code:
>>>
>>> https://github.com/numenta/nupic/blob/master/src/nupic/encoders/coordinate.py
>>>
>>> You can Try that as a start, and what I'd also do is maybe have a model
>>> for each frequency band, which you can probably the easiest get with the
>>> htmengine :) the second method will also help you interpret the results as
>>> you'll know what frequency was unexpected at a given time.
>>>
>>> Hope that helps :)
>>>
>>>
>>>
>>> Best,
>>>
>>> Pascal Weinberger
>>>
>>> ____________________________
>>>
>>> BE THE CHANGE YOU WANT TO SEE IN THE WORLD ...
>>>
>>>
>>> PLEASE NOTE:  This email and any file transmitted are strictly
>>> confidential and/or legally privileged and intended only for the person(s)
>>> directly addressed. If you are not the intended recipient, any use, copying,
>>> transmission, distribution, or other forms of dissemination is strictly
>>> prohibited. If you have received this email in error, please notify the
>>> sender immediately and permanently delete the email and files, if any.
>>>
>>> Please consider the environment before printing this message.
>>>
>>>
>>>
>>>
>>>
>>> On 03 Nov 2015, at 04:12, Kentaro Iizuka <[email protected]> wrote:
>>>
>>> Hello, NuPIC,
>>>
>>> I'm currently working for ECG anomaly detection with NuPIC as HTM
>>> Challenge project.
>>>
>>> Here is two graph.
>>>
>>> [first]
>>>
>>> https://cloud.githubusercontent.com/assets/478824/10900146/9b3a85a8-821f-11e5-83d4-4970e77bb623.png
>>>
>>> [second]
>>>
>>> https://cloud.githubusercontent.com/assets/478824/10900145/9b17a376-821f-11e5-9987-45c2634aa77c.png
>>>
>>> This is visualization of FFT converted ECG data.
>>> First is the normal ECG data, second contain anomalous part.
>>> Vertical axis is time step and horizontal axis is frequency,
>>> color shows value of each frequency.
>>>
>>> You can see mottled part in second graph.
>>> Actually, mottled part show anomalous in ECG data.
>>>
>>> FFT Converted data is times series of VECTOR(about 120 dimension)
>>> I want to input time series of vector data into the NuPIC!
>>> Is there any example or document for deal with time series of vector with
>>> NuPIC?
>>>
>>> I want to know
>>> * How to input vector data into the NuPIC
>>> * What kind of Encoder I should use
>>> * How to write swarming setting file
>>>
>>> Here are sample converted data.
>>>
>>> https://github.com/iizukak/ecg-htm/blob/master/data/healthy_person1_fft_converted.csv
>>>
>>> https://github.com/iizukak/ecg-htm/blob/master/data/disease_person1_fft_converted.csv
>>>
>>> Data form.
>>> TIME1: [11.13, 10.36,..., 1.92]
>>> TIME2: [11.22, 10.35,..., 2.65]
>>> ...
>>> TIME_END: [1.11, 10.20,..., 1.84]
>>>
>>>
>>> In previous thread,very thank you for your helpful replies.
>>> I’m an amateur of signal processing but I read all of your replies
>>> carefully.
>>> "Please help Ken with his HTM Challenge project"
>>>
>>> http://lists.numenta.org/pipermail/nupic_lists.numenta.org/2015-October/012047.html
>>>
>>> Thanks.
>>>
>>> --
>>> Kentaro Iizuka<[email protected]>
>>>
>>> Github
>>> https://github.com/iizukak/
>>>
>>> Facebook
>>> https://www.facebook.com/kentaroiizuka
>>>
>>
>
>
>
> --
> Kentaro Iizuka<[email protected]>
>
> Github
> https://github.com/iizukak/
>
> Facebook
> https://www.facebook.com/kentaroiizuka



-- 
Kentaro Iizuka<[email protected]>

Github
https://github.com/iizukak/

Facebook
https://www.facebook.com/kentaroiizuka

Reply via email to