本文整理汇总了Python中Orange.widgets.tests.base.WidgetOutputsTestMixin类的典型用法代码示例。如果您正苦于以下问题:Python WidgetOutputsTestMixin类的具体用法?Python WidgetOutputsTestMixin怎么用?Python WidgetOutputsTestMixin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WidgetOutputsTestMixin类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.signal_name = "Data"
cls.signal_data = cls.data
cls.scorename = "Silhouette ({})".format(cls.data.domain.class_var.name)
示例2: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.same_input_output_domain = False
cls.signal_name = "Data"
cls.signal_data = cls.data
示例3: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.signal_name = "Distances"
cls.signal_data = Euclidean(cls.data)
cls.same_input_output_domain = False
示例4: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.signal_name = "Data"
cls.signal_data = cls.data
cls.titanic = Table("titanic")
cls.iris = Table("iris")
示例5: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.signal_name = "Distances"
cls.signal_data = Euclidean(cls.data)
cls.same_input_output_domain = False
my_dir = os.path.dirname(__file__)
datasets_dir = os.path.join(my_dir, '..', '..', '..', 'datasets')
cls.datasets_dir = os.path.realpath(datasets_dir)
示例6: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.iris = Table("iris")
cls.zoo = Table("zoo")
cls.housing = Table("housing")
cls.titanic = Table("titanic")
cls.heart = Table("heart_disease")
cls.data = cls.iris
cls.signal_name = "Data"
cls.signal_data = cls.data
示例7: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.titanic = Table('titanic')
cls.learner = CN2Learner()
cls.classifier = cls.learner(cls.titanic)
# CN2Learner does not add `instances` attribute to the model, but
# the Rules widget does. We simulate the model we get from the widget.
cls.classifier.instances = cls.titanic
cls.signal_name = "Classifier"
cls.signal_data = cls.classifier
cls.data = cls.titanic
示例8: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
tree = TreeLearner()
cls.model = tree(cls.data)
cls.model.instances = cls.data
cls.signal_name = "Tree"
cls.signal_data = cls.model
# Load a dataset that contains two variables with the same entropy
data_same_entropy = Table(path.join(
path.dirname(path.dirname(path.dirname(__file__))), "tests",
"datasets", "same_entropy.tab"))
cls.data_same_entropy = tree(data_same_entropy)
cls.data_same_entropy.instances = data_same_entropy
示例9: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
# Set up for output tests
tree = TreeLearner()
cls.model = tree(cls.data)
cls.model.instances = cls.data
cls.signal_name = "Tree"
cls.signal_data = cls.model
# Set up for widget tests
titanic_data = Table('titanic')[::50]
cls.titanic = TreeLearner(max_depth=1)(titanic_data)
cls.titanic.instances = titanic_data
housing_data = Table('housing')[:10]
cls.housing = TreeLearner(max_depth=1)(housing_data)
cls.housing.instances = housing_data
示例10: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.signal_name = "Data"
cls.signal_data = cls.data
示例11: setUpClass
def setUpClass(cls):
super().setUpClass()
WidgetOutputsTestMixin.init(cls)
cls.signal_name = "Data"
cls.signal_data = cls.data # pylint: disable=no-member