Code Monkey home page Code Monkey logo

gridtoplacemodel's People

Contributors

torty0815 avatar

Stargazers

Nate Sutton avatar

Forkers

nmsutton

gridtoplacemodel's Issues

Updated code for current libraries

I added some patches to the code to get this at least producing some figues on Ubuntu 21.10. The forked version of the code is here. The following software versions were used:

python virtualenv (3.9.4-1build1)
python (2.7)
packages:
numpy (1.22.2)
matplotlib (3.5.1)
scipy (1.8.0)
pickle-mixin (1.0.2)
sklearn (1.0.2)

I did not create a pull request because I was only able to generate figures 1, 2, 3, and 1/2 of 5. Issues creating other figures were:

function: problematic()
Error: self.distance_matrix[int(np.subtract((self.distance_matrix <= bins[i]),(self.distance_matrix <= bins[i-1]),dtype=np.float32))] = bins[i] #every entry that is <= bins[i] but without beeing <= bins[i-1] becomes bins[i]
TypeError: only size-1 arrays can be converted to Python scalars

Figure 5 and 6A (hebbPaperNew()) and
Figure 7 (hebbPaperStabilityErr())
Error: self.distance_matrix[int(np.subtract((self.distance_matrix <= bins[i]),(self.distance_matrix <= bins[i-1]),dtype=np.float32))] = bins[i] #every entry that is <= bins[i] but without beeing <= bins[i-1] becomes bins[i]
TypeError: only size-1 arrays can be converted to Python scalars

Figure generating functions working:

MethodsPaper() (Fig. 1)
SVCPaper() (Fig. 2)
SVCPaperOneMod() (Fig. 3)
hebbPaperLesionsErr() (Fig. 5 panels C, D, and E)

I think the patches added may make the code run with equivalent results to the original version. One patch I made was changing if self.patterns_1.shape[-1] == 1 into self.patterns_1.shape[-1].all() == 1. I don't know if this affects results.

Another approach to getting the original code to work would be creating a virtual machine with I assume Ubuntu 15.04 and installing old Python packages. I preferred to work outside of a virtual machine so I patched the code.

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.