Comments (1)
Looking at this again. The main issue is that linkpred uses its own data structure (Scoresheet
) to track prediction scores. This has at least two advantages:
- Order of nodes is never a problem: (a,b) == (b,a) and ranking of pairs with the same scores is deterministic
- Only node pairs for which there is a prediction need to be tracked, which is less memory-intensive. This is especially a concern for larger networks. E.g. 5000 nodes yield 12497500 node pairs.
Especially 2 is fundamentally different from scikit-learn.
The way forward is probably to replace Scoresheet
with a Pandas Series, whose keys are all node pairs and whose values are scores. The index could be built prior to evaluation:
idx = pd.MultiIndex.from_tuples(itertools.combinations(G.nodes(), 2))
and shared across evaluations. The underlying numpy array could then be passed to scikit-learn metrics.
I am not yet sure how best to deal with 1 and/or to what extent it constitutes a problem.
from linkpred.
Related Issues (20)
- Clarify `excluded` parameter to `Predictor.__init__` HOT 1
- ROC Plot HOT 5
- error when running linkpred from terminal HOT 4
- Error when clling linkpred in linux HOT 10
- Test Community predictor HOT 3
- How to do link prediction on a large graph without 'MemoryError' HOT 3
- Error when nodes name are string type and int type HOT 2
- AssertionError with self-loops from Python but not from command line HOT 5
- I plot ROC curve successfully, but the range of the X axis isn't 0 to 1 HOT 1
- Port test suite to pytest HOT 1
- Typo while importing a module in Community class HOT 3
- ZeroDivisionError HOT 3
- EvaluationSheet : fully understand the universe terme HOT 1
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- how to explain the input file format HOT 2
- linkpred is in maintenance mode
- Update test infrastructure
- test_katz fails in CI HOT 6
- UndefinedError: Measure is undefined if there are no relevant or retrieved items HOT 1
- What link prediction method is used by the sample code in the linkpred folder HOT 4
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 linkpred.