Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread Jin Li
seems wise. > > On 2023-10-23 4:38 a.m., Martin Maechler wrote: > >>>>>> Jin Li > >>>>>> on Mon, 23 Oct 2023 15:42:14 +1100 writes: > > > > > If you are interested in other validation methods (e.g., LOO or > n

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-22 Thread Jin Li
code. > > > > __________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented

Re: [R] Sensitivity and Specificity

2022-10-24 Thread Jin Li
; and provide commented, minimal, self-contained, reproducible code. > >>> > >> > >> -- > >> Michael > >> http://www.dewey.myzen.co.uk/home.html > >> > > > > [[alternative HTML version deleted]] > > > > _

Re: [R] How important is set.seed

2022-03-21 Thread Jin Li
d=DwICAg&c=sJ6xIWYx-zLMB3EPkvcnVg&r=9PEhQh2kVeAsRzsn7AkP-g&m=s9osWKJN-zG2VafjXQYCmU_AMS5w3eAtCfeJAwnphAb7ap8kDYfcLwt2jrmf0UaX&s=wI6SycC_C2fno2VfxGg9ObD3Dd1qh6vn56pIvmCcobg&e= > and provide commented, minimal, self-contained, reproducible code. > > _

[R] Release of a new package steprf: Stepwise Predictive Variable Selection for Random Forest

2021-11-14 Thread Jin Li
references cited in the description of the package. Cheers, -- Jin -- Jin Li, PhD Founder, Data2action, Australia https://www.researchgate.net/profile/Jin_Li32 https://scholar.google.com/citations?user=Jeot53EJ&hl=en [[alternative HTML version del

[R] spm2: A new package for (spatial) predictive modelling

2021-10-17 Thread Jin Li
s for data preparation and predictive accuracy assessment. Any feedback is welcome and appreciated. -- Jin ---------- Jin Li, PhD Founder, Data2action, Australia https://www.researchgate.net/profile/Jin_Li32 https://scholar.google.com/citations?user=Jeot53EA

[R] Spm package is updated and available on CRAN again

2021-09-07 Thread Jin Li
Dear spm users and all, I am glad to inform you that the spm package is available on CRAN again. It is an updated version with a few bugs fixed. Please note that some functions in the package are not only for spatial predictive modelling but also for predictive modeling in general. Please feel fr

[R] spm package is available on CRAN again

2021-09-06 Thread Jin Li
to contact me if you have any questions regarding the spm package. Best regards, -- Jin -- Jin Li, PhD Founder, Data2action, Australia https://www.researchgate.net/profile/Jin_Li32 https://scholar.google.com/citations?user=Jeot53EJ&h

Re: [R] How to make our data normally distributed in R

2020-03-15 Thread Jin Li
: > Thanks a lot Jin.. > > If my total number of observations are 500, > n will be 500, > mu will be average (500) > s will be sd (500) > and m will be RMSE value i.e. 4500 in this case? > > tovecv(n=500, mu=average (500), s=sd, m=4500, measure="rmse") > > >

Re: [R] How to make our data normally distributed in R

2020-03-12 Thread Jin Li
Hi, Why do you want to re-scale RMSE to 0-1? You can change ylim=(0,1) to ylim=(0, 4600). You may use VEcv (Variance explained by predictive models based on cross-validation) that ranges from 0 to 100% instead. It can be calculated using vecv function in library(spm) or you can convert RMSE to VEc

Re: [R] Is it possible to remove this loop? [SEC=UNCLASSIFIED]

2012-07-03 Thread Jin . Li
Thanks for your validation. Yes Peter's solution is the fastest, faster than the previous one by saving 25% time. It was missed out in my previous testing. Jin -Original Message- From: Pascal Oettli [mailto:kri...@ymail.com] Sent: Wednesday, 4 July 2012 2:07 PM To: Li Jin Cc: r-help@r-p

Re: [R] Is it possible to remove this loop? [SEC=UNCLASSIFIED]

2012-07-03 Thread Jin . Li
Thank you all for providing various alternatives. They are all pretty fast. Great help! Based on a test of a dataset with 800,000 rows, the time used varies from 0.04 to 11.56 s. The champion is: > a1$h2 <- 0 > a1$h2[a1$h1=="H"] <- 1 Regards, Jin Geoscience Australia Disclaimer: This e-mail (and

[R] Is it possible to remove this loop? [SEC=UNCLASSIFIED]

2012-07-03 Thread Jin . Li
Hi all, I would like create a new column in a data.frame (a1) to store 0, 1 data converted from a factor as below. a1$h2<-NULL for (i in 1:dim(a1)[1]) { if (a1$h1[i]=="H") a1$h2[i]<-1 else a1$h2[i]<-0 } My question: is it possible to remove the loop from above code to achieve the d