Did I find the right examples for you? yes no

All Samples(16)  |  Call(14)  |  Derive(0)  |  Import(2)

src/o/r/orange3-HEAD/Orange/widgets/visualize/owheatmap.py   orange3(Download)
 
            disc = feature.discretization.EqualWidth(n=self.n_discretization_intervals)
            self.disc_dataset = discretization.DiscretizeTable(self.dataset, method=disc)
            self.contingencies = self.computeContingencies(self.disc_dataset)
 
 
        disc = feature.discretization.EqualWidth(n=n_discretization_intervals)
        disc_subdataset = discretization.DiscretizeTable(subdataset, method=disc,
                                                         fixed=( {dataset.domain.attributes[self.X_attributes_select].name: (X_min, X_max),
                                                                  dataset.domain.attributes[self.Y_attributes_select].name: (Y_min, Y_max)} ))

src/o/r/Orange-2.7.2/docs/reference/rst/code/discretization-table.py   Orange(Download)
import Orange
iris = Orange.data.Table("iris.tab")
disc_iris = Orange.data.discretization.DiscretizeTable(iris,
    method=Orange.feature.discretization.EqualFreq(n=3))
 

src/o/r/Orange-2.7.2/docs/reference/rst/code/discretization-entropy.py   Orange(Download)
import Orange
 
data = Orange.data.Table(Orange.data.Table("heart_disease.tab")[:100])
d_data = Orange.data.discretization.DiscretizeTable(data,
    method=Orange.feature.discretization.Entropy(forced=False))

src/o/r/orange3-HEAD/Orange/widgets/visualize/owmosaic.py   orange3(Download)
from Orange.classification import Fitter
from Orange.data import Table, Variable, filter
from Orange.data.discretization import DiscretizeTable
from Orange.data.sql.table import SqlTable
from Orange.feature.discretization import EqualWidth
        # diskretiziraj - prej se je to naredilo v optimizationDlg.setData()
        disc = EqualWidth()
        self.data = DiscretizeTable(data, method=disc)
        self.data.name = data.name  # v DiscretizeTable se izgubi name
 

src/o/r/orange3-HEAD/doc/modules/code/discretization-table.py   orange3(Download)
import Orange
iris = Orange.data.Table("iris.tab")
disc_iris = Orange.data.discretization.DiscretizeTable(iris,
    method=Orange.feature.discretization.EqualFreq(n=3))
 

src/o/r/Orange-2.7.2/docs/reference/rst/code/discretization-table-method.py   Orange(Download)
import Orange
iris = Orange.data.Table("iris.tab")
disc = Orange.data.discretization.DiscretizeTable()
disc.method = Orange.feature.discretization.EqualFreq(numberOfIntervals=2)
disc_iris = disc(iris)

src/o/r/orange3-HEAD/doc/modules/code/discretization-table-method.py   orange3(Download)
import Orange
iris = Orange.data.Table("iris.tab")
disc = Orange.data.discretization.DiscretizeTable()
disc.method = Orange.feature.discretization.EqualFreq(n=2)
disc_iris = disc(iris)

src/o/r/Orange-2.7.2/Orange/testing/unit/tests/test_discretization.py   Orange(Download)
 
import Orange
from Orange.data.discretization import DiscretizeTable
from Orange.feature.discretization import EqualFreq, EqualWidth, Entropy
 
 
class TestDataDiscretization(unittest.TestCase):
    def test_data_discretization(self):
        iris = Orange.data.Table("iris")
        disc_iris = DiscretizeTable(iris, method=EqualFreq(n=3))
        )
 
        disc_iris = DiscretizeTable(iris_no_class, method=EqualFreq(n=3),
                                    discretize_class=True)
 
 
        housing = Orange.data.Table(Orange.data.Table("housing.tab"))
        disc_housing = DiscretizeTable(housing, method=EqualWidth(n=3),
                                       discretize_class=True)
 
        self.assertTrue(all(len(feature.values) == 3
                            for feature in disc_housing.domain.variables))
 
        heart = Orange.data.Table("heart_disease.tab")
        heart_disc = DiscretizeTable(heart, method=Entropy(), clean=True)