Apache Hadoop at CEON, ICM UW
Currently, this post is available here only in Polish. It will be translated as soon as possible.
Currently, this post is available here only in Polish. It will be translated as soon as possible.
| The Door to Hell near Derweze, Turkmenistan |
| The Door to Hell near Derweze, Turkmenistan |
Some assorted links collected this week:
There are discussions in various places about merits, pitfalls, and misunderstandings related to buzzwords “bigdata”, “data science” (what a useless term it is…) etc., analysis being “data-driven” or “evidence-based” etc. Perhaps I will make a separate post on that at some point… For now:
It turned out that I wrote the last post on “intergraph” package too hastily. After some feedback from CRAN maintainers and deliberation I decided to release the updated version of the “intergraph” package under the original name (so no new package “intergraph0″) with version number 1.2. This version relies on legacy “igraph” version 0.5, which is now called “igraph0″. Package “intergraph” 1.2 is now available on CRAN.
Meanwhile, I’m working on new version of “intergraph”, scheduled to be ver. 1.3, which will rely on new version 0.6 of “igraph”.
I am sorry for the mess.
A short update on network+intergraph R packages story:
Couple of days ago Carter Butts released a new version of the ‘network’ package (ver. 1.5-1). It has a namespace now. Consequently, the ‘intergraph’ package should work out-of-the-box. There is no need to install my hacked version of the ‘network’ package anymore.
Nice discussion on the usefulness, or lack thereof, of mathematics and formal theory building in the social sciences. Make sure you have a look at the comments. More or less chronologically:
With some appraisal here, here, and to some extent here.
Somewhat in parallel, a discussion about the death of theoretical (read mathematical) economics at econlog:
All in all, I subscribe to Fabio’s call with both hands.
My subjective list of advantages of formal theory building in social sciences supplementing the one at orgtheory.net:
toMatrix :: Int -> Int -> [a] -> [[a]]
chunksOf :: Int -> [a] -> [[a]]Using the above, toMatrix could be implemented this way:
chunksOf _ [] = []
chunksOf c vs = h : (chunksOf c t)
where (h, t) = splitAt c vs
toMatrix r c = chunksOf c . take (r*c)I had a feeling that a function like chunksOf should be already present somewhere in the standard library, so I asked Hoogle, but to no avail. There was chunksOf in Data.Text, but it operated on Text only (I retroactively named my function after the one in Data.Text). However, Hoogle returned replicateM as well…
splitOnce :: Int -> State [a] [a]After a while I realized that the same function could be written in a much more concise form:
splitOnce c = do
s <- get
let (h, t) = splitAt c s
put t
return h
splitOnce' :: Int -> State [a] [a]The solution was, therefore:
splitOnce' = state . splitAt
toMatrix r = evalState . replicateM r . state . splitAt
toMatrix :: Int -> Int -> [a] -> [[a]]
chunksOf :: Int -> [a] -> [[a]]Using the above, toMatrix could be implemented this way:
chunksOf _ [] = []
chunksOf c vs = h : (chunksOf c t)
where (h, t) = splitAt c vs
toMatrix r c = chunksOf c . take (r*c)I had a feeling that a function like chunksOf should be already present somewhere in the standard library, so I asked Hoogle, but to no avail. There was chunksOf in Data.Text, but it operated on Text only (I retroactively named my function after the one in Data.Text). However, Hoogle returned replicateM as well…
splitOnce :: Int -> State [a] [a]After a while I realized that the same function could be written in a much more concise form:
splitOnce c = do
s <- get
let (h, t) = splitAt c s
put t
return h
splitOnce' :: Int -> State [a] [a]The solution was, therefore:
splitOnce' = state . splitAt
toMatrix r = evalState . replicateM r . state . splitAt