WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

brt tutorial - pca #3

@eeholmes

Description

@eeholmes

describing the spectral shape with pca

Pre-process spectra

  • Optionally log-transform: log10(Rrs) (helps a lot with dynamic range)
  • Remove any very noisy bands if needed (e.g., extremes of the spectrum)
  • Standardize across samples per band (this is useful before PCA):

For each wavelength: subtract mean, divide by std

  • PCA cares about covariance structure; this is standard practice
  • Compute PCA on the 128 bands
  • Use a big set of spectra across your training region(s)

Get:

  • Loadings: PCᵢ(λ) → “basis spectral shapes”
  • Scores: for each sample, how much of each PC it has
  • Choose K PCs

e.g. enough to explain 95–99% of variance, or just fix K=5–10 for teaching

So now instead of 128 bands, each spectrum becomes: PC1_score, PC2_score, …, PCK_score

  • Use PC scores as predictors in your BRT or
  • Generate ratios among PCs (or between PCs and a reference band).

So your model sees:

“Here is the overall brightness, here is the blue–green tilt, here is the curvature, plus SST and location; please predict CHL / bbp700.”

You never gave it a blue/green ratio explicitly—just the PCs, which encode those combinations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions