spacer
{Arrest This Man, He Talks In Maths } spacer

Blog : Archives : Homepage

With your feet in the air, and your head on the ground . . .

spacer
spacer

{Thursday, January 20, 2005}

 
You know what's hot? When girls wear sport-jackets. Like, men's sport-jackets.

Yes, I suppose this is all part of my lesbian-chic attraction, and a peculiarity.

I'm just saying.


Here's what I'm working on, today. Anyone who can decipher what the code does & is for wins a special prize. :-p

best_orth = 0;

for j=1:1000
test_nums = [19 18 17 16 21 22 24 25];

%% scoring:
%%
%% 1 = "more"
%% -1 = "less"
%% 0 = no prediction

num_trials = 16;

stim_order = ceil(8*rand(num_trials,1));

R = zeros(4,num_trials);

running_total = zeros(num_trials,1);
moving_mean = zeros(num_trials,1);

running_total(1) = test_nums(stim_order(1));

for i=2:num_trials
running_total(i) = running_total(i-1)+test_nums(stim_order(i));
end

moving_mean = (running_total+60)./[4:num_trials+3]';

for i=1:num_trials

% scoring for "correct task performance" hypothesis
% sensible for color; no change required
if stim_order(i) <= 4
R(1,i) = -1;
else
R(1,i) = 1;
end

% scoring for "modulating standard" hypothesis, window = 1
% sensible for color; some change required

if i==1
R(2,i) = R(1,i);
else
if test_nums(stim_order(i)) > test_nums(stim_order(i-1))
R(2,i) = 1;
elseif test_nums(stim_order(i)) < test_nums(stim_order(i-1))
R(2,i) = -1;
else
R(2,i) = 0;
end
end

% scoring for "modulating standard" hypothesis, window = 3
% not sensible for color

if i==1
R(3,i) = R(1,i);
else
if i < 4
current_std = (running_total(i-1)+(4-i)*20)/3;
else
current_std = (test_nums(stim_order(i-1))+test_nums(stim_order(i-2))+test_nums(stim_order(i-3)))/3;
end

if test_nums(stim_order(i)) > current_std
R(3,i) = 1;
elseif test_nums(stim_order(i)) < current_std
R(3,i) = -1;
else
R(3,i) = 0;
end
end

% scoring for "compensating for previous responses" hypothesis
% sensible for color; no change required

if i==1
R(4,i) = R(1,i);
else
if sum(R(4,1:i)) < 0
R(4,i) = 1;
elseif sum(R(4,1:i)) > 0
R(4,i) = -1;
else
if stim_order(i) <= 4
R(4,i) = -1;
else
R(4,i) = 1;
end
end
end

end
orthogonality = sum(sum(sqrt(1-corrcoef(R'))));
if orthogonality > best_orth
best_orth = orthogonality;
best_sequence = stim_order;
best_R = R';
end
end

best_R
best_sequence
best_orth
corrcoef(best_R)

posted by Miles 11:08 AM

Comments:
The smaller font seems to be missing a close tag... it's continuing on into your previous posts. (at least in Firefox 1.0 on a PC)

--Zack
 
Post a Comment
spacer