Comments (8)
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.
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.
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.
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.
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.
Anyway, thank you very much for providing the code.
from helit.
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.
Thank you very much. It's so kind of you.
from helit.
Related Issues (15)
- possible bug in wishart sampler HOT 3
- ValueError - Numpy?
- Requirements (let dependancies)
- about the import path
- help needed -- just getting started HOT 3
- Windows?
- Need to upgrade project to Python3 or a documentation for requirements
- The result model varies for each run
- License clarification requested HOT 2
- cost_proxy error on Handwriting synthesis generate HOT 1
- Installing ? HOT 7
- LET: Thresholding causes an exception HOT 6
- How to build C modules while using virtualenv
- TypeError: Couldn't find foreign struct converter for 'cairo.Context' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helit.