不錯(cuò)的函數(shù)
它的哲學(xué)是 易于上手(很快就到了一個(gè)高度),難于精通(就是到不了1) 做條目推薦可以作為加權(quán)函數(shù) In [89]: def aaa(b):return 2/(1+2.71828**-(float(b)/10))-1 ....: In [90]: aaa(1) Out[90]: 0.049958341409185536 In [91]: aaa(0) Out[91]: 0.0 In [92]: aaa(5) Out[92]: 0.24491850432781681 In [93]: aaa(10) Out[93]: 0.46211689275686596 In [94]: aaa(20) Out[94]: 0.76159387345873797 In [95]: aaa(30) Out[95]: 0.90514807131548203 In [96]: aaa(40) Out[96]: 0.9640274850287549 In [97]: aaa(50) Out[97]: 0.98661425343302223 In [98]: aaa(60) Out[98]: 0.99505473377744025 |
|