Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainschmitt committed May 15, 2024
1 parent abae27f commit db80940
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/evaluate.axes.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ setMethod('evaluate.axes', "Algorithm.SDM", function(obj, cv, cv.param, final.fi
} else {
model.axes <- get_model(obj.axes, ...)
predicted.values <- predict(model.axes, obj.axes@data[,-which(names(obj.axes@data)=="train")])
c <- cor(predicted.values, o.predicted.values)
c <- cor(predicted.values, o.predicted.values)[1,1]
if (is.na(c) || !is.numeric(c)) {
c <- 0
}
obj@variable.importance[(i - 3)] <- 1 - c
}


}
}

Expand Down

0 comments on commit db80940

Please sign in to comment.