edu.udo.cs.miningmart.compiler.utils
Class PivotizeWithoutAggregation
java.lang.Object
edu.udo.cs.miningmart.compiler.utils.AttributeCreationTool
edu.udo.cs.miningmart.compiler.utils.PivotizeWithoutAggregation
- public class PivotizeWithoutAggregation
- extends AttributeCreationTool
A tool similar to Binarify
. It creates a Step that uses
the GenericFeatureConstruction operator to pivotize one attribute. Pivotizing
means that for each value that occurs in the column of an "index" attribute, a new
attribute is created. This new attribute contains the value of the pivotized
attribute iff the index attribute took the value that corresponds to the new
attribute. Otherwise the new attribute contains NULL
.
Example (I = index attribute, P = pivotised attribute)
Input Output
ID | I | P ID | P_M | P_F
---------- --------------
1 | M | 4 => 1 | 4 | NULL
2 | M | 2 2 | 2 | NULL
3 | F | 6 3 | NULL| 6
- Version:
- $Id: PivotizeWithoutAggregation.java,v 1.3 2006/04/11 14:10:18 euler Exp $
- Author:
- Timm Euler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PivotizeWithoutAggregation
public PivotizeWithoutAggregation(Concept inputConcept,
BaseAttribute indexBA,
BaseAttribute pivotBA,
Chain chain)
throws M4Exception
- Constructor. We expect the input concept, the index attribute,
the attribute to be pivotised and the chain to which the new step
will belong.
- Parameters:
inputConcept
- The Input Concept for the Step to be created.indexBA
- The index attributepivotBA
- The attribute to be pivotisedchain
- The Chain to which to add the new Step
insertSpecificParameters
protected void insertSpecificParameters(int loopNr,
int parNr,
java.lang.String targetValS)
throws M4Exception
- Description copied from class:
AttributeCreationTool
- Create specific parameters for the new Step for the given loop number, starting
with the given parameter number.
- Specified by:
insertSpecificParameters
in class AttributeCreationTool
- Parameters:
loopNr
- The loop number for which the specific parameters must be createdparNr
- The first parameter number to be used; increment it for each additional parametertargetValS
- The value of the index attribute for the given loop
- Throws:
M4Exception
- See Also:
miningmart.compiler.utils.AttributeCreationTool#insertSpecificParameters(int, int, String)
getIdOfOperator
protected int getIdOfOperator()
- Specified by:
getIdOfOperator
in class AttributeCreationTool
- Returns:
- the M4 Id of the operator that the new step uses
- See Also:
miningmart.compiler.utils.AttributeCreationTool#getIdOfOperator()
getNameOfOperator
protected java.lang.String getNameOfOperator()
- Specified by:
getNameOfOperator
in class AttributeCreationTool
- Returns:
- the Name of the operator that the new step uses
- See Also:
miningmart.compiler.utils.AttributeCreationTool#getNameOfOperator()
getNameOfNewStep
protected java.lang.String getNameOfNewStep()
- Specified by:
getNameOfNewStep
in class AttributeCreationTool
- Returns:
- the name for the new Step; the Step number will be put before it
- See Also:
miningmart.compiler.utils.AttributeCreationTool#getNameOfNewStep()
getConceptualDatatypeNameOfNewAttributes
protected java.lang.String getConceptualDatatypeNameOfNewAttributes()
throws M4Exception
- Specified by:
getConceptualDatatypeNameOfNewAttributes
in class AttributeCreationTool
- Returns:
- the name of the conceptual datatype that the new attributes will be given
- Throws:
M4Exception
- See Also:
miningmart.compiler.utils.AttributeCreationTool#getConceptualDatatypeNameOfNewAttributes()
Copyright © 2001-2005