PseudoAbsences
PseudoAbsences.backgroundpoints — Methodbackgroundpoints(layer::T, n::Int; kwargs...) where {T <: SimpleSDMLayer}Generates background points based on a layer that gives the weight of each cell in the final sample. The additional keywords arguments are passed to StatsBase.sample, which is used internally. This includes the replace keyword to determine whether sampling should use replacement.
PseudoAbsences.pseudoabsencemask — Methodpseudoabsencemask( ::Type{DistanceToEvent}, presences::SDMLayer{Bool}; f = minimum, )Generates a mask for pseudo-absences using the distance to event method. Candidate cells are weighted according to their distance to a known observation, with far away places being more likely. Depending on the distribution of distances, it may be a very good idea to flatten this layer using log or an exponent. The f function is used to determine which distance is reported (minimum by default, but can be any other relevant function).
PseudoAbsences.pseudoabsencemask — Methodpseudoabsencemask(::Type{RandomSelection}, presences::SDMLayer{Bool})Generates a mask for pseudo-absences using the random selection method. Candidate cells for the pseudo-absence mask are (i) within the bounding box of the layer (use SurfaceRangeEnvelope to use the presences bounding box), and (ii) valued in the layer.
PseudoAbsences.pseudoabsencemask — Methodpseudoabsencemask(::Type{SurfaceRangeEnvelope}, presences::SDMLayer{Bool})Generates a mask from which pseudo-absences can be drawn, by picking cells that are (i) within the bounding box of occurrences, (ii) valued in the layer, and (iii) not already occupied by an occurrence
PseudoAbsences.pseudoabsencemask — Methodpseudoabsencemask(::Type{WithinRadius}, presences::SDMLayer{Bool}; distance::Number = 100.0, )Generates a mask for pseudo-absences where pseudo-absences can be within a distance (in kilometers) of the original observation. Internally, this uses DistanceToEvent.
PseudoAbsences.DistanceToEvent — TypeDistanceToEventGenerates a weight for the pseudo-absences based on the distance to cells with a true value. The distances are always measured in km using the haversine formula.
PseudoAbsences.PseudoAbsenceGenerator — TypePseudoAbsenceGeneratorAbstract type to which all of the pseudo-absences generator types belong. Note that the pseudo-absence types are singleton types, and the arguments are passed when generating the pseudo-absence mask.
PseudoAbsences.RandomSelection — TypeRandomSelectionGenerates pseudo-absences at random within the layer. The full extent is considered, and cells with a true value cannot be part of the background sample.
PseudoAbsences.SurfaceRangeEnvelope — TypeSurfaceRangeEnvelopeGenerates pseudo-absences at random within the geographic range covered by actual occurrences. Cells with presences cannot be part of the background sample.
PseudoAbsences.WithinRadius — TypeWithinRadiusGenerates pseudo-absences within a set radius (in kilometers) around each occurrence. Internally, this relies on DistanceToEvent.