Evaluate different layout algorithms / interaction with graphs - algorithm

I have to write a report on the following question:
Evaluate different layout algorithms / interaction with graphs
Where can I find useful resource to understand graph layout algorithms?
I have no experience in graph programming or visualisation, so resources starting from basics would be very helpful.
Thank You

You might want to check the extensive documentation of the igraph software, which has some description of its internal layout generators. There are also nice illustrations on aiSee website.
For more academic reference, I would suggest browsing the following tutorials: Graph Drawing Tutorial (106 pages) or Graph and Network Visualization (69 pages).
Another useful resource: Handbook of Graph Drawing and Visualization (26 chapters, available as PDF).

The GraphViz project contain lots of different approaches and links to several references.

Related

How to build a knowledge graph?

I prototyped a tiny search engine with PageRank that worked on my computer. I am interested in building a Knowledge Graph on top of it, and it should return only queried webpages that are within the right context, similarly to how Google found relevant answers to search questions. I saw a lot of publicity around Knowledge Graphs, but not a lot of literature and almost no pseudocode like guideline of building one. Does anyone know good references on how such Knowledge Graphs work internally, so that there will be no need to create models about a KG?
Knowledge graph is a buzzword. It is a sum of models and technologies put together to achieve a result.
The first stop on your journey starts with Natural language processing, Ontologies and Text mining. It is a wide field of artificial intelligence, go here for a research survey on the field.
Before building your own models, I suggest you try different standard algorithms using dedicated toolboxes such as gensim. You will learn about tf-idf, LDA, document feature vectors, etc.
I am assuming you want to work with text data, if you want to do image search using other images it is different. Same for the audio part.
Building models is only the first step, the most difficult part of Google's knowledge graph is to actually scale to billions of requests each day ...
A good processing pipeline can be built "easily" on top of Apache Spark, "the current-gen Hadoop". It provides a resilient distributed datastore which is mandatory if you want to scale.
If you want to keep your data as a graph, as in graph theory (like pagerank), for live querying, I suggest you use Bulbs which is a framework which is "Like an ORM for graphs, but instead of SQL, you use the graph-traversal language Gremlin to query the database". You can switch the backend from Neo4j to OpenRDF (useful if you do ontologies) for instance.
For graph analytics you can use Spark, GraphX module or GraphLab.
Hope it helps.
I know I'm really late but first to clarify some terminology: Knowledge Graph and Ontology are similar (I'm talking in the Semantic Web paradigm). In the semantic web stack the foundation is RDF which is a language for defining graphs as triples (Subject, Predicate, Object). RDFS is a layer on top of RDF. It defines a meta-model, e.g., predicates such as rdf:type and nodes such as rdfs:Class. Although RDFS provides a meta-model there is no logical foundation for it so there are no reasoners that can validate the model or do further reasoning on it. The layer on top of RDFS is OWL (Web Ontology Language). That has a formal semantics defined by Description Logic which is a decidable subset of First Order Logic. It has more predefined nodes and links such as owl:Class, owl:ObjectProperty, etc. So when people use the term ontology they typically mean an OWL model. When they use the term Knowledge Graph it may refer to an ontology defined in OWL (because OWL is still ultimately an RDF graph) or it may mean just a graph in RDF/RDFS.
I said that because IMO the best way to build a knowledge graph is to define an ontology and then use various semantic web tools to load data (e.g., from spreadsheets) into the ontology. The best tool to start with IMO is the Protege ontology editor from Stanford. It's free and for a free open source tool very reliable and intuitive. And there is a good tutorial for how to use Protege and learn OWL as well as other Semantic Web tools such as SPARQL and SHACL. That tutorial can be found here: New Protege Pizza Tutorial (disclosure: that links to my site, I wrote the tutorial). If you want to get into the lower levels of the graph you probably want to check out a triplestore. It is a graph database designed for OWL and RDF models. The free version of Franz Inc's AllegroGraph triplestore is easy to use and supports 5M triples. Another good triplestore that is free and open source is part of the Apache Jena framework.

Recommendations for using graphs theory in machine learning? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have been learning alot about using graphs for machine learning by watching Christopher Bishops videos( http://videolectures.net/mlss04_bishop_gmvm/ ). I find it very interesting and watched a few others in the same categories(machine learning/graph) but was wondering if anyone had any recommendations for ways of learning more?
My problem is, although the videos gave a great high level understanding, I don't have much practical skills in it yet. I've read Bishops book on machine learning/patterns as well as Norvig's AI book but both don't seem to touch upon specific using graphs much. With the emergence of search engines and social networking, I would think machine learning on graphs would be popular.
If possible, can anyone suggestion an a resource to learn from? (I'm new to this field and development is a hobby for me, so I'm sorry in advance if there's a super obvious resource to learn from..I tried google and university sites).
Thanks in advance!
First, i would strongly recommend the book Social Network Analysis for Startups by Maksim Tsvetovat and Alexander Kouznetsov. A book like this is a godsend for programmers who need to quickly acquire a basic fluency in a specific discipline (in this case, graph theory) so that they can begin writing code to solve problems in this domain. Both authors are academically trained graph theoreticians but the intended audience of their book is programmers. Nearly all of the numerous examples presented in the book are in python using the networkx library.
Second, for the projects you have in mind, two kinds of libraries are very helpful if not indispensible:
graph analysis: e.g., the excellent networkx (python), or igraph
(python, R, et. al.) are two that i can recommend highly; and
graph rendering: the excellent graphViz, which can be used
stand-alone from the command line but more likely you will want to
use it as a library; there are graphViz bindings in all major
languages (e.g., for python there are at least three i know of,
though pygraphviz is my preference; for R there is rgraphviz which is
part of the bioconductor package suite). Rgraphviz has excellent documentation (see in particular the Vignette included with the Package).
It is very easy to install and begin experimenting with these libraries and in particular using them
to learn the essential graph theoretic lexicon and units of analysis
(e.g., degree sequence distribution, nodes traversal, graph
operators);
to distinguish critical nodes in a graph (e.g., degree centrality,
eigenvector centrality, assortivity); and
to identify prototype graph substructures (e.g., bipartite structure,
triangles, cycles, cliques, clusters, communities, and cores).
The value of using a graph-analysis library to quickly understand these essential elements of graph theory is that for the most part there is a 1:1 mapping between the concepts i just mentioned and functions in the (networkx or igraph) library.
So e.g., you can quickly generate two random graphs of equal size (node number), render and then view them, then easily calculate for instance the average degree sequence or betweenness centrality for both and observer first-hand how changes in the value of those parameters affects the structure of a graph.
W/r/t the combination of ML and Graph Theoretic techniques, here's my limited personal experience. I use ML in my day-to-day work and graph theory less often, but rarely together. This is just an empirical observation limited to my personal experience, so the fact that i haven't found a problem in which it has seemed natural to combine techniques in these two domains. Most often graph theoretic analysis is useful in ML's blind spot, which is the availability of a substantial amount of labeled training data--supervised ML techniques depend heavily on this.
One class of problems to illustrate this point is online fraud detection/prediction. It's almost never possible to gather data (e.g., sets of online transactions attributed to a particular user) that you can with reasonable certainty separate and label as "fraudulent account." If they were particularly clever and effective then you will mislabel as "legitimate" and for those accounts for which fraud was suspected, quite often the first-level diagnostics (e.g., additional id verification or an increased waiting period to cash-out) are often enough to cause them to cease further activity (which would allow for a definite classification). Finally, even if you somehow manage to gather a reasonably noise-free data set for training your ML algorithm, it will certainly be seriously unbalanced (i.e., much more "legitimate" than "fraud" data points); this problem can be managed with statistics pre-processing (resampling) and by algorithm tuning (weighting) but it's still a problem that will likely degrade the quality of your results.
So while i have never been able to successfully use ML techniques for these types of problems, in at least two instances, i have used graph theory with some success--in the most recent instance, by applying a model adapted from the project by a group at Carnegie Mellon initially directed to detection of online auction fraud on ebay.
MacArthur Genius Grant recipient and Stanford Professor Daphne Koller co-authored a definitive textbook on Bayesian networks entitled Probabalistic Graphical Models, which contains a rigorous introduction to graph theory as applied to AI. It may not exactly match what you're looking for, but in its field it is very highly regarded.
You can attend free online classes at Stanford for machine learning and artificial intelligence:
https://www.ai-class.com/
http://www.ml-class.org/
The classes are not simply focused on graph theory, but include a broader introduction in the field and they will give you a good idea of how and when you should apply which algorithm. I understand that you've read the introductory books on AI and ML, but I think that the online classes will provide you with a lot of exercises that you can try.
Although this is not an exact match to what you are looking for, textgraphs is a workshop that focuses on the link between graph theory and natural language processing. Here is a link. I believe the workshop also generated this book.

where can I find graph input resources/files?

I want to test various algorithms on graphs.
Does anyone know a web where I can get lots of examples in text files?
I've found many examples but they are always images. I want a text description
of a graph, by edge listing or whatever... do you know one such source?
Thanks!
Manuel
Graph problems are common in programming competitions.
I don't know if you are used to the format of those competitions, but here's a list
of some of the online judges where you can submit/test your solution online:
UVA (Probably the biggest ACM problems database, to help you, here's a list of some graph problems)
Spoj
SGU
Topcoder has also a great problem database (see problem archive) But it'll take you some time to get used to it. (Note that it's not just the problems, you can also use the arena to test/submit your solutions)
RDF datasets are graphs, try rdfdata.org, dbpedia which is wikipedia in RDF, the LUBM graph benchmark, or a really big one (currently down at 2009-11-19 21:18 GMT).
Also wordnet is a graph.
Or go to the source, The Stanford Graphbase.

Looking for algorithms to generate realistic planets

I'd like to collect a list of algorithms and other resources to generate realistic and interesting visuals of planets. The visual should look like something which you'd expect to find on the NASA homepage. Key attributes would be:
a nice colorful atmosphere for gas giants
rings (optional)
impact craters for solid rocks without atmosphere
inhabitable planets could have features like oceans, mountains, rivers, forests
inhabitables could even have a realistic distribution for the civilization on the surface
The final goal should be to give Science Fiction(SciFi) writers a tool to generate a world which helps them to spark ideas, create locations for scenes, or as a basis to render nice images for their books.
Note: This is a wiki, so no single "correct" answer.
Fractal terrain generation works wonders for creating realistic landscapes. I imagine you could scale the processs up in order to generate landmasses on a plantary scale. This site has a detailed description of the process used for landscapes.
If you want high-level descriptions of a very mature procedural planet renderer, Infinity is perhaps the most venerable. The development blog covers many of the concepts used to create some very nice procedural planets and some other very nice space phenomena.
Check out conworlding links. There is actually commercial software out there (ProFantasy comes to mind) but if you wanted to do something from scratch, I have a link you may be interested in :
Magical World Builder
Finally, Guy Lecky-Thompson has written some interesting books on using procedural content in game design. I have both of his books and they are very inspiring. Many algorithms are listed, including a few RNG implementations, name generators (HINT: pick a list of name parts, then how many parts each name should have, then randomise), two whole chapters on terrain and landscape generation, a dungeon chapter...
Oooh ! Speaking of dungeons, dunno if you have heard of Roguelikes, but I have recently been looking into these. I imagine that many of the same general principles they use for dungeons can be applied - and there are wilderness algorithms they share, besides. Try:
Temple of The Roguelike - possibly the largest Roguelike dev forum
Wilderness Generation using Vornoi Diagrams - this blog is run by a developer of Unangband, a very popular Rogue variant. Many people in the Roguelike dev community share sources.
Markov Chain - this article is about how to put together randomised names using Markov Chains. The wiki where this is hosted has quite a few algorithms of interest to anyone generating procedural content of any sort.
Roguebasin - many useful aglorithms and code examples here.
Have fun !
I'm no astronomer, but you might consider some sort of decision tree for a preliminary classification of the planet:
Main Composition (methane/rock/etc.)
Mass
Additional atmosphere (how much, what of, etc.)
Temperature (Alternately, specify distance from star, model the star and write an algorithm based on the above)
Age
Asteroid/Meteor activity
Things like craters would be indirectly determined by 1, 3, and 6. Radius could be calculated from 1 and 2. And higher elements on the list might put boundaries on lower elements.
You still have many algorithms to research, but maybe having an order of information might structure your calculations or what variables you use.

Graph drawing algorithms - I'm trying to render finite state automata

I want to write something that will draw finite state automata. Does anyone know any algorithms that are related to this?
EDIT: I should mention that I know about graphviz. I want to build my own draw program/function, so what I'm looking for is some more theoretical stuff/pseudo-code for algorithms.
Graph drawing is a fairly complex subject due to the fact that different graphs need to be drawn in different ways - there is no one algorithm fits all approach.
May I suggest the following resource:
http://cs.brown.edu/people/rtamassi/papers/gd-tutorial/gd-constraints.pdf
It should be a good starting point, page 15 provides a number of links and books to follow up.
To get started with graph drawing algorithms, see this famous paper:
"A technique for drawing directed graphs" (1993), by Emden R. Gansner, Eleftherios Koutsofios, Stephen C. North, Kiem-phong Vo, IEEE Transactions on Software Engineering.
It describes the algorithm used by dot, a graphviz drawing program. On the linked page you will find many more references. You will also find some more papers when you google for "drawing directed graphs".
Also, you might find OpenFst convenient, a general toolkit for finite-state machines. It has a binary called fstdraw, which will output a finite-state machine in a format that can be read by dot.
Check out Graphviz. It's an open source graph visualization software.
EDIT: Check out the documentation section which links to some of the layout algorithms used.
Maybe, I'm a little late in answering this question. Anyway this is a very comprehensive reference to the different types of graphs and the algorithms to visualize them.
http://www.cs.brown.edu/~rt/gdhandbook/

Resources