hist.probs_cube: histogram of prob cubes

View source: R/sits_histogram.R

hist.probs_cubeR Documentation

histogram of prob cubes

Description

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

Usage

## S3 method for class 'probs_cube'
hist(x, ..., tile = x[["tile"]][[1]], label = NULL, size = 1e+05)

Arguments

x

Object of classes "raster_cube".

...

Further specifications for summary.

tile

Tile to be shown

label

Label to be shown

size

Number of cells to be sampled

Value

A histogram of one label of a probability cube.

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")
    modis_cube <- sits_cube(
        source = "BDC",
        collection = "MOD13Q1-6.1",
        data_dir = data_dir
    )
    rfor_model <- sits_train(samples_modis_ndvi, sits_rfor())
    probs_cube <- sits_classify(
        data = modis_cube,
        ml_model = rfor_model,
        output_dir = tempdir()
    )
    hist(probs_cube, label = "Forest")
}


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