Hello,
Iām using reversed ECDF for data analysis and the resulting diagrams contain a sort of strange spikes.
Looks like a bug.
Any idea or suggestion?
Thanks a lot.
Hello,
Iām using reversed ECDF for data analysis and the resulting diagrams contain a sort of strange spikes.
Looks like a bug.
Any idea or suggestion?
Thanks a lot.
Hi @enric.pastor welcome to the forums.
This could be anything. Maybe you could add some more information concerning the chart? How does the data look like, how did you create the chart?
The first thing you could check is the dtype of the x and y axes, specially the x axis
It is hard to add the data as its is generated through a complex process.
The strange thing is that the spikes only appear when the reversed distribution is requested.
The code per se is fairly simple:
fig = px.ecdf(df3, group_labels, ecdfmode="reversed", marginal="box")
fig.update_layout(margin_b= 0, margin_l= 0, margin_r= 0, width= 1000)
fig.update_xaxes(title_text='Time(s)', range=[0, 80])
fig.update_yaxes(title_text='CDF')
fig.update_layout(title_text='Spurious Caution Alert')
fig.update_layout(legend=dict(
yanchor="top",
y=0.99,
xanchor="right",
x=0.99
))
Did you check the dtype for the columns of df3
?
Sorry. I forgot about that.
Time to CPA and the durations are int64.
The predictions are float64.
I have extracted the dataframe as is not large in this test case.
group_labels = [āTime to CPAā, āSpurious Caution durationā, āFirst Caution durationā, āPredicted Time to LoWCā, āFirst Predicted Time to LoWCā]
[[ 13. 4. 4. 38.52282079 38.52282079]
[ 13. 4. 4. 38.52282079 38.52282079]
[ 21. 2. 2. 36.40388629 36.40388629]
[ 21. 2. 2. 36.40388629 36.40388629]
[ 2. 6. 6. 43.17394253 43.17394253]
[ 2. 6. 6. 43.17394253 43.17394253]
[-19. 49. 5. 23.15611685 39.88214533]
[-19. 49. 5. 23.15611685 39.88214533]
[ 28. 44. 4. 44.64795822 38.85908162]
[ 28. 44. 4. 44.64795822 38.85908162]
[ -3. 3. 3. 25.68102444 25.68102444]
[ -3. 3. 3. 25.68102444 25.68102444]
[ 21. 5. 5. 34.04343412 34.04343412]
[ 21. 5. 5. 34.04343412 34.04343412]
[ 12. 18. 1. 36.11286997 28.71333269]
[ 12. 18. 1. 36.11286997 28.71333269]]