本文整理汇总了Python中SSUtilities.padValue方法的典型用法代码示例。如果您正苦于以下问题:Python SSUtilities.padValue方法的具体用法?Python SSUtilities.padValue怎么用?Python SSUtilities.padValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSUtilities
的用法示例。
在下文中一共展示了SSUtilities.padValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createDiagnosticReport
# 需要导入模块: import SSUtilities [as 别名]
# 或者: from SSUtilities import padValue [as 别名]
def createDiagnosticReport(self):
"""Creates a formatted summary table of the OLS
diagnostics."""
#### Create PValue Array ####
allPVals = NUM.array( [self.fProb, self.waldProb,
self.BPProb, self.JBProb] )
#### Check For Any Significance for Extra Padding ####
signFlag = NUM.any(allPVals <= 0.05)
#### Table Title ####
header = ARCPY.GetIDMessage(84076)
feet = [84104, 84105, 84106, 84107]
feet = [ ARCPY.GetIDMessage(i) for i in feet ]
dFoot, eFoot, fFoot, gFoot = feet
dFoot = ARCPY.GetIDMessage(84104)
row1 = [UTILS.addColon(ARCPY.GetIDMessage(84253)),
self.ssdo.inName,
' ' + UTILS.addColon(ARCPY.GetIDMessage(84254)),
UTILS.padValue(self.depVarName, significant = signFlag)]
aiccLab = ARCPY.GetIDMessage(84251) + " " + dFoot
row2 = [UTILS.addColon(ARCPY.GetIDMessage(84093)),
str(self.n), ' ' + UTILS.addColon(aiccLab),
UTILS.padValue(UTILS.formatValue(self.aicc),
significant = signFlag)]
r2Lab = ARCPY.GetIDMessage(84019) + " " + dFoot
adjR2Lab = ARCPY.GetIDMessage(84022) + " " + dFoot
row3 = [UTILS.addColon(r2Lab), UTILS.formatValue(self.r2),
' ' + UTILS.addColon(adjR2Lab),
UTILS.padValue(UTILS.formatValue(self.r2Adj),
significant = signFlag)]
fdofLab = ARCPY.GetIDMessage(84028)
fLab = ARCPY.GetIDMessage(84025) + " " + eFoot
row4 = [UTILS.addColon(fLab), UTILS.formatValue(self.fStat),
" " + UTILS.addColon(fdofLab.format(self.q, self.dof)),
UTILS.writePVal(self.fProb, padNonSig = True)]
chiMess = ARCPY.GetIDMessage(84034)
wLab = ARCPY.GetIDMessage(84031) + " " + eFoot
row5 = [UTILS.addColon(wLab), UTILS.formatValue(self.waldStat),
" " + UTILS.addColon(chiMess.format(self.q)),
UTILS.writePVal(self.waldProb, padNonSig = True)]
kLab = ARCPY.GetIDMessage(84037) + " " + fFoot
row6 = [UTILS.addColon(kLab), UTILS.formatValue(self.BP),
' '+ UTILS.addColon(chiMess.format(self.q)),
UTILS.writePVal(self.BPProb, padNonSig = True)]
jbLab = ARCPY.GetIDMessage(84043) + " " + gFoot
row7 = [UTILS.addColon(jbLab), UTILS.formatValue(self.JB),
' '+ UTILS.addColon(chiMess.format(2)),
UTILS.writePVal(self.JBProb, padNonSig = True)]
#### Finalize Diagnostic Table ####
diagTotal = [ row1, row2, row3, row4, row5, row6, row7 ]
diagJustify = ["left", "right", "left", "right"]
self.diagTable = UTILS.outputTextTable(diagTotal,
header = header, pad = 1,
justify = diagJustify)
self.diagRaw = diagTotal
self.diagJustify = diagJustify