Skip to content

Instantly share code, notes, and snippets.

View stuart-cls's full-sized avatar

Stuart Read stuart-cls

View GitHub Profile
@stuart-cls
stuart-cls / data.py
Last active May 15, 2025 14:28
ComplexTable
class ComplexTable(Table):
DTYPE = np.complex64
@classmethod
def from_table(cls, domain, source, row_indices=...):
"""
Create a new table from selected columns and/or rows of an existing
one. The columns are chosen using a domain. The domain may also include
variables that do not appear in the source table; they are computed
from source variables if possible.
@stuart-cls
stuart-cls / average_by_target_var.py
Created September 27, 2018 16:27
Averaging by target variable attempts
import numpy as np
import Orange
from Orange.preprocess.preprocess import Preprocess
### Functions ###
def _split_by_value(data, avar):
# from owcurves.CurvePlot._split_by_color_value()
rd = {}
if isinstance(avar, str):