@classmethod
def set_discretized(cls, val=False):
    """Sets the `discretized` flag.

        Parameters
        ----------
        val : bool
            Flag identifying whether the features are discretized or not.
            Default is False.

        Raises
        ------
        ValueError
            If `val` is not boolean type.

        """
    if not isinstance(val, bool):
        raise ValueError(
            "Attribute 'nfeatures' must be of <type 'bool'>, got %s" % str(
            type(val)))
    cls.discretized = val
