forpca Module


Uses

    • foreig
    • kinds
  • module~~forpca~~UsesGraph module~forpca forpca foreig foreig module~forpca->foreig kinds kinds module~forpca->kinds

Used by

  • module~~forpca~~UsedByGraph module~forpca forpca program~benchmark benchmark program~benchmark->module~forpca program~test1 test1 program~test1->module~forpca

Derived Types

type, public ::  tpca

Components

Type Visibility Attributes Name Initial
integer, public :: ncol
integer, public :: nrow
integer, public :: npc
character(len=:), public, allocatable :: method
real(kind=rk), public, dimension(:,:), allocatable :: matrix
real(kind=rk), public, dimension(:,:), allocatable :: coeff
real(kind=rk), public, dimension(:,:), allocatable :: score
real(kind=rk), public, dimension(:,:), allocatable :: matrix_app
real(kind=rk), public, dimension(:,:), allocatable :: mean_data
real(kind=rk), public, dimension(:), allocatable :: latent
real(kind=rk), public, dimension(:), allocatable :: explained_variance

Type-Bound Procedures

procedure, public :: initialize
procedure, public :: compute_coeff
procedure, public :: compute_score
procedure, public :: reconstruct_data
procedure, public :: cmp_explained_variance
procedure, public :: pca
procedure, public :: finalize => deallocate_tpca

Subroutines

private impure subroutine initialize(this, matrix, npc, method)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this
real(kind=rk), intent(in), dimension(:,:) :: matrix
integer, intent(in), optional :: npc
character(len=*), intent(in), optional :: method

private impure subroutine compute_coeff(this)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this

private impure subroutine compute_score(this)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this

private impure subroutine reconstruct_data(this)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this

private impure subroutine cmp_explained_variance(this)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this

private impure subroutine pca(this, matrix, npc, method, coeff, score, latent, explained, matrix_app)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this
real(kind=rk), intent(in), dimension(:,:) :: matrix
integer, intent(in), optional :: npc
character(len=*), intent(in), optional :: method
real(kind=rk), intent(out), dimension(:,:), allocatable :: coeff
real(kind=rk), intent(out), optional, dimension(:,:), allocatable :: score
real(kind=rk), intent(out), optional, dimension(:), allocatable :: latent
real(kind=rk), intent(out), optional, dimension(:), allocatable :: explained
real(kind=rk), intent(out), optional, dimension(:,:), allocatable :: matrix_app

private pure elemental subroutine deallocate_tpca(this)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this