Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summaries

Evaluate solutions using summary statistics


Description

After generating a solution to a conservation planning problem(), it can be useful to evaluate how well it performs. These functions can be used to evaluate a solution according to various different summary statistics.

Details

The following functions can be used to summarize the performance of a solution to a conservation planning problem():

eval_n_summary()

Calculate the number of planning units selected within a solution.

eval_cost_summary()

Calculate the total cost of a solution.

eval_feature_representation_summary()

Calculate how well features are represented by a solution. This function can be used for all problems.

eval_target_coverage_summary()

Calculate how well feature representation targets are met by a solution. This function can only be used with problems contain targets.

eval_boundary_summary()

Calculate the exposed boundary length (perimeter) associated with a solution.

eval_connectivity_summary()

Calculate the connectivity held within a solution.

See Also

Examples

# load data
data(sim_pu_raster, sim_features)

# create a minimal problem
p <- problem(sim_pu_raster, sim_features) %>%
     add_min_set_objective() %>%
     add_relative_targets(0.1) %>%
     add_binary_decisions() %>%
     add_default_solver(verbose = FALSE)

## Not run: 
# solve problem
s <- solve(p)

# evaluate number of selected planning units in solution
eval_n_summary(p, s)

# evaluate solution cost
eval_cost_summary(p, s)

# evaluate feature representation by solution
eval_feature_representation_summary(p, s)

# evaluate target coverage by solution
eval_target_coverage_summary(p, s)


# evaluate exposed boundary (perimeter) length by solution
eval_boundary_summary(p, s)

# create a connectivity matrix to describe pair-wise connectivity
# values between combinations of planning units,
# see ?connectivity_matrix for more information

# for brevity, we will do this using the cost data
# cost valuers have high connectivity between them
cm <- connectivity_matrix(sim_pu_raster, sim_pu_raster)

# evaluate connectivity of solution
eval_connectivity_summary(p, s, data = cm)


## End(Not run)

prioritizr

Systematic Conservation Prioritization in R

v7.0.1
GPL-3
Authors
Jeffrey O Hanson [aut] (<https://orcid.org/0000-0002-4716-6134>), Richard Schuster [aut, cre] (<https://orcid.org/0000-0003-3191-7869>), Nina Morrell [aut], Matthew Strimas-Mackey [aut] (<https://orcid.org/0000-0001-8929-7776>), Matthew E Watts [aut], Peter Arcese [aut] (<https://orcid.org/0000-0002-8097-482X>), Joseph Bennett [aut] (<https://orcid.org/0000-0002-3901-9513>), Hugh P Possingham [aut] (<https://orcid.org/0000-0001-7755-996X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.