summary.sits_area_accuracy: Summarize accuracy matrix for area data

View source: R/sits_summary.R

summary.sits_area_accuracyR Documentation

Summarize accuracy matrix for area data

Description

This is a generic function. Parameters depend on the specific type of input.

Usage

## S3 method for class 'sits_area_accuracy'
summary(object, ...)

Arguments

object

Object of classe "sits_accuracy".

...

Further specifications for summary.

Value

A summary of the sample accuracy

Author(s)

Gilberto Camara, gilberto.camara@inpe.br

Examples

if (sits_run_examples()) {
    # create a data cube from local files
    data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
    cube <- sits_cube(
        source = "BDC",
        collection = "MOD13Q1-6.1",
        data_dir = data_dir
    )
    # create a random forest model
    rfor_model <- sits_train(samples_modis_ndvi, sits_rfor())
    # classify a data cube
    probs_cube <- sits_classify(
        data = cube, ml_model = rfor_model, output_dir = tempdir()
    )
    # label the probability cube
    label_cube <- sits_label_classification(
        probs_cube,
        output_dir = tempdir()
    )
    # obtain the ground truth for accuracy assessment
    ground_truth <- system.file("extdata/samples/samples_sinop_crop.csv",
        package = "sits"
    )
    # make accuracy assessment
    as <- sits_accuracy(label_cube, validation = ground_truth)
    summary(as)
}


sits documentation built on Sept. 11, 2024, 6:36 p.m.