pathfinder.matrix: Creating a Pathfinder network from a matrix

Description Usage Arguments Value See Also Examples

Description

pathfinder creates the Pathfinder network from a given weight matrix.

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#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)

Example output

This is package 'modeest' written by P. PONCET.
For a complete list of functions, use 'library(help = "modeest")' or 'help.start()'.

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
           Object Class Method Attribute Visibility Algorithm
Object          0     3      3       Inf        Inf       Inf
Class           3     0    Inf         6          8       Inf
Method          3   Inf      0         4          9         3
Attribute     Inf     6      4         0          5       Inf
Visibility    Inf     8      9         5          0       Inf
Algorithm     Inf   Inf      3       Inf        Inf         0
           Object Class Method Attribute Visibility Algorithm
Object          0     3      3       Inf        Inf       Inf
Class           3     0    Inf         6          8        10
Method          3   Inf      0         4          9         3
Attribute     Inf     6      4         0          5       Inf
Visibility    Inf     8      9         5          0       Inf
Algorithm     Inf    10      3       Inf        Inf         0
           Object Class Method Attribute Visibility Algorithm
Object          0     3      3       Inf        Inf       Inf
Class           3     0    Inf       Inf        Inf       Inf
Method          3   Inf      0         4        Inf         3
Attribute     Inf   Inf      4         0          5       Inf
Visibility    Inf   Inf    Inf         5          0       Inf
Algorithm     Inf   Inf      3       Inf        Inf         0
           Object Class Method Attribute Visibility Algorithm
Object          0     3      3       Inf        Inf       Inf
Class           3     0    Inf         6        Inf       Inf
Method          3   Inf      0         4        Inf         3
Attribute     Inf     6      4         0          5       Inf
Visibility    Inf   Inf    Inf         5          0       Inf
Algorithm     Inf   Inf      3       Inf        Inf         0

comato documentation built on May 2, 2019, 6:52 a.m.