Displaying 20 results from an estimated 1000 matches similar to: "Random Forest prediction questions"
2010 May 12
1
Convert data.frame or matrix to list
Hi,
i have the following data.frame :
> Data[1:3,]
dt amt geoTree merTree ref
1 0.71002484 3.334570 A2b B2b 0
2 0.49074936 2.544464 A2b B1a 0
3 0.06223433 3.617133 A1b B2a 0
i want to convert it to a list, like this:
list(Data[1,],Data[2,],Data[3,])
[[1]]
dt amt geoTree merTree ref
1 0.07333459 0.969585 A2a
2012 May 05
1
what is Non-numeric argument to mathematical function in prediction ?
Hi,
I tried to use naivebayes in package 'e1071'.
when I use following parameter, only one predictor, there is an error.
> m <- naiveBayes(iris[,1], iris[,5])
> table(predict(m, iris[,1]), iris[,5])
Error in log(sapply(attribs, function(v) { :
Non-numeric argument to mathematical function
However, when I use two predictors, there is not error any more.
> m <-
2017 Oct 27
4
Cannot Compute Box's M (Three Days Trying...)
It can't be this hard, right? I really need a shove in the right direction here. Been spinning wheels for three days. Cannot get past the errors.
I'm doing something wrong, obviously, since I can easily compute the Box's M right there in RStudio
But I don't see what is wrong below with the coding equivalent.
The entire code snippet is below. The code fails below on the call to
2017 Oct 29
3
Renjin?
Hi All,
OK, in the "back to the drawing board" department, I found what looks like a much better solution to using R in Java. Renjin.
Looking at the docs and then trying a quick example, didn't quite work.
Of course I'm missing something.
Although I'm telling the engine to require ("biotools") just like I would in R itself, when I get to the line of code that
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
I'm not sure what you mean. Could you please be more specific?
If I print the string, I get: boxM(boxMVariable[, -5], boxMVariable[, 5])
From this code:
.
.
.
// assign the data to a variable.rConnection.assign("boxMVariable", myDf);
// create a string command with that variable name.String boxVariable = "boxM(boxMVariable[, -5], boxMVariable[, 5])";
2010 Dec 26
2
Doing a mixed-ANOVA after accounting for a covariate
Dear r helpers,
I would like to look at the interaction between two two-level factors, one
between and one within participants, after accounting for any variance due
to practice (31 trials in each of two blocks) in the task.
It seems to require treating practice as a covariate.
All the examples I noticed for handling covariates (i.e. ANCOVA, including
the ones in Faraway's "Practical
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
Just print the string you are asking to R to evaluate. It doesn't make
any sense as an R expression. Fix that, and things will work.
Duncan Murdoch
On 27/10/2017 3:41 PM, Morkus via R-devel wrote:
> It can't be this hard, right? I really need a shove in the right direction here. Been spinning wheels for three days. Cannot get past the errors.
>
> I'm doing something
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
Does it work if you supply the closing parenthesis on the call to boxM?
The parser says the input is incomplete and a missing closing parenthesis
would cause that error..
// create a string command with that variable name.String boxVariable =
"boxM(boxMVariable [,-5], boxMVariable[,5]";
// try to execute the command...
// FAILS with org.rosuda.REngine.Rserve.RserveException: eval
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Thanks Duncan. Awesome ideas!
I think we're getting closer!
I tried what you suggested and got a possibly better error...
.
.
.
rConnection.assign("boxMVariable", myDf);
String resultBV = "str(boxMVariable)"; // your suggestion.
RESULTING ERROR:
Error in format.default(nam.ob, width = max(ncn), justify = "left") : invalid 'width' argument
(No idea
2017 Oct 29
0
Renjin?
Renjin is not R.??
Renjin is an R language interpreter written in Java.
It has become exceedingly obvious that you are making user
errors.??That's not a bug in the language.
If you want to use Renjin, there are mailing lists devoted to Renjin,
and also Stack Overflow and Renjin list questions that cover exactly
what you've asked about (loading packages in Renjin when Renjin is used
as a
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 6:26 AM, Morkus wrote:
> I'm not sure what you mean. Could you please be more specific?
You were trying to eval an expression that you constructed in Java. I
was suggesting that before you eval it, you print it.
>
> If I print the string, I get: *boxM(boxMVariable[, -5], boxMVariable[, 5])*
Right, that's what I was suggesting you do. Now you've fixed the
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Hey Duncan,
Hard to debug? That's an understatement. Eyes bleeding....
In any case, I tried all your suggestions. To get "integer" for the final column, I had to change the code to get integers instead of strings.
double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();
double[] d3 = ((REXPVector)
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 7:12 AM, Morkus wrote:
> Thanks Duncan. Awesome ideas!
>
> I think we're getting closer!
>
> I tried what you suggested and got a possibly better error...
> .
> .
> .
> rConnection.assign("boxMVariable", myDf);
>
> *String resultBV *= *"str(boxMVariable)"*; *// your suggestion.*
>
> *RESULTING ERROR:*
>
>
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 8:59 AM, Morkus wrote:
> Hey Duncan,
>
> Hard to debug? That's an understatement. Eyes bleeding....
>
> In any case, I tried all your suggestions. To get "integer" for the
> final column, I had to change the code to get integers instead of strings.
The last column in iris is actually a factor. That's stored as an
S3-classed integer vector
2017 Oct 29
2
Cannot Compute Box's M (Three Days Trying...)
Thanks Duncan. I can't tell you how helpful all your terrific replies have been.
I think the biggest surprise is that nobody appears to be using Java and R together like I"m trying to do. I suppose it should be a surprise since there are no books on the subject and almost no technical documentation other than a few sites here and there.
-----
I originally had the "int" as the
2017 Oct 29
0
Cannot Compute Box's M (Three Days Trying...)
On 29/10/2017 7:26 AM, Morkus wrote:
> Thanks Duncan. I can't tell you how helpful all your terrific replies
> have been.
>
> I think the biggest surprise is that nobody appears to be using Java and
> R together like I"m trying to do. I suppose it should be a surprise
> since there are no books on the subject and almost no technical
> documentation other than a
2009 Nov 03
2
Plotting an interaction with error bars
Hello.
I need to plot a two-way interaction (5 levels X 3) with error bars.
The x.factor will be the five-levels var and the trace.factor will be
the three level var.
I was able to find functions that draw error bars, but still couldn't
find a way to draw an interaction plot that looks like what is common
in psychological (and related) journals: the lines (three in my need)
are plotted in
2007 May 13
6
no network for dom0
I installed Ubuntu Feisty successfully, then I configured the network
(static IP) and things worked well.
Then I installed Xen using "apt-get install ubuntu-xen-desktop".
I could boot the xen kernel, and booted succesfully to dom0, however,
there''s no network for dom0.
According to network manager, I saw that Ubuntu recognizes now 4
unconfigured adapters (veth0, veth1, veth2,
2010 Feb 23
0
BUG with LSSVM in R:
Hello,
I have noticed a bug with LSSVM implementation in R. It could be a bug with
the LSSVM itself that causes this problem.
I thought I should post this message to see if anyone else is familiar with
this problem and explain why the result is different for odd and even number
of cases.
Once the hyperplane is found using LSSVM, the prediction results vary when
you predict odd or even number of
2009 Dec 29
1
Plotting power function to practice data
Hello,
I have practice data of motor action in the format:
S | Cond. | Time
----+---------+--------
01 | c | 1.23
01 | nc | 0.89
02 | c | 2.15
02 | nc | 1.80
.....
I want to look at the learning curves graphically.
I will appreciate pointers to relevant functions / packages.
Thanks in advance,
dror
[[alternative HTML version deleted]]