faqs

PAF Version 2.2.2.4 Release Notes

The Predictive Analytics Framework v 2.2.2.4 includes thousands of additional R libraries not in our 2.1.2 release. Features include:

If I am unable to access RStudio server using username “ubuntu” and password “Instance-ID” how do can I fix this.

There are two different ways to fix your access to RStudio server, both require you ssh to the instance and access the shell prompt. The user “ubuntu”‘s password in the shell controls access to RStudio server.

#1

a. ssh to the box by using a command similar to the following

ssh -i /path/my-key-pair.pem ubuntu@ec2-198-51-100-1.compute-1.amazonaws.com

b.

sudo -i

c.

 rm -f  /home/ubuntu/.ssh/setpw 

d.

/etc/init.d/setshellpw4ubuntu.sh

 

#2

a. ssh to the box y using a command similar to the following

ssh -i /path/my-key-pair.pem ubuntu@ec2-198-51-100-1.compute-1.amazonaws.com

b.

sudo -i

c.

passwd ubuntu

(the word you choose will be your password)

Back to Index

How does PAF R compare to Ubuntu’s R
Creation, Transposition and Deformation of a Num X Num Matrix

Performance characteristics of RRECKTEK PAF's R compared to Ubuntu R for a Num X Num Cross Product Matrix
Performance characteristics of RRECKTEK PAF’s R compared to Ubuntu R for a Num X Num Cross Product Matrix
# FIGURE 4 CODE (Click Image)

cumulate <- 0; b <- 0
for (i in 1:runs) {
  a <- Rnorm(num*num); dim(a) <- c(num, num)
  invisible(gc())
  timing <- system.time({
    b <- crossprod(a)           # equivalent to: b <- t(a) %*% a
  })[3]
  cumulate <- cumulate + timing
}
timing <- cumulate/runs
times[4, 1] <- timing

 

Back to Index

How does PAF R compare to Ubuntu’s R
Creation, Transposition and Deformation of a Num X Num Matrix

Performance characteristics of RRECKTEK PAF's R compared to Ubuntu R for Creation, Transposition and Deformation of a Num X Num Random Matrix
Performance characteristics of RRECKTEK PAF’s R compared to Ubuntu R for Creation, Transposition and Deformation of a Num X Num Random Matrix

# FIGURE 1 CODE (click image)
cumulate <- 0; a <- 0; b <- 0
for (i in 1:runs) {
invisible(gc())
timing <- system.time({
a <- matrix(Rnorm (num*num)/10, ncol=num, nrow=num);
b <- t(a);
dim(b) <- c((num/2), (num*2));
a <- t(b)
})[3] cumulate <- cumulate + timing
}
timing <- cumulate/runs
times[1, 1] <- timing

Back to Index

Can I move the port that SHINY Server is on?

Yes, shiny server’s port is defined in the configuration file found here:

/etc/shiny-server/shiny-server.conf

The section you want it probably

server {
  # Instruct this server to listen on port 80
  listen 80;
 

Or read about it in the documentation found here. (section 2)

Back to Index

What could prevent me from connecting to a port on the machine?

There are several layers of security in PAF.

  1. If you are operating on AWS, the first thing to consider is the security group configuration of your VPC. By default we recommend port 22, 3838 and 8787 are open.
  2. IPTABLES is configured to only allow remote access to certain ports. An example command that would allow access to port 80 looks like

    sudo  ufw allow 80/tcp

    . Learn more about ufw commands.

  3. fail2ban is designed to protect your machine from attacks. If you have tried to login a few times and failed and now cannot even try it is because fail2ban has put you in jail temporarily. A simple way to reset jail is to simply reboot because the settings are volatile and get reset during a reboot. Alternatively, you can explicitly remove an IP from jail with a command like

    set ssh unbanip 203.113.167.162
    

    as shown here.

  4. Back to Index

Where are the AWS instructions for connecting to my instance?

The AWS document can be found
here.

Typically, the necessary command line looks like this:

ssh -i /path/my-key-pair.pem ubuntu@ec2-198-51-100-1.compute-1.amazonaws.com
Back to Index

Can I get a refund?

Our refund policy is that we cannot issue refunds on our monthly subscriptions. Hourly licenses on Amazon Web Services can be cancelled at any time. Amazon has ultimate discretion on their billing and we have very little say in what they choose to do.

 

 

 

Back to Index

How do I run RStudio on server on AWS?

Back to Index

How do I optimize R code?

The most effective optimization is not just about making your code run faster. It is best to understand where the bottleneck is, and strategize how to improve exactly that. It is often times easier to improve code where it doesn’t really effect the overall end-to-end performance. Pay attention to what section of your process is the most time consuming.

A simple list of improvements would be

  • Use
    ifelse()

    instead of

    if()
  • check out microbench
  • anyNA()

    is more efficient than

    is.NA()
  • You can determine the size of your object with
    pryr::object_size(data)

Here is a simple R optimization tip to try. Use the following approach:

library(compiler)
g <- cmpfun(f)
Back to Index

About the author: rreck

You must be logged in to post a comment.