EnglishFrenchSpanish

OnWorks favicon

r.covargrass - Online in the Cloud

Run r.covargrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command r.covargrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


r.covar - Outputs a covariance/correlation matrix for user-specified raster map layer(s).

KEYWORDS


raster, statistics

SYNOPSIS


r.covar
r.covar --help
r.covar [-r] map=name[,name,...] [--help] [--verbose] [--quiet] [--ui]

Flags:
-r
Print correlation matrix

--help
Print usage summary

--verbose
Verbose module output

--quiet
Quiet module output

--ui
Force launching GUI dialog

Parameters:
map=name[,name,...] [required]
Name of raster map(s)

DESCRIPTION


r.covar outputs a covariance/correlation matrix for user-specified raster map layer(s).
The output can be printed, or saved by redirecting output into a file.

The output is an N x N symmetric covariance (correlation) matrix, where N is the number of
raster map layers specified on the command line.

NOTES


This module can be used as the first step of a principle components transformation. The
covariance matrix would be input into a system which determines eigen values and eigen
vectors. An NxN covariance matrix would result in N real eigen values and N eigen vectors
(each composed of N real numbers).

The module m.eigensystem in GRASS GIS Addons can be compiled and used to generate the
eigen values and vectors.

EXAMPLE


For example,
g.region raster=layer.1 -p
r.covar -r map=layer.1,layer.2,layer.3
would produce a 3x3 matrix (values are example only):
1.000000 0.914922 0.889581
0.914922 1.000000 0.939452
0.889581 0.939452 1.000000
In the above example, the eigen values and corresponding eigen vectors for the covariance
matrix are:
component eigen value eigen vector
1 1159.745202 <0.691002 0.720528 0.480511>
2 5.970541 <0.711939 -0.635820 -0.070394>
3 146.503197 <0.226584 0.347470 -0.846873>
The component corresponding to each vector can be produced using r.mapcalc as follows:
r.mapcalc "pc.1 = 0.691002*layer.1 + 0.720528*layer.2 + 0.480511*layer.3"
r.mapcalc "pc.2 = 0.711939*layer.1 - 0.635820*layer.2 - 0.070394*layer.3"
r.mapcalc "pc.3 = 0.226584*layer.1 + 0.347470*layer.2 - 0.846873*layer.3"
Note that based on the relative sizes of the eigen values, pc.1 will contain about 88% of
the variance in the data set, pc.2 will contain about 1% of the variance in the data set,
and pc.3 will contain about 11% of the variance in the data set. Also, note that the
range of values produced in pc.1, pc.2, and pc.3 will not (in general) be the same as
those for layer.1, layer.2, and layer.3. It may be necessary to rescale pc.1, pc.2 and
pc.3 to the desired range (e.g. 0-255). This can be done with r.rescale.

Use r.covargrass online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Phaser
    Phaser
    Phaser is a fast, free, and fun open
    source HTML5 game framework that offers
    WebGL and Canvas rendering across
    desktop and mobile web browsers. Games
    can be co...
    Download Phaser
  • 2
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 3
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 4
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 5
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 6
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • More »

Linux commands

Ad