Comments (3)
If you want to keep the timeseries' structure along the time axis, then yes you have to fill the missing values with something.
And here, there are many many strategies (0.0, last known value, randomly draw from the series, mean or median on a particular time window, etc), but it all depends your use case and this is a decision you have to make according to the underlying goal of the task you are trying to solve !
Hope it helps !
Olivier
from ruptures.
Hi @jdkworld ,
Thx for you interest in ruptures
.
This is because of the nan
values in your series ! Indeed, ruptures
expects the user to have handled on its own missing data. If ruptures
has as input series with missing data, then the behaviour is unexpected.
If you remove the missing data, the outputs "looks" fine.
series = dataframe.to_numpy(dtype='float', na_value=np.nan)
print(f"Raw data : shape is {series.shape}")
series = series[~np.isnan(series)]
print(f"After removing the nans : shape is {series.shape}")
algo = rpt.Binseg(model="normal", min_size=12*24*7, jump=12*24).fit(series)
result = algo.predict(pen=100)
rpt.display(series, result)
plt.show()
I hope this helps ! Let us know !
Olivier
from ruptures.
Hi Olivier,
Thanks a lot for your answer.
The signal is a timeseries and I still want min_size and jump to correspond to the correct time period. So just removing the NaNs is no option.
As I understand you, I should therefore fill in all missing data so that no NaN values are left and the time interval for each step is constant?
Josien
from ruptures.
Related Issues (20)
- AttributeError: 'kernel_hyper' object has no attribute 'signal' HOT 6
- Docs: Penalty term explainer HOT 2
- Docs: Cost function illustrations HOT 1
- multidimensional data HOT 2
- More metrics ? e.g. adjusted randindex HOT 2
- [BUG] Two badges not rendering correctly in readme HOT 2
- How to `set_xticklabels` HOT 1
- Significance Value for Change Point HOT 2
- Piecewise linear HOT 2
- Provide Python 3.11 wheels HOT 1
- Algorithm and threshold advice for piecewise linear
- Rand index over 1 HOT 1
- Pruning rule in Pelt HOT 1
- Normalization and Cost HOT 3
- Clarification on Breakpoint Indexing with Dataframe Input HOT 2
- Python 3.12 wheels HOT 4
- Unable to install in Poetry 1.7.1 HOT 3
- Question: How do i use Ruptures to detect large data streaming? HOT 2
- Speed it up HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruptures.