High-level interfaceΒΆ

To estimate a sparse variational Gaussian process factor analysis model we:

  1. Construct an empty model

    model = stats.svGPFA.svGPFAModelFactory.SVGPFAModelFactory.buildModel(
        conditionalDist=stats.svGPFA.svGPFAModelFactory.PointProcess,
        linkFunction=stats.svGPFA.svGPFAModelFactory.ExponentialLink,
        embeddingType=stats.svGPFA.svGPFAModelFactory.LinearEmbedding,
        kernels=kernels)
    

    by specifying a conditional distribution (e.g., point-process, PointProcess), an embedding type (e.g., linear, LinearEmbedding), a link function (e.g., exp()) and providing a set of kernels (Kernel).

  2. Estimate the parameters of the model

    svEM = stats.svGPFA.svEM.SVEM()
    lowerBoundHist = svEM.maximize(model=model, measurements=spikeTimes,
                                   initialParams=initialParams,
                                   quadParams=quadParams,
                                   optimParams=optimParams)
    

    by providing a set of measurements, spikeTimes, initial parameters, initialParams, quadrature parameters, quadParams and optimisation parameters, optimParams.

  3. Plot the lower bound history of the estimated model

    plot.svGPFA.plotUtils.plotLowerBoundHist(lowerBoundHist=lowerBoundHist)
    
    _images/24219004_lowerBoundHist.png

and model parameters (e.g., latents).

plot.svGPFA.plotUtils.plotTrueAndEstimatedLatents(times=testTimes, muK=testMuK, varK=testVarK, indPointsLocs=indPointsLocs, trueLatents=trueLatentsSamples, trialToPlot=trialToPlot)
_images/24219004_estimatedLatents.png

Please refer to the following notebook for a full piece of code running svGPFA and plotting its estimates.