Download - 4.=;::; \3'v'l Vy\l ~i\f
-
8/14/2019 4.=;::; \3'v'l Vy\l ~i\f
1/6
~ ~-- .~
BEL 41f?4.=;::; \3'V'l vY\L ~I\f
#!/usr/local/bin/perl
#Smith-Waterman Algorithm
sw.pl
# Requires two command line arguments
#Inputs in the form seql and seq2
#Inputs in the form seql and seq2printfCftEnter sequencel:");$seql = ;printfCft\nEnter sequence2:");$seq2 = ;$lenl = length(Sseql);$len2 = lengthCSseq2);
tJo.5
~.~
#Initialize firit row and column with multiples of gap penalty$gp=O;forC$i=O;Si$d))
values
Page 1
--
-
8/14/2019 4.=;::; \3'v'l Vy\l ~i\f
2/6
The experiment paradigm used for the present study issimilar to an earlier researeh done in our laboratory
r10]. The subject was asked to comfortably lie downin a relaxed position Ilith eyes closed- Initiall~ thesubject was asked to relax II)r5 min- Alier assuringthe normal relaxed state by checking the status of thealpha waves. the EEG I\-asrecorded fl)r ::.session of 5s epoch each for relaxed state- This is used as basicn:ferenee for further analysis of the planning data. Thesubject was asked to mentally plan to mO\-ethe righthanded thumb. on presentation of an audio eue. both atthe start and cnd of a session- 5 sessil)fJ of eachplanning and relaxed data were reeorded each with atime gap of 180s .The I\-hole e:\periment includingpreparation of the subjects last flJI' I hr. collectingEEG data II)r the, 5 sessions- The 5s epochs relatednormal rel
rhe Ie\enherg -l\larquardt algorillull \\ a s design toapproach second ordn training 'pced II i thoul hal ingto cnmpule the Ik,sian m~i!ri_'\-\\he'll Ih\' perll)l"Illanee
~"
function has the formof a sum ofsquare (as is typical intraining feed forward network). then the Hessian matri.\
can be approximate as H=JTJ and gradient can becomputed as g=.ITe.Were J is the jacobian matrix thatcontains first derivatives of the network errors \\ithrespect to the weights and biases, and e is a vector ofnet\\ork errors. The Levenberg-Marquardt algorithmuses this approximation to the Hessian matri:..:in thettJIIO\\-ingNewton-like update:
Xk+l=X, ,_pTJ+/- IIJ,1 JTe
a... aff"""'~.
~~
-.
Fig 2 -Architecture of ANN
When the scalar /-I is zero, this is just Newton -s method-using the appro: .. :imate Hessian matrix- When ~lis large.this hecomes gradient descent with a small step size-NewlUn-s method is faster and more accurate near ancrror minimum. so the aim is to shift to\\ard Ne\1 tOll-smethod as quickly as possible. Thus. ~I is decreasedalkr each successful step (reduction in perll)ffllanCefUllction) and is increased only whcn a tentatile stepIlouid increase the performance function- In Ihis \\ a~,the pertl)ffl1anCe function is always reduced at eachiteratioll of the algorithm. Thc value of trainingp
-
8/14/2019 4.=;::; \3'v'l Vy\l ~i\f
3/6
#LOOp till substring of max length is found.for(Si=Sil;(Si>O) && (Smax>O);){
for(Sj=$j2; (Sj>O) && (Stable[Si][$j]!=O){ #printf("loop");
#printf("$arrow[$i] [$j]\n");
$x=$arrow[$i] [$j];i f($x eq "d"){
&& ($max>O);)
{SW.pl
$table[$i] [$jJ=$r;Sarrow[$i] [$j]="u";
}# elsif$d>$r) && ($d>$l))else
{ $table[$i] [$j]=$d;$arrow[$i] [$j]="d";
}#If resulting value
-
8/14/2019 4.=;::; \3'v'l Vy\l ~i\f
4/6
T~hlc I Dirferent valuc ofparanl, (x)Whae
=;: /?X): I?
(I,1lwtCI' Valuc
1\1;11 ..grad 1e.5_.-Epoch 5000
I\lu 0001---!\lu dee 01
!\Ill..ine 10
Gn1 Ie.O6
'"krn redue
!\1, Mu I 1e10
Classification Accuracv (%)Session Le\'enberg- Radial basis
marquard! functionI 78.84 75.002 75.00 70583 6703 66.664 65.384 63155 63.46 60,00
Average 69.94 67.07-
-
8/14/2019 4.=;::; \3'v'l Vy\l ~i\f
5/6
ACKNOWLEDMENT
Thc author's acknO\lkdge Iheir gratitude tOIl ard,math \lorks for \I a lekt alld Ileural Ilct\lork tooll1o.\\\hich helpcd 10compik Ihe resul t.
REFERENCE
III . I.R.Wolpa". NBirbaumer. I)) Mc Farland. G.Plurtschelkr.T M. Vaughan. "Brain computer Inter!"acesfor communicationand controL" Clinical Nurophl's. .113.767-791,2002
121 (;.Pfurtschelk. DFh,tzlllger. and .lKalchcr. "Brain Computerinter!"ace-A .ne\\ communication device Ii" handicappcd.people" .IMicn>compul..$ Neurophysiology, 110, 18-12..IX52..930.1999.
[6)
[7]
18)
['II .I R \\','Ipa\\. D. J. Me Far!and. T 1\1 Vaughan. 'Ihe \lads'\l>rtP Cemre Brain l'omp'Her inler!;,ee leseareh andDc, olopment Program."IEIT Trans on Ncural S'Slem and,ehab Eng" 1112))20-l..207.200}
II ( II .I ", a shree Santhosh. Mall\ ir Bhalla. S.Sahli Sl ieh Anand"(,)ua"tuali\e ITG analysis for assessmelll t t>plall a ta,k ut,\ISpalletH' a sil idy of exeellt i, e fli lleh"11Iplalil lon~) III ..\LS."C"gllni\e braill fl'search 22.59..66. 20()-I.
II1I T"II.1 Ebrah,m,. . lcan marc Vesil l. and (ira, ( ia ,( la "Bram\'('mpllter inlert",e ill mullimedia rommllllleation."IEEESIgnalrrneessing magazine. 1-1/20.2000.Ii Pfllrtseheller. CNeliper. /\ Sehlogl. an.u K Lugger"~epalabihly o!"EEG signals recorded dllring roght and :enn"'tor imagen' using adaptive all to regre
-
8/14/2019 4.=;::; \3'v'l Vy\l ~i\f
6/6
sw.plelse{$j--;$disl[$lenJ="-";$dis2[$lenJ=substr($seq2,$j,1);
}$len++;$max--;
}}
#Display, the alignment.printf('Alignment\n");
for($z=$len;$z>=O;$z--){
printf("$disl[$z]");}pri ntf("\n").;
for($z=$len;$z>=O;$z--){printf("$dis2[$z]");
}
;
.~
=-=-. ""' = = =="'" ~".~=~~
'"
Page 3
-~~
-=-