@statsepi One of many goodies in RStudio: if you go into LaTeX math mode ($...$) and you hover over an equation you'll see a beautiful mathematically typeset preview of the equation @rstudio@rstudiotips
Over time, many #Python statements have evolved a variant form as an expression:
print ⟶ print() function
def ⟶ lambda
if ⟶ ternary operator
for-loop with list.append() ⟶ list comprehension
def and yield ⟶ generator expression
= assignment ⟶ walrus operator
Thanks to everyone who submitted a solution. I'm glad other people think this sort of thing is fun!
Here's my solution, using a BayesTable class that demonstrates Bayes's Theorem:
https://t.co/AKwF5gvfH9
More Bayes puzzles coming soon!
I have a box of dice with 4, 6, 8, and 12 sides, the same number of each.
I choose one at random, roll it twice without showing you, and report that I got the same outcome both times.
If I roll the same die again, what is the probability I get the same outcome a third time?
Purrr's reduce function is so powerful. We can join multiple tables (read it as >2) using two lines of code. List all the tables and pipe it up with <<reduce>>. #rstats
Writing production #python code:
* Simplest thing that works
* Consider type signatures
* Add repr, copy, and pickle support.
* Watch out for circular references
* Think hard about concurrency
* Handle exotic and unanticipated use cases
* Learn from the experience
* Repeat
Interested in statistical methods for data science? Check out our probabilistic programming and bayesian methods playlist, including:
"Bayesian Network Modeling using R and Python" by Pragyansmita Nayak: https://t.co/CNw92p8jAJ
Don't forget to subscribe to #PyData on Youtube!
Python or R? Trick question: Both!
Check out our PyData video playlist of R talks, including:
"A Beginner's Guide to Random Forests - R vs Python" by Linda Uruchurtu:
https://t.co/iZ6FtRiBJ7
#rstats#scikitlearn#sklearn
Don't forget to subscribe for updates!
#python factlet: I learned something new. A "binade" is the set of floating point numbers that all have the same exponent.
Presumably, if an addition z=y+x is closed within a single binade, it will be lossless.
If we want to compare two data sets, to ensure whether the data matches, we can use setequal() or identical(). The difference is, setequal() wouldn't mind duplicates and/or order whereas identical() will return FALSE on duplicates or mismatch in order between data sets. #rstats
Witness Max Kuhn talk about Modeling in the #Tidyverse. @topepos
The roadmap for modeling packages that adhere to tidyverse-tenets.
Empirical validation and good methods, consistent interfaces,
https://t.co/X6nhgKzBAE #rstudioconf#rstats