Sunday, October 17, 2010

Hebbian theory


"The general idea is an old one, that any two cells or systems of cells that are repeatedly active at the same time will tend to become 'associated', so that activity in one facilitates activity in the other." (Hebb 1949, p. 70)
"When one cell repeatedly assists in firing another, the axon of the first cell develops synaptic knobs (or enlarges them if they already exist) in contact with the soma of the second cell." (Hebb 1949, p. 63)
"If the inputs to a system cause the same pattern of activity to occur repeatedly, the set of active elements constituting that pattern will become increasingly strongly interassociated. That is, each element will tend to turn on every other element and (with negative weights) to turn off the elements that do not form part of the pattern. To put it another way, the pattern as a whole will become 'auto-associated'. We may call a learned (auto-associated) pattern an engram." (Hebb 1949, p. 44)
Hebb, D.O. (1949). The organization of behavior. New York: Wiley
http://en.wikipedia.org/wiki/Hebbian_theory

Thursday, October 7, 2010

R: get euclidean distance

use dist()
Example:
vect<-rbind(data_assoc[term,], cl$centers[i,])
dist[i,]<-dist(vect, method="euclidean")

R:Get index of array element

use which()


get index of min element in arrwhich(arr==min(arr))

Sunday, October 3, 2010

R: making plots

 data:
threshold;cues;words;pairs
0;6577;23196;102516
1;5437;10496;29998


data<-read.table("../data", colClasses=c("integer","integer","integer","integer"),header=TRUE,sep=";")
max_y<-max(data)
plot_colors=c("red","green","blue")
plot(data$threshold,data$cues,xlab="Threshold for number of reactions per cue",ylab="number of cues,words,pairs",col=plot_colors[1],main="Data quantity reduction",type="l")
lines(data$threshold,data$words,xlab="Threshold for number of reactions per",ylab="number of cues,words,pairs",col=plot_colors[2],main="Data quantity reduction",type="l")
lines(data$threshold,data$pairs,xlab="Threshold for number of reactions per",ylab="number of cues,words,pairs",col=plot_colors[3],main="Data quantity reduction",type="l")

legend("topright", names(data[2:4]), cex=0.8, col=plot_colors, lty=1:3, lwd=2, bty="n")
dev.copy(png,filename="../Picts/threshold_value_dependence.png",height=600, width=800,bg="white")
dev.off()