def test_no_samples(self): data = Orange.data.Table("iris") proc = PCADenoising() d1 = proc(data[:0]) newdata = Orange.data.Table(d1.domain, data) np.testing.assert_equal(newdata.X, np.nan)
Integrate(methods=Integrate.Simple, limits=[[1100, 1200]]), Integrate(methods=Integrate.Baseline, limits=[[1100, 1200]]), Integrate(methods=Integrate.PeakMax, limits=[[1100, 1200]]), Integrate(methods=Integrate.PeakBaseline, limits=[[1100, 1200]]), Integrate(methods=Integrate.PeakAt, limits=[[1100]]), Integrate(methods=Integrate.PeakX, limits=[[1100, 1200]]), Integrate(methods=Integrate.PeakXBaseline, limits=[[1100, 1200]]), RubberbandBaseline(), Normalize(method=Normalize.Vector), Normalize(method=Normalize.Area, int_method=Integrate.PeakMax, lower=0, upper=10000), ] # Preprocessors that use groups of input samples to infer # internal parameters. PREPROCESSORS_GROUPS_OF_SAMPLES = [ PCADenoising(components=2), ] PREPROCESSORS = PREPROCESSORS_INDEPENDENT_SAMPLES + PREPROCESSORS_GROUPS_OF_SAMPLES def shuffle_attr(data): natts = list(data.domain.attributes) random.Random(0).shuffle(natts) ndomain = Orange.data.Domain(natts, data.domain.class_vars, metas=data.domain.metas) return Orange.data.Table(ndomain, data) def reverse_attr(data): natts = reversed(data.domain.attributes)