當前位置: 首頁>>代碼示例>>Java>>正文


Java BinominalMapping類代碼示例

本文整理匯總了Java中com.rapidminer.example.table.BinominalMapping的典型用法代碼示例。如果您正苦於以下問題:Java BinominalMapping類的具體用法?Java BinominalMapping怎麽用?Java BinominalMapping使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BinominalMapping類屬於com.rapidminer.example.table包,在下文中一共展示了BinominalMapping類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MappingTranslation

import com.rapidminer.example.table.BinominalMapping; //導入依賴的package包/類
public MappingTranslation(NominalMapping originalMapping) {
	this.originalMapping = originalMapping;
	if (originalMapping instanceof PolynominalMapping) {
		this.newMapping = new PolynominalMapping();
	} else {
		this.newMapping = new BinominalMapping();
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:9,代碼來源:RemoveUnusedNominalValuesModel.java

示例2: createBinominalValueAttribute

import com.rapidminer.example.table.BinominalMapping; //導入依賴的package包/類
private Attribute createBinominalValueAttribute(Attribute attribute, String value) {
	NominalMapping mapping = new BinominalMapping();
	mapping.mapString("false");
	mapping.mapString("true");
	// giving new attributes old name_value
	String newName = createAttributeName(attribute.getName(), value);
	Attribute newAttribute = new ViewAttribute(this, attribute, newName, Ontology.BINOMINAL, mapping);
	binominalAttributeValueMap.put(newAttribute, (double) attribute.getMapping().mapString(value));
	return newAttribute;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:11,代碼來源:NominalToBinominalModel.java

示例3: XMLSerialization

import com.rapidminer.example.table.BinominalMapping; //導入依賴的package包/類
private XMLSerialization(ClassLoader classLoader) {
	try {
		Class<?> xStreamClass = Class.forName("com.thoughtworks.xstream.XStream");
		Class generalDriverClass = Class.forName("com.thoughtworks.xstream.io.HierarchicalStreamDriver");
		Constructor constructor = xStreamClass.getConstructor(new Class[] { generalDriverClass });
		Class driverClass = Class.forName("com.thoughtworks.xstream.io.xml.XppDriver");
		xStream = (com.thoughtworks.xstream.XStream) constructor.newInstance(driverClass.newInstance());
		xStream.setMode(com.thoughtworks.xstream.XStream.ID_REFERENCES);

		// define default aliases here
		addAlias("IOContainer", IOContainer.class);
		addAlias("PolynominalAttribute", PolynominalAttribute.class);
		addAlias("BinominalAttribute", BinominalAttribute.class);
		addAlias("NumericalAttribute", NumericalAttribute.class);

		addAlias("PolynominalMapping", PolynominalMapping.class);
		addAlias("BinominalMapping", BinominalMapping.class);

		addAlias("NumericalStatistics", NumericalStatistics.class);
		addAlias("WeightedNumericalStatistics", WeightedNumericalStatistics.class);
		addAlias("NominalStatistics", NominalStatistics.class);
		addAlias("UnknownStatistics", UnknownStatistics.class);

		addAlias("SimpleAttributes", SimpleAttributes.class);
		addAlias("AttributeRole", AttributeRole.class);

		xStream.setClassLoader(classLoader);

		defineXMLAliasPairs();
	} catch (Throwable e) {
		// TODO: Why are we catching Throwables?
		// LogService.getRoot().log(Level.WARNING,
		// "Cannot initialize XML serialization. Probably the libraries 'xstream.jar' and 'xpp.jar' were not provided. XML serialization will not work!",
		// e);
		LogService.getRoot().log(
				Level.WARNING,
				I18N.getMessage(LogService.getRoot().getResourceBundle(),
						"com.rapidminer.tools.XMLSerialization.writing_initializing_xml_serialization_error", e), e);
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:41,代碼來源:XMLSerialization.java

示例4: XMLSerialization

import com.rapidminer.example.table.BinominalMapping; //導入依賴的package包/類
private XMLSerialization(ClassLoader classLoader) {
	try {
		Class<?> xStreamClass = Class.forName("com.thoughtworks.xstream.XStream");
		Class<?> generalDriverClass = Class.forName("com.thoughtworks.xstream.io.HierarchicalStreamDriver");
		Constructor<?> constructor = xStreamClass.getConstructor(generalDriverClass);
		Class<?> driverClass = Class.forName("com.thoughtworks.xstream.io.xml.XppDriver");
		xStream = (com.thoughtworks.xstream.XStream) constructor.newInstance(driverClass.newInstance());
		xStream.setMode(com.thoughtworks.xstream.XStream.ID_REFERENCES);

		// define default aliases here
		addAlias("IOContainer", IOContainer.class);
		addAlias("PolynominalAttribute", PolynominalAttribute.class);
		addAlias("BinominalAttribute", BinominalAttribute.class);
		addAlias("NumericalAttribute", NumericalAttribute.class);

		addAlias("PolynominalMapping", PolynominalMapping.class);
		addAlias("BinominalMapping", BinominalMapping.class);

		addAlias("NumericalStatistics", NumericalStatistics.class);
		addAlias("WeightedNumericalStatistics", WeightedNumericalStatistics.class);
		addAlias("NominalStatistics", NominalStatistics.class);
		addAlias("UnknownStatistics", UnknownStatistics.class);

		addAlias("SimpleAttributes", SimpleAttributes.class);
		addAlias("AttributeRole", AttributeRole.class);

		xStream.setClassLoader(classLoader);

		defineXMLAliasPairs();
	} catch (Throwable e) {
		// TODO: Why are we catching Throwables?
		LogService.getRoot().log(Level.WARNING, I18N.getMessage(LogService.getRoot().getResourceBundle(),
						"com.rapidminer.tools.XMLSerialization.writing_initializing_xml_serialization_error", e), e);
	}
}
 
開發者ID:rapidminer,項目名稱:rapidminer-studio,代碼行數:36,代碼來源:XMLSerialization.java

示例5: MappingTranslation

import com.rapidminer.example.table.BinominalMapping; //導入依賴的package包/類
public MappingTranslation(NominalMapping originalMapping) {
    this.originalMapping = originalMapping;
    if (originalMapping instanceof PolynominalMapping) {
        this.newMapping = new PolynominalMapping();
    } else {
        this.newMapping = new BinominalMapping();
    }
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:9,代碼來源:RemoveUnusedNominalValuesModel.java

示例6: XMLSerialization

import com.rapidminer.example.table.BinominalMapping; //導入依賴的package包/類
private XMLSerialization(ClassLoader classLoader) {
    try {
        Class<?> xStreamClass = Class.forName("com.thoughtworks.xstream.XStream");
        Class generalDriverClass = Class.forName("com.thoughtworks.xstream.io.HierarchicalStreamDriver");
        Constructor constructor = xStreamClass.getConstructor(new Class[] { generalDriverClass });
        Class driverClass = Class.forName("com.thoughtworks.xstream.io.xml.XppDriver");
        xStream = (com.thoughtworks.xstream.XStream)constructor.newInstance(driverClass.newInstance());
        xStream.setMode(com.thoughtworks.xstream.XStream.ID_REFERENCES);

        // define default aliases here
        addAlias("IOContainer", IOContainer.class);
        addAlias("PolynominalAttribute", PolynominalAttribute.class);
        addAlias("BinominalAttribute", BinominalAttribute.class);
        addAlias("NumericalAttribute", NumericalAttribute.class);

        addAlias("PolynominalMapping", PolynominalMapping.class);
        addAlias("BinominalMapping", BinominalMapping.class);

        addAlias("NumericalStatistics", NumericalStatistics.class);
        addAlias("WeightedNumericalStatistics", WeightedNumericalStatistics.class);
        addAlias("NominalStatistics", NominalStatistics.class);
        addAlias("UnknownStatistics", UnknownStatistics.class);

        addAlias("SimpleAttributes", SimpleAttributes.class);
        addAlias("AttributeRole", AttributeRole.class);

        xStream.setClassLoader(classLoader);


        defineXMLAliasPairs();
    } catch (Throwable e) {
        // TODO: Why are we catching Throwables?
        //LogService.getRoot().log(Level.WARNING, "Cannot initialize XML serialization. Probably the libraries 'xstream.jar' and 'xpp.jar' were not provided. XML serialization will not work!", e);
    	LogService.getRoot().log(Level.WARNING,
    			I18N.getMessage(LogService.getRoot().getResourceBundle(),
    					"com.rapidminer.tools.XMLSerialization.writing_initializing_xml_serialization_error", 
    					e),
    					e);
    }
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:41,代碼來源:XMLSerialization.java


注:本文中的com.rapidminer.example.table.BinominalMapping類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。