#!/bin/bash#-----------------------------------# R script to display MAP results over the number of expansion documents and the number of expansion terms## @author: Duy Dinh, University of Toulouse# @date: 10 March 2012##-----------------------------------
library(rgl)# directory containing evaluation results files# each file has the format 4 columns: xterms xdocs RunID MAP (see in the example below)
path <- "/home/user/Desktop/dataFolder"
files <- list.files(path, full.names=TRUE)
names <- list.files(path)# number of files
n <- length(files)# distribute plots on the grid
par(mfrow=c(n/3,n/3))tickLabs=c(0, 10, 20, 30, 40, 50)xTickCount=5yTickCount=5zTickCount=4min=5max=50minMAP=0.0
maxMAP=0.4
# read data from filesfor(i in 1: n){
data <- read.table(files[i], header=FALSE)
scatterplot3d(data$V1, data$V2, data$V4,
color="blue", type="p", xlab="#terms", ylab="#docs", zlab="MAP",
lab=c(xTickCount, yTickCount, 0),
lab.z=c(zTickCount, 0, 0),
xlim=c(min, max), ylim=c(min, max),
zlim=c(minMAP, maxMAP),
pch=20, main=list(names[i], font=2))}#dev.off()
Last edit: Duy Dinh 2013-02-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Last edit: Duy Dinh 2013-02-26