predict: Predict function for Naive Bayes Spatial Model

Description Usage Arguments Author(s) Examples

Description

This function allows to calculate the classification of each cell in the GRID, based on the score function of the naive Bayes model. See score function.

Usage

1
predict(object, apr_inc, ...)

Arguments

object

A SpNaBaModel object from NBModel function.

apr_inc

logical. If TRUE the apriori score is included for prediction calculation.

...

pass to other methods.

Author(s)

Enrique Del Callejo-Canal (edelcallejoc@gmail.com).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(sp)
library(rgeos)
data(Mex0)
data(mammals)

# Generating de grid from Mex0 data
Mex0.grd<-grd_build(Mex0)

# Identification points of mammals with colnames = NULL.
x.mat<-id_pts(grd = Mex0.grd, pts = mammals)

x.model <- NBModel(x.mat, target = 1:10, fac.lap = 0.01)

x.prediction <- predict(x.model, apr_inc = FALSE)

edelcallejoc/rspecies documentation built on May 27, 2019, 7:25 a.m.