Displaying 20 results from an estimated 2000 matches similar to: "lda, collinear variables and CV"
2012 Aug 14
0
Problems with lda-CV, and collinear variables in lda
Dear R-help list,
two issues regarding lda.
1) I'm puzzled by the fact that lda's in-build cross-validation gives results different from the manual cross-validation routine that I run (of course mine may be wrong, but I don't think so).
See here:
library(MASS)
set.seed(12345)
n <- 50
p <- 10 # or p<- 200
testdata <- matrix(ncol=p,nrow=n)
for (i in 1:p)
testdata[,i]
2013 Jan 08
0
bagging SVM Ensemble
Dear Sir,
I got a problem with my program. I would like to classify my data using
bagging support vector machine ensemble. I split my data into training data
and test data. For a given data sets TR(X), K replicated training data sets
are first randomly generated by bootstrapping technique with replacement.
Next, Support Vector Mechine (SVM) is applied for each bootstrap data sets.
Finally, the
2020 Oct 28
0
R for-loop to add layer to lattice plot
On Tue, Oct 27, 2020 at 6:04 PM Luigi Marongiu <marongiu.luigi at gmail.com> wrote:
>
> Hello,
> I am using e1071 to run support vector machine. I would like to plot
> the data with lattice and specifically show the hyperplanes created by
> the system.
> I can store the hyperplane as a contour in an object, and I can plot
> one object at a time. Since there will be
2020 Oct 23
0
How to shade area between lines in ggplot2
Hi
What about something like
p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2],
ymax = slope_1*x + intercept_1 + 1/w[2], fill = "grey70", alpha=0.1))
Cheers
Petr
> -----Original Message-----
> From: Luigi Marongiu <marongiu.luigi at gmail.com>
> Sent: Friday, October 23, 2020 11:11 AM
> To: PIKAL Petr <petr.pikal at precheza.cz>
> Cc: r-help
2011 Jan 24
5
Train error:: subscript out of bonds
Hi,
I am trying to construct a svmpoly model using the "caret" package (please
see code below). Using the same data, without changing any setting, I am
just changing the seed value. Sometimes it constructs the model
successfully, and sometimes I get an ?Error in indexes[[j]] : subscript out
of bounds?.
For example when I set seed to 357 following code produced result only for 8
2010 Nov 23
5
cross validation using e1071:SVM
Hi everyone
I am trying to do cross validation (10 fold CV) by using e1071:svm method. I
know that there is an option (?cross?) for cross validation but still I
wanted to make a function to Generate cross-validation indices using pls:
cvsegments method.
#####################################################################
Code (at the end) Is working fine but sometime caret:confusionMatrix
2020 Oct 23
2
How to shade area between lines in ggplot2
also from this site: https://plotly.com/ggplot2/geom_ribbon/
I get the answer is geom_ribbon but I am still missing something
```
#! plot
p = ggplot(data = trainset, aes(x=x, y=y, color=z)) +
geom_point() + scale_color_manual(values = c("red", "blue"))
# show support vectors
df_sv = trainset[svm_model$index, ]
p = p + geom_point(data = df_sv, aes(x=x, y=y),
2020 Oct 27
3
R for-loop to add layer to lattice plot
Hello,
I am using e1071 to run support vector machine. I would like to plot
the data with lattice and specifically show the hyperplanes created by
the system.
I can store the hyperplane as a contour in an object, and I can plot
one object at a time. Since there will be thousands of elements to
plot, I can't manually add them one by one to the plot, so I tried to
loop into them, but only the
2020 Oct 26
0
How to shade area between lines in ggplot2
Hi
Put fill outside aes
p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2],
ymax = slope_1*x + intercept_1 + 1/w[2]), fill = "blue", alpha=0.1)
The "hole" is because you have two levels of data (red and blue). To get rid
of this you should put new data in ribbon call.
Something like
newdat <- trainset
newdat$z <- factor(0)
p+geom_ribbon(data=newdat, aes(ymin =
2009 Mar 11
1
prediction error for test set-cross validation
Hi,
I have a database of 2211 rows with 31 entries each and I manually split my
data into 10 folds for cross validation. I build logistic regression model
as:
>model <- glm(qual ~ AgGr + FaHx + PrHx + PrSr + PaLp + SvD + IndExam +
Rad +BrDn + BRDS + PrinFin+ SkRtr + NpRtr + SkThck +TrThkc +
SkLes + AxAdnp + ArcDst + MaDen + CaDt + MaMG +
MaMrp + MaSh +
2006 Feb 28
2
Need help with a Power Find()
I was hoping someone would be able to help me with creating a method.
I have two tables. What I am trying to do is create a list of all the id''s
from table2 that aren''t currently referenced by Table1''s address_id column.
That way, when I create a new customer I can have a drop down list in the
view of all the addresses that are not currently being used.
##### Database
2012 Jan 03
1
sqldf and not converting integers to floating point in SQLite
Hi,
I have following 2 tables:
Table 1:
POSTAL | VALUE
1000|49
1010|100
1020|50
Table 2:
INSEE | POSTAL
A|1000
B|1000
C|1010
D|1020
I would like to convert this to the following:
INSEE | VALUE_SPREAD
A|24.5
B|24.5
C|100
D|50
I can achieve this with a nested SQL query (through counting the
number of POSTAL that belong to any given INSEE, and diving the value
of the postal in that INSEE by
2020 Oct 23
2
How to shade area between lines in ggplot2
Thank you, but this split the area into two and distorts the shape of
the plot. (compared to
```
p + geom_abline(slope = slope_1, intercept = intercept_1 - 1/w[2],
linetype = "dashed", col = "royalblue") +
geom_abline(slope = slope_1, intercept = intercept_1 + 1/w[2],
linetype = "dashed", col = "royalblue")
```
Why there
2012 Dec 02
2
How to re-combine values based on an index?
I am able to split my df into two like so:
dataset <- trainset
index <- 1:nrow(dataset)
testindex <- sample(index, trunc(length(index)*30/100))
trainset <- dataset[-testindex,]
testset <- dataset[testindex,-1]
So I have the index information, how could I re-combine the data using that back into a single df?
I tried what I thought might work, but failed with:
2011 Nov 30
1
Replace columns in a data.frame randomly splitted
Dear community,
I'm working with the data.frame attached (
http://r.789695.n4.nabble.com/file/n4122926/df1.xls df1.xls ), let's call it
df1.
I typed: df1<- read.xls("C:/... dir .../df1.xls",colNames= TRUE, rowNames=
TRUE)
Then I splited randomly df1 using splitdf function
(http://gettinggeneticsdone.blogspot.com/2011/03/splitting-
dataset-revisited-keeping.html)
2004 Sep 23
0
two internet connections don''t appear to be masqing
I have a script for dual internet connections that does this:
-------------------------
#!/bin/bash
IF1=eth1
IP1=203.219.190.106
P1=203.219.190.105
P1_NET=203.219.190.104
IF2=eth2
IP2=220.245.224.46
P2=220.245.224.45
P2_NET=220.245.224.44
IF0=eth0
P0_net=192.168.0.0
TABLE1=inet1
TABLE2=inet2
ip route add $P1_NET dev $IF1 src $IP1 table $TABLE1
ip route add default via $P1 table $TABLE1
ip
2020 Oct 23
0
How to shade area between lines in ggplot2
Hi
Did you try google? I got several answers using your question
e.g.
https://stackoverflow.com/questions/54687321/fill-area-between-lines-using-g
gplot-in-r
Cheers
Petr
> -----Original Message-----
> From: R-help <r-help-bounces at r-project.org> On Behalf Of Luigi Marongiu
> Sent: Friday, October 23, 2020 9:59 AM
> To: r-help <r-help at r-project.org>
> Subject:
2012 Sep 27
1
Random Forest - Extract
Hello,
I have two Random Forest (RF) related questions.
1. How do I view the classifications for the detail data of my training data (aka trainset) that I used to build the model? I know there is an object called predicted which I believe is a vector. To view the detail for my testset I use the below-bind the columns together. I was trying to do something similar for my trainset but
2011 Feb 27
2
regularized dfa rda (Klar): problems with predictions
Dear all, I am trying to do a n-fold cross-validation for a regularized discrimant function analysis using rda from the package klaR. However, I have problems to predict the groups from the test/validation sample. The exmaples of the R documantation and some online webpage also do not work. Does anybody know what I have done wrong?
Here my code
# I want to use the first 6 observations for
2012 Nov 20
3
data after write() is off by 1 ?
I am new to R, so I am sure I am making a simple mistake. I am including complete information in hopes
someone can help me.
Basically my data in R looks good, I write it to a file, and every value is off by 1.
Here is my flow:
> str(prediction)
Factor w/ 10 levels "0","1","2","3",..: 3 1 10 10 4 8 1 4 1 4 ...
- attr(*, "names")= chr