Exemplo n.º 1
0
    for _ in trange(iterations_num):
        # get stimulus from psi object
        rod, frame = psi.stim

        # get response from the generative model
        response = genAgent.getResponses(rod, frame, 1)

        # plot selected stimuli
        plotter.plotStimuli()

        # M: Plot RMSE for thresholds; first argument is the predicted treshold,
        # second argument is the target threshold.
        a=np.asarray(psi.CDFTable)
        b= np.asarray(genAgent.PSETable)
        # a is basically nothing no since, it is flattened and meaned
        plotter.plotRSME(a.flatten().mean(), b)

        # plot updated parameter values based on mean and MAP
        plotter.plotParameterValues()

        # the parameter distributions may be plotted at most once (so comment out at least one)

        # plot parameter distributions of current trial
        # plotter.plotParameterDistributions()

        # plot parameter distributions of each trial as surfaces
        plotter.plotParameterDistributions(projection='3d')

        # the negative log likelihood may be plotted at most once (so comment out at least one)

        # plot negative log likelihood of responses thus far as a contour plot
Exemplo n.º 2
0
    # run model for given number of iterations
    print 'inferring model ' + stim_selection + 'ly'

    for _ in trange(iterations_num):
        # get stimulus from psi object
        rod, frame = psi.stim

        # get response from the generative model
        response = genAgent.getResponses(rod, frame, 1)

        # plot selected stimuli
        plotter.plotStimuli()

        # M: Plot RMSE for thresholds; first argument is the predicted treshold,
        # second argument is the target threshold.
        plotter.plotRSME(psi.response_array, genAgent.PSETable)

        # plot updated parameter values based on mean and MAP
        plotter.plotParameterValues()

        # the parameter distributions may be plotted at most once (so comment out at least one)

        # plot parameter distributions of current trial
        # plotter.plotParameterDistributions()

        # plot parameter distributions of each trial as surfaces
        plotter.plotParameterDistributions(projection='3d')

        # the negative log likelihood may be plotted at most once (so comment out at least one)

        # plot negative log likelihood of responses thus far as a contour plot
Exemplo n.º 3
0
        # get response from the generative model
        response = genAgent.getResponses(rod, frame, 1)

        # plot selected stimuli
        plotter.plotStimuli()

        # M: Plot RMSE for thresholds; first argument is the predicted threshold,
        # second argument is the target threshold.
        # M: PSE from GenAg is the target threshold, the CDF PSE is the predicted threshold.

        CDFArray = np.asarray(psi.CDFTable)
        # Reduce dimensionality by summing over all columns.
        CDFArrayMean = CDFArray.mean(axis=0)
        PSEArray = np.asarray(genAgent.PSETable)
        # PSEArray2= PSEArray.mean(axis=0)
        plotter.plotRSME(CDFArray, PSEArray)
        #print(CDFArray)
        print(CDFArray)

        # print(psi.CDFTable)
        # print(genAgent.PSETable)
        #plotter.CDFPlotter(CDFArrayMean)
        # print('cdf', psi.CDFTable)

        # plot updated parameter values based on mean and MAP
        plotter.plotParameterValues()

        # the parameter distributions may be plotted at most once (so comment out at least one)

        # plot parameter distributions of current trial
        # plotter.plotParameterDistributions()