fit.distribution_compare('power_law','exponential')# help(fit.distribution_compare)# distribution_compare(dist1, dist2, nested=None, **kwargs) method of powerlaw.Fit instance# Returns the loglikelihood ratio, and its p-value, between the two# distribution fits, ![在这里插入图片描述](https://img-blog.csdnimg.cn/07ed29b129de4b81877f0bb363d3ebf6.png#pic_center)
assuming the candidate distributions are nested.# Returns# -------# R : float# Loglikelihood ratio of the two distributions' fit to the data. If# greater than 0, the first distribution is preferred. If less than# 0, the second distribution is preferred.# p : float# Significance of R# 5.508748079440679>0
count 38.000000
mean 0.122832
std 0.066159
min 0.065789
25% 0.097068
50% 0.107022
75% 0.117592
max 0.452407
Name: pred_error, dtype: float64
C:\Users\apache\AppData\Local\Continuum\anaconda3\lib\site-packages\ipykernel_launcher.py:3: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
This is separate from the ipykernel package so we can avoid doing imports until
C:\Users\apache\AppData\Local\Continuum\anaconda3\lib\site-packages\ipykernel_launcher.py:4: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
after removing the cwd from sys.path.
alpha= 4.158527091405096
xmin= 0.08629441624365482
count 30.000000
mean 0.129028
std 0.074869
min 0.086294
25% 0.097399
50% 0.107495
75% 0.118141
max 0.463873
Name: lost_Prob, dtype: float64
fit.distribution_compare('power_law','exponential')# help(fit.distribution_compare)# distribution_compare(dist1, dist2, nested=None, **kwargs) method of powerlaw.Fit instance# Returns the loglikelihood ratio, and its p-value, between the two# distribution fits, assuming the candidate distributions are nested.
C:\Users\apache\AppData\Local\Continuum\anaconda3\lib\site-packages\ipykernel_launcher.py:6: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
C:\Users\apache\AppData\Local\Continuum\anaconda3\lib\site-packages\ipykernel_launcher.py:8: RuntimeWarning: divide by zero encountered in power
C:\Users\apache\AppData\Local\Continuum\anaconda3\lib\site-packages\ipykernel_launcher.py:11: RuntimeWarning: divide by zero encountered in power
# This is added back by InteractiveShellApp.init_path()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-17-a56dda00e550> in <module>()
----> 1 for item in range(0,100,0.5):
2 print(item)
TypeError: 'float' object cannot be interpreted as an integer