netkit.classifiers.io
Interface ReadClassification

All Known Implementing Classes:
ReadClassificationGeneric

public interface ReadClassification

This interface defines the methods needed to read a set of true classifications from a file.

Author:
Sofus A. Macskassy (sofmac@gmail.com)

Method Summary
 void readClassification(Graph graph, Classification labels, java.io.File input)
          Read from a given file a estimate of classifications for nodes in the given graph.
 Classification readClassification(Graph graph, java.lang.String nodeType, AttributeCategorical attribute, java.io.File input)
          Read from a given file a estimate of classifications for nodes in the given graph.
 

Method Detail

readClassification

Classification readClassification(Graph graph,
                                  java.lang.String nodeType,
                                  AttributeCategorical attribute,
                                  java.io.File input)
Read from a given file a estimate of classifications for nodes in the given graph. Return these classifications in a Classification object.

Parameters:
graph - The graph whose nodes are two be classified
nodeType - The nodeType which the classification object refers to
attribute - The categorial values to map classification-names against.
input - The file from which to read classifications
Returns:
A Classification object for the classifications read in. Nodes whose classifications were not in the given file are classified as index '-1'

readClassification

void readClassification(Graph graph,
                        Classification labels,
                        java.io.File input)
Read from a given file a estimate of classifications for nodes in the given graph. Fill these into the given Classification object.

Parameters:
graph - The graph whose nodes are two be classified
labels - The classification object to fill in with the read in labels. The calling function should lock the valuemap if no new labels are to be accepted.
input - The file from which to read classifications