Positive And Negative Connections And Homophily In Complex Networks