turicreate.graph_coloring.GraphColoringModel

class turicreate.graph_coloring.GraphColoringModel(model)

A GraphColoringModel object contains color ID assignments for each vertex and the total number of colors used in coloring the entire graph.

The coloring is the result of a greedy algorithm and therefore is not optimal. Finding optimal coloring is in fact NP-complete.

Below is a list of queryable fields for this model:

Field Description
graph A new SGraph with the color id as a vertex property
training_time Total training time of the model
num_colors Number of colors in the graph

This model cannot be constructed directly. Instead, use turicreate.graph_coloring.create() to create an instance of this model. A detailed list of parameter options and code samples are available in the documentation for the create function.

See also

create

Methods

GraphColoringModel.name() Returns the name of the model.
GraphColoringModel.save(location) Save the model.
GraphColoringModel.summary([output]) Print a summary of the model.