Hi,
When I was trying to reproduce the experiment in section 6.3 of the paper FRECHET REGRESSION FOR RANDOM OBJECTS WITH
EUCLIDEAN PREDICTORS, using this package v0.2.0, I was unable to get the R^2, even if I have included Rsquared=TRUE in the control options. A short reproducible example is put as below, which should give Error in is.data.frame(x) : object 'qin.est' not found.
library("frechet")
xin = seq(0,1,0.05)
yin = lapply(xin, function(x) {rnorm(100, rnorm(1,x,0.005), 0.05)})
res1 <- GloDenReg(xin=xin, yin=yin, optns = list(Rsquared=TRUE))
With some attempts, it seems that the bug comes from the "if block" at line 77-80 in GloWassReg.R. When (k == n) is true, yet the condition (sum(abs(xout-xin)) > 1e-10*length(xout)) is false, qin.est shall not be assigned.
By replicating "else" operations to here, I am able to get the R-square. I hope you can fix this bug.
Hi,
When I was trying to reproduce the experiment in section 6.3 of the paper FRECHET REGRESSION FOR RANDOM OBJECTS WITH
EUCLIDEAN PREDICTORS, using this package v0.2.0, I was unable to get the R^2, even if I have included
Rsquared=TRUEin the control options. A short reproducible example is put as below, which should giveError in is.data.frame(x) : object 'qin.est' not found.library("frechet")xin = seq(0,1,0.05)yin = lapply(xin, function(x) {rnorm(100, rnorm(1,x,0.005), 0.05)})res1 <- GloDenReg(xin=xin, yin=yin, optns = list(Rsquared=TRUE))With some attempts, it seems that the bug comes from the "if block" at line 77-80 in
GloWassReg.R. When(k == n)is true, yet the condition(sum(abs(xout-xin)) > 1e-10*length(xout))is false,qin.estshall not be assigned.By replicating "else" operations to here, I am able to get the R-square. I hope you can fix this bug.