Inferring friendship network structure by using mobile phone data