Displaying 20 results from an estimated 40000 matches similar to: "Alternative to Scale Function?"
2009 Aug 03
2
Scale set of 0 values returns NAN??
Hi,
More questions in my ongoing quest to convert from RapidMiner to R.
One thing has become VERY CLEAR: None of the issues I'm asking about
here are addressed in RapidMiner. How it handles misisng values,
scaling, etc. is hidden within the "black box". Using R is forcing me
to take a much deeper look at my data and how my experiments are
constructed. (That's a very
2009 Aug 12
5
Nominal variables in SVM?
Hi,
The answers to my previous question about nominal variables has lead me
to a more important question.
What is the "best practice" way to feed nominal variable to an SVM.
For example:
color = ("red, "blue", "green")
I could translate that into an index so I wind up with
color= (1,2,3)
But my concern is that the SVM will now think that the values are
2011 Jan 07
2
Stepwise SVM Variable selection
I have a data set with about 30,000 training cases and 103 variable.
I've trained an SVM (using the e1071 package) for a binary classifier
{0,1}. The accuracy isn't great.
I used a grid search over the C and G parameters with an RBF kernel to
find the best settings.
I remember that for least squares, R has a nice stepwise function that
will try combining subsets of variables to find
2009 Sep 07
2
Confused - better empirical results with error in data
Hi,
I have a strange one for the group.
We have a system that predicts probabilities using a fairly standard svm
(e1017). We are looking at probabilities of a binary outcome.
The input data is generated by a perl script that calculates a bunch of
things, fetches data from a database, etc.
We train the system on 30,000 examples and then test the system on an
unseen set of 5,000 records.
2009 Aug 31
1
Probit function
Hello,
I want to start testing using the MNP probit function in stead of the
lrm function in my current experiment.
I have one dependant label and two independent varaibles.
The lrm is simple
model <- lrm(label ~ val1 + val2)
I tried the same thing with the mnp function and got an error that I
don't understand
model <- mnp(label ~ val1 + val2)
I get back an immediate error that
2009 Aug 02
2
Strange column shifting with read.table
Hi,
I am reading in a dataframe from a CSV file. It has 70 columns. I do
not have any kind of unique "row id".
rawdata <- read.table("r_work/train_data.csv", header=T, sep=",",
na.strings=0)
When training an svm, I keep getting an error
So, as an experiment, I wrote the data back out to a new file so that I
could see what the svm function sees.
2009 Sep 14
1
Strange question/result about SVM
Hello,
I have a very unusual situation with an SVM and wanted to get the
group's opinion.
We developed an experiment where we train the SVM with one set of data
(train data) and then test with a completely independent set of data
(test data). The results were VERY good.
I found and error in how we generate one of or training variables. We
discovered that it was indirectly influenced
2012 Mar 21
2
glmnet: obtain predictions using predict and also by extracting coefficients
All,
For my understanding, I wanted to see if I can get glmnet predictions
using both the predict function and also by multiplying coefficients
by the variable matrix. This is not worked out. Could anyone suggest
where I am going wrong?
I understand that I may not have the mean/intercept correct, but the
scaling is also off, which suggests a bigger mistake.
Thanks for your help.
Juliet Hannah
2011 Dec 10
1
Difficult subset challenge
Hi,
I'm having difficulty coming up with a good way to subest some data to generate statistics.
My data frame has multiple observations by group.
Here is an overly-simplified toy example of the data
==========================
code v1 v2
G1 1.2 2.3
G1 0 2.4
G1 1.4 3.4
G2 2.9 2.3
G2 4.3 4.4
etc..
=========================
I want to normalize the data *by group* for certain variable.
2009 Oct 16
2
Different way of scaling data
Hi,
I have a data.frame that I need to scale.
I've been using the scale function and it works nicely.
Some of the libraries I'm testing won't accept negative values for data,
so I need to find a way to scale the data from 0 to 1
Any ideas?
Thans!
2009 Aug 06
1
Logit Model... GLM or GEE or ??
Posted about this earlier. Didn't receive any response
But, some further research leads me to believe that MAYBE a GLMM or a
GEE function will do what I need.
Hello,
I have a bit of a tricky puzzle with trying to implement a logit model
as described in a paper.
The particular paper is on horseracing and they explain a model that is
a logit trained "per race", yet somehow the
2009 Jul 18
1
svm works but tune.svm give error
Hello,
I'm using the e1071 library for SVM functions.
I can quickly train an SVM with:
svm(formula = label ~ ., data = testdata)
That works well.
I want to tune the parameters, so I tried:
tune.svm(label ~ ., data=testdata[1:2000, ], gamma=10^(-6:3), cost=10^(1:2))
THIS FAILS WITH AN ERROR:
'names' attribute [199] must be the same length as the vector [184]
I don't
2009 Jul 27
1
Forumla format?
Hi,
Quick question.
I'm working on training an SVM.
I have a dataframe with about 50 columns. I want to train on 46 of them.
Is there a way to say "All except columns 22,23,25 and 31"?
It would be nice to not have to do +c1 +c2 +c3 +c4, etc for all 48 columns.
Thanks!
-N
[[alternative HTML version deleted]]
2009 Aug 04
1
Save model and predictions from svm
Hello,
I'm using the e1071 package for training an SVM. It seems to be working
well.
This question has two parts:
1) Once I've trained an SVM model, I want to USE it within R at a later
date to predict various new data. I see the write.svm command, but
don't know how to LOAD the model back in so that I can use it tomorrow.
How can I do this?
2) I would like to add the
2009 Aug 12
1
nominal to numeric function
Hi,
I'm training an SVM (C-classification from e1071 library)
Some of the variables in my data set are nominal. Is there some
easy/automatic way to convert them to numerical representations?
Thanks,
-N
2011 Mar 31
3
Create Variable names dynamically
Hi,
I want to create variable names from within my code, but can't find any documentation for this.
An example is probably the best way to illustrate. I am reading data in from a file, doing a bunch of stuff, and want to generate variables with my output. (I could make a "list of lists" and name all the elements, but I really want separate variables.)
#################
#This is
2010 Jun 01
4
Plot multiple columns
I'm running a long MCMC chain that is generating samples for 22 variables.
I have each run of the chain as a row in a matrix.
So: Chain[,1] is the column with all the samples for variable one.
Chain[,2] is the column with all the samples for variable 2, etc.
I'd like to fit all 22 on a single page to print a nice summary. It is
OK if the graphs are small, I just need to show the
2012 Jun 11
3
Decision Trees or Markov Models for Cost Effectiveness
Hello,
I was just assigned to perform a cost effectiveness study in healthcare. We are studying the cost effectiveness of a proposed diagnostic vs. current screening procedures.
One of the team members suggest a commercial software package called "TreeAge Pro". Looking at the description, it appears to be a nice GUI to some very simple models that could be easily constructed in R.
2012 Oct 14
4
Date Math
Hello,
I have a time series object (xts) that I iterate over in a loop. Works fine.
My challenge is that I want to be able to reference other entries in the series by math. i.e. For today's observation, what were the last 5 observations? If indexed numerically, it is trivial, but I can figure out how to do this with dates.
This is slightly more difficult as there may not be an
2012 Oct 09
4
Convert COLON separated format
I have a bunch of data sets that were created for the libsvm tool. They are in "colon separated sparse format".
i.e.
1 5:1 27:3 345:10
Is a row with the label of "1" and only has values in columns 5, 27, and 345.
I want to read these into a data.frame in R.
Is there a simple way to do this?
--
Noah Silverman, M.S.
UCLA Department of Statistics
8117 Math Sciences