当前位置: 首页>>代码示例>>Python>>正文


Python sei_glob.__函数代码示例

本文整理汇总了Python中sei_glob.__函数的典型用法代码示例。如果您正苦于以下问题:Python __函数的具体用法?Python __怎么用?Python __使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了__函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self):
     # getting all required methods
     _genericFunc.__init__(self)
     self.name=      __(u'linear space')
     self.statName=  __('randint')
     self._scritpEquivalenString='numpy.random.'+self.statName
     self.lenData= None
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:7,代码来源:random.py

示例2: _showGui_GetValues

 def _showGui_GetValues( self):
     dlg= self._dialog()
     if dlg.ShowModal() == _OK:
         values = dlg.GetValue()
         dlg.Destroy()
     else:
         dlg.Destroy()
         return
     
     self.colNameSelect= values[0]
     
     if len( self.colNameSelect ) == 0:
         print __("you don't select any items")
         return
     
     if len( self.colNameSelect ) != 2:
         print __("you have to select only two column(s)")
         return
     
     columns=  [numpy.ravel(self._convertColName2Values( [colName] )) for colName in self.colNameSelect]
     # se homogeniza las columnas
     columns= homogenize(*columns)
     self.tests=     values[1]
     #self.hypotesis= values[2]
     #self.userMean=  values[3]
     return ( columns, self.tests) #, self.hypotesis, self.userMean)
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:26,代码来源:xConditionTest.py

示例3: evaluate

    def evaluate( self, *args, **params):
        # computations here
        columns=   args[0]
        tests=     args[1]
        if len(columns) == 0 or len(tests) == 0:
            raise StandardError( __('The input parameters are incorrect'))

        # combining data
        result= list()
        for test in tests:
            if   test == 'kruskawallish':
                fcn= kruskalwallish()
            
            elif test == 'friedmanchisquare':
                fcn= friedmanchisquare()
            
            else:
                continue
            
            res= [fcn.name]
            try:
                resultado= fcn.evaluate(*columns)
                for  name, res1 in zip(fcn.nameResults, resultado):
                    res.extend([name, res1])
            except:
                res.append(__('There is a runtime error'))
            res.append('')
            result.append(res)           
                
        return result
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:30,代码来源:xConditionTest.py

示例4: _showGui_GetValues

    def _showGui_GetValues(self):
        dlg= self._dialog()
        if dlg.ShowModal() == _OK:
            values = dlg.GetValue()
            dlg.Destroy()
        else:
            dlg.Destroy()
            return

        # changing value strings to numbers
        (self.colNameSelect, self.moment) = values
        if len( self.colNameSelect ) == 0:
            print __("You haven't selected any items!")
            return
        
        if not isinstance(self.colNameSelect, (list, tuple)):
            self.colNameSelect = [self.colNameSelect]
            self.moment = [self.moment]

        columns= list()
        for selectedCol in self.colNameSelect:
            col= numpy.array( self.grid.GetColNumeric( selectedCol))
            col= numpy.ravel( col)
            columns.append( col)
        return (columns, self.moment)
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:25,代码来源:moments.py

示例5: _showGui_GetValues

 def _showGui_GetValues( self):
     dlg= self._dialog()
     if dlg.ShowModal() == _OK:
         values = dlg.GetValue()
         dlg.Destroy()
     else:
         dlg.Destroy()
         return
     
     (self.xcolNameSelect, self.ycolNameSelect)= values
     
     if self.xcolNameSelect == None or self.ycolNameSelect == None:
         print __(u"You haven't selected any items!")
         return
     
     xcolumn= self.grid.GetCol( self.xcolNameSelect)
     ycolumn= self.grid.GetCol( self.ycolNameSelect)
     (xcolumn, ycolumn)= homogenize(xcolumn, ycolumn)
     
     xcolumn = numpy.array(xcolumn)
     ycolumn = numpy.array(ycolumn)
     xcolumn=  numpy.ravel(xcolumn)
     ycolumn=  numpy.ravel(ycolumn)
     
     return (xcolumn, ycolumn)
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:25,代码来源:correlation.py

示例6: __init__

 def __init__(self):
     ols.__init__(self)
     self.name=      ('Feasible generalized least squares')
     self.statName=  'glsar'
     self._scritpEquivalenString= 'sm.'+ self.statName
     self.nameResults= [__(u"Kendall's tau"), __(u" two-tailed p-value")]
     self.minRequiredCols= 2
     self.colNameSelect= ''
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:8,代码来源:regression.py

示例7: __init__

 def __init__(self):
     pearsonr.__init__(self)
     self.name=      __('covariance')
     self.statName=  'covariance'
     self._scritpEquivalenString='stats.'+self.statName
     self.nameResults= [__(u'covariance')]
     self.minRequiredCols= 2
     self.colNameSelect= ''
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:8,代码来源:correlation.py

示例8: _report

 def _report( self, result):
     self.outputGrid.addColData( self.nameResults, self.name)
     self.outputGrid.addColData( result)
     self.outputGrid.addRowData( [__(u'Input Data')],  currRow= 0)
     self.outputGrid.addRowData( [__(u'x column='),   self.xcolNameSelect, 'y column=', self.ycolNameSelect ], currRow= 1)
     self.outputGrid.addRowData( [__(u'Output Data')], currRow= 2)
             
     print self.statName+ ' '+ __(u'successful')
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:8,代码来源:correlation.py

示例9: _report

 def _report( self, result):
     if len(result) == 0:
         return
     
     # se hace el reporte por variables
     coldescription= [u'test - variable']
     for nameTest in self.tests:
         coldescription.append( nameTest)
         if nameTest == u't-test':
             coldescription.extend( ['t', 'prob (approx)'])
             
         elif nameTest == u'Sign Test':
             coldescription.extend( ['z', 'prob'])
             
         elif nameTest == u'Chi square test for variance':
             coldescription.extend( ['df', 'chisquare', 'prob'])
             
     self.outputGrid.addColData( coldescription, self.name)
     
     for name, testResults in zip( self.colNameSelect, result):
         col2report= [name]
         for nameTest in self.tests:
             result= testResults.pop( 0)
             if nameTest == u't-test':
                 prob= result[1]
                 if prob == -1.0:
                     col2report.extend( [__('All elements are the same'), __('test not possible'), ''])
                 else:
                     if self.hypotesis == 0:
                         prob= result[1]/2.0
                     col2report.append( '')
                     col2report.append( result[0]) 
                     col2report.append( prob)
                     
             elif nameTest == u'Sign Test':
                 prob= result[1]
                 if prob == -1.0:
                     col2report.extend([ __('All data are the same'),__('no analysis is possible'),''])
                 else:
                     if self.hypotesis == 0:
                         prob= prob/2.0
                     col2report.append( '')
                     col2report.append( result[0])
                     col2report.append( prob)
                     
             elif nameTest == u'Chi square test for variance':
                 prob= result[2]
                 if prob == None:
                     prob= 1.0
                     
                 if self.hypotesis == 0:
                     continue
                     # prob= prob / 2.0 # chisquare
                 
                 col2report.extend( ['',result[0], result[1], prob])
                 
         self.outputGrid.addColData( col2report)
     self.outputGrid.addRowData( ['user mean=' ,  self.userMean ], currRow= 0)
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:58,代码来源:xConditionTest.py

示例10: _sixpack

 def _sixpack(self, data, UCL, LCL, Target, k= 6, n= 2 ):
     result= dict()
     stadis= statistics(data)
     stddev = stadis.stddev
     if stddev == 0:
         print __(u'Six pack analysis fail because the stddev is zero)')
         return
 
     if UCL == None:
         UCL= stadis.mean+ 0.5*k*stadis.stddev
 
     if LCL == None:
         LCL= stadis.mean- 0.5*k*stadis.stddev
 
     if Target == None:
         Target= stadis.mean
 
     if UCL <= LCL:
         print __(u'Six pack analysis fail because LCL >= UCL  %f >= %f')%(LCL, UCL)
         return
 
     mean=     stadis.mean
     Cp=       (UCL-LCL)/float(k*stddev)
     Cpl=      2*(mean-LCL)/float(k*stddev)
     Cpu=      2*(UCL-mean)/float(k*stddev)
     Cpk=      min(Cpu, Cpl)
     va1=      (mean-Target)/float(stddev)
     val2=     math.sqrt(1+va1**2)
     val3=     Cp/float(val2)
     Cpm=      Cp/float(math.sqrt(1+((mean-Target)/float(stddev))**2))
     zUCL=     (UCL - mean)/float(stddev)
     zLCL=     (mean - LCL)/float(stddev)
     outOfUCL= sum([1 for x in data if x > UCL])
     outOfLCL= sum([1 for x in data if x < LCL])
     probUCL=  1 - normProb(zUCL)
     probLCL=  1 - normProb(zLCL)
     probTot=  probLCL + probUCL
     ppm=      int(probTot*1e6)
     sigmaLevel= normProbInv(1-probTot)+1.5
 
     # data for xbar chart
     mir= list()
     for x,y in zip(data[1:],data[:-1]):
         mir.append(abs(x-y))
     newData=       numpy.array(mir)
     rangeNewData=  max(newData)- min(newData)
     LCU=    stadis.mean+ A2[n]*rangeNewData
     LCL=    stadis.mean- A2[n]*rangeNewData
 
     for paramName, value in zip(['stddev', 'mean', 'Cp', 'Cpl', 'Cpu','Cpk',
                                  'zUCL', 'zLCL', 'probUCL', 'probLCL',
                                  'probTot', 'ppm', 'sigmaLevel', 'outOfUCL',
                                  'outOfLCL','Cpm','LCU','LCL',],
                                 [stddev, mean, Cp, Cpl, Cpu, Cpk, zUCL, zLCL,
                                  probUCL, probLCL, probTot, ppm, sigmaLevel,
                                  outOfUCL, outOfLCL, Cpm, LCU, LCL ]):
         result[paramName] = value
     return result
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:58,代码来源:ctrlProcess.py

示例11: _report

 def _report( self, result):
     if 0:
         self.outputGrid.addColData( self.nameResults, self.name)
         self.outputGrid.addColData( result)
         self.outputGrid.addRowData( [__(u'Input Data')],  currRow= 0)
         self.outputGrid.addRowData( [__(u'x column='),   self.xcolNameSelect, 'y column=', self.ycolNameSelect ], currRow= 1)
         self.outputGrid.addRowData( [__(u'Output Data')], currRow= 2)
     print result.summary().__str__().decode( sys.getfilesystemencoding())
     print self.statName+ ' '+__(u'successful')
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:9,代码来源:regression.py

示例12: __init__

 def __init__(self):
     # getting all required methods
     pearsonr.__init__(self)
     self.name=      __(u'Wilcoxon T-test related samples')
     self.statName=  'wilcoxont'
     self._scritpEquivalenString='stats.'+self.statName
     self.txt1= __("X Column to analyse")
     self.txt2= __("Y Column to analyse")
     self.nameResults= ['t-statistic', 'two-tail probability estimate']
     self.minRequiredCols= 2
     self.colNameSelect= ''
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:11,代码来源:inferential.py

示例13: _report

 def _report(self, result):
     res1= [__(u'variable name')]
     res1.extend(self.colNameSelect)
     self.outputGrid.addColData(res1, self.name)
     res2= [__(u'value')]
     res2.extend([numpy.ravel(res[1]) for res in result])
     self.outputGrid.addColData(res2)
     res3= [__(u'frecuency')]
     res3.extend([numpy.ravel(res[0])[0] for res in result])
     self.outputGrid.addColData(res3)
     print self.statName + ' ' + __('successfull')
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:11,代码来源:centralTendency.py

示例14: _dialog

 def _dialog(self, *arg, **params):
     setting= {'Title': self.name,
               '_size': Size(260,250)}
     self._updateColsInfo() # update self.columnames and self.colnums
     bt1= ['StaticText',   [__('Columns to analyse'),] ]
     bt2= ['CheckListBox', [self.columnNames]]
     bt3= ['SpinCtrl',     [1,100,1]]
     bt4= ['StaticText',   [__('moment'),] ]
     structure = list()
     structure.append([bt2, bt1])
     structure.append([bt3, bt4])
     return self.dialog(settings = setting, struct= structure)
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:12,代码来源:moments.py

示例15: _dialog

 def _dialog( self, *arg, **params):
     setting= {'Title': self.name,
               '_size':  Size(280,430)}
     self._updateColsInfo() # update self.columnames and self.colnums
     btn1= ['StaticText',   [__('Select the columns to analyse')]]
     btn2= ['CheckListBox', [self.columnNames]]
     btn3= ['StaticText',   [__('Choose test(s)')]]
     btn4= ['CheckListBox', [self.aviableTest,]]
     structure= list()
     structure.append( [btn1,])
     structure.append( [btn2,])
     structure.append( [btn3,])
     structure.append( [btn4,])
     return self.dialog( settings = setting, struct = structure)
开发者ID:debbiespiegel,项目名称:salstat-statistics-package-2,代码行数:14,代码来源:xConditionTest.py


注:本文中的sei_glob.__函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。