本文整理汇总了Python中utils.Utils.scale方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.scale方法的具体用法?Python Utils.scale怎么用?Python Utils.scale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils.Utils
的用法示例。
在下文中一共展示了Utils.scale方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: input
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from utils import Utils
from stats import Stats
input()
tokens = input().split()
N = len(tokens)
points = list(map(int, tokens))
points.sort()
Q1 = Stats.Q1(points)
Q2 = Stats.Q2(points)
Q3 = Stats.Q3(points)
print(Utils.scale(Q1,0))
print(Utils.scale(Q2,0))
print(Utils.scale(Q3,0))
示例2: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
from utils import Utils
from stats import Stats
print( Utils.scale (Stats.geomDistCumulative(1/3, 5), 3))
示例3: input
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from utils import Utils
from stats import Stats
N = input()
values1 = input().split()
values2 = input().split()
points = [int(i) for i in values1]
weights = [int(i) for i in values2]
wMean = Stats.weightedMean(points, weights)
print(Utils.scale(wMean,1))
示例4: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
from utils import Utils
from stats import Stats
print( Utils.scale (Stats.poissonDist(2.5,5), 3))
示例5: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
from stats import Stats
from utils import Utils
mean = 70
stdDev = 10
pMoreThan80 = 1 - Stats.normDistCumulative(mean, stdDev, 80)
pPassed = 1 - Stats.normDistCumulative(mean, stdDev, 60)
pFailed = Stats.normDistCumulative(mean, stdDev, 60)
print( Utils.scale (pMoreThan80*100, 2))
print( Utils.scale (pPassed*100, 2))
print( Utils.scale (pFailed*100, 2))
示例6: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from stats import Stats
from utils import Utils
boysWeight = 1.09
girlsWeight = 1.0
probBoy = boysWeight / (boysWeight + girlsWeight)
print (Utils.scale( 1 - Stats.binomDistCumulative(2,6,probBoy), 3))
示例7: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
from stats import Stats
from utils import Utils
mean = 20
stdDev = 2
pLess19_5 = Stats.normDistCumulative(mean, stdDev, 19.5)
pBetween22_20 = Stats.normDistCumulative(mean, stdDev, 22) - Stats.normDistCumulative(mean, stdDev, 20)
print( Utils.scale (pLess19_5, 3))
print( Utils.scale (pBetween22_20, 3))
示例8: input
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from utils import Utils
from stats import Stats
input()
points = map(int,input().split())
freqs = map(int, input().split())
S = Stats.expandPopulation(points, freqs)
S.sort()
Q1 = Stats.Q1(S)
Q3 = Stats.Q3(S)
print(Utils.scale(Q3-Q1, 1))
示例9: input
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from utils import Utils
from stats import Stats
input()
numbers = list(map(int,input().split()))
stdev = Stats.standardDeviation(numbers)
print(Utils.scale(stdev, 1))
示例10: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
import math
from utils import Utils
from stats import Stats
mean = 2.4 * 100
stdDev = 2.0 * math.sqrt(100)
pSuccess = Stats.normDistCumulative(mean, stdDev, 250)
print( Utils.scale (pSuccess, 4))
示例11: input
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from utils import Utils
from stats import Stats
input()
line = input()
values = line.split()
numbers = [int(i) for i in values]
numbers.sort()
average = Stats.mean(numbers)
median = Stats.median(numbers)
mode = Stats.mode(numbers)
print(Utils.scale(average,1))
print(Utils.scale(median, 1))
print(mode)
示例12: input
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
import math
from stats import Stats
from utils import Utils
_ = input("Size of variables: ")
X = Utils.readFloatsLine("Enter X: ")
Y = Utils.readFloatsLine("Enter Y: ")
pcc = Stats.PearsonCC(X,Y)
print (Utils.scale(pcc,3))
示例13: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
from utils import Utils
from stats import Stats
CA = 160 + 40 * Stats.poissonSquareExpectedValue(0.88)
CB = 128 + 40 * Stats.poissonSquareExpectedValue(1.55)
print( Utils.scale (CA, 3))
print( Utils.scale (CB, 3))
示例14: print
# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import scale [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from utils import Utils
from stats import Stats
print( Utils.scale (Stats.geomDist(1/3, 5), 3))