Git Product home page Git Product logo

Comments (4)

iancovert avatar iancovert commented on June 3, 2024

Hi Avinash,

You've noticed that the experiment files typically save a dictionary of results, with an entry called 'GC_est'. The way this 1D array is computed is: i) the relevant first layer weights are extracted from the neural network (all weights in MLP; weights that touch the input in LSTM), ii) those weights are reshaped if applicable (in MLP we reshape the weights to put all the lags for one input variable in the same column), iii) we take the norm of the weight matrix to quickly determine if there are columns where all weights are equal to zero.

If you follow a similar pattern in your experiments, you can determine the sparsity pattern by checking where zeros are located in the 'GC_est' entry in the results dictionary.

As for data preprocessing, results will definitely vary depending on the scaling of your inputs. It would probably be reasonable to standardize your input data (as people do in linear l1-regularized models) by scaling each feature to be in the range [-1, 1] or to have variance 1.

Let me know if there's anything else I can help clarify.

Ian

from nonlinear-gc.

10avinash avatar 10avinash commented on June 3, 2024

Thanks,
I am trying to run a simple bivariate time series to check causality. I am getting the following error:
RuntimeError: size mismatch, m1: [49992 x 20], m2: [10 x 10] at /pytorch/aten/src/TH/generic/THTensorMath.cpp:940

I am guessing there is a layer somewhere in the mlp.py file which needs some sort of size specifications. Do you know how to fix this? I am a little knew to pytorch hence I am asking these many questions.

with thanks,
Avinash

from nonlinear-gc.

iancovert avatar iancovert commented on June 3, 2024

Hi Avinash, sorry for the slow reply. Please take a look at this repository, where I've written a much cleaner implementation of these methods. There are a couple demos, so I think you'll find this much easier to use.

from nonlinear-gc.

10avinash avatar 10avinash commented on June 3, 2024

No problem Ian, I will go through the new repository, thanks.

from nonlinear-gc.

Related Issues (2)

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.