Git Product home page Git Product logo

clelidm / mincompspin_greedy Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 3.0 7.18 MB

Greedy search for the best Minimally Complex spin Model: "community detection" in binary data.

License: GNU General Public License v3.0

C++ 95.15% C 1.49% Makefile 2.60% Shell 0.76%
bayesian-inference binary-data-analysis community-detection-algorithm high-order-interaction spin-models maximum-entropy-models

mincompspin_greedy's People

Contributors

clelidm avatar zzammuel avatar

Watchers

 avatar  avatar  avatar

mincompspin_greedy's Issues

incorrect log evidence

Correct additional factors of sqrt(pi). Possible fix:

double LogE_SubC_forMCM(map<__int128_t, unsigned int> Kset, uint32_t m, unsigned int N)
{
  double LogE = 0;

  map<__int128_t, unsigned int>::iterator it;
  unsigned int Ncontrol = 0; // for control
  unsigned int Ks = 0;

  for (it = Kset.begin(); it!=Kset.end(); ++it)
  {
    Ks = (it->second);  Ncontrol += Ks;
    LogE += lgamma(Ks + 0.5) - lgamma(0.5);
  }
  if (Ncontrol != N) { cout << "Error Likelihood function: Ncontrol != N" << endl;  }

  return LogE - lgamma( (double)( N + (1UL << (m-1)) ) ) + lgamma( (double)((1UL << (m-1)) ) ); 
}

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.