similar to: Cubic Gradient Descent Package

Displaying 20 results from an estimated 900 matches similar to: "Cubic Gradient Descent Package"

2011 Aug 05
1
If find x, then y, else do nothing
I want to write code that says "If you find an element equal to 4 in this vector for each person in the data set tested separately, then put in 1 for 2 and 2 for 4, else leave the variable as is" u.ppl <- (unique(init.dat1$grid)) l.ppl <- length(u.ppl) for (i in 1:l.ppl) { if (grep("4",init.dat1$Slide1_RESP)) {2 == 1, 4 == 2}; else
2012 Mar 05
2
Running Total
I'm am trying to create a vector that has a running total that adds each time a 1 occurs. here's the code and data c(1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L,
2011 Jul 27
1
Hidden Markov Models in R
R Community - I am attempting to fit a model as described in Hampton, Bossaerts, and O'doherty (J. Neuroscience) 2006. They use a bayesian hidden markov model to model the Reversal Learning data. I have tried using HMM and depmixS4 with no success. My data is a Reversal Learning Task in which there are 3 sets of patterns over 3 blocks. The participant receives incorrect or correct
2011 Aug 22
1
Counting Elements Conditionally
R - I have 3 variables with data below. Variable "Rev" is a vector that changes from 1 to 2, 2 to 3, etc.... Variable "FF" is a binary variable with 1's and 0's. Variable "bin" is a different binary variable with 1's and 0's. I want to calculate the number of elements: 1. Starting with the first element where Rev switches (i.e. 1 to 2) 2. The
2011 Jun 28
2
Loop through each subject
R help - I am attempting to write a script that has multiple subjects in 1 data file. Each subject has multiple rows with columns as variables. Here is my code, I am having problem executing it on each unique subject id (dat$Subject). getwd() setwd("/Users/edwardpatzelt/Desktop/Neuroimaging/MERIT/SRRT/merge") dat <- read.table("test2.txt", header = TRUE, na.strings
2012 Oct 19
2
Axis Breaks with ggplot2
R-help - I'm trying to create axis breaks similar to this : http://www.r-bloggers.com/wp-content/uploads/2010/08/bar-chart-natural-axis-split1.png . Is there a way to do this in R? Here's my code thus far: structure(list(condition = structure(c(2L, 1L, 3L), .Label = c("con", "exp", "unedit"), class = "factor"), trial.avg = c(4.04583333333333,
2011 Aug 15
0
Indexing Permutation Values
R-help - This code iterates over a function with 2 free parameters to find a list of values (which are the number of incorrect predictions for a computational model). I want to find the values of i,e when there is the minimum number of incorrect predictions. In other words, the value of "i" and "e" when variable "thesum" is at the lowest possible number. The
2012 Oct 31
2
Aggregate Table Data into Cell Frequencies
R-help - I have this set of aggregated tables (sample data below via dput()). And I would like to have delayValue as the column variables with the "temp" (temp1, temp2, temp3) values as the row variables. However I would like to have the temp variables *aggregated into single rows* so that I have the frequency ("Freq" | counts) of each time each "delayValue" occurs
2016 Apr 22
1
Unique Ordering
Hi R-Help, data at bottom I've been struggling with a problem where I need to order based on 1) the Frequency "Freq" and 2) keeping each group of 3 of the same type together "Var2" but I want across all groups it to go "high to low" based on the earn factor. Thank you! structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L, 3L, 2L, 3L, 1L, 2L, 3L, 1L,
2006 Jul 12
1
direct descent into home directory
I am trying, after login that samba will go directly to thei users home directory. But it doesn't happen. Please help. Here is my setup: logon home = \\%N\%U [homes] comment = %U's Home Directory valid users = %S read only = Yes browseable = no ## path = %H create mask = 0600 directory mask = 0700 guest ok = no printable = no
2006 Jul 13
0
[Fwd: Re: direct descent into home directory]
Hi: The home directory isn't being maped to a letter (as in netuse h: /home). After the user chooses the machine the user must login, he then sees in the window a folder with the same name as his userid. The user must then choose this folder to enter his home directory. I want him to go directly into the folder without having to choose it. Regards,
2013 Mar 21
1
Descent RoR shared hosting
Hi everyone. I was in the market for wordpress host today and i thought while i was at it why not get a hosting provider that can support RoR too. I just about to begin to try to learn rails & ruby. I''m a .net developer. It won''t be any site with much load but of course id like to pick a hoster that kept ruby & rails somewhat current (without me having to do it manually)
2009 Apr 26
1
Stochastic Gradient Ascent for logistic regression
Hi. guys, I am trying to write my own Stochastic Gradient Ascent for logistic regression in R. But it seems that I am having convergence problem. Am I doing anything wrong, or just the data is off? Here is my code in R - lbw <- read.table("http://www.biostat.jhsph.edu/~ririzarr/Teaching/754/lbw.dat" , header=TRUE) attach(lbw) lbw[1:2,] low age lwt race smoke ptl ht ui ftv
1997 Nov 21
2
R-alpha: nlm and gradients
At present the documentation for nlm refers the reader to Dennis and Schnabel for details on the algorithms. It also states that the function is liable to change. Can anyone tell me if the current version of nlm uses only function values or if it can use gradients and Hessians when they are available? I would like to get an idea of how difficult it would be to port the development versions of
2010 Nov 15
1
Executing Command on Multiple R Objects
Hello Everyone - I want to print a number of results from lme function objects out to a txt file. How could I do this more efficiently than what you see here: out2 <- capture.output(summary(mod2a)) out3 <- capture.output(summary(mod3)) out4 <- capture.output(summary(mod5)) out5 <- capture.output(summary(mod6)) out6 <- capture.output(summary(mod7))
2010 Sep 06
1
nlme Output
Everyone - What do the NaN's mean here? Is this analysis a problem? Linear mixed-effects model fit by maximum likelihood Data: tmp.dat AIC BIC logLik 1611.251 1638.363 -797.6253 Random effects: Formula: ~1 | group_id (Intercept) Residual StdDev: 0.0003077668 9.236715 Fixed effects: AvgTrials ~ time + factor(group_id) + time * factor(group_id)
2010 Sep 26
1
Basis functions of cubic regression spline in mgcv
I have a question about the basis functions of cubic regression spline in mgcv. Are there some ways I can get the exact forms of the basis functions and the penalty matrix that are used in mgcv? Thanks in advance! Yan [[alternative HTML version deleted]]
2011 Oct 27
1
Fitting Maximums of data series with cubic spline
Hi Users, I want to fit the maximums of a data series with a cubic spline. How do I go about this in R. I failed to figure out how I can use the mgcv library to do this. Thanks ---------------------------- ZABLONE
2013 Nov 01
0
Impose constraint on first order derivative at a point for cubic smoothing spline
Hello,        Dr. Simon Wood told me how to force a cubic spline passing through a point. The code is as following. Anyone  who knows how I can change the code to force the first derivative to be certain value. For example, the first derivative of the constrained cubic spline equals 2 at point (0, 0.6).        I really appreciate your help!        Thanks!                 Best             Victor   
2007 May 08
1
Piecewise cubic Hermite interpolation
Which function implements the piecewise cubic Hermite interpolation? I am looking for equivalent of matlab's interp1 with the method = 'pchip' Here is the reference http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/interp1.html& -- View this message in context: