gm-spacagna / deep-ttf Goto Github PK
View Code? Open in Web Editor NEWSurvival analsyis and time-to-failure predictive modeling using Weibull distributions and Recurrent Neural Networks in Keras
Survival analsyis and time-to-failure predictive modeling using Weibull distributions and Recurrent Neural Networks in Keras
How can we add more layers to this model? I tried adding layers and kept getting this error:
"ValueError: Input 0 is incompatible with layer gru_19: expected ndim=3, found ndim=2"
I was experimenting adding a simple GRU layer like this: model.add(GRU(40, activation = 'tanh'))
Hello,
Very nice work.
It doesn't appear that the engine data set you've collected is apt survival analysis given that the target event (engine failure) is recored. E.g. "(engine/day, 2) tensor containing time-to-event and 1 (since all engines failed)"
E.g. it seems like you're attempting semi-supervised learning on a fully-supervised dataset (unless I've missed something!)
It would be nice to see a simpler and censored example, perhaps the rossi dataset that Lifelines experiments with:
from lifelines.datasets import load_rossi
rossi_dataset = load_rossi()
See:
http://lifelines.readthedocs.io/en/latest/Survival%20Regression.html
@gm-spacagna Could you please share the missing Jupyter notebook code to generate the graphs after "If we plot the predictions at each time step of engine 3 in terms of mode and [10%, 90%] confidence interval we observe the following:" I'd like to understand how to create that confidence interval graph (in your README.md)
Thank you
Hello,
Thanks for this great piece! As you stated, your solution here could be used in predicting component failure across various applications and domains. I was experimenting with your code using a different data set BUT which is structured same as your data here. But when I got to the builddata() function, I got the following error:
error:---> 39 xtemp[:, max_time-min(j, 99)-1:max_time, :] = engine_x[max(0, j-max_time+1):j+1, :]
ValueError: could not broadcast input array from shape (50,74) into shape (1,1,74)
Again, my data is structured exactly same as yours coming into this function. Seems like the left and right sides of the above line within the function has different shapes hence numpy can not braodcast input array into shape (1,1,74) from (50,74). **Can you please help with how I can overcome this problem?
Thanks!**
run 'model.fit',then " UnboundLocalError: local variable 'arrays' referenced before assignment",what should i do?
I've used your implementation of the WTTE-RNN on the CPU and managed to complete training without any issues. However, when I used the same implementation on a Nvidia GPU I am getting the Invalid Loss error at around 25/100 epochs.
Following are the only changes I've done made when running on the GPU:
CuDNNGRU is used instead of the GRU.
The masking layer is removed from the the model as CuDNNGRU does not support masking. I.e. following line is removed:
model.add(Masking(mask_value=mask_value, input_shape=(None, n_features)))
An initial input layer is added to the model:
mode.add(InputLayer(input_shape(None, n_features)))
The epsilon is 1e-10 and the Keras backend is Tensorflow. And the WTTE-RNN version is 1.1.1.
in ()
1 for unit_number, grp in train_results_df.groupby('unit_number'):
----> 2 plot_weibull_predictions(grp, unit_number)
TypeError: plot_weibull_predictions() takes 1 positional argument but 2 were given
I started to see NaN during training at about 20 epochs, is the nanterminator supposed to prevent that? The output was all NaN.
In the Training with censored data paragraph, we should rather filter out all of the observations in the training set that are later than the representative current time.
Hey - in your build_data func, whats the rationale behind the value 99 in the following line?
xtemp[:, max_time-min(j, 99)-1:max_time, :] = engine_x[max(0, j-max_time+1):j+1, :]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.