Tuesday, April 24, 2007
SVM v2 result
t c=32.0, g=0.125 CV rate=94.8725
Training...
Output model: F_v1.v2.Train.model
Scaling testing data...
Testing...
Accuracy = 46.9498% (1647/3508) (classification)
Output prediction: F_v1.v2.Test.predict
answer
H, A, S, F, P |Predict
48 69 103 27 264 |0
9 7 2 63 78 |1
0 24 46 3 7 |2
6 7 15 46 77 |3
287 187 184 449 1500 |4
=============
F0_.v1.v2.Test
t c=32.0, g=0.125 CV rate=94.7875
Training...
Output model: F0_v1.v2.Train.model
Scaling testing data...
Testing...
Accuracy = 52.1095% (1828/3508) (classification)
Output prediction: F0_v1.v2.Test.predict
answer
H, A, S, F, P |Predict
47 44 50 1 159 |0
8 2 0 46 56 |1
0 23 72 24 12 |2
1 5 12 26 18 |3
294 220 216 491 1681 |4
J48 v1 result
=== Run information ===
Scheme: weka.classifiers.trees.J48 -C 0.25 -M 2
Relation: F_v1
Instances: 6274
Attributes: 103
[list of attributes omitted]
Test mode: 10-fold cross-validation
=== Classifier model (full training set) ===
=== Summary ===
Correctly Classified Instances 5823 92.8116 %
Incorrectly Classified Instances 451 7.1884 %
Kappa statistic 0.8832
K&B Relative Info Score 552448.6144 %
K&B Information Score 9940.3112 bits 1.5844 bits/instance
Class complexity | order 0 11285.6028 bits 1.7988 bits/instance
Class complexity | scheme 327256.4897 bits 52.1607 bits/instance
Complexity improvement (Sf) -315970.8869 bits -50.362 bits/instance
Mean absolute error 0.0316
Root mean squared error 0.1657
Relative absolute error 12.8354 %
Root relative squared error 47.2221 %
Total Number of Instances 6274
=== Detailed Accuracy By Class ===
TP Rate FP Rate Precision Recall F-Measure Class
0.923 0.006 0.942 0.923 0.933 _S
0.845 0.012 0.851 0.845 0.848 _A
0.941 0.013 0.925 0.941 0.933 _F
0.861 0.017 0.856 0.861 0.858 _H
0.948 0.07 0.949 0.948 0.949 _P
=== Confusion Matrix ===
a b c d e <-- classified as
553 4 14 1 27 | a = _S
8 382 7 8 47 | b = _A
1 15 859 5 33 | c = _F
1 6 8 570 77 | d = _H
24 42 41 82 3459 | e = _P
Number of Leaves : 278
Size of the tree : 555
================
F0_v1.csv (10 CV)
=== Run information ===
Scheme: weka.classifiers.trees.J48 -C 0.25 -M 2
Relation: F0_v1
Instances: 6274
Attributes: 103
[list of attributes omitted]
Test mode: 10-fold cross-validation
=== Classifier model (full training set) ===
Number of Leaves : 262
Size of the tree : 523
Time taken to build model: 34.48 seconds
=== Stratified cross-validation ===
=== Summary ===
Correctly Classified Instances 5742 91.5206 %
Incorrectly Classified Instances 532 8.4794 %
Kappa statistic 0.8615
Mean absolute error 0.0364
Root mean squared error 0.1782
Relative absolute error 14.7968 %
Root relative squared error 50.7918 %
Total Number of Instances 6274
=== Detailed Accuracy By Class ===
TP Rate FP Rate Precision Recall F-Measure Class
0.93 0.008 0.922 0.93 0.926 _S
0.812 0.012 0.838 0.812 0.825 _A
0.92 0.015 0.911 0.92 0.916 _F
0.802 0.016 0.854 0.802 0.827 _H
0.945 0.092 0.935 0.945 0.94 _P
=== Confusion Matrix ===
a b c d e <-- classified as
557 7 10 1 24 | a = _S
9 367 16 8 52 | b = _A
5 12 840 5 51 | c = _F
1 8 8 531 114 | d = _H
32 44 48 77 3447 | e = _P
SVM v1 result
Best c=128.0, g=0.5 CV rate=93.2173
Training...
Output model: F_v1.train.5.model
Scaling testing data...
Testing...
Accuracy = 94.8791% (1334/1406) (classification)
Output prediction: F_v1.test.5.predict
answer
H, A, S, F, P |Predict
129 0 0 1 13 |0
0 88 1 0 2 |1
1 0 124 0 2 |2
0 1 2 188 3 |3
20 11 3 12 805 |4
=========
F0_v1.test.5
Best c=32.0, g=0.5 CV rate=93.0753
Training...
Output model: F0_v1.train.5.model
Scaling testing data...
Testing...
Accuracy = 94.8791% (1334/1406) (classification)
Output prediction: F0_v1.test.5.predict
answer
H, A, S, F, P |Predict
129 0 0 1 12 |0
0 86 1 0 3 |1
1 0 124 0 2 |2
0 0 2 189 2 |3
20 14 3 11 806 |4
Wednesday, April 11, 2007
BVP analysis
analysis of BVP
Pulse Contour Analysis
Cardiovascular disease (CVD) is the leading cause of death and serious illness and in 1948, the Framingham Heart Study embarked on an ambitious project in health research. Pulse wave shape was one of the parameters collected during the study. The tools available to the investigators at that time precluded a detailed analysis of the waveform, but visual inspection of waveform changes correlated with increased risk of developing CVD (Ref.1 & 20). It is only recently that research workers from around the world have revisited this exciting observation (Ref. 2 to 5, 28, 29, 31) and in particular the research group at St Thomas hospital showed that the finger volume pulse derived from a digital photoplethysmographic probe is directly related to the radial and brachial artery pressure pulse (Ref. 6).
The Digital Volume Pulse (DVP)
The digital volume pulse (DVP) is recorded by measuring the transmission of infra-red light absorbed through the finger. The amount of light is directly proportional to the volume of blood in the finger pulp.
To minimise the occurrence of poor signals from vasoconstricted and poorly perfused subjects, a unique control system maintains the light transmission at the optimum level to accurately follow blood volume changes, independant of the subjects finger size to obtain an extremely accurate and noise free signal.
How the Digital Volume Pulse (DVP) is formed?
The first part of the waveform (systolic component) is formed as a result of pressure transmission along a direct path from the aortic root to the finger. The second part (diastolic component) is formed by pressure transmitted from the ventricle along the aorta to the lower body where it is reflected back along the aorta to the finger. The upper limb provides a common channel for both the directly transmitted pressure wave and the reflected wave and, therefore, has little influence on the contour of the DVP.
Indices derived from the Digital Volume Pulse (DVP)
The height of the diastolic component of the DVP relates to the amount of pressure wave reflection. This in turn relates mainly to the tone of small arteries.
The timing of the diastolic component relative to the systolic component depends on the pulse wave velocity (PWV) of pressure waves in the aorta and large arteries. This in turn depends upon large artery stiffness.
Indices derived from the Digital Volume Pulse (DVP)
Reflection Index RI is the height of the diastolic component of the DVP expressed as a percentage of the systolic peak and is a measure of the amount of pulse wave reflection and the tone of small arteries:
The Stiffness Index SI is an estimate of pulse wave velocity in large arteries and is obtained from subject height divided by the time between the systolic and diastolic peaks of the DVP. It is a measure of large artery stiffness
Tuesday, April 10, 2007
FFT
y是要被做FFT的data, 長度為L
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y是做完FFT的結果
補上一筆
只有一半可以用
假如原來在時間域的資料點有N點,則經過FFT轉換後,在頻率域其數據仍為N點,但己經是複數了。這N點中第一個點為所有其他點的總合,而且前半數的N/2點與後半數的N/2點是共軛對稱的複數,對稱點在中點,例如有256點,則128點為其共軛對稱點。因此在時間域有N點,則以FFT轉換到頻率頻後只有N/2點可用。至於各點頻率差,若在時間域的數據每點間隔則在頻率域的頻率間隔為,例如前述的A900地震儀,其=0.005,取N=1024點做FFT轉換後可用點只有其半數512點,各點頻率間隔為=0.1953125cps.
Power Spectrum Density
window: 在data中考量的window的大小
noverlap: window和window之間overlap的sample個數
nfft: 做fft時window的大小
clipped from www.mathworks.com
|
Monday, April 09, 2007
一直忘了補上average
到底怎樣取才好勒....
我現在有兩種取法,
一種是在整個induction的過程中都拿來average.
一種是將切出來的各種檔案拿來average
好像第二種比較make sense. ! so?
smooth?! normalized?!
該怎麼寫比較準確, 該怎麼弄比較好
都是要考慮的....
smooth現在寫了兩個方法, gaussian smooth filter(用guassian window去做convorution)
另一個是標準的law pass filter(span=5).
其他其實還有很多的方法, 但感覺不出好壞與優劣還有特點
感覺上我應該要依據訊號的特徵去處理
現在是傾向寫起來放著 XD
除此之外, normalized其實就是shift and scale.
再放入feature的時候真的有這個必要嗎?!
真是不知道哪個好....
一樣先寫起來放著吧.... XD
快寫完了, 我要快點train