Use k-means and linear regression to approximate ambiguous inverse cosine.