if (attribute.type() == Attribute.STRING) { throw new UnsupportedAttributeTypeException("BayesNet does not handle string variables, only nominal and continuous."); } if (attribute.type() == Attribute.DATE) { throw new UnsupportedAttributeTypeException("BayesNet does not handle date variables, only nominal and continuous."); }
	Instances normalizeDataSet(Instances instances) throws Exception {		m_DiscretizeFilter = null;		m_MissingValuesFilter = null;		boolean bHasNonNominal = false;		boolean bHasMissingValues = false;		Enumeration enu = instances.enumerateAttributes();				while (enu.hasMoreElements()) {			Attribute attribute = (Attribute) enu.nextElement();			if (attribute.type() == Attribute.STRING) {				throw new UnsupportedAttributeTypeException("BayesNet does not handle string variables, only nominal and continuous.");			}			if (attribute.type() == Attribute.DATE) {				throw new UnsupportedAttributeTypeException("BayesNet does not handle date variables, only nominal and continuous.");			}					if (attribute.type() != Attribute.NOMINAL) {				m_nNonDiscreteAttribute = attribute.index();				bHasNonNominal = true;				//throw new UnsupportedAttributeTypeException("BayesNet handles nominal variables only. Non-nominal variable in dataset detected.");			}			Enumeration enum2 = instances.enumerateInstances();			while (enum2.hasMoreElements()) {				if (((Instance) enum2.nextElement()).isMissing(attribute)) {					bHasMissingValues = true;					// throw new NoSupportForMissingValuesException("BayesNet: no missing values, please.");				}			}		}		        		if (bHasNonNominal) {			System.err.println("Warning: discretizing data set");			m_DiscretizeFilter = new Discretize();			m_DiscretizeFilter.setInputFormat(instances);			instances = m_DiscretizeFilter.useFilter(instances, m_DiscretizeFilter);		}		if (bHasMissingValues) {			System.err.println("Warning: filling in missing values in data set");			m_MissingValuesFilter = new ReplaceMissingValues();			m_MissingValuesFilter.setInputFormat(instances);			instances = m_MissingValuesFilter.useFilter(instances, m_MissingValuesFilter);		}		return instances;	} // normalizeDataSet