【问题标题】:Which parameters should be increased to indicate the variance from a function?应该增加哪些参数来指示函数的方差?
【发布时间】:2020-04-26 06:22:57
【问题描述】:

这是Xy的函数

X = np.random.rand(50,1)
y = ((X.T*X)**9 +X).reshape(-1) 

您如何指出数据是否存在差异?哪些参数控制方差以及如何增加或减少它? where is the variance here?

你能给我举例说明函数的变化吗..

【问题讨论】:

    标签: numpy machine-learning statistics variance


    【解决方案1】:

    在这种情况下,您可以使用np.var(my_numpy_array,ddof=1) 来计算数组的方差。

    参数 ddof 来自 'Delta Degrees of Freeedom',您可以在这里阅读更多关于它们的信息:https://en.wikipedia.org/wiki/Degrees_of_freedom_(statistics)

    在您的情况下,由于 y 是根据 X 计算的,我将计算 np.var(y) 并检查以查看结果。

    您认为您的数据变化足够大的阈值取决于具体情况。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多