So sorry to ask this naive question, but I really get stuck as an absolute MATLAB newbie.
Below is what I am trying to do. I have a model that takes coin flip outcomes as its input:
function randomness = benHMMN(flips,rep,prior) % defined later
flips = csvread('flips.csv')
On the right-hand side, "flips" are coin flipping outcomes read from a file, while "rep" and "prior" are two parameters whose values I am trying to find. The function outputs randomness evaluation for all coin flips, which is a column vector with 256 elements.
csvread('judgement.csv')
Meanwhile, I had humans evaluate the same set of outcomes and their responses are stored in another column vector with 256 elements. (Note that humans judge how non-random instead of how random these outcomes are.)
I wish to minimize the correlation between two vectors.
corr(randomness, judgment)
On an abstract level, I guess the solution looks something like this:
function correlation = corr(randomness, judgment)
[...,fval] = fminsearch(@corr, ...)
However, the arguments are NOT directly the parameters ('rep' and 'prior') that I want to fit, but a function with them in it. I have no idea how to use fminsearch or other methods to find 'rep' and 'prior' when they are not explicitly in the arguments. I would really appreciate your help!