python新手,Spyder新手,但下面是我的代码:
#calculating the probability that a data point belongs to a normal distribution
dVal = stats.norm(mu[0], sigma[0])
dVal.pdf(15)
#passing in array to prob density function to get prob density at every point in data set
dVal.pdf(X[:,0])[0:50]
我的密码来自: http://www.johnwittenauer.net/machine-learning-exercises-in-python-part-8/ 我理解的其余代码,这一点我正在慢慢地尝试理解,但我的问题是为什么dVal变量没有出现在Spyder的variable explorer中?这仅仅是因为我的代码中不正确的逻辑,还是与变量的类型有关,还是有其他原因?在
根据文档heredVal是一个对象。在
根据我对Spyder的记忆,变量浏览器中只显示简单的内置变量。在
您可以尝试在同一窗口中使用“对象检查器”选项卡,以便深入了解对象。在
您也可以键入help(dVal)来查看文档。在
您也可以键入dir(dVal)来查看属性和方法的列表。在
相关问题 更多 >
编程相关推荐