Giter Site home page Giter Site logo

Comments (4)

haowen-xu avatar haowen-xu commented on August 13, 2024 1

@maye9999 Better close the current issue and start a new one, since it might be helpful to other participants. If you do so, I will copy and paste this comment to the new issue.

  • Yes, it will handle the sliding windows internally. The reason of this is that Donut applies missing data injection, which might be better applied on the original 1-D series, rather than the sliding windows.
  • Yes, you can. Also, you need to pass in numpy arrays, not TensorFlow tensors.
  • As the training goes by, the std estimation of q(z|x) and p(x|z) would probably decrease to a very small value, such that if an unlabelled anomaly presents in the training data, it will cause severe confusion to the gradient at that point (recall that log Normal(..) contains a -(x-mean)/std^2 term). So if you have labels, it will definitely help to stabilize training, thus make the model converge to a better local optimum. When you do not have labels, the missing data injection part of the algorithm will help the model gain some ability to adapt to such noises. And with the help of some other techniques (e.g., gradient clip by norm), the algorithm can still work to some extent.

from donut.

maye9999 avatar maye9999 commented on August 13, 2024

I downgrade Tensorflow to 1.8 and it works. So maybe some API changed in 1.9?

However, when I run the file test_model.py on Tensorflow 1.8, some new error occurs.

....F
======================================================================
FAIL: test_variable_reuse (__main__.ModelTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_model.py", line 55, in test_variable_reuse
    'get_donut/donut/q_z_given_x/z_std/kernel']
AssertionError: Lists differ: [u'get_donut/donut/p_x_given_z... != ['get_donut/donut/p_x_given_z/...

First differing element 0:
u'get_donut/donut/p_x_given_z/mean/dense/bias'
'get_donut/donut/p_x_given_z/x_mean/bias'

Diff is 1428 characters long. Set self.maxDiff to None to see it.

----------------------------------------------------------------------
Ran 6 tests in 1.048s

FAILED (failures=1)

Could you please check it too? Thank you very much!

from donut.

haowen-xu avatar haowen-xu commented on August 13, 2024

Actually the Python 2.7 + TensorFlow 1.8 already passes unit tests on Travis CI (https://travis-ci.org/haowen-xu/donut/jobs/406086706).

It seems to be related to a bug I fixed today (see bef5575), which has been existing long before I noticed it. The old version would construct a set of new variables each time the encoder or decoder of the model is built, but I meant to reuse the previous constructed ones. You may upgrade to the newest version to have a try.

If you just cloned it from git, do git pull. Otherwise if you also installed it, please do pip install --upgrade git+https://github.com/haowen-xu/donut.git.

from donut.

maye9999 avatar maye9999 commented on August 13, 2024

Thanks for your reply.

By the way, I'd like to ask some questions about the inputs of the model.

  • The values for DonutTrainer.fit and DonutPredictor.get_score is 1-D vector and do I need to handle the sliding window? Or the sliding windows is handled internally in Trainer and Predictor?
  • When I don't have missing points, could I just set the missing to zeros_like(values)?
  • The readme says If there is no label, simply use all zeros. I assume VAE models are un-supervised, so I don't understand the usage of labels in DonutTrainer.fit. Is it simply used for evaluate the model, or is it involved in some training process?

Thank you very much and looking foward to your reply!

from donut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.