Monday, January 09, 2006
"LIPL : Little Idiotic Programming Language"
has
0 comments
<expr> ::= <state> <operator> <state> { <operator> <state> }
<state> ::= '(' <name> ')'
<name> ::= <character> { <character> }
<character> ::= ANY CHARACTER. UNICODE WHATEVER
<operator> ::= =[<weight>]=> | <=[<weight>]=
<weight> ::= '(' (<func-call> | <name>) ')'
=========================
Example of <expr>
(f( => A)<=())=>(B)=>(B)<=(()() ())=>(C)
Meaning:
"f( => A" => ")"
")" => "B"
"B" => "B"
"()() ()" => "B"
"()() ()" => "C"
Step by step parsing (Always from left to right):
(f( => A)<=())
open paren detected. find closing paren.
closing paren detected. see if there is an operator.
operator detected. previous token is <state> : f( => A.
Saturday, January 07, 2006
"ANN"
has
0 comments
artificial neural networks are hot.
Yi =(Wij)=> Yj
Xj ::= Weight input at j = sum( Yi*Wij )
Yj ::= Activity Level at j =1/(1 + e^(-Xj))
Yj = 1 + e^sum( Yi*Wij )
E ::= Error = sum( (Yj - Dj)^2 )/2
Dj ::= Desired Activity Level for j
E = sum( (1/(1+e^(-sum(Yi*Wij))) - Dj)^2 )/2
Note that Yj is recursively evaluated from the input layer to the output layer.
EAj ::= Rate of Error change according to Activity change = dE/dYj = Yj - Dj ::= Activity - Desired Activity.
EIj ::= Rate of Error change according to total Input change = dE/dXj = dE/dYj * dYj/dXj = EAj * dYj/dXj = EAj*Yj(1-Yj).
dYj/dXj = Yj(1-Yj) since Yj is sigmoid function 1/(1+e^-Xj)
EWij ::= Rate of Error change according to Weight change = dE/dW = dE/dXj * dXj/dWij = EIj * dXj/dWij = EIj * Yi
I don't know why dXj/dWij = Yi
EAi ::= Rate of Error change according to Activity level change in previous layer = dE/dYi =
ok i thought it's a simple derivitave..but it's partial derivative..no d..ok i'm stuck here
Yi =(Wij)=> Yj
Xj ::= Weight input at j = sum( Yi*Wij )
Yj ::= Activity Level at j =1/(1 + e^(-Xj))
Yj = 1 + e^sum( Yi*Wij )
E ::= Error = sum( (Yj - Dj)^2 )/2
Dj ::= Desired Activity Level for j
E = sum( (1/(1+e^(-sum(Yi*Wij))) - Dj)^2 )/2
Note that Yj is recursively evaluated from the input layer to the output layer.
EAj ::= Rate of Error change according to Activity change = dE/dYj = Yj - Dj ::= Activity - Desired Activity.
EIj ::= Rate of Error change according to total Input change = dE/dXj = dE/dYj * dYj/dXj = EAj * dYj/dXj = EAj*Yj(1-Yj).
dYj/dXj = Yj(1-Yj) since Yj is sigmoid function 1/(1+e^-Xj)
EWij ::= Rate of Error change according to Weight change = dE/dW = dE/dXj * dXj/dWij = EIj * dXj/dWij = EIj * Yi
I don't know why dXj/dWij = Yi
EAi ::= Rate of Error change according to Activity level change in previous layer = dE/dYi =
ok i thought it's a simple derivitave..but it's partial derivative..no d..ok i'm stuck here
Friday, January 06, 2006
"Queens College Report"
has
0 comments
I needed an unofficial transcript from my college ( Queens College - CUNY ).
So, I went to the registrar's office to get a copy.
But they only provided printed copy of transcript.
I mean, no file? Come on!
Anyways, I needed a transcript with course numbers and course titles.
But webregs.qc.edu (the site where students can look up their grades and stuff) was written in stupid ASP and probably running on Windows 95. And it doesn't give me course titles.
I mean, come on! Why? Why? Why?
So, I wrote a script to insert course titles based on course codes.
Two files are needed as an input:
#1. a list of course codes i took.
#2. a list of course code => course title hash table.
I can get #1. from webregs.qc.edu by copy and pasting my record.
I got #2 from other site that has course schedules. (you can view source on the site and find javascript array).
So, here's the script:
So, I went to the registrar's office to get a copy.
But they only provided printed copy of transcript.
I mean, no file? Come on!
Anyways, I needed a transcript with course numbers and course titles.
But webregs.qc.edu (the site where students can look up their grades and stuff) was written in stupid ASP and probably running on Windows 95. And it doesn't give me course titles.
I mean, come on! Why? Why? Why?
So, I wrote a script to insert course titles based on course codes.
Two files are needed as an input:
#1. a list of course codes i took.
#2. a list of course code => course title hash table.
I can get #1. from webregs.qc.edu by copy and pasting my record.
I got #2 from other site that has course schedules. (you can view source on the site and find javascript array).
So, here's the script:
#!/bin/bash
transcript=$1
courselisting=$2
if [[ -z $transcript || -z $courselisting ]]
then
echo "usage : $0 transcript.txt courselisting.txt"
exit 1
fi
courses="grep \"[[:upper:]]\{3,\}[[:space:]]\{1,\}[[:digit:]]\{3,3\}\" ${transcript}"
tempfile="${transcript}.temp.txt"
eval $courses > $tempfile
while read department number credits grade
do
echo $department $number
grep "${department}[[:space:]]\{1,\}${number}" ${courselisting} |sed 's/^\".. //'
echo "grade: ${grade}"
echo "------------------"
done < "$tempfile"
rm $tempfile