Skip to content

Commit

Permalink
Update RCoT.R
Browse files Browse the repository at this point in the history
  • Loading branch information
ericstrobl committed Sep 1, 2018
1 parent e5ae14d commit aefcc03
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions R/RCoT.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,19 @@ RCoT <- function(x,y,z=NULL,approx="lpd4",num_f=25,num_f2=5,seed=NULL){
r1=500
} else {r1=r;}

x=normalize(x);
y=normalize(y);
z=normalize(z);
#x=normalize(x);
#y=normalize(y);
#z=normalize(z);

for (t in seq_len(ncol(x))){
x[,t] = pnorm(ecdf(x[,t])(x[,t]));
}
for (t in seq_len(ncol(y))){
y[,t] = pnorm(ecdf(y[,t])(y[,t]));
}
for (t in seq_len(d)){
z[,t] = pnorm(ecdf(z[,t])(z[,t]));
}

four_z = random_fourier_features(z[,1:d],num_f=num_f,sigma=median(c(t(dist(z[1:r1,])))), seed = seed );
four_x = random_fourier_features(x,num_f=num_f2,sigma=median(c(t(dist(x[1:r1,])))), seed = seed );
Expand Down

0 comments on commit aefcc03

Please sign in to comment.