The torch-dataframe – basics on modifications

Forming your data to your needs is crucial. The image i cc by Lennart Tange.
Forming your data to your needs is crucial. The image i cc by Lennart Tange.

In my [previous post][intro post] we took a look at some of the basic functionality. In this post I’ll try to show how to manipulate your dataframe. Note though, the [torch-dataframe][tdf github] is not about data munging, there are far more powerful tools in other languages for this. The aim of the modifications is to do simple tasks without being forced to switch to a different language. Continue reading

Flattr this!

Posted in Deep learning, Torch, Tutorial | Leave a comment

Deep learning with torch-dataframe – a gentle introduction to Torch

[![A solid concrete foundation is always important. The image is cc by Sharon Pazner ](http://gforge.se/wp-content/uploads/2016/07/Lego-house-concrete.jpg)](http://gforge.se/wp-content/uploads/2016/07/Lego-house-concrete.jpg) A solid concrete foundation is always important. The image is cc by[
Sharon Pazner
](https://flic.kr/p/nSNQzw)

Handling [tabular data](https://en.wikipedia.org/wiki/Table_(information)) is generally at the heart of most research projects. As I started exploring [Torch](http://torch.ch/) that uses the [Lua](https://www.lua.org/) language for [deep learning](https://en.wikipedia.org/wiki/Deep_learning) I was surprised that there was no package that would correspond to the functionality available in R’s [data.frame](https://stat.ethz.ch/R-manual/R-devel/library/base/html/data.frame.html). After some searching I found Alex Mili’s [torch-dataframe](https://github.com/AlexMili/torch-dataframe) package that I decided to update to my needs. We have during the past few months been developing the package and it has now made it onto the Torch [cheat sheet](https://github.com/torch/torch7/wiki/Cheatsheet#data-formats) (partly the reason for the posting scarcity lately). This series of posts provide a short introduction to the package (version 1.5) and examples of how to implement basic networks in Torch. Continue reading

Flattr this!

Posted in Deep learning, Torch, Tutorial | Leave a comment

Dealing with non-proportional hazards in R

As things change over time so should our statistical models. The image is CC by Prad Prathivi(
As things change over time so should our statistical models. The image is CC by Prad Prathivi

Since I’m frequently working with large datasets and survival data I often find that the proportional hazards assumption for the Cox regressions doesn’t hold. In my most recent study on cardiovascular deaths after total hip arthroplasty the coefficient was close to zero when looking at the period between 5 and 21 years after surgery. Grambsch and Thernau’s test for non-proportionality hinted though of a problem and as I explored it there was a clear correlation between mortality and hip arthroplasty surgery. The effect increased over time, just as we had originally thought, see below figure. In this post I’ll try to show how I handle with non-proportional hazards in R. Continue reading

Flattr this!

Posted in Orthopaedic surgery, R, Research, Tutorial | Tagged , , , | Leave a comment

LMWH – a Big Pharma bluff?

Tales of Big Pharma Horror. The image is CC from Mike Licht.
Tales of Big Pharma Horror. The image is CC from Mike Licht.

Thromboprophylaxis is a given for patients operated due to lower limb injuries, at least if we believe Big Pharma-studies. This dogma is now challenged by a double-blind, multi-center, RCT by Selby et al. They found that the DVT rate was much lower than expected and had to pull the plug on the study as it would be practically impossible to show a difference between placebo and LMWH. Continue reading

Flattr this!

Posted in Orthopaedic surgery, Research | Leave a comment

R trends in 2015 (based on cranlogs)

What are the current tRends? The image is CC from coco + kelly.
What are the current tRends? The image is CC from coco + kelly.

It is always fun to look back and reflect on the past year. Inspired by Christoph Safferling’s post on top packages from published in 2015, I decided to have my own go at the top R trends of 2015. Contrary to Safferling’s post I’ll try to also (1) look at packages from previous years that hit the big league, (2) what top R coders we have in the community, and then (2) round-up with my own 2015-R-experience. Continue reading

Flattr this!

Posted in R | 4 Comments

Cuff surgery: Still no cigar

The degenerative cuff tear still unresolved. The image is CC by Brian
The degenerative cuff tear still unresolved. The image is CC by Brian

I’ve previously reported on Kukkonen et al’s excellent three-armed rotator cuff surgery RCT. They’ve now just published the 2-year follow-up where they still don’t see any difference in outcomes. Interestingly, they’ve added an MRI and noted that the cuff tear remains smaller among those that had surgery. This indicates that the intended surgery works but still too early to see any actual results. Continue reading

Flattr this!

Posted in Orthopaedic surgery | Leave a comment

Canakinumab – difficult to pronounce but useful for treating gout?

Gout onset is sudden and be intensely painful. The image is CC by Mike
Gout onset is sudden and be intensely painful. The image is CC by Mike

Gout can be incredibly painful where the main treatment option are nonsteroidal anti-inflammatory drugs (NSAID). Unfortunately NSAIDs are not the best alternative for elderly patients as it may induce heart & kidney failure. I was therefore thrilled to see that canakinumab recently was approved by Läkemedelsverket as a treatment alternative. Continue reading

Flattr this!

Posted in General, Orthopaedic surgery, Research | Leave a comment

The proximal humerus fracture – a lost cause?

Time to give up on the proximal humerus fracture? The image is CC by Crouchy99.
Time to give up on the proximal humerus fracture? The image is CC by Crouchy99.

Most orthopaedic surgeons have met patients with poor shoulder function after a proximal humerus fracture, and many of us have thought: if I’ve only done the other thing I was thinking of…. Unfortunately the outcome seems to be independent of what we do, at least according to Launonen et al’s meta-analysis and Rangan et al’s recent RCT on 250 patients. Continue reading

Flattr this!

Posted in Orthopaedic surgery, Research | 1 Comment

A bloody mess

Is the evidence on blood transfusions going down the drain? The image is CC by  Steve Koukoulas.
Is the evidence on blood transfusions going down the drain? The image is CC by
Steve Koukoulas
.

In a recent RCT by Gregersen et al. they manage to complicate  blood transfusions in orthopaedic patients even further. They suggest that orthopaedic patients from nursing homes fare better with liberal blood transfusions (> 113 g/L compared to >97 g/L). The concept is interesting, although the paper has some issues. Continue reading

Flattr this!

Posted in Orthopaedic surgery, Research | Leave a comment

Stop (em)bracing burst fractures?

Jailbreaking spine fracture braces. The image is CC by Parée.
Jailbreaking spine fracture braces. The image is CC by Parée.

Continuing on the theme of #2MuchMed (see BMJ’s campaign) I figured it may be worth highlighting two recent studies on stable compression fractures of the spine. Both failed to show any benefit with standard bracing treatment. As some patients experience the brace as claustrophobic and uncomfortable (from my own patients’ experience), I’m thrilled to have this option available. Continue reading

Flattr this!

Posted in Orthopaedic surgery, Research | Leave a comment