We prove that the portfolio problem with transaction costs is equivalent to three different problems designed to alleviate the impact of estimation error: a robust portfolio optimization problem, a regularized regression problem, and a Bayesian portfolio problem. Motivated by these results, we propose a data-driven approach to portfolio optimization that tackles transaction costs and estimation error simultaneously by treating the transaction costs as a regularization term to be calibrated. Our empirical results demonstrate that the data-driven portfolios perform favorably because they strike an optimal trade-off between rebalancing the portfolio to capture the information in recent historical return data and avoiding the large transaction costs and impact of estimation error associated with excessive trading.