FMeasure: F measure

Description Usage Arguments Value Examples

View source: R/4_metaClustering.R

Description

Compute the F measure between two clustering results

Usage

1
FMeasure(realClusters, predictedClusters, silent = FALSE)

Arguments

realClusters

Array containing real cluster labels for each sample

predictedClusters

Array containing predicted cluster labels for each sample

silent

Logical, if FALSE (default), print some information about precision and recall

Value

F measure score

Examples

1
2
3
4
5
6
# Generate some random data as an example
realClusters <- sample(1:5,100,replace = TRUE)
predictedClusters <- sample(1:6, 100, replace = TRUE)

# Calculate the FMeasure
FMeasure(realClusters,predictedClusters)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Precision: 0.381073684210526
Recall: 0.3

[1] 0.2980427

FlowSOM documentation built on Nov. 8, 2020, 6:40 p.m.