A maximum variance cluster algorithm