Closed kieran-mace closed 7 years ago
Thanks @kmace we'll be releasing an updated library in the next couple of days that allows that option. Hang tight and I'll shoot you an update.
OK, you should be able to do that now:
from contrastive import CPCA
mdl = CPCA(n_components=3) #the top 3 components will be returned
projected_data = mdl.fit_transform(foreground_data, background_data)
You may have to update your package first by running pip install contrastive --upgrade
I'd like to be able to access more than just the first 2 PCs from the projected_data object. Is there a way to specify this?