Orange Forum • View topic - help in script

help in script

A place to ask questions about methods in Orange and how they are used and other general support.

help in script

Postby Guest » Fri Jan 25, 2008 11:09

this query is with regards to OrngInteract.py which uses OrngContingency.py. OrngInteract.py calls a function getPvalue. my doubt revolves around this function.
as per the theory
To test for significance, u imply that self loss when assessed by test - bootstrap protocol and multiplied by 2n/log2e has a chi squared distribution. Therefore the variable "lim" in the part of the script represents the self loss or gain loss. The variable "table" represents the contingency table to provide "n" (total number) and df in the above formula. Therefore, in the function below "2n/log2e" has to be calculated and the using the function statisticsc the p value at df is calculated.
This I understand. This is a python script and I have two questions:
1) _log2e = 0.693
why are we multiplying this in the function below, we need to divide 2n * self loss
2) second why do we need (1-statisticsc.chi_squared(...))
why 1- the pvalue is calculated.


def getPvalue(lim,table):
import statisticsc
return 1-statisticsc.chi_squared(table.dof,2.0*lim*table.total*_log2e)

i really need your help here.
much regards

Return to Questions & Support



cron