Metis-a package (introduction) of a graph slice

Source: Internet
Author: User

Metis is a powerful, feature-rich graph-slicing package developed by Karypis Lab. To be precise, Metis is a serial-segmented software package, and Karypis Lab also provides a parallel version of the graph-slicing package parmetis and hmetis that support the hyper-graph and circuit partitioning. The algorithm design of Metis is mainly based on multi-level recursive dichotomy, multi-level K-way segmentation and multi-constraint partitioning mechanism. When users use the Metis package, they can select the appropriate segmentation method as needed.


The main features of Metis are as follows. First, Metis has high-quality partitioning results, which are said to be 10%-50% more accurate than the usual spectral clustering (spectral clustering). Among them, Chaco supports spectral clustering algorithm. Secondly, the Metis execution efficiency is very high, 1-2 orders of magnitude faster than the common method of dividing calculation. The millions vertex graph can be cut into 256 classes in seconds. Finally, the Metis has a very low injection element (fill-in), which reduces storage load and computational capacity.


Metis's working principle: take K-Way multi-level division as an example.


The entire partitioning process is divided into coarsening, initial partitioning and uncoarsening (refinement) three parts. coarsening the size of the graph gradually, g1->g2->g3-g4. The G4 phase is performed in the K-way division, and the original nodes in the diagram are mapped to cluster in the G4 partition during the uncoarsening phase.


Metis installation: Users need to download the latest Metis installation package from Karypis Lab, currently the latest version is Metis 5.1, then unpack the package. It is necessary to ensure that the C compiler and GNU make and C makes 2.8 are installed on the system and that the value of the Idxtypewidth constant in the Metis.h file is modified to 32 or 64 based on the number of bits in the operating system, and then the make command is executed under the Metis underlying file to complete the installation.


Use of Metis: Take Gpmetis as an example, its use is gpmetis [options] Graphfile nparts. Gpmetis is the compiled executable file, [options] is the execution Gpmetis optional, graphfile is the file name to be divided, Nparts is the number of user-specified cluster. By configuring the-ptype parameter of the options, the user can specify the Gpmetis segmentation method,-ptype = RB, using a multi-level recursive binary cutting algorithm,-ptype = kway , Uses a multi-level K-Path partitioning algorithm (the default value). -ctype Specifies the Coarsen operation policy,-ctype = rm, random match,-ctype = Shem when using Shem ( Sorted Heavy-edge Matching) method to match (default value).


Metis input and output file formats: Enter the file format as shown in.


The left image is a graph with no weights, and the first row is the number of vertices and edges. In addition to the first line, line I represents the vertex number of the I-1 node connection. For example, line 2nd indicates that Vertex 1 is directly connected to the 5,3,2 vertex. On the right is the right-hand graph, the first line represents the number of vertices and edges, and the format is a weighted graph. line I represents the vertex number of the I-1 node connection, followed by the weight value of the edge.


The graph partition output file format is very simple, there are n rows (a graph of n vertices), and each line is an integer representing the number of the cluster the node belongs to.




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Metis-a package (introduction) of a graph slice

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.