Skip to content

Error thrown when validation and training data are different classes. #73

Closed
@Silviculturalist

Description

I found that there's an error that arises from the invalid !all.equal that is thrown when the two input classes are of different class.

From the help on base::all.equal you can read:

"Do not use all.equal directly in if expressions—either use isTRUE(all.equal(....)) or identical if appropriate."

Is there any particular reason one should not be able to provide the function with for example training data in SpatialPolygonsDataFrame and validate with a SpatialPointsDataFrame?

if(!is.null(valData) && !all.equal(class(trainData), class(valData)))

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions