nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java
Method eval
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public void eval(INDArray labels, INDArray predictions, INDArray mask) {
Triple<INDArray,INDArray, INDArray> triple = BaseEvaluation.reshapeAndExtractNotMasked(labels, predictions, mask, axis);
if(triple == null){
File EvaluationCalibration.java
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
Method eval
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public void eval(INDArray labels, INDArray predictions, INDArray mask) {
Triple<INDArray,INDArray, INDArray> triple = BaseEvaluation.reshapeAndExtractNotMasked(labels, predictions, mask, axis);
if(triple == null){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getReliabilityDiagram
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public ReliabilityDiagram getReliabilityDiagram(int classIdx) {
Preconditions.checkState(rDiagBinPosCount != null, "Unable to get reliability diagram: no evaluation has been performed (no data)");
INDArray totalCountBins = rDiagBinTotalCount.getColumn(classIdx);
INDArray countPositiveBins = rDiagBinPosCount.getColumn(classIdx);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getReliabilityDiagram
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public ReliabilityDiagram getReliabilityDiagram(int classIdx) {
Preconditions.checkState(rDiagBinPosCount != null, "Unable to get reliability diagram: no evaluation has been performed (no data)");
INDArray totalCountBins = rDiagBinTotalCount.getColumn(classIdx);
INDArray countPositiveBins = rDiagBinPosCount.getColumn(classIdx);