-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX]OWFreeViz: Fix optimization for data with missing values #3358
Conversation
np.max(np.linalg.norm(embedding[self.valid_data], axis=1)) or 1 | ||
EX = np.dot(self._X, self.projection) | ||
EX /= np.max(np.linalg.norm(EX, axis=1)) or 1 | ||
embedding = np.zeros((len(self.data), 2), dtype=np.float) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the original data had missing values, and the embedding is not available for all points, I think it is better to assign missing values to those points as the embedding too (instead of zeros).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, while I doubt these projections will ever be generalized to more than 2D, I would still prefer to not make implicit assumptions like that in the code and use EX.shape[1]
instead of 2
I see that @janezd was quicker than my comments... :) |
I apologize for being over-eager. :)
You're right about 2D. On the other hand, if it would say |
I know it is not going to be generalized. I just really dislike hardcoded constants in code (numbers, strings) when they can be avoided :) However, I would change the zeros to nans, as I think that is conceptually more correct. |
I agree about nans. I guess @VesnaT should make a change in a new PR. I promise I won't merge it. :) |
Issue
The widget crashed when received dataset with missing values on the input.
Description of changes
Includes