pair-based ridge regression model