Skip to content

Commit

Permalink
added warning to align function when n_features exceeds n_samples
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheusser committed Feb 23, 2017
1 parent f57af0b commit 9e3e064
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hypertools/tools/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from .procrustes import procrustes
import numpy as np
from .._shared.helpers import format_data
from warnings import warn

##MAIN FUNCTION##
def align(data, method='hyper'):
Expand Down Expand Up @@ -63,6 +64,11 @@ def align(data, method='hyper'):

data = format_data(data)

if data[0].shape[1]>=data[0].shape[0]:
warn('The number of features exceeds number of samples. This can lead \
to overfitting. We recommend reducing the dimensionality to be \
less than the number of samples prior to hyperalignment.')

if method=='hyper':

##STEP 0: STANDARDIZE SIZE AND SHAPE##
Expand Down

0 comments on commit 9e3e064

Please sign in to comment.