fraenkel-lab / pcst_fast Goto Github PK
View Code? Open in Web Editor NEWA fast implementation of the Goemans-Williamson scheme for the prize-collecting Steiner tree / forest problem.
License: MIT License
A fast implementation of the Goemans-Williamson scheme for the prize-collecting Steiner tree / forest problem.
License: MIT License
@ludwigschmidt let me know what you think. It seems like googletest is not a pypy package, which warrants keeping it, I think, but pybind11 probably shouldn't be a subtree, in keeping with the modular attitude we're taking here, right?
Also, would it be possible to write unit tests using googletest or travis?
Hi @ludwigschmidt,
As we've previously discussed, for many of our applications, we can get better results if we allow negative node prizes. Would you take a look at how difficult it would be to add this functionality?
I've noticed that unrooted PCST runs (in some cases much) faster than rooted PCST.
In our use case, we solve the PCSF problem by rooting a dummy node with prize 0. An alternative (though slightly dirty) way of rooting a dummy node would be to assign a large prize to it. I've seen speedups 2-4x faster by doing this.
Hi,
I would like to ask about an error of 'incompatible function arguments'.
It suggests only the following argument types are supported: 1. (arg0: numpy.ndarray[numpy.int64], arg1: numpy.ndarray[numpy.float64], arg2: numpy.ndarray[numpy.float64], arg3: int, arg4: int, arg5: str, arg6: int) Tuple[numpy.ndarray[numpy.int32], numpy.ndarray[numpy.int32]]
when I used numpy.array.
So I changed from numpy.array to numpy.ndarray, but it raises another error of ValueError: maximum supported dimension for an ndarray is 32, found 390577
The following is my script.
`from pcst_fast import pcst_fast
import numpy as np
import pickle5 as pickle
edge = pickle.load(open('edge.pickle', 'rb'))
prizes = pickle.load(open('prize.pickle', 'rb'))
edges = []
costs = []
for (gene1, gene2) in edge:
edges.append([gene1, gene2])
costs.append(edge[(gene1, gene2)])
edges = np.ndarray(edges, dtype='int64')
costs = np.ndarray(costs, dtype='float64')
prize = np.ndarray(prizes, dtype='float64')
verticess, edgess = pcst_fast(edges, prize, costs, root=-1, num_clusters=3, pruning='strong', verbosity_level=3)
print(verticess)
print(edgess)
`
Is the pypi package currently supposed to work on Mac? When I try to install pcst_fast in a fresh virtualenv on my Mac I get the following error:
Hello,
Do you plan to provide support for Python 3.8 and 3.9?
Trying to install it on Debian Buster returns error below.
docker run -it python:3.9-buster sh
pip install pcst-fast
# ERROR: Could not find a version that satisfies the requirement pcst-fast
# ERROR: No matching distribution found for pcst-fast
I am not qualified in C++ or Python bindings, but let me know if I can help.
Thank you for your work!
Here's an example of how to set this up:
https://github.com/muflihun/easyloggingpp/blob/master/.travis.yml
New python users often install the last python version, which is now python 3.12 (https://devguide.python.org/versions/).
How to make it run in the new python versions. It has hard python 3.7 dependency. How to make it compatible with the latest python versions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.