limitations on the matrix shape (feature space limitation) per partition

This commit is contained in:
Steve Nyemba 2020-04-14 15:52:55 -05:00
parent f1076f441b
commit f91a58e534
1 changed files with 5 additions and 3 deletions

View File

@ -167,9 +167,11 @@ class Binary :
# Let's treat the case of missing values i.e nulls # Let's treat the case of missing values i.e nulls
# #
row_count,col_count = column.size,values.size row_count,col_count = column.size,values.size
if row_count * col_count > size and row_count < size: # if row_count * col_count > size and row_count < size:
N = np.divide(size,row_count).astype(int) if col_count > size :
i = np.random.choice(col_count,N) # N = np.divide(size,row_count).astype(int)
# N =
i = np.random.choice(col_count,size)
values = values[-i] values = values[-i]
col_count = N col_count = N