Learn R Programming

wordspace (version 0.2-0)

plot.eval.similarity.correlation: Printing and Plotting Similarity Correlation Evaluation Results (wordspace)

Description

Suitable printing and visualization of evaluation results from eval.similarity.correlation. The print method displays an evaluation summary (stored in attribute "eval.result") after the full data frame. The plot method displays a scatterplot of gold standard ratings against DSM distances with optional regression line (lowess), a summary of evaluation results at the top, and various other formatting options.

Usage

# S3 method for eval.similarity.correlation
print(x, …)
  
  # S3 method for eval.similarity.correlation
plot(x, y, line = TRUE,
     categories = NULL, cat.col = NA, cat.legend = "bottomleft",
     pch = 20, cex = 1, xlim = NULL, ylim = NULL,
     xlab = "human rating", ylab = "distributional model",
     main = attr(x, "taskname"), …)

Arguments

x

detailed evaluation report from eval.similarity.correlation (with details=TRUE)

y

unused, must not be specified

line

if TRUE, a non-linear regression line is added to the plot in order to indicate the precise relationship between gold standard ratings and DSM distances (based on the lowess smoother)

categories

a factor with one entry for each word pair in the evaluation task. If specified, points in the scatterplot are colour-coded according to the categories of the corresponding word pairs. Note that categories is evaluated within the data frame x, so any column of x can directly be used as a variable.

cat.col

a vector of colours to be used for the different categories (defaults to the standard palette built into R)

cat.legend

corner of the plot in which to display the legend box for category colours

pch, cex

symbol used for plotting and its size

xlim, ylim

range of values shown on the x-axis and y-axis, respectively

xlab, ylab, main

axis labels and main title of the plot

all other arguments are passed to the scatterplot function (plot.default) and can be used to set additional graphics parameters

Details

Word pairs not found in the DSM are always shown as empty boxes in the scatterplot, regardless of the pch parameter.

See Also

eval.similarity.correlation

Examples

Run this code
# NOT RUN {
plot(eval.similarity.correlation(WordSim353, DSM_Vectors, details=TRUE))
# }

Run the code above in your browser using DataLab