Пример #1
0
 def select_dataset(self, *args):
     from astrolab.gui.application import Astrolab
     self.dm.select_current_mode()
     if self.dm.dataset != self._dset_selection.value:
         print(
             f"Loading dataset '{self._dset_selection.value}', current dataset = '{self.dm.dataset}', current mode = '{self._mode}', current mode index = {self.dm.mode_index}, mdmgr id = {id(self)}"
         )
         self.dm.dataset = self._dset_selection.value
         self.dm.select_dataset(self._dset_selection.value)
     Astrolab.instance().refresh_all()
Пример #2
0
import time
import xarray as xa
from astrolab.gui.application import Astrolab
from astrolab.data.manager import DataManager
from astrolab.reduction.base import UMAP
import cudf, cuml, cupy, cupyx

app = Astrolab.instance()
app.configure("spectraclass")
n_neighbors = 15
project_dataset: xa.Dataset = DataManager.instance().loadCurrentProject(
    "spectraclass")
umap_data: xa.DataArray = project_dataset["reduction"].compute()

umap = UMAP.instance()
embedding = umap.transform(umap_data)
print(f"Completed embedding, result shape = {embedding.shape}")
Пример #3
0
 def apply_handler(*args):
     from astrolab.gui.application import Astrolab
     rm.nepochs = nepochs_selector.value
     rm.alpha = alpha_selector.value
     rm.init = init_selector.value
     Astrolab.instance().save_config()