Home > pls

pls

Pls is a project mainly written in R and SHELL, it's free.

OVERVIEW

This project runs a MonteCarlo simulation of PLS as a streaming MapReduce job.

MapReduce is an algorithm that divides work in a computing cluster. One computing node acts as a master and runs the mapper, which takes a problem as an input file and divides it into smaller subtasks that can be run in parallel. These subtasks are then run on separate nodes that run the reducer script.

See also http://labs.google.com/papers/mapreduce.html

This set of script takes creates a text file that contains information about population models, tested models, and simulation parameters. These are divided in the mapper and passed on to the reducers that will run the jobs.

The simulation is executed in four steps. First, the prepare.R script is used to create an input file. This input file can be processed locally by executing

cat input.txt | ./map.R | ./reduce.R

or by uploading the files to Amazon cloud and running the simulation as a streaming job in Elastic MapReduce. The input file needs to be prepared on a local computer.

The text file(s) that are produced by MapReduce are parsed with the file parseMapReduceData.sh, which reads the results into three csv files called constructs.csv, relationships.csv, and models.csv containing construct, relationship, and model level results.

CONTENT OF THE FILES

prepare.R: A file that creates an input file that the MapReduce algorithm processes. map.R: Map executable reduce.R: Reduce executable parseMapReduceData.sh: Reads the results files from Elastic MapReduce and stores the results into three csv files. tablesAndFigures.R: Reads the combined output and gnerates tables and figures based on the input. include/functions.R, include/functionsPrepare.R, include/functionsTablesAndFigures.R: Functions to that are needed for the simulation include/parameters.R: Simulation parameters

DETAILS OF THE SIMULATION

The prepare.R script creates a text file that contains 81 rows for each replication. Each line describes ---TO BE WRITTEN ---

Previous:Vim