You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Thanks for your great work on merf!
When I debug merf, I found that there is one line that does not work in any case:
63defpredict(self, X: np.ndarray, Z: np.ndarray, clusters: pd.Series):
...
forcluster_idinself.cluster_counts.index:
indices_i=clusters==cluster_id# If cluster doesn't exist in test data that's ok. Just move on.96iflen(indices_i) ==0: <------------------mightreviseto: ifsum(indices_i) ==0continue# If cluster does exist, apply the correction.
...
I marked Line # 96 and suggested changing "len()" to "sum()", otw, this if will never run in any case because indices_i is a pd.Series has the same shape with the input cluster.
And if possible, I would like to ask another question about the random effect matrix Z.
In the given example notebook, I noticed that when considering one variance as a random effect, the Z is not simply composed of one column but also has another column of ones. Why are the ones necessary?
Thanks in advance!
meng
The text was updated successfully, but these errors were encountered:
Hello,
Thanks for your great work on merf!
When I debug merf, I found that there is one line that does not work in any case:
I marked Line # 96 and suggested changing "len()" to "sum()", otw, this
if
will never run in any case becauseindices_i
is a pd.Series has the same shape with the inputcluster
.And if possible, I would like to ask another question about the random effect matrix
Z
.In the given example notebook, I noticed that when considering one variance as a random effect, the
Z
is not simply composed of one column but also has another column of ones. Why are the ones necessary?Thanks in advance!
meng
The text was updated successfully, but these errors were encountered: