我无法从模块访问导出的函数。该模块的代码是
module SteinDistributions
export
# Abstract types
SteinDistribution,
SteinPosterior,
# Specific distributions
SteinDiscrete,
SteinGMMPosterior,
SteinGaussian,
SteinLogisticRegressionPosterior,
SteinLogisticRegressionGaussianPrior,
SteinScaleLocationStudentT,
SteinUniform,
# Common functions operating on distributions
# CDF of a distribution
cdf,
# Get Stein factors
getC1,
getC2,
getC3,
# Lower bound on range of coordinate
supportlowerbound,
# Upper bound on range of coordinate
supportupperbound,
# Number of dimensions of target variable
numdimensions,
# get number of samples when distribution is posterior of data
numdatapoints,
# the log prior for posterior distributions
logprior,
# the likelihood [without a prior for posterior distributions]
loglikelihood,
# Log density [will include prior for posterior distributions]
logdensity,
# Gradient of the prior
gradlogprior,
# Gradient of the log density
gradlogdensity,
# Gradient of the log likelihood
gradloglikelihood,
# Random samples drawn from distribution
rand,
# random GMM samples
randgmm,
# evaluating joint and conditional probability mass functions for
# discrete distributions
jointdistribution,
condlogodds,
conddistribution
# Include abstract types first
include("SteinDistribution.jl")
include("SteinPosterior.jl")
# Include specific distributions
include("SteinDiscrete.jl")
include("SteinGMMPosterior.jl")
include("SteinGaussian.jl")
include("SteinLogisticRegressionPosterior.jl")
include("SteinLogisticRegressionGaussianPrior.jl")
include("SteinScaleLocationStudentT.jl")
include("SteinUniform.jl")
end
但我遇到以下错误
julia> using SteinDistributions: SteinUniform
ERROR: SteinUniform not defined
whos()的输出只列出了模块中的一些函数,我不确定是什么决定导出哪些函数:
julia> whos(SteinDistributions)
SteinDistribution DataType
SteinDistributions Module
SteinPosterior DataType
getC1 Function
getC2 Function
getC3 Function
gradlogdensity Function
gradloglikelihood Function
logdensity Function
numdatapoints Function
rand Function
supportlowerbound Function
supportupperbound Function
我希望有人可以帮助我。 谢谢, DAR