pathfinder.matrix {comato}R Documentation

Creating a Pathfinder network from a matrix

Description

pathfinder creates the Pathfinder network from a given weight matrix.

Usage

## S3 method for class 'matrix'
pathfinder(data, q, r, ...)

Arguments

data

A non-negative weight matrix of a graph that can be either directed or undirected.

q

The parameter q used in the Pathfinder algorithm. The resulting graph will be q-triangular.

r

The parameter r used in the Pathfinder algorithm for the r-metric.

...

-

Value

A numeric weight matrix that represented the Pathfinder graph of the input graph.

See Also

The Pathfinder algorithm is implemented based on the description in: Dearholt, Donald W.; Schvaneveldt, Roger W. (1990): Properties of Pathfinder Netowrks. In: Roger W. Schvaneveldt (Hg.): Pathfinder associative networks. Studies in knowledge organizations. Norwood, N.J: Ablex Pub. Corp., S. 1-30.

Examples

#Manually create a weighted graph
data = matrix(data = 0, nrow = 6, ncol=6)
colnames(data) <- c("Object", "Class", "Method", "Attribute", "Visibility", "Algorithm")
rownames(data) <- c("Object", "Class", "Method", "Attribute", "Visibility", "Algorithm")
data["Object", "Class"] = 3
data["Object", "Method"] = 3
data["Object", "Attribute"] = 10
data["Object", "Visibility"] = Inf
data["Object", "Algorithm"] = 9
data["Class", "Method"] = 7
data["Class", "Attribute"] = 6
data["Class", "Visibility"] = 8
data["Class", "Algorithm"] = 10
data["Method", "Attribute"] = 4
data["Method", "Visibility"] = 9
data["Method", "Algorithm"] = 3
data["Attribute", "Visibility"] = 5
data["Attribute", "Algorithm"] = 10
data["Visibility", "Algorithm"] = Inf

data = data + t(data)

#Run the Pathfinder algorithm with several different parameters
pathfinder(data, 5, 1)
pathfinder(data, 2, 1)
pathfinder(data, 5,Inf)
pathfinder(data, 2, Inf)

[Package comato version 1.1 Index]