bug fix: missing values when generated

This commit is contained in:
Steve Nyemba 2020-02-26 09:25:13 -06:00
parent 1cfd2059a4
commit a51be50a86
1 changed files with 4 additions and 1 deletions

View File

@ -594,6 +594,7 @@ class Predict(GNet):
#
# In case we are dealing with actual values like diagnosis codes we can perform
#
INDEX = np.random.choice(np.arange(len(found)),1)[0]
INDEX = ratio.index(np.max(ratio))
df = found[INDEX]
@ -609,7 +610,9 @@ class Predict(GNet):
# let's get the missing rows (if any) ...
#
ii = df.apply(lambda row: np.sum(row) == 0 ,axis=1)
if ii.shape[0] == 0 :
# print ([' **** ',ii.sum()])
if ii.shape[0] > 0 :
#
#@TODO Have this be a configurable variable
missing = np.repeat(0, np.where(ii==1)[0].size)