Problem in fitting the model #51
-
Dear Valuable team, I am a new user of pyextremes package which i need to fit my data which is timeseries of tension loads on mooring line. lets say (t,x), and i drived them from FEM analysis. So first i transffered to the series format as suggeted and then storred them in data.frame like this test = pd.Series(data =df['x'].values, index = df['t']). Then i tried to use the quick example of the package. these two codes are running sucesfuklly: model = EVA(data = test) model.fit_model() Cell In[18], line 1 File ~\anaconda3\lib\site-packages\pyextremes\eva.py:601 in fit_model File ~\anaconda3\lib\site-packages\pyextremes\eva.py:602 in File ~\anaconda3\lib\site-packages\pyextremes\models\model_mle.py:43 in init File ~\anaconda3\lib\site-packages\pyextremes\models\model_base.py:65 in init File ~\anaconda3\lib\site-packages\pyextremes\models\distribution.py:110 in init File ~\anaconda3\lib\site-packages\pyextremes\models\distribution.py:134 in fit File ~\anaconda3\lib\site-packages\scipy\stats_distn_infrastructure.py:2655 in fit TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' I will be thankful if you kindly advice me on this problem. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You should check your data for invalid values. What dtype are you using? |
Beta Was this translation helpful? Give feedback.
You can use any units, the default period is 365 days. You should set your period both when extracting extremes (as you did) and when generating figures/results. Fitting doesn't care about your time scale - you fit distributions to a sample of extremes, not to time series (you can see that in the PDF plot).