Giter Club home page Giter Club logo

Comments (8)

thaines avatar thaines commented on September 18, 2024 1

Sorry for not getting back to you sooner.
ItemRef is defined in linked_list_cpp.py under dp_utils, and it's a C++ class that is using templates; if you haven't seen templates before it can be a bit confusing! In simple terms there is a generic List, where ITEM (the first thing in the angle braces) is the contents of each item in the list, and BODY (the second thing in the angle braces) is something stored once for all items in the list. An ItemRef then points at one item in the list.
Effectively, the code uses these definitions of lists to define the data structures for Chinese restaurant processes; the template means the same code can be used for every level of the hierarchy. The ITEM is typically a table at which customers sit, the BODY represents the concentration parameter. Afraid that code is very messy and overly complex - wouldn't write it that way now!

from helit.

df19900725 avatar df19900725 commented on September 18, 2024

It seems that import 'solve_weave' has circular dependent imports. Firstly, import solve_weave, solve_weave imports State from solve_shared, then solve_shared imports Model from model.py, model imports solvers, then solvers import solve_weave again...

from helit.

thaines avatar thaines commented on September 18, 2024

weave is a module that was depreciated from the default scipy install, so you now have to manually install it yourself - you can find it at https://github.com/scipy/weave

P.S. Circular dependencies of that nature are not a problem for Python - its smart enough to handle them correctly.

from helit.

df19900725 avatar df19900725 commented on September 18, 2024

thx a lot. I have solved this problem. Now, I am searching OpenCV1 on Google to run the program since I have found that there are no OpenCV1 in pypi repository. It seems that it is not easy to install open cv1.

from helit.

thaines avatar thaines commented on September 18, 2024

Yeah - I'm afraid this code is quite old now. If I remember correctly then all I was using was the OpenCV image output functions, for visualisation - it may be easier to swap them out for the equivalents in scipy.misc instead (they did not exist when I wrote that code!).

from helit.

df19900725 avatar df19900725 commented on September 18, 2024

Anyway, thank you very much for providing the code.

from helit.

df19900725 avatar df19900725 commented on September 18, 2024

Sorry to bore you again. But I really confused by your code about ds_link_cpp. You have written lots of code as follows:
ItemRef<Cluster,Conc> * clu = to->clusters.Append();
ItemRef<Topic,Conc> ** topicArray = new ItemRef<Topic,Conc>*[topicCount];

But I do not understand keyword "ItemRef" because I think it is neither C code nor python code. I also have google it on Web. I did not find answers. Would you please tell me what does it mean or where can I find things about this? Thanks a lot!

from helit.

df19900725 avatar df19900725 commented on September 18, 2024

Thank you very much. It's so kind of you.

from helit.

Related Issues (15)

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.