odel.
Tim
-Original Message-
From: R-help On Behalf Of Ivan Krylov
Sent: Wednesday, February 16, 2022 5:00 AM
To: r-help@r-project.org
Subject: Re: [R] confusion matrix like detail with continuous data?
[External Email]
On Tue, 15 Feb 2022 22:17:42 +0100
Neha gupta wrote:
> (1) Can we ge
Try the table() function.
?table
For example,
df <- data.frame(real=sample(0:1, 20, replace=T), pred=sample(0:1, 20,
replace=T))
table(df)
pred
real 0 1
0 3 7
1 4 6
Jean
Doussa wrote on 09/02/2011 08:46:42 PM:
>
> hi users
> I have a data frame in with there are two colomns real
hi users
I have a data frame in with there are two colomns real values and predicted
ones (for a dichotomic response).
How can i obtain a confusion matrix (miscalssification rat and errors)?
The costs are egal.
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/confusion-mat
Hi,
this is my R-script
I need to make a confusion matrix
but the last row return me an error
require(mixOmics)
require(SDMTools)
file <- "C:\\data.txt"
d <- read.table(file, header=T, row.names = NULL)
X <- as.matrix(d[,2:11])
Y <- as.factor(d[,1])
i <- 1
samp <- sample(1:3, nrow(X), replace
Thanks, Richard, for your speedy reply!
>
>From: Richard M. Heiberger
>To: "Shi, Tao"
>Cc: r-help@r-project.org
>Sent: Tue, March 8, 2011 12:28:05 PM
>Subject: Re: [R] confusion matrix
>
>
>You need to make your variables into factors and specify the lev
You need to make your variables into factors and specify the levels.
> x <- c(1,3,4,5)
> table(x)
x
1 3 4 5
1 1 1 1
> factor(x)
[1] 1 3 4 5
Levels: 1 3 4 5
> table(factor(x))
1 3 4 5
1 1 1 1
> table(factor(x, levels=1:5))
1 2 3 4 5
1 0 1 1 1
>
Rich
On Tue, Mar 8, 2011 at 3:22 PM, Shi, Tao wrote:
Hi list,
Is there already a function somewhere to output the confusion matrix from two
input vectors? "table" always automatically delete rows or columns with all
0's. For example, I would like the columns for "10" and "30" added back.
Thanks!
...Tao
20 40 50 60 70 80 90 100
10
Beleites Date: Fri, 08 Oct 2010 15:38:31 To:
Gregory Ryslik Cc: R Help
Subject: Re: [R] confusion matrix Dear Greg, If it is only the NA that
worries you: function table can deal with that. ? table and: example
(table) If you want to make a confusion matrix that works also with
fractional answers (e.g.
Dear Greg,
If it is only the NA that worries you: function table can deal with that.
? table
and:
example (table)
If you want to make a confusion matrix that works also with fractional answers
(e.g. 50% A, 50% B, a.k.a soft classification) then you can contact me and
become test user of a pack
Hi Everyone,
In follow up to my previous question, I wrote some code that correctly makes a
confusion matrix as I need it. However, it only works when the numbers are
between 1 and n. If the possible outcomes are between 0 and n, then I can't
reference row "0" of the matrix and the code breaks
Hey!
How do I get the confusion matrix after performing 10-fold cross validation
from SVM in R?
When I try to print it, I get the confusion matrix without cross validation.
I need to compute PPV. Should I report PPV without CV and total accuracy
with CV?
I am confused.
> svmtrain <- svm(xtrain
t; To: r-help@r-project.org
> Subject: [R] confusion matrix in randomForest
>
>
> I have a question on the output generated by randomForest in
> classification
> mode, specifically, the confusion matrix. The confusion
> matrix lists the
> various classes and how t
I have a question on the output generated by randomForest in classification
mode, specifically, the confusion matrix. The confusion matrix lists the
various classes and how the forest classified each one, plus the
classification error. Are these numbers essentially averages over all the
trees in
13 matches
Mail list logo