High-level interfaceΒΆ
To estimate a sparse variational Gaussian process factor analysis model we:
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).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,quadParamsand optimisation parameters,optimParams.Plot the lower bound history of the estimated model
plot.svGPFA.plotUtils.plotLowerBoundHist(lowerBoundHist=lowerBoundHist)
and model parameters (e.g., latents).
plot.svGPFA.plotUtils.plotTrueAndEstimatedLatents(times=testTimes, muK=testMuK, varK=testVarK, indPointsLocs=indPointsLocs, trueLatents=trueLatentsSamples, trialToPlot=trialToPlot)![]()
Please refer to the following notebook for a full piece of code running svGPFA and plotting its estimates.