Taking advantage of the Amazon EC2 free year long trial, I installed RapidAnalytics in their Cloud on a micro instance running Ubuntu 10.10 with MySQL. Port 8080 needs to be opened in the instance firewall to allow incoming requests to the RapidAnalytics web page.
Installation of the Ubuntu desktop, a VNC server and Java was the time consuming part. Note that installing Java does not work on a micro instance; there is a known error. The workround is to run on a small instance and then install Java in that environment. Having done that, the image can be saved and re-run on a micro instance.
The memory available in the micro instance is insufficient for the default JBoss settings. Reducing this to 512M allows everything to start but after 30 minutes it does not run properly with many timeout like errors.
Sad conclusion: the micro instance is too small - this is a shame since it means free Cloud practice is not possible.
Changing to a small instance allow things to start and after about 5 minutes, RapidAnalytics starts OK and is usable. This costs money - not a lot - but enough for my mean streak to kick in. A medium instance would presumably start more quickly - it would cost a bit more so I didn't try it.
The IP connectivity to allow the server to be found so that a local RapidMiner client can use it is the next step although money is likely to be required to assign an IP address that can be seen on the Internet.
Conclusion: RapidAnalytics will work in the Cloud but some cost conscious people will choose to install and play on local machines.
Installation on a laptop running XP SP3 and SQL Server is also OK as is installation on a 64 bit laptop running Windows 7 enterprise with MySQL. Note that some SQL Server components steal port 8080 necessitating a change to the JBoss port to something like 8081 in the server.xml file contained in the folder rapidAnalytics\rapidanalytics\server\default\deploy\jbossweb.sar.
Next steps will be to find a way to backup a RapidAnalytics installation and restore on a different machine.
Search this blog
Wednesday, 6 July 2011
Sunday, 12 June 2011
Counting clusters: part R
Here's an example process that uses an R script called from RapidMiner to perform clustering and provide a silhouette validity index.
As before, it uses the same artificial data as for the previous examples; namely 1000 data points in three dimensions with 8 clusters.
The script uses the R package "cluster". This contains the algorithm "partitioning around medoids" which the documentation describes as a more robust k-means.
The process iterates over values of k from 2 to 20, passes the data to R for clustering and generation of an average silhouette value. This allows the optimum value for k to be determined. The "correct" answer is 8 but this may not correspond to the best cluster using the validity measure owing to the random number generator which causes the clusters to differ between each run.
Some points to note
As before, it uses the same artificial data as for the previous examples; namely 1000 data points in three dimensions with 8 clusters.
The script uses the R package "cluster". This contains the algorithm "partitioning around medoids" which the documentation describes as a more robust k-means.
The process iterates over values of k from 2 to 20, passes the data to R for clustering and generation of an average silhouette value. This allows the optimum value for k to be determined. The "correct" answer is 8 but this may not correspond to the best cluster using the validity measure owing to the random number generator which causes the clusters to differ between each run.
Some points to note
- The R script installs the package and this causes a pop up dialog box to appear. Select the mirror from which to download the package. Comment out the "install.packages" line to stop this (or read the R documentation to work out how to test for the presence of the library before attempting the install).
- The R script takes multiple inputs and these appear as R data frames.
- The output from the R script must be a data frame.
- The returned example set contains the validity measure and this is picked up for logging using the "Extract Performance" operator.
- The order of the processes before the script is important to ensure the correct value of k is passed in. This can be done using the "show and alter operator execution order" feature on the process view.
- The operator "Generate Data By User Specification" is used to create an example set to contain the value of k
A value near 1 is what is being looked for and indicates compact, well separated clusters. The "correct" answer is 8 and the result supports this.
Saturday, 4 June 2011
Counting clusters: part IV
Here's an example process that uses the operator "Map Clustering on Labels" to match labels to clusters. If the data already has labels, the operator allows the output from a clustering algorithm to be assessed. It compares labels and clusters and determines the best match. From this, the output is a prediction and this can be passed to a performance operator to allow a confusion matrix to be created.
This allows a clustering algorithm to be used for prediction if training examples are available.
This allows a clustering algorithm to be used for prediction if training examples are available.
Subscribe to:
Posts (Atom)
