public class DrawDiagnosticsChart extends CompositeOperator
This operator takes the output of one or multiple predictors and uses the confidence values produced by these predictors along with the actual target values ("true class") to produce diagnostic charts.
Supported chart types are ROC, Gains and Lift:
This operator accepts an arbitrary number of input ports. The first port is always mandatory, the other ports may be optional, dependent on the constructor settings used.
Note: This operator is not parallelizable. In cluster mode, it will execute on a single node.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INPUT_PORT_COUNT
The default number of input ports
|
Constructor and Description |
---|
DrawDiagnosticsChart()
Creates an operator with a default number of (optional) input ports.
|
DrawDiagnosticsChart(int inputPortsCount)
Creates an operator with the given number of mandatory input ports.
|
DrawDiagnosticsChart(int inputPortsCount,
boolean optional)
Creates an operator with the given number of input ports.
|
Modifier and Type | Method and Description |
---|---|
protected void |
compose(CompositionContext context)
Compose the body of this operator.
|
List<String> |
getChartNames()
Returns the predictor names for each input port
to be displayed as the chart legend (null entries
for disconnected input ports).
|
ChartType |
getChartType()
Returns the desired chart type (ROC, Gains, Lift).
|
List<String> |
getConfidenceFieldNames()
Returns the confidence field names for each input port
(null entries for disconnected ports).
|
RecordPort |
getInput(int idx)
Returns the input port for the given index.
|
boolean |
getInputPortsOptional()
Returns whether the input ports with index > 0 are optional.
|
RecordPort |
getOutput()
Returns the output port.
|
String |
getOutputPath()
Returns the path of the .png output file (null
means no output file will be generated).
|
int |
getPortCount()
Returns the number of input ports.
|
int |
getResultSize()
Returns the number of results.
|
List<String> |
getTargetFieldNames()
Returns the actual target field names for all input ports (null entries
for disconnected ports).
|
String |
getTargetValue()
Returns the target value ("true class")
|
void |
setChartNames(List<String> chartNames)
Sets the predictor names for each input port
to be displayed as the chart legend (null entries
for disconnected input ports).
|
void |
setChartType(ChartType chartType)
Sets the desired chart type (ROC, Gains, Lift).
|
void |
setConfidenceFieldNames(List<String> confidenceFieldNames)
Sets the confidence field names for each input port
(null entries for disconnected ports).
|
void |
setOutputPath(String outputPath)
Sets the path of the .png output file (null
means no output file will be generated).
|
void |
setResultSize(int resultSize)
Sets the number of results.
|
void |
setTargetFieldNames(List<String> targetFieldNames)
Sets the actual target field names for all input ports (null entries
for disconnected ports).
|
void |
setTargetValue(String targetValue)
Sets the target value ("true class")
|
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
public static final int DEFAULT_INPUT_PORT_COUNT
public DrawDiagnosticsChart()
public DrawDiagnosticsChart(int inputPortsCount)
inputPortsCount
- The number of input ports.public DrawDiagnosticsChart(int inputPortsCount, boolean optional)
inputPortsCount
- The number of input ports.optional
- If true, all input ports except for the first will be optional.public RecordPort getInput(int idx) throws IndexOutOfBoundsException
idx
- The index of the input port. It must be within the configured range.IndexOutOfBoundsException
- if the index is outside the configured range.public RecordPort getOutput()
public int getPortCount()
public boolean getInputPortsOptional()
public List<String> getTargetFieldNames()
public void setTargetFieldNames(List<String> targetFieldNames)
targetFieldNames
- the target field namespublic String getTargetValue()
public void setTargetValue(String targetValue)
targetValue
- the target valuepublic List<String> getConfidenceFieldNames()
public void setConfidenceFieldNames(List<String> confidenceFieldNames)
confidenceFieldNames
- the confidence field namespublic int getResultSize()
public void setResultSize(int resultSize)
resultSize
- the number of resultspublic ChartType getChartType()
public void setChartType(ChartType chartType)
chartType
- the desired chart typepublic List<String> getChartNames()
public void setChartNames(List<String> chartNames)
chartNames
- the predictor/chart namespublic String getOutputPath()
public void setOutputPath(String outputPath)
outputPath
- the output pathprotected void compose(CompositionContext context)
CompositeOperator
OperatorComposable.add(O)
OperatorComposable.connect(P, P)
. This includes
connections from the composite's input ports to sub-operators, connections between sub-operators, and
connections from sub-operators output ports to the composite's output portscompose
in class CompositeOperator
context
- the contextCopyright © 2016 Actian Corporation. All rights reserved.