Skip to content

Commit

Permalink
Merge branch 'hotfix/hotfix-epsilonwarning'
Browse files Browse the repository at this point in the history
  • Loading branch information
ragulpr committed Jan 10, 2018
2 parents aab7460 + 1bd15c2 commit c0075a7
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 32 deletions.
24 changes: 17 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,29 @@ language: python

cache: pip

python:
- "2.7"
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "3.6"
- "3.6-dev" # 3.6 development branch
matrix:
include:
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.5-dev
- python: 3.6
- python: 3.6-dev
- python: 3.6
- python: 2.7
env: KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile
- python: 3.6
env: KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile

# command to install dependencies
install:
- pip install --upgrade pip setuptools
- cd python && pip install -r requirements-ci.txt

- if [[ "$KERAS_BACKEND" == "theano" ]]; then
pip install theano;
fi

# command to run tests
# (we are already in "python" directory here)
script:
Expand Down
2 changes: 1 addition & 1 deletion README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ WTTE-RNN은 이러한 문제가 어떻게 다루어져야 하는가에 대한

![중도절단된 데이터](./readme_figs/data.gif)

일종의 트릭으로, TTE 자체를 예측하는 대신 기계 학습 모델이 *확률 분포의 매개 변수* 를 출력하도록 해 봅시다. 어떤 확률 분포도 가능합니다만, 그 [굉장함](https://ragulpr.github.io/2016/12/22/WTTE-RNN-Hackless-churn-modeling/#embrace-the-Weibull-euphoria) 때문에 *Weibull 분포*좋아하므로 사용했습니다. 기계 학습 알고리즘 또한 그래디언트 기반의 임의의 알고리즘이 될 수 있습니다만, 우리가 그 [굉장함](http://karpathy.github.io/2015/05/21/rnn-effectiveness/)때문에 RNN을 좋아하므로 RNN을 선택했습니다.
일종의 트릭으로, TTE 자체를 예측하는 대신 기계 학습 모델이 *확률 분포의 매개 변수* 를 출력하도록 해 봅시다. 어떤 확률 분포도 가능합니다만, 그 [굉장함](https://ragulpr.github.io/2016/12/22/WTTE-RNN-Hackless-churn-modeling/#embrace-the-Weibull-euphoria) 을 좋아해서 *Weibull 분포* 를 사용했습니다. 기계 학습 알고리즘 또한 그래디언트 기반의 임의의 알고리즘이 될 수 있습니다만, 우리가 그 [굉장함](http://karpathy.github.io/2015/05/21/rnn-effectiveness/)을 좋아해서 RNN을 선택했습니다.


![WTTE-RNN 구조 예제](./readme_figs/fig_rnn_weibull.png)
Expand Down
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WTTE-RNN is an algorithm and a philosophy about how this should be done.
* [blog post](https://ragulpr.github.io/2016/12/22/WTTE-RNN-Hackless-churn-modeling/)
* [master thesis](https://ragulpr.github.io/assets/draft_master_thesis_martinsson_egil_wtte_rnn_2016.pdf)
* Quick visual intro to the [model](https://imgur.com/a/HX4KQ)
* Jupyter notebook: [basics](examples/keras/simple_example.ipynb)
* Jupyter notebooks: [basics](examples/keras/simple_example.ipynb), [more](https://github.com/ragulpr/wtte-rnn-examples)


# Installation
Expand Down Expand Up @@ -93,28 +93,14 @@ Pull-requests, recommendations, comments and contributions very welcome.
* Weibull functions (cdf, pdf, quantile, mean etc)
* Objective functions written for:
- Tensorflow
- Keras
- Keras (Tensorflow + Theano) ✔
* Keras helpers
- Weibull output layers
- Loss functions
- Callbacks
* ~~ Lots of example-implementations ~~
- [Basic notebook](examples/keras/simple_example.ipynb) will be kept here but to save space and encourage viz check out [the examples-repo](https://github.com/ragulpr/wtte-rnn-examples) or fork your notebooks there

## Multi-framework support

The core technology is the objective functions.
We plan to make them to be reusable with any machine-learning framework.

* TensorFlow ✔
* Keras (TensorFlow wrapper) ✔
* MXnet
* Theano
* Torch
* h2o
* scikitFlow
* MLlib

# Licensing

* MIT license
Expand All @@ -131,7 +117,14 @@ We plan to make them to be reusable with any machine-learning framework.
```

## Contributing
Contributions/PR/Comments etc are very welcome! Post an issue if you have any questions and feel free to reach out to egil.martinsson[at]gmail.com.

### Contributors (by order of commit)

Reach out to egil.martinsson[at]gmail.com if you have any questions.
If you can, please open an issue so other can join in.
Contributions/PR/Comments etc are very welcome!
* Egil Martinsson
* Clay Kim
* Jannik Hoffjann
* Daniel Klevebring
* Jeongkyu Shin
* Joongi Kim
* Jonghyun Park
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

# General information about the project.
project = 'WTTE-RNN'
copyright = '2016-2017. Egil Martinsson and contributors'
copyright = '2016-2018. Egil Martinsson and contributors'
author = 'Contributors.'

# The version info for the project you're documenting, acts as replacement for
Expand Down
11 changes: 9 additions & 2 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,14 @@ $ pip install -e .[build,test,dev,tf]
```

## Contributing
Contributions/PR/Comments etc are very welcome! Post an issue if you have any questions and feel free to reach out to egil.martinsson[at]gmail.com.

Reach out to egil.martinsson[at]gmail.com if you have any questions.
Contributions/PR/Comments etc are very welcome!
### Contributors (by order of commit)

* Egil Martinsson
* Clay Kim
* Jannik Hoffjann
* Daniel Klevebring
* Jeongkyu Shin
* Joongi Kim
* Jonghyun Park
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name='wtte',
version='1.0.1',
version='1.0.2',
description='Weibull Time To Event model. A Deep Learning model for churn- and failure prediction and everything else.',
author='Egil Martinsson',
author_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion python/wtte/wtte.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def output_lambda(x, init_alpha=1.0, max_beta_value=5.0,
"""
if max_beta_value is None or max_beta_value > 3:
if K.epsilon() <= 1e-07 and K.backend() == 'tensorflow':
if K.epsilon() > 1e-07 and K.backend() == 'tensorflow':
message = "\
Using tensorflow backend and allowing high `max_beta_value` may lead to\n\
gradient NaN during training unless `K.epsilon()` is small.\n\
Expand Down

1 comment on commit c0075a7

@ragulpr
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #38 Fixes #33

Please sign in to comment.