public void WhenDiscriminabilityValueIsNeeded() { _foveaPeripheryOperatingCharacteristic = new Mock<NormalDistribution>(); const int fixation = 1; const int location = 4; _distanceFromFixation = Math.Abs(fixation - location) - 1; var fpoc = new ObservationGenerationModel(_foveaPeripheryOperatingCharacteristic.Object, fixation, location); fpoc.GenerateDiscriminabilityValue(); }
public double[] CalculateState(double[] activation, int fixation) { for (var i = 0; i < activation.Length; i++) { //discriminability is explained in Butko and Movellan (2008) and is determined using FPOC and eccentricity from fixation. var discriminability = new ObservationGenerationModel(_foveaPeripheryOperatingCharacteristic, fixation, i) .GenerateDiscriminabilityValue(); //This is equation 6 in the Butko & Movellan (2008) paper determining belief state State[i] = State[i]*Math.Exp(activation[i]*discriminability); } return State; }
public double[] CalculateState(double[] activation, int fixation) { ++_numberOfFixation; for (var i = 0; i < activation.Length; i++) { var discriminability = new ObservationGenerationModel(_foveaPeripheryOperatingCharacteristic, fixation, i) .GenerateDiscriminabilityValue(); State[i] = State[i]*Math.Exp(activation[i]*discriminability); } _beliefStateDataRecorder.Insert(_numberOfFixation, (double[]) State.Clone()); return State; }
public bool Update(double[] activation, int fixation) { ++ _numberOfFixation; for (var i = 0; i < activation.Length; i++) { //discriminability is explained in Butko and Movellan (2008) and is determined using FPOC and eceentricity from fixation. var discriminability = new ObservationGenerationModel(_foveaPeripheryOperatingCharacteristic, fixation, i) .GenerateDiscriminabilityValue(); State[i] = State[i]*Math.Exp(activation[i]*discriminability); //This is equation 6 in the Butko & Movellan (2008) paper determining belief state } _beliefStateDataRecorder.Insert(_numberOfFixation, (double[]) State.Clone());//Stores belief states for output onto graph return State.Any(s => s >= 0.9); }
public double[] GenerateActivation(int fixation, int[] visualArray) { var activationValues = new double[visualArray.Length]; _observationValues = GenerateObservations(fixation, visualArray); for (var i = 0; i < visualArray.Length; i++) { //discriminability is explained in Butko and Movellan (2008) and is determined using FPOC and eceentricity from fixation. var discriminability = new ObservationGenerationModel(_standardDistribution, fixation, i) .GenerateDiscriminabilityValue(); activationValues[i] = _observationValues[i] - discriminability/2; } return activationValues; }
private double[] GenerateObservations(int fixation, int[] visualArray) { _observationValues = new double[visualArray.Length]; for (var location = 0; location < visualArray.Length; location++) { if (visualArray[location] == 0) { _observationValues[location] = _standardDistribution.Generate(); } else { //discriminability is explained in Butko and Movellan (2008) and is determined using FPOC and eceentricity from fixation. var discriminability = new ObservationGenerationModel(_standardDistribution, fixation, location) .GenerateDiscriminabilityValue(); _observationValues[location] = new NormalDistribution(discriminability, 1.0).Generate(); } } return _observationValues; }