Skip to content
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] tSNE, Freeviz: Set effective_data #5839

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Orange/widgets/unsupervised/owtsne.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ def __init__(self):
self.tsne_embedding = None # type: Optional[manifold.TSNEModel]
self.iterations_done = 0 # type: int

@property
def effective_data(self):
return self.data.transform(Domain(self.effective_variables))

def _add_controls(self):
self._add_controls_start_box()
super()._add_controls()
Expand Down
7 changes: 6 additions & 1 deletion Orange/widgets/visualize/owfreeviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import pyqtgraph as pg

from Orange.data import Table
from Orange.data import Table, Domain
from Orange.projection import FreeViz
from Orange.projection.freeviz import FreeVizModel
from Orange.widgets import widget, gui, settings
Expand Down Expand Up @@ -181,6 +181,11 @@ def effective_variables(self):
return [a for a in self.data.domain.attributes
if a.is_continuous or a.is_discrete and len(a.values) == 2]

@property
def effective_data(self):
return self.data.transform(Domain(self.effective_variables,
self.data.domain.class_vars))

def __radius_slider_changed(self):
self.graph.update_radius()

Expand Down