1 / 19

Part 2 . Pre-process seizers data – looking for test filter.

Part 2 . Pre-process seizers data – looking for test filter. Run over array of pre- preictal and preictal given signals, and creating two mean stat’ trees of coefficient’s energy. For each one of the two stat’ energies trees calculate best basis.

Download Presentation

Part 2 . Pre-process seizers data – looking for test filter.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Part 2.Pre-process seizers data – looking for test filter. • Run over array of pre-preictal and preictal given signals, and creating two mean stat’ trees of coefficient’s energy. • For each one of the two stat’ energies trees calculate best basis. • Search for different level indexes from the calculated bases • First we tried to shrink the lowest energy coefficients in both bases, and look for unique indexes – but this indexes energy was negligible

  2. Function use for pre-process • [mean_cof_tree mean_eng_coff_tree mean_coff_eng_var_tree ] = mean_coff_multi_signals (signals_train, num_of_seiz, win_size, qmf, D); • mean_stat_tree = CalcStatTree_eng (pp_eng_sum_coff_tree, 'Entropy'); • [btree, vtree] = BestBasis (pp_m_stat_tree,D); • [indexs] = find_indexs (btree, win_size); • Each of the above function steps taken for both, pre-preictal and preictal seizers arrays, to get depth of stat’ tree for each of the best basis coefficients. • [pp_filter p_filter] = filters (pp_indexs, p_indexs); • Distinction indexes concluded from different depths

  3. Function documentation • mean_cof_treemean_eng_coff_treemean_coff_eng_var_tree ] = mean_coff_multi_signals (signals_train, num_of_seiz, win_size, qmf, D); • % run over array of signals ,summarize and calculate n*logn mean coff' ,mean • % energies and mean vars • % according 50% overlapping windows • mean_stat_tree = CalcStatTree_eng (pp_eng_sum_coff_tree, 'Entropy'); • % A stat tree summarizes the • % coefficients eng within a particular block at a given depth • % with an entropy measure based on the coefficients. • [btree, vtree] = BestBasis (pp_m_stat_tree,D); • % pick out the best • % basis from all the possible bases in the packet table • [indexs] = find_indexs (btree, win_size); • % FIND_INDEXS find array of indexes and decomposition level of each of • % coefficients in the best basis

  4. Function documentation – cont’ • [pp_filter p_filter] = filters (pp_indexs, p_indexs); • %FILTERS return two array of indexes from different depth of stat tree. • First we tried to shrink the lowest energy coefficients in both bases, and look for unique indexes that were included only at one base smallest coefficients, thinking this way we will get distinguished indexes. but this indexes energy was negligible

  5. Search for consistency diff’ between calculated indexes sets • Look for consistency difference between pre-preictal and preictal signals that contain in the indexes sets of the pre process data, based on coefficients energy. • Test of concluded indexes sets on seizers that weren’t part of the pre process and didn’t influence it.

  6. Calc_energy - Test function • Calculate eng’ stat’ tree of both pre-preictal and preictal seizures array [cof_tree_testeng_coff_tree_testmean_coff_eng_var_tree_test] = mean_coff_multi_signals( pp_signals_test, 8-num_of_seiz, win_size,qmf, D); • For each of the calculated stat’ trees, calculate energies of indexes of both filters [eng_with_filtereng_sum_with_filter] = calc_energy(filter, indexs, eng_coff_tree_test ); % return array of energy for filtered indexes and eng sum

  7. Example :

  8. Impact of factors that are part of the pre process data:Windowsize 2048 512 4096

  9. Impact of factors that are part of the pre process data. Max depth D=4 D=11 D=6 D=7

  10. Factors influence summary and conclusions Another factor testes was the wavelet filter. Best distinction obtained with: • ‘Daubechies‘ ,4 • Win size :2048 • Max depth :6 With this factors, pre preictal energy tested indexes, seems to be almost always higher then preictal energy indexes. The difference was extremely significant in first 10% of the indexes, therefore It can be used as a good indicator.

  11. Tested examples of first and last 10% of the filtered indexes energies Last 10 % First 10 % Energies of first and last 10% of filtered indexes, at pre-preictal and preictal mean stats trees

  12. Test all options and calculated statistics To get statistics: run over all possible options (S-seizures number) for i=1:8 for j=1:8 if((i~=j)&(i<j)) count=count+1; ind=[]; test_ind=[i j]; for k=1:8 if ((k~=j)& (k~=i)) ind= [ind k]; end end pp_signals_train=subj.pp(ind,:); % array of seizures to pre process p_signals_train=subj.p(ind,:); pp_signals_test=subj.pp(test_ind,:); % array of seizures to test p_signals_test=subj.p(test_ind,:); [ ratio_pp bigger ] =run_test( pp_signals_train,pp_signals_test, p_signals_train, p_signals_test, i, j ); success=[success bigger] ratios =[ratios ratio_pp] %collect statistics

  13. Statistics: subj1 Define parameters for statistics:1. ratio = pp_eng / p_eng; 2. success=> pp_eng > p_eng 1th elec 82% success Average ratio :1.39 success = Columns 1 through 10 1 1 1 1 1 1 1 1 1 1 Columns 11 through 20 1 1 1 1 1 1 1 1 0 0 Columns 21 through 28 0 0 0 1 1 1 1 1 ratios = Columns 1 through 6 1.6769 1.3722 1.4593 1.4570 1.2970 1.3948 Columns 7 through 12 1.4532 1.4432 1.2104 2.2393 1.9019 1.9222 Columns 13 through 18 2.0789 1.0381 1.2948 1.3306 1.3663 1.3651 Columns 19 through 24 0.9422 0.9024 0.9161 0.9635 0.9000 1.4200 Columns 25 through 28  1.4916 1.5438 1.6157   1.0966 2th elec 100% success Average ratio : 1.36 success = Columns 1 through 10 1 1 1 1 1 1 1 1 1 1 Columns 11 through 20 1 1 1 1 1 1 1 1 1 1 Columns 21 through 28 1 1 1 1 1 1 1 1 ratios = Columns 1 through 6 1.0222 1.4952 1.3414 1.4958 1.7264 1.6503 Columns 7 through 12 1.8840 1.3453 1.1130 1.0418 1.1514 1.1389 Columns 13 through 18 1.0953 1.3817 1.2202 1.6701 1.6150 1.3207 Columns 19 through 24 1.4066 1.4354 1.4069 1.5478 1.3763 1.1016 Columns 25 through 28 1.0487 1.8725 1.0475 1.1983 3th elec 89% success Average ratio : 2.13 success = Columns 1 through 10 1 1 1 1 1 1 1 1 1 1 Columns 11 through 20 1 1 1 1 1 1 1 1 1 1 Columns 21 through 28 1 1 0 1 1 0 0 1 ratios = Columns 1 through 6 4.9850 5.1478 2.3811 3.2855 3.6381 3.9826 Columns 7 through 12 3.9992 1.8633 1.7732 1.4555 1.6410 1.7448 Columns 13 through 18 1.7519 1.3344 1.8341 1.9718 2.1192 2.1282 Columns 19 through 24 1.1754 1.7240 1.7657 1.7684 0.9206 1.0632 Columns 25 through 28 1.0771 0.8059 0.8902 1.3074

  14. Statistics: subj2 Define perameters for statistics:1. ratio = pp_eng / p_eng; 2. success=> pp_eng > p_eng 1th elec 100% Success Average ratio : 1.74 success = 1 1 1 1 1 1 ratios = 3.5326 1.4864 1.0614 2.0028 1.1171 1.2608 >> 2th elec 83.3% Success Average ratio : 1.196 success = 1 1 1 1 0 1 ratios = 1.1122 1.4158 1.0665 1.2976 0.9627 1.1859 >> 3th elec 66% Success Average ratio :1.12 success = 1 1 0 1 1 0 ratios = 1.5025 1.0026 0.9505 1.0438 1.3039 0.8776 >>

  15. Real time indication filter Motivated by the results, I calculate the energy of each window alone and average the energies. len=length(signal); Count=1; while e_win<=len; %run over the signal …… cof_tree=find_coff(win,qmf,D); %calc window coff’ stat’ trees’ sum_eng_coff=cof_tree.^2; %calc window coff’s energies stat’ trees’ [arrsum_eng] = calc_energy(filter, indexs, sum_eng_coff); %calc filter inxdes eng eng=[eng sum_eng]; % collect windows energies if (count <150) avg=[avg sum(eng)/count]; end if (count >150) avg=[avg sum(eng(count-150:count))/150]; end count=count+1; …….. Calculated energy of single window and average it with the last 150 windows

  16. Singles windows energy, and energies average Windows(time) time time Energy Energy Windows(time)

  17. Cont’ Windows(time) time Windows(time) time Energy Energy

More Related