Skip to content
Open
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
7 changes: 5 additions & 2 deletions datasets/breheny.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,20 @@ class Dataset(BaseDataset):

parameters = {
"dataset": ["Scheetz2006", "Rhee2006", "bcTCGA"],
"standardize" : [True, False]
}

install_cmd = "conda"
requirements = ["rpy2", "numpy", "scipy", "appdirs", "r"]

def __init__(self, dataset="bcTCGA"):
def __init__(self, dataset="bcTCGA", standardize=True):
self.dataset = dataset
self.X, self.y = None, None
self.standardize = standardize

def get_data(self):
X, y = fetch_breheny(self.dataset)
X, y = preprocess_data(X, y)
if self.standardize:
X, y = preprocess_data(X, y)

return dict(X=X, y=y)
7 changes: 5 additions & 2 deletions datasets/libsvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ class Dataset(BaseDataset):

parameters = {
"dataset": ["finance", "finance-tf-idf", "YearPredictionMSD"],
"standardize" : [True, False]
}

install_cmd = "conda"
requirements = ["pip:libsvmdata"]

def __init__(self, dataset="bodyfat"):
def __init__(self, dataset="bodyfat", standardize=True):
self.dataset = dataset
self.X, self.y = None, None
self.standardize = standardize

def get_data(self):
X, y = fetch_libsvm(self.dataset)
X, y = preprocess_data(X, y)
if self.standardize:
X, y = preprocess_data(X, y)

return dict(X=X, y=y)
13 changes: 11 additions & 2 deletions datasets/simulated.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@ class Dataset(BaseDataset):
(200, 10_000, 20),
],
"rho": [0, 0.5],
"standardize": [True, False],
}

def __init__(
self, n_samples=10, n_features=50, n_signals=5, rho=0, random_state=27
self,
n_samples=10,
n_features=50,
n_signals=5,
rho=0,
random_state=27,
standardize=True,
):
self.n_samples = n_samples
self.n_features = n_features
self.n_signals = n_signals
self.random_state = random_state
self.rho = rho
self.standardize = standardize

def get_data(self):
X, y, _ = make_correlated_data(
Expand All @@ -35,6 +43,7 @@ def get_data(self):
random_state=self.random_state,
)

X, y = preprocess_data(X, y)
if self.standardize:
X, y = preprocess_data(X, y)

return dict(X=X, y=y)