Tradeoffs for Space, Time, Data and Risk in Unsupervised Learning