sup_class: Function for eigenanalysis and supervised classification

Description Usage Arguments Value

Description

This function allows to carry out an eigenanalysis of given webcam data and a supervised classification of DOYs with respect to seasons. Example code can be downloaded at http://bothmann.userweb.mwn.de/dissertation.html.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sup_class(folder_results = paste0(getwd(), "/"),
  folder_data = paste0(getwd(), "/"),
  name_of_analysis = substr(as.character(Sys.time()), 1, 10),
  lists_files = lists_files, do_eigenanalysis = TRUE,
  do_classification = TRUE, do_classification_newyear = FALSE,
  do_masking = FALSE, load_eigen = FALSE, show_eigen = FALSE,
  varimax_rotation = FALSE, sum1 = FALSE, norm_it = TRUE,
  norm_type = "mean0", colorspace = "rgb", total_var = TRUE,
  col_in = 1:3, colormode = "Color", filename_mask = NULL,
  pfad_eigen = NULL, fact = NULL, x = NULL, y = NULL, training_year,
  test_year, season_list, n_pc = 12, year, doy, complete_year = TRUE,
  n_images_try = 10, seasons_newyear, mask = NULL)

Arguments

folder_results

Folder where the results will be saved

folder_data

Folder where the data is saved

name_of_analysis

Name of the specific analysis for a unique folder

lists_files

Vector of file names of images

do_eigenanalysis

If TRUE (default), eigenanalysis is carried out

do_classification

If TRUE (default), supervised classification is carried out

do_classification_newyear

If TRUE, supervised classification of a new/test year is carried out, default is FALSE

do_masking

If TRUE, images are masked with a given ROI as first step is carried out, default is FALSE

load_eigen

If TRUE, results of eigenanalysis are loaded, default is FALSE

show_eigen

If TRUE, eigenimages are save, default is FALSE

varimax_rotation

If TRUE, principal components are rotated with varimax method, default is FALSE

sum1

If TRUE, images are normed to sum=1, default is FALSE

norm_it

If TRUE (default), images are normed before the analysis

norm_type

Type of norming

colorspace

Color space (rgb, hsv, etc.)

total_var

If TRUE (default), total variance is computed in eigenanalysis

col_in

Color channels to be read in, default 1:3 corresponds to red, blue and green

colormode

The color mode

filename_mask

File name of mask / ROI

pfad_eigen

Path of results of eigenanalysis to be loaded

fact

Weighting factor for sum and diff of mean and eigenimages, default is NULL and then quantiles of the scores are used as weights

x

vector of x-coordinates of analyzed pixels

y

vector of y-coordinates of analyzed pixels

training_year

The training year

test_year

The test year

season_list

List specifying the true seasons

n_pc

Number of principal components / eigenimages

year

Vector of year for each image

doy

Vector of DOYs for each image

complete_year

If TRUE (default), the complete year is analysed, else the first n_images_try are analyzed (only for testing)

n_images_try

See complete_year

seasons_newyear

Vector with true seasons of the test year

mask

Do not edit, mask is loaded, if needed

Value

An entire supervised classification analysis is carried out. All results are saved on the disc, the necessary folders are created.


phenofun documentation built on Jan. 22, 2017, 9:01 p.m.

Related to sup_class in phenofun...