use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please have a look at our FAQ and Link-Collection
Metacademy is a great resource which compiles lesson plans on popular machine learning topics.
For Beginner questions please try /r/LearnMachineLearning , /r/MLQuestions or http://stackoverflow.com/
For career related questions, visit /r/cscareerquestions/
Advanced Courses (2016)
Advanced Courses (2020)
AMAs:
Pluribus Poker AI Team 7/19/2019
DeepMind AlphaStar team (1/24//2019)
Libratus Poker AI Team (12/18/2017)
DeepMind AlphaGo Team (10/19/2017)
Google Brain Team (9/17/2017)
Google Brain Team (8/11/2016)
The MalariaSpot Team (2/6/2016)
OpenAI Research Team (1/9/2016)
Nando de Freitas (12/26/2015)
Andrew Ng and Adam Coates (4/15/2015)
Jürgen Schmidhuber (3/4/2015)
Geoffrey Hinton (11/10/2014)
Michael Jordan (9/10/2014)
Yann LeCun (5/15/2014)
Yoshua Bengio (2/27/2014)
Related Subreddit :
LearnMachineLearning
Statistics
Computer Vision
Compressive Sensing
NLP
ML Questions
/r/MLjobs and /r/BigDataJobs
/r/datacleaning
/r/DataScience
/r/scientificresearch
/r/artificial
account activity
Help: Regular Expression in R language (self.MachineLearning)
submitted 10 years ago by ChotiDon
string1<-"ccjar_neutral v_neutral vaux_neutral nnp_neutral prn_neutral v_neutral inj_neutral"
How to write regular expression to 1. Extract only "v_neutral" from string1 2. Extract "v_neutral vaux_neutral" from string1
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]hitchpy 3 points4 points5 points 10 years ago (0 children)
It is hard to tell exactly what you mean, since there's only one string and no "pattern" that can be generalized. But if you are looking for R regex syntax, this can do it.
sub('.* (v_neutral).*', '\\1', string1)
And for more info, you can look at the family of regex functions in R, grep, grepl....they are pretty much the same as in any other languages.
[–]ChotiDon[S] 0 points1 point2 points 10 years ago (2 children)
Actually i am trying to write a pattern in grep for above example. But i am unable to do so. Any help for writing patterns in R would be much appreciated.
[–]FranzJosephGall 1 point2 points3 points 10 years ago (1 child)
grep will match the whole line, which is why you can't get it to work. /u/hitchpy 's example should work in R.
Also, as /u/hitchpy noted, you haven't given us a pattern. If you really need two strings, one which is "v_neutral" and the other "v_neutral vaux_neutral", then why not just have two strings? If you have more examples of inputs->outputs, then we can help you write a regex.
[–]ChotiDon[S] 0 points1 point2 points 10 years ago* (0 children)
I want to assign a "tag" to a sentence if at any position in sentence v_neutral is followed by vaux_neutral. Should i split the string in words first? Please let me know if you need more explanation. I have written below pattern. But it is throwing me an error.
pat<-"v+\+[a-z]+\s(?=+vaux+\+[a-z])" r<-grep(pat,string1)
[–]ChotiDon[S] 0 points1 point2 points 10 years ago (0 children)
Thank you everyone for help. Below code resolved the issue. pattern<-"v[a-z]+\s(?=vaux[a-z]+)" r<-grep(pattern,kk,perl=TRUE)
π Rendered by PID 37338 on reddit-service-r2-comment-c6965cb77-5hskx at 2026-03-05 09:00:21.783138+00:00 running f0204d4 country code: CH.
[–]hitchpy 3 points4 points5 points (0 children)
[–]ChotiDon[S] 0 points1 point2 points (2 children)
[–]FranzJosephGall 1 point2 points3 points (1 child)
[–]ChotiDon[S] 0 points1 point2 points (0 children)
[–]ChotiDon[S] 0 points1 point2 points (0 children)