Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Feret Jean-Baptiste
biodivMapR
Commits
42f474da
Commit
42f474da
authored
Jan 16, 2020
by
Jean-Baptiste Feret
Browse files
update Spectral
parent
a9d38180
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/Lib_MapSpectralSpecies.R
View file @
42f474da
...
...
@@ -65,7 +65,7 @@ map_spectral_species <- function(Input_Image_File,Output_Dir,PCA_Files,PCA_model
print
(
"Apply PCA to subset prior to k-Means"
)
# remove constant bands if needed
if
(
!
length
(
Spectral
$
BandsNoVar
)
==
0
)
{
Subset
$
DataSubset
<-
Subset
$
DataSubset
[,
-
Spectral
$
BandsNoVar
]
Subset
$
DataSubset
<-
Subset
$
DataSubset
[,
-
Spectral
Filter
$
BandsNoVar
]
}
if
(
TypePCA
==
"PCA"
|
TypePCA
==
"SPCA"
)
{
dataPCA
<-
t
(
t
(
PCA_model
$
eiV
[,
1
:
PCA_model
$
Nb_PCs
])
%*%
t
(
center_reduce
(
Subset
$
DataSubset
,
PCA_model
$
mu
,
PCA_model
$
scale
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment