2 yrl84 yrl84 于 2016.02.22 17:32 提问

哪位大神分析一下这是什么语言? 50C

@CreateVar(

numTrainTrials 300

numTrainTrials 150
dwellTime 144 # ms
OffRate 168.69374021197876 # ms
OnRate 10.527192211200115 # ms
ActivityHz 2.8347775148279837
mePct 0.20021843519101787 # Percent of Activity due to me
PyrToInternrnWtAdjDecayRate 10 # ms
InternrnExcDecayRate 3.0510244761578473 # ms
InternrnAxonalDelay 3 #ms
filePostfix InsertBHere
mySFR 0.18825035630935036
KFBBase 0.11863330057732645
KFFBase 0.016282657407230942
K0Base 0.02561081172035472
TraceDuration 500
setMu 0.015414817635324376
setLambda 1.394322282916058
minAxDelay 1
maxAxDelay 4
dendFilterWidth 8
randomSeed 1580
)
@SetVar(deltaT 1)
76
@SetVar(Period ^Calc(round[^(dwellTime)/^(deltaT)]))
@PrintVar(deltaT)
#Default values
?If(strcmp[^(InternrnExcDecayRate),Insert:A:Here]=0) {
@SetVar(InternrnExcDecayRate 3.5) # ms
}
?If(strcmp[^(filePostfix),Insert:B:Here]=0) {
@SetVar(filePostfix tstActWithin.dat)
}
?If(strcmp[^(InternrnAxonalDelay),Insert:C:Here]=0) {
@SetVar(InternrnAxonalDelay 2) # ms
}
?If(strcmp[^(dendFilterWidth),Insert:D:Here]=0) {
@SetVar(dendFilterWidth 7) # ms
}
?If(strcmp[^(minAxDelay),Insert:E:Here]=0) {
@SetVar(minAxDelay ^Num2Int(^Calc(round[2/^(deltaT)]))) # ms
}
?If(strcmp[^(maxAxDelay),Insert:F:Here]=0) {
@SetVar(maxAxDelay ^Num2Int(^Calc(round[2/^(deltaT)]))) # ms
}
?If(strcmp[^(ActivityHz),Insert:G:Here]=0) {
@SetVar(ActivityHz 1)
}
?If(strcmp[^(mySFR),Insert:H:Here]=0) {
@SetVar(mySFR 0)
77
}
?If(strcmp[^(OffRate),Insert:I:Here]=0) {
@SetVar(OffRate 100)
}
?If(strcmp[^(OnRate),Insert:J:Here]=0) {
@SetVar(OnRate 15)
}
?If(strcmp[^(KFBBase),Insert:K:Here]=0) {
@SetVar(KFBBase 0.01903)
}
?If(strcmp[^(KFFBase),Insert:L:Here]=0) {
@SetVar(KFFBase 0.00207)
}
?If(strcmp[^(K0Base),Insert:M:Here]=0) {
@SetVar(K0Base 0.02726)
}
?If(strcmp[^(TraceDuration),Insert:N:Here]=0) {
@SetVar(TraceDuration 500) # ms
}
?If(strcmp[^(setMu),Insert:O:Here]=0) {
@SetVar(setMu 0.01) # ms
}
?If(strcmp[^(setLambda),Insert:P:Here]=0) {
@SetVar(setLambda 0.5) # ms
}
?If(strcmp[^(mePct),Insert:X:Here]=0) {
@SetVar(mePct 0.3) # ms
}
78
@PrintVar(InternrnExcDecayRate filePostfix InternrnAxonalDelay)
@CreateVar(halfWidth ^Calc(^(dendFilterWidth)/2))
@CopyData(-to DTSFiltA -from "^Fn(^(deltaT),^(halfWidth),1-exp[-
^(halfWidth)/5*^(tFn)])" -type mat -T)
@CopyData(-to DTSFiltB -from
"^Fn(^(halfWidth)+^(deltaT),^(dendFilterWidth),exp[-
^(halfWidth)/5*[^(tFn)-^(halfWidth)]])" -type mat -T)
@AppendData(-from 2 DTSFiltA DTSFiltB -to DTSFiltT -type mat)
@CopyData(-to DTSFilt -from DTSFiltT -type mat -T)
@CopyData(-to WtFilt -from "^Fn(^(deltaT),1,1)" -type mat)
@SetVar(
title "Trace Conditioning"
mu ^(setMu)
Phase 0
Activity ^Calc(^(ActivityHz) * ^(deltaT) / 1000)
ni 2048
DendriteToSomaFilter DTSFilt
SynapseFilter WtFilt
FBInternrnAxonalDelay
^Num2Int(^Calc(round[^(InternrnAxonalDelay)/^(deltaT)]))
FFInternrnAxonalDelay 1 # to allow it to be quasi in-sync
InternrnExcDecay ^Calc(1-exp[-^(deltaT)/^(InternrnExcDecayRate)])
ResetPattern zeros
)
79
@MakeRandSequence(-name zeros -len 1 -p 0)
@SetVar(
ExtExc ^Calc(^(ni) * ^(Activity))
)
@MakeSequence(-name InitPtn -len 1 -non 1 -Nstart 1)
?If(exists[wNoise]) { @SetVar(wNoise ^(mySFR)) }
?If(exists[SynFailRate]) { @SetVar(SynFailRate ^(mySFR)) }
@CreateVar(

mePct varies from 0.2 to 0.5

me ^Calc(round[^(ni) * ^(mePct) / 10]) # 10 is arbitrary
)
#@SaveData(-from me -to me.dat)
#@SaveData(-from mePct -to mePct.dat)
#@SaveData(-from ActivityHz -to ActivityHz.dat)
?If(exists[PyrToInternrnWtAdjDecay]) {
@SetVar(PyrToInternrnWtAdjDecay ^Calc(exp[-
^(deltaT)/^(PyrToInternrnWtAdjDecayRate)]))
}
?If(exists[KdAdjDecay]) {
@SetVar(KdAdjDecay ^Calc(exp[-
^(deltaT)/^(PyrToInternrnWtAdjDecayRate)]))
}
80
@SetVar(
NMDArise ^Calc(ceil[^(OnRate) / ^(deltaT)])
theta 0.5
Con 0.1
KFF ^Calc(^(KFFBase) * ^(dendFilterWidth))
KFB ^Calc(^(KFBBase) * ^(dendFilterWidth))
K0 ^Calc(^(K0Base) * ^(dendFilterWidth))
wStart ^Calc(^(ActivityHz) * ^(OffRate) * ^Calc(1-^(mySFR)) /
1000)
Reset 0 # Circular sequence
alpha ^Calc(exp[-^(deltaT)/^(OffRate)])
MidPoint ^Calc(^(mePct) * ^(ni) * ^(Activity) / ^(me))
xNoise ^Calc(^(mePct) * ^(ni) * ^(Activity) / ^(me))
xTestingNoise ^Calc(^(mePct) * ^(ni) * ^(Activity) / ^(me))
lambdaFB ^(setLambda)

Begin Izhikevich Block

Remove for Classical model

IzhA 0.02437434474636943
IzhB -0.09098031934366621
IzhC -56.084834380015565
IzhD 5.715417424859181
IzhvStart -64.12632551580455 # stable point
IzhuStart ^Calc(-0.09098031934366621 * -64.12632551580455) #
stable point -60 * -0.1
IzhIMult 11.361992401899078

End Izhikevich Block

)
81
@MakeRandSequence(-name InitPtn -len ^Calc(100/^(deltaT)) -p
^Calc(^(Activity)/^(MidPoint)))
@CreateVar(
startN 1
lastN ^Calc(2 * ^(me))
tonelen ^Num2Int(^Calc(150 / ^(deltaT)))
pufflen ^Num2Int(^Calc(100 / ^(deltaT)))
tracelen ^Num2Int(^Calc(^(TraceDuration) / ^(deltaT)))
)
?If(strcmp[^(randomSeed),Insert:Seed:Here]=0) {
@SetVar(randomSeed 1)
}
@SetVar(seed ^(randomSeed))
@SeedRNG()
@CreateNetwork(-mindelay ^(minAxDelay) -maxdelay ^(maxAxDelay) -dist
uniform -low ^Calc(0.9 * ^(wStart)) -high ^Calc(1.1 * ^(wStart)))
@DeleteData(InitPtn)
@MakeRandSequence(-name InitPtn -Nend ^(ni) -len ^(Period) -p
^Calc(^(mePct)*^(Activity)/^(MidPoint)))
@MakeSequence(-name blank -len ^(tonelen) -non 0 -Nstart 1)
@MakeSequence(-name tone -len ^(tonelen) -st ^(tonelen) -non ^(me))
@MakeSequence(-name trace -len ^(tracelen) -st ^(tracelen) -non 0)
82
@MakeSequence(-name puff -len ^(pufflen) -st ^(pufflen) -non ^(me) -
Nstart ^Calc(^(me)+1))
@MakeSequence(-name nopuff -len ^(pufflen) -st ^(pufflen) -non 0)
@AppendData(-to trainTraceSeq -from 3 tone trace puff)
@AppendData(-to testTraceSeq -from 3 tone trace nopuff)
@CreateVar(firstRecur ^Calc(^(lastN)+1))
@PrintVar(deltaT alpha firstRecur Activity me MidPoint)
@SetVar(seed ^(randomSeed))
@SeedRNG()
@PrintVar(deltaT alpha Activity me MidPoint)
@Test(-name testTraceSeq -time ^SequenceLength(-from testTraceSeq) -
nocomp -norecord 7 TestingThresholds TestingBusLines
TestingIntBusLines TestingKWeights TestingInhibitions
TestingFBInternrnExc TestingFFInternrnExc)
@PrintVar(AveTestAct)
@CreateVar(tempTest 0)
@CreateVar(tempData 0)
%(i 1 ^(numTrainTrials)) {
@ResetFiring()
@DeleteData(InitPtn)
@MakeRandSequence(-name InitPtn -Nend ^(ni) -len ^(Period) -p
^Calc(^(mePct)*^(Activity)/^(MidPoint)))
@Test(-name InitPtn -time ^SequenceLength(-from InitPtn) -nocomp -
norecord 7 TestingThresholds TestingBusLines TestingIntBusLines
83
TestingKWeights TestingInhibitions TestingFBInternrnExc
TestingFFInternrnExc)
@DeleteData(trace)
@MakeRandSequence(-name trace -Nend ^(ni) -len ^(tracelen) -p
^Calc(^(mePct)*^(Activity)/^(MidPoint)))
@AppendData(-to trainTraceSeq -from 3 tone trace puff)
@MakeSequence(-name nopuff -len ^(pufflen) -st ^(pufflen) -non 0)
@AppendData(-to testTraceSeq -from 3 tone trace nopuff)
@Train(-name trainTraceSeq -trials 1 -nocomp -norecord 7
TrainingThresholds TrainingBusLines TrainingIntBusLines
TrainingKWeights TrainingInhibitions TrainingFBInternrnExc
TrainingFFInternrnExc)
@PrintVar(AveTrainAct)
?If(^(i) = 1) {
@FileReset(fit_trn_mean_act.dat fit_trn_ssd_act.dat)
%(j 1 701 50) {

This is a little confusing because we're using N (neuron)

where P (timestep) makes more sense

That's because CopyData was designed for 0/1 patterns and

not activities
@CopyData(-from TrainingActivity -Nstart ^(j) -Nend ^Calc(^(j)

  • 49) -to subAct -type mat) @SetVar(tempData ^Calc(mean[subAct])) @SetVar(tempData ^Calc(1000 * ^(tempData) / ^(deltaT))) # Convert to Hz @SaveData(-from tempData -to fit_trn_mean_act.dat -append) } @SetVar(tempData ^Calc(sqrt[var[TrainingActivity]])) 84 @SetVar(tempData ^Calc(1000 * ^(tempData) / ^(deltaT))) # Convert to Hz @SaveData(-from tempData -to fit_trn_ssd_act.dat) } @DeleteData(TrainingBuffer) @SetVar(tempTest 0) ?If(^(i) = 1) { @SetVar(tempTest 1) } # ?If(^(i) = ^(numTrainTrials)) { # @SetVar(tempTest 1) # } ?If(^(i) % 50 = 0) { @SetVar(tempTest 1) } ?If(^(tempTest) = 1) { @ResetFiring() @DeleteData(InitPtn) @MakeRandSequence(-name InitPtn -Nend ^(ni) -len ^(Period) -p ^Calc(^(mePct)*^(Activity)/^(MidPoint))) @Test(-name InitPtn -time ^SequenceLength(-from InitPtn) -nocomp -norecord 7 TestingThresholds TestingBusLines TestingIntBusLines TestingKWeights TestingInhibitions TestingFBInternrnExc TestingFFInternrnExc) @DeleteData(trace) @MakeRandSequence(-name trace -Nend ^(ni) -len ^(tracelen) -p ^Calc(^(mePct)*^(Activity)/^(MidPoint))) @DeleteData(nopuff) 85 @MakeRandSequence(-name nopuff -Nend ^(ni) -len ^(pufflen) -p ^Calc(^(mePct)*^(Activity)/^(MidPoint))) @AppendData(-to testTraceSeq -from 3 tone trace nopuff) @Test(-name testTraceSeq -time ^SequenceLength(-from testTraceSeq) -nocomp -norecord 7 TestingThresholds TestingBusLines TestingIntBusLines TestingKWeights TestingInhibitions TestingFBInternrnExc TestingFFInternrnExc) @PrintVar(AveTestAct) ?If(^(i) = 1) { @FileReset(fit_tst_mean_act.dat fit_tst_ssd_act.dat) %(j 1 701 50) { # This is a little confusing because we're using N (neuron) where P (timestep) makes more sense # That's because CopyData was designed for 0/1 patterns and not activities @CopyData(-from TestingActivity -Nstart ^(j) -Nend ^Calc(^(j) + 49) -to subAct -type mat) @SetVar(tempData ^Calc(mean[subAct])) @SetVar(tempData ^Calc(1000 * ^(tempData) / ^(deltaT))) # Convert to Hz @SaveData(-from tempData -to fit_tst_mean_act.dat -append) } @SetVar(tempData ^Calc(sqrt[var[TestingActivity]])) @SetVar(tempData ^Calc(1000 * ^(tempData) / ^(deltaT))) # Convert to Hz @SaveData(-from tempData -to fit_tst_ssd_act.dat) @SaveData(-from tempTest -to fit_quick.ready) } 86 ?If(^(i) % 50 = 0) { @FileReset(fit2_:^(i):.dat) %(j 1 701 50) { @CopyData(-from TestingBuffer -Nstart ^Calc(^(me) + 1) -Nend ^Calc(^(me) * 2) -Pstart ^(j) -Pend ^Calc(^(j) + 49) -to subBuff - type mat) @SetVar(tempData ^Calc(mean[subBuff])) @SaveData(-from tempData -to fit2_:^(i):.dat -append) } @SaveData(-from tempTest -to fit2_:^(i):.dat.ready) } @DeleteData(TestingBuffer) } } @DeleteData(TrainingActivity)

2个回答

caozhy
caozhy   Ds   Rxr 2016.02.22 21:04

看着有点像COBOL或者是一种私有的脚本语言。

zz202328
zz202328 这语言那里像cobol(●—●)
接近 2 年之前 回复
Marksinoberg
Marksinoberg   Ds   Rxr 2016.02.24 08:31

看起来好像是元语言一样对对一种需要的较为底层的解释。希望能帮到你图片说明

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!