Package gov.nih.mipav.model.algorithms
Class NonnegativeMatrixFactorization
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.NonnegativeMatrixFactorization
-
public class NonnegativeMatrixFactorization extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
NonnegativeMatrixFactorization.accur
(package private) class
NonnegativeMatrixFactorization.hyperparams
private class
NonnegativeMatrixFactorization.indexRowComparator
private class
NonnegativeMatrixFactorization.indexRowItem
class
NonnegativeMatrixFactorization.indexValueAscendingComparator
private class
NonnegativeMatrixFactorization.indexValueComparator
class
NonnegativeMatrixFactorization.indexValueDescendingComparator
(package private) class
NonnegativeMatrixFactorization.indexValueItem
(package private) class
NonnegativeMatrixFactorization.info
(package private) class
NonnegativeMatrixFactorization.opt
(package private) class
NonnegativeMatrixFactorization.stop_opt
-
Field Summary
Fields Modifier and Type Field Description static int
ACC_ONLINE_MU_NMF
static int
ADMM_NMF
static int
ADMM_SEQ_CONV_NMF
private java.lang.String
alg
static int
ALS_NMF
static int
ALTERNATING_ONMF
static int
ANLS_NMF
private boolean
ard
static int
ASAG_MU_NMF
private double
d_beta
static int
DIV_ADMM_NMF
static int
DIV_MU_NMF
static int
DIV_MU_PARTIAL_NMF
static int
DTPP_NMF
private double
epsilon
static int
FRO_MU_NMF
static int
FRO_MU_PARTIAL_NMF
private int
functionType
private Jama.Matrix
H
static int
HALS_SO_NMF
static int
INCREMENTAL_MU_NMF
private java.lang.String
init_alg
private int[]
K
static int
KL_BMD_NMF
static int
KL_FPA_NMF
private double
L1a
private double
L1s
(package private) java.lang.String
metric_type
static int
MINVOL_NMF
private int
model
static int
NENMF
private int
norm_h
private int
norm_w
private int
num_col
static int
ONLINE_MU_NMF
private boolean
orth_h
static int
ORTH_MU_NMF
private boolean
orth_w
private Jama.Matrix
P
static int
PALM_SPARSE_SMOOTH_NMF
private boolean
permute_on
static int
PGD_NMF
static int
PROB_NMF
static int
PROJ_SPARSE_NMF
static int
PROJECTIVE_NMF
private Jama.Matrix
R
private int
rank
static int
RANK2NMF
static int
RECURSIVE_NMU
private java.lang.String
rep_mode
private boolean
robust
static int
ROBUST_MU_NMF
static int
ROBUST_ONLINE_MU_NMF
private Jama.Matrix
S
static int
SAGMU_NMF
static int
SC_NMF
static int
SEMI_BCD_NMF
static int
SEMI_MU_NMF
static int
SEP_SYMM_NMTF
static int
SMU_NMF
static int
SNPA
static int
SPA
static int
SPARSE_MU_V_NMF
static int
SPARSE_NMF
static int
SPG_NMF
static int
SRGMU_NMF
(package private) SVD
svd
static int
SVRMU_NMF
static int
SYMM_ANLS
static int
SYMM_HALSACC
static int
SYMM_NEWTON
private int
t
private java.lang.String
type
private Jama.Matrix
U
private Jama.Matrix
V
static int
VB_PRO_NMF
private Jama.Matrix
W
private java.lang.String
W_sub_mode
private double[][][]
W3D
static int
WLRA
-
Constructor Summary
Constructors Constructor Description NonnegativeMatrixFactorization()
NonnegativeMatrixFactorization(int functionType, Jama.Matrix V, int rank, Jama.Matrix W, Jama.Matrix H, java.lang.String alg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acc_online_mu_nmf()
void
admm_nmf()
void
admm_seq_conv_nmf()
void
adp_step_pgd_stop_func(int[] stop_flag, java.lang.String[] reason, NonnegativeMatrixFactorization.opt options, NonnegativeMatrixFactorization.stop_opt stop_options)
void
als_nmf()
void
alternating_onmf()
void
anls_nmf()
void
asag_mu_nmf()
int[]
bestMap(int[] L1, int[] L2)
double
calc_entropy(int[] assignment)
Jama.Matrix
calc_nls_nmf(Jama.Matrix X, Jama.Matrix W, double lambda)
double
calc_nmi(int[] groundtruthAssignment, int[] algorithmAssignment)
double
calc_purity(int[] groundtruthAssignment, int[] algorithmAssignment)
int
change_inner_max_epoch(Jama.Matrix X, Jama.Matrix W, NonnegativeMatrixFactorization.opt options)
void
check_divergence(NonnegativeMatrixFactorization.opt options)
double[]
check_momentum_setting(double[] betamax, NonnegativeMatrixFactorization.opt options)
void
check_stop_condition(int[] stop_flag, java.lang.String[] reason, boolean[] max_reached_flag, NonnegativeMatrixFactorization.info rev_info, int epoch, NonnegativeMatrixFactorization.info infos, NonnegativeMatrixFactorization.opt options, NonnegativeMatrixFactorization.stop_opt stop_options)
void
compute_f(double[] f, double[] p, double[] r, int[] T, int[] H)
void
copyInfo(NonnegativeMatrixFactorization.info srcInfo, NonnegativeMatrixFactorization.info destInfo)
int[]
count_occurrence(int[] list)
void
display_info(java.lang.String method_name, int epoch, NonnegativeMatrixFactorization.info nmf_info, NonnegativeMatrixFactorization.opt options)
void
display_stop_reason(NonnegativeMatrixFactorization.opt options, java.lang.String disp_name, java.lang.String reason, boolean max_reached_flag)
void
div_admm_nmf()
void
div_mu_partial_nmf()
void
do_momentum_h(Jama.Matrix H_tmp1, Jama.Matrix H_tmp2, Jama.Matrix H, Jama.Matrix H_prev, double[] beta, int epoch, NonnegativeMatrixFactorization.opt options)
void
do_momentum_w(Jama.Matrix W_tmp1, Jama.Matrix W, Jama.Matrix W_prev, Jama.Matrix H, Jama.Matrix H_prev, Jama.Matrix H_tmp1, double[] beta, int epoch, NonnegativeMatrixFactorization.opt options)
void
dtpp_nmf()
NonnegativeMatrixFactorization.accur
eval_clustering_accuracy(Jama.Matrix H, int[] gnd, int classnum, int eval_num)
double
exp_square_diff(Jama.Matrix V, Jama.Matrix exp_U, Jama.Matrix exp_V, Jama.Matrix var_U, Jama.Matrix var_V)
double
exponential_draw(double lambdax)
Jama.Matrix
fastgradsparseNNLS(Jama.Matrix XHt, Jama.Matrix HHt, Jama.Matrix Wsrc, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
FGMqpnonneg(java.util.Vector<java.lang.Double> e, Jama.Matrix A, Jama.Matrix C, Jama.Matrix W0, int maxiter, int proj)
void
fro_mu_nmf()
void
fro_mu_partial_nmf()
double
g_lambda(double L, double mu)
double
gamma_beta(double beta)
double[]
gamma_expectation(double[] alpha, double[] beta)
double
gamma_expectation(double alpha, double beta)
double
gamma_expectation_log(double alpha, double beta)
NonnegativeMatrixFactorization.opt
get_nmf_default_options()
double
GetStopCriterion(int stop_rule, Jama.Matrix X, Jama.Matrix gradX)
void
hals_so_nmf()
Jama.Matrix
HALSupdt(Jama.Matrix Vorig, Jama.Matrix UtU, Jama.Matrix UtM, double alpha, double delta, NonnegativeMatrixFactorization.opt in_options)
Jama.Matrix
hessian_blkdiag(Jama.Matrix temp, Jama.Matrix H, int idx, boolean[][] projnorm_idx)
void
hmflip(int[][] A, int[] C, int[] LC, int[] LR, int[][] U, int l, int r)
void
hminiass(int[][] A, int[] C, int[][] U)
int[][]
hminired(int[][] A)
void
hmreduce(int[][] A, int[] CH, int[] RH, int[] LC, int[] LR, java.util.Vector<java.lang.Integer> SLC, java.util.Vector<java.lang.Integer> SLR)
void
hungarian(int[] C, int[] T, int[][] A)
void
incremental_mu_nmf()
void
kl_bmd_nmf()
void
kl_fpa_nmf()
void
litekmeans(int[][] label, Jama.Matrix center, boolean[] bCon, double[] sumD, Jama.Matrix D, Jama.Matrix X, int k, java.lang.String Distance, Jama.Matrix startMatrix, int[] startVector, java.lang.String Start, int maxit, int reps, int clustermaxit)
double
log2(double x)
void
minvol_nmf()
double
MutualInfo(int[] L1, int[] L2)
double[]
neg(double[] A)
void
nenmf()
Jama.Matrix
nesterov_mnls(int[] iter, double[] alpha, Jama.Matrix X, Jama.Matrix B, Jama.Matrix A_star, int max_iter, java.lang.String func_type)
double
nmf_cost(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, Jama.Matrix R, NonnegativeMatrixFactorization.opt options)
void
NNDSVD(Jama.Matrix W, Jama.Matrix H, Jama.Matrix A, int k, int flag)
Jama.Matrix
NNLS(int[] iter, Jama.Matrix Grad, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, double tol, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
nnls_fpgm(Jama.Matrix WtW, Jama.Matrix WtX, Jama.Matrix X, Jama.Matrix W, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
nnls_init(Jama.Matrix X, Jama.Matrix W, Jama.Matrix WtW, Jama.Matrix WtX)
Jama.Matrix
NNLS_L1(int[] iter, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, double tol, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
NNLS_L2(int[] iter, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, double tol, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
NNLS_MR(int[] iter, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, Jama.Matrix Lp, double LpC, double tol, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
nnls_orth(Jama.Matrix M, Jama.Matrix U, Jama.Matrix Mn)
Jama.Matrix
nnls_solver(Jama.Matrix WtW, Jama.Matrix WtV, NonnegativeMatrixFactorization.info infos, Jama.Matrix V, Jama.Matrix W, NonnegativeMatrixFactorization.opt in_options)
double[]
nnls1_asgivens(int[] success, int[] iter, Jama.Matrix A, double[] b, int overwrite, int isInputProd, double[] init)
Jama.Matrix
nnlsm_activeset(Jama.Matrix Y, int[] success, int[] numChol, int[] numEq, Jama.Matrix A, Jama.Matrix B, int overwrite, int isInputProd, Jama.Matrix init)
Jama.Matrix
nnlsm_blockpivot(int[] success, int[] numChol, int[] numEq, Jama.Matrix A, Jama.Matrix B, int isInputProd, Jama.Matrix init)
double
norm(double[] v)
Jama.Matrix
normalEqComb(int[] numChol, int[] numEq, Jama.Matrix AtA, Jama.Matrix AtB, int[][] PassSet)
void
normalize_WH(Jama.Matrix W_new, Jama.Matrix H_new, Jama.Matrix V, Jama.Matrix W_orig, Jama.Matrix H_orig, int rank, java.lang.String type)
void
online_mu_nmf()
void
palm_sparse_smooth_nmf()
void
pgd_nmf()
double[]
pos(double[] A)
void
prob_nmf()
void
proj_sparse_nmf()
Jama.Matrix
projection_mnls(Jama.Matrix X, Jama.Matrix B, Jama.Matrix A)
Jama.Matrix
projection_precon_mnls(Jama.Matrix X, Jama.Matrix B, Jama.Matrix A)
void
projective_nmf()
double[]
projfunc(int[] usediters, double[] s, double k1, double k2, boolean nn)
void
rank2nmf()
void
reconstruct_wh(Jama.Matrix W_concat, Jama.Matrix H_concat, double[][][] W, Jama.Matrix H, int t)
void
recursive_nmu()
void
renormalize_convNMF(double[][][] W, Jama.Matrix H)
void
robust_mu_nmf()
void
robust_online_mu_nmf()
void
run()
void
sagmu_nmf()
void
sc_nmf()
void
scalingWH(Jama.Matrix W, Jama.Matrix H)
void
semi_bcd_nmf()
void
semi_mu_nmf()
void
sep_symm_nmtf()
int
set_disp_frequency(NonnegativeMatrixFactorization.opt options)
Jama.Matrix
shift_t(Jama.Matrix H, int t)
Jama.Matrix
SimplexColProj(Jama.Matrix Y)
Jama.Matrix
SimplexProj(Jama.Matrix y)
void
smu_nmf()
void
snpa()
int[][]
sortrows(int[] sortIx, int[][] rows)
void
spa()
Jama.Matrix
spa(int[] K, NonnegativeMatrixFactorization.info infos, Jama.Matrix Vorig, int num_col, NonnegativeMatrixFactorization.opt in_options)
void
sparse_mu_v_nmf()
void
sparse_nmf()
void
spg_nmf()
void
srgmu_nmf()
void
store_nmf_info(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, Jama.Matrix R, NonnegativeMatrixFactorization.opt options, NonnegativeMatrixFactorization.info infos, int epoch, int grad_calc_count, long elapsed_time, double[] f_val, double[] optgap)
void
svrmu_nmf()
void
symm_anls()
void
symm_halsacc()
void
symm_newton()
void
test_mu()
double[]
TN_vector_expectation(double[] mus, double[] taus)
double[]
TN_vector_variance(double[] mus, double[] taus)
int[]
unique(int[] x)
double
update_alpha(double alpha, double q)
void
update_direct_pgd(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, Jama.Matrix gradW, Jama.Matrix gradH, double[] alpha, double[] obj)
void
update_exp(Jama.Matrix exp_A, Jama.Matrix var_A, Jama.Matrix mu_A, Jama.Matrix tau_A, int k)
void
update_exp_lambdak(double[] exp_lambdak, double[] exp_loglambdak, double[] alphak_s, double[] betak_s, int k)
void
update_exp_tau(double[] exp_tau, double[] exp_logtau, double alpha_s, double beta_s)
void
update_lambdak(double[] alphak_s, double[] betak_s, Jama.Matrix exp_U, Jama.Matrix exp_V, int k, NonnegativeMatrixFactorization.opt options)
void
update_tau(double[] alpha_s, double[] beta_s, NonnegativeMatrixFactorization.opt options, Jama.Matrix V, Jama.Matrix exp_U, Jama.Matrix exp_V, Jama.Matrix var_U, Jama.Matrix var_V, int size_Omega)
void
update_U(Jama.Matrix mu_U, Jama.Matrix tau_U, Jama.Matrix V, Jama.Matrix exp_U, Jama.Matrix exp_V, Jama.Matrix var_V, double[] exp_tau, double[] exp_lambdak, int k, NonnegativeMatrixFactorization.opt options)
void
update_V(Jama.Matrix mu_V, Jama.Matrix tau_V, Jama.Matrix V, Jama.Matrix exp_V, Jama.Matrix exp_U, Jama.Matrix var_U, double[] exp_tau, double[] exp_lambdak, int k, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
update_with_SC(double[] stepsizeX_new, Jama.Matrix X, java.lang.String name, double stepsizeX)
void
vb_pro_nmf()
void
warm_restart(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, int rank, Jama.Matrix W_prev, Jama.Matrix H_prev, Jama.Matrix W_tmp1, Jama.Matrix H_tmp1, Jama.Matrix H_tmp2, double[] rel_error, double[] beta, double[] betamax, int epoch, NonnegativeMatrixFactorization.opt options)
void
wcheckcrit(double[] xcrit, double[] maxx, double[] xa, double[] w, double precision)
Jama.Matrix
weightedgroupedsparseproj(double[] gxpmu, int[] numiter, double[] newmu, Jama.Matrix Xorg, double s, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
weightedgroupedsparseproj_col(int[] numiter, Jama.Matrix X, double s, NonnegativeMatrixFactorization.opt options)
Jama.Matrix
wgmu(double[] vgmu, double[] gradg, Jama.Matrix X, Jama.Matrix w, double mu)
void
wlra()
double[]
wmedian(Jama.Matrix Aorig, double[] yorig)
-
-
-
Field Detail
-
epsilon
private double epsilon
-
functionType
private int functionType
-
V
private Jama.Matrix V
-
rank
private int rank
-
W
private Jama.Matrix W
-
W3D
private double[][][] W3D
-
H
private Jama.Matrix H
-
R
private Jama.Matrix R
-
S
private Jama.Matrix S
-
K
private int[] K
-
U
private Jama.Matrix U
-
P
private Jama.Matrix P
-
t
private int t
-
d_beta
private double d_beta
-
alg
private java.lang.String alg
-
model
private int model
-
type
private java.lang.String type
-
rep_mode
private java.lang.String rep_mode
-
permute_on
private boolean permute_on
-
W_sub_mode
private java.lang.String W_sub_mode
-
robust
private boolean robust
-
orth_h
private boolean orth_h
-
norm_h
private int norm_h
-
orth_w
private boolean orth_w
-
norm_w
private int norm_w
-
ard
private boolean ard
-
init_alg
private java.lang.String init_alg
-
num_col
private int num_col
-
metric_type
java.lang.String metric_type
-
L1s
private double L1s
-
L1a
private double L1a
-
FRO_MU_NMF
public static final int FRO_MU_NMF
- See Also:
- Constant Field Values
-
ADMM_NMF
public static final int ADMM_NMF
- See Also:
- Constant Field Values
-
ALS_NMF
public static final int ALS_NMF
- See Also:
- Constant Field Values
-
ANLS_NMF
public static final int ANLS_NMF
- See Also:
- Constant Field Values
-
FRO_MU_PARTIAL_NMF
public static final int FRO_MU_PARTIAL_NMF
- See Also:
- Constant Field Values
-
PGD_NMF
public static final int PGD_NMF
- See Also:
- Constant Field Values
-
DIV_ADMM_NMF
public static final int DIV_ADMM_NMF
- See Also:
- Constant Field Values
-
DIV_MU_NMF
public static final int DIV_MU_NMF
- See Also:
- Constant Field Values
-
DIV_MU_PARTIAL_NMF
public static final int DIV_MU_PARTIAL_NMF
- See Also:
- Constant Field Values
-
KL_BMD_NMF
public static final int KL_BMD_NMF
- See Also:
- Constant Field Values
-
KL_FPA_NMF
public static final int KL_FPA_NMF
- See Also:
- Constant Field Values
-
MINVOL_NMF
public static final int MINVOL_NMF
- See Also:
- Constant Field Values
-
NENMF
public static final int NENMF
- See Also:
- Constant Field Values
-
SEP_SYMM_NMTF
public static final int SEP_SYMM_NMTF
- See Also:
- Constant Field Values
-
RECURSIVE_NMU
public static final int RECURSIVE_NMU
- See Also:
- Constant Field Values
-
ACC_ONLINE_MU_NMF
public static final int ACC_ONLINE_MU_NMF
- See Also:
- Constant Field Values
-
ASAG_MU_NMF
public static final int ASAG_MU_NMF
- See Also:
- Constant Field Values
-
INCREMENTAL_MU_NMF
public static final int INCREMENTAL_MU_NMF
- See Also:
- Constant Field Values
-
ONLINE_MU_NMF
public static final int ONLINE_MU_NMF
- See Also:
- Constant Field Values
-
ROBUST_ONLINE_MU_NMF
public static final int ROBUST_ONLINE_MU_NMF
- See Also:
- Constant Field Values
-
SAGMU_NMF
public static final int SAGMU_NMF
- See Also:
- Constant Field Values
-
SMU_NMF
public static final int SMU_NMF
- See Also:
- Constant Field Values
-
SPG_NMF
public static final int SPG_NMF
- See Also:
- Constant Field Values
-
SRGMU_NMF
public static final int SRGMU_NMF
- See Also:
- Constant Field Values
-
SVRMU_NMF
public static final int SVRMU_NMF
- See Also:
- Constant Field Values
-
ALTERNATING_ONMF
public static final int ALTERNATING_ONMF
- See Also:
- Constant Field Values
-
DTPP_NMF
public static final int DTPP_NMF
- See Also:
- Constant Field Values
-
HALS_SO_NMF
public static final int HALS_SO_NMF
- See Also:
- Constant Field Values
-
ORTH_MU_NMF
public static final int ORTH_MU_NMF
- See Also:
- Constant Field Values
-
PROB_NMF
public static final int PROB_NMF
- See Also:
- Constant Field Values
-
VB_PRO_NMF
public static final int VB_PRO_NMF
- See Also:
- Constant Field Values
-
PROJECTIVE_NMF
public static final int PROJECTIVE_NMF
- See Also:
- Constant Field Values
-
RANK2NMF
public static final int RANK2NMF
- See Also:
- Constant Field Values
-
ROBUST_MU_NMF
public static final int ROBUST_MU_NMF
- See Also:
- Constant Field Values
-
SEMI_BCD_NMF
public static final int SEMI_BCD_NMF
- See Also:
- Constant Field Values
-
SEMI_MU_NMF
public static final int SEMI_MU_NMF
- See Also:
- Constant Field Values
-
SNPA
public static final int SNPA
- See Also:
- Constant Field Values
-
SPA
public static final int SPA
- See Also:
- Constant Field Values
-
PALM_SPARSE_SMOOTH_NMF
public static final int PALM_SPARSE_SMOOTH_NMF
- See Also:
- Constant Field Values
-
PROJ_SPARSE_NMF
public static final int PROJ_SPARSE_NMF
- See Also:
- Constant Field Values
-
SC_NMF
public static final int SC_NMF
- See Also:
- Constant Field Values
-
SPARSE_MU_V_NMF
public static final int SPARSE_MU_V_NMF
- See Also:
- Constant Field Values
-
SPARSE_NMF
public static final int SPARSE_NMF
- See Also:
- Constant Field Values
-
SYMM_ANLS
public static final int SYMM_ANLS
- See Also:
- Constant Field Values
-
SYMM_HALSACC
public static final int SYMM_HALSACC
- See Also:
- Constant Field Values
-
SYMM_NEWTON
public static final int SYMM_NEWTON
- See Also:
- Constant Field Values
-
WLRA
public static final int WLRA
- See Also:
- Constant Field Values
-
ADMM_SEQ_CONV_NMF
public static final int ADMM_SEQ_CONV_NMF
- See Also:
- Constant Field Values
-
svd
SVD svd
-
-
Method Detail
-
test_mu
public void test_mu()
-
run
public void run()
-
admm_seq_conv_nmf
public void admm_seq_conv_nmf()
-
shift_t
public Jama.Matrix shift_t(Jama.Matrix H, int t)
-
gamma_beta
public double gamma_beta(double beta)
-
renormalize_convNMF
public void renormalize_convNMF(double[][][] W, Jama.Matrix H)
-
reconstruct_wh
public void reconstruct_wh(Jama.Matrix W_concat, Jama.Matrix H_concat, double[][][] W, Jama.Matrix H, int t)
-
wlra
public void wlra()
-
scalingWH
public void scalingWH(Jama.Matrix W, Jama.Matrix H)
-
symm_newton
public void symm_newton()
-
hessian_blkdiag
public Jama.Matrix hessian_blkdiag(Jama.Matrix temp, Jama.Matrix H, int idx, boolean[][] projnorm_idx)
-
symm_halsacc
public void symm_halsacc()
-
symm_anls
public void symm_anls()
-
sparse_nmf
public void sparse_nmf()
-
sparse_mu_v_nmf
public void sparse_mu_v_nmf()
-
sc_nmf
public void sc_nmf()
-
NNDSVD
public void NNDSVD(Jama.Matrix W, Jama.Matrix H, Jama.Matrix A, int k, int flag)
-
norm
public double norm(double[] v)
-
pos
public double[] pos(double[] A)
-
neg
public double[] neg(double[] A)
-
projfunc
public double[] projfunc(int[] usediters, double[] s, double k1, double k2, boolean nn)
-
update_with_SC
public Jama.Matrix update_with_SC(double[] stepsizeX_new, Jama.Matrix X, java.lang.String name, double stepsizeX)
-
proj_sparse_nmf
public void proj_sparse_nmf()
-
fastgradsparseNNLS
public Jama.Matrix fastgradsparseNNLS(Jama.Matrix XHt, Jama.Matrix HHt, Jama.Matrix Wsrc, NonnegativeMatrixFactorization.opt options)
-
weightedgroupedsparseproj_col
public Jama.Matrix weightedgroupedsparseproj_col(int[] numiter, Jama.Matrix X, double s, NonnegativeMatrixFactorization.opt options)
-
weightedgroupedsparseproj
public Jama.Matrix weightedgroupedsparseproj(double[] gxpmu, int[] numiter, double[] newmu, Jama.Matrix Xorg, double s, NonnegativeMatrixFactorization.opt options)
-
wgmu
public Jama.Matrix wgmu(double[] vgmu, double[] gradg, Jama.Matrix X, Jama.Matrix w, double mu)
-
wcheckcrit
public void wcheckcrit(double[] xcrit, double[] maxx, double[] xa, double[] w, double precision)
-
palm_sparse_smooth_nmf
public void palm_sparse_smooth_nmf()
-
spa
public void spa()
-
snpa
public void snpa()
-
semi_mu_nmf
public void semi_mu_nmf()
-
semi_bcd_nmf
public void semi_bcd_nmf()
-
robust_mu_nmf
public void robust_mu_nmf()
-
rank2nmf
public void rank2nmf()
-
projective_nmf
public void projective_nmf()
-
vb_pro_nmf
public void vb_pro_nmf()
-
update_U
public void update_U(Jama.Matrix mu_U, Jama.Matrix tau_U, Jama.Matrix V, Jama.Matrix exp_U, Jama.Matrix exp_V, Jama.Matrix var_V, double[] exp_tau, double[] exp_lambdak, int k, NonnegativeMatrixFactorization.opt options)
-
update_V
public void update_V(Jama.Matrix mu_V, Jama.Matrix tau_V, Jama.Matrix V, Jama.Matrix exp_V, Jama.Matrix exp_U, Jama.Matrix var_U, double[] exp_tau, double[] exp_lambdak, int k, NonnegativeMatrixFactorization.opt options)
-
update_lambdak
public void update_lambdak(double[] alphak_s, double[] betak_s, Jama.Matrix exp_U, Jama.Matrix exp_V, int k, NonnegativeMatrixFactorization.opt options)
-
exponential_draw
public double exponential_draw(double lambdax)
-
update_exp_lambdak
public void update_exp_lambdak(double[] exp_lambdak, double[] exp_loglambdak, double[] alphak_s, double[] betak_s, int k)
-
TN_vector_expectation
public double[] TN_vector_expectation(double[] mus, double[] taus)
-
TN_vector_variance
public double[] TN_vector_variance(double[] mus, double[] taus)
-
update_exp
public void update_exp(Jama.Matrix exp_A, Jama.Matrix var_A, Jama.Matrix mu_A, Jama.Matrix tau_A, int k)
-
gamma_expectation
public double gamma_expectation(double alpha, double beta)
-
gamma_expectation
public double[] gamma_expectation(double[] alpha, double[] beta)
-
gamma_expectation_log
public double gamma_expectation_log(double alpha, double beta)
-
exp_square_diff
public double exp_square_diff(Jama.Matrix V, Jama.Matrix exp_U, Jama.Matrix exp_V, Jama.Matrix var_U, Jama.Matrix var_V)
-
update_tau
public void update_tau(double[] alpha_s, double[] beta_s, NonnegativeMatrixFactorization.opt options, Jama.Matrix V, Jama.Matrix exp_U, Jama.Matrix exp_V, Jama.Matrix var_U, Jama.Matrix var_V, int size_Omega)
-
update_exp_tau
public void update_exp_tau(double[] exp_tau, double[] exp_logtau, double alpha_s, double beta_s)
-
prob_nmf
public void prob_nmf()
-
hals_so_nmf
public void hals_so_nmf()
-
dtpp_nmf
public void dtpp_nmf()
-
alternating_onmf
public void alternating_onmf()
-
svrmu_nmf
public void svrmu_nmf()
-
srgmu_nmf
public void srgmu_nmf()
-
spg_nmf
public void spg_nmf()
-
projection_mnls
public Jama.Matrix projection_mnls(Jama.Matrix X, Jama.Matrix B, Jama.Matrix A)
-
nesterov_mnls
public Jama.Matrix nesterov_mnls(int[] iter, double[] alpha, Jama.Matrix X, Jama.Matrix B, Jama.Matrix A_star, int max_iter, java.lang.String func_type)
-
update_alpha
public double update_alpha(double alpha, double q)
-
g_lambda
public double g_lambda(double L, double mu)
-
projection_precon_mnls
public Jama.Matrix projection_precon_mnls(Jama.Matrix X, Jama.Matrix B, Jama.Matrix A)
-
smu_nmf
public void smu_nmf()
-
sagmu_nmf
public void sagmu_nmf()
-
calc_nls_nmf
public Jama.Matrix calc_nls_nmf(Jama.Matrix X, Jama.Matrix W, double lambda)
-
robust_online_mu_nmf
public void robust_online_mu_nmf()
-
online_mu_nmf
public void online_mu_nmf()
-
incremental_mu_nmf
public void incremental_mu_nmf()
-
asag_mu_nmf
public void asag_mu_nmf()
-
acc_online_mu_nmf
public void acc_online_mu_nmf()
-
recursive_nmu
public void recursive_nmu()
-
wmedian
public double[] wmedian(Jama.Matrix Aorig, double[] yorig)
-
sep_symm_nmtf
public void sep_symm_nmtf()
-
spa
public Jama.Matrix spa(int[] K, NonnegativeMatrixFactorization.info infos, Jama.Matrix Vorig, int num_col, NonnegativeMatrixFactorization.opt in_options)
-
nenmf
public void nenmf()
-
NNLS
public Jama.Matrix NNLS(int[] iter, Jama.Matrix Grad, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, double tol, NonnegativeMatrixFactorization.opt options)
-
NNLS_L1
public Jama.Matrix NNLS_L1(int[] iter, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, double tol, NonnegativeMatrixFactorization.opt options)
-
NNLS_L2
public Jama.Matrix NNLS_L2(int[] iter, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, double tol, NonnegativeMatrixFactorization.opt options)
-
NNLS_MR
public Jama.Matrix NNLS_MR(int[] iter, Jama.Matrix Z, Jama.Matrix WtW, Jama.Matrix WtV, Jama.Matrix Lp, double LpC, double tol, NonnegativeMatrixFactorization.opt options)
-
GetStopCriterion
public double GetStopCriterion(int stop_rule, Jama.Matrix X, Jama.Matrix gradX)
-
minvol_nmf
public void minvol_nmf()
-
FGMqpnonneg
public Jama.Matrix FGMqpnonneg(java.util.Vector<java.lang.Double> e, Jama.Matrix A, Jama.Matrix C, Jama.Matrix W0, int maxiter, int proj)
-
kl_fpa_nmf
public void kl_fpa_nmf()
-
kl_bmd_nmf
public void kl_bmd_nmf()
-
div_mu_partial_nmf
public void div_mu_partial_nmf()
-
div_admm_nmf
public void div_admm_nmf()
-
check_divergence
public void check_divergence(NonnegativeMatrixFactorization.opt options)
-
pgd_nmf
public void pgd_nmf()
-
update_direct_pgd
public void update_direct_pgd(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, Jama.Matrix gradW, Jama.Matrix gradH, double[] alpha, double[] obj)
-
nnls_solver
public Jama.Matrix nnls_solver(Jama.Matrix WtW, Jama.Matrix WtV, NonnegativeMatrixFactorization.info infos, Jama.Matrix V, Jama.Matrix W, NonnegativeMatrixFactorization.opt in_options)
-
adp_step_pgd_stop_func
public void adp_step_pgd_stop_func(int[] stop_flag, java.lang.String[] reason, NonnegativeMatrixFactorization.opt options, NonnegativeMatrixFactorization.stop_opt stop_options)
-
fro_mu_partial_nmf
public void fro_mu_partial_nmf()
-
anls_nmf
public void anls_nmf()
-
nnlsm_blockpivot
public Jama.Matrix nnlsm_blockpivot(int[] success, int[] numChol, int[] numEq, Jama.Matrix A, Jama.Matrix B, int isInputProd, Jama.Matrix init)
-
nnls1_asgivens
public double[] nnls1_asgivens(int[] success, int[] iter, Jama.Matrix A, double[] b, int overwrite, int isInputProd, double[] init)
-
nnlsm_activeset
public Jama.Matrix nnlsm_activeset(Jama.Matrix Y, int[] success, int[] numChol, int[] numEq, Jama.Matrix A, Jama.Matrix B, int overwrite, int isInputProd, Jama.Matrix init)
-
normalEqComb
public Jama.Matrix normalEqComb(int[] numChol, int[] numEq, Jama.Matrix AtA, Jama.Matrix AtB, int[][] PassSet)
-
sortrows
public int[][] sortrows(int[] sortIx, int[][] rows)
-
als_nmf
public void als_nmf()
-
HALSupdt
public Jama.Matrix HALSupdt(Jama.Matrix Vorig, Jama.Matrix UtU, Jama.Matrix UtM, double alpha, double delta, NonnegativeMatrixFactorization.opt in_options)
-
change_inner_max_epoch
public int change_inner_max_epoch(Jama.Matrix X, Jama.Matrix W, NonnegativeMatrixFactorization.opt options)
-
admm_nmf
public void admm_nmf()
-
warm_restart
public void warm_restart(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, int rank, Jama.Matrix W_prev, Jama.Matrix H_prev, Jama.Matrix W_tmp1, Jama.Matrix H_tmp1, Jama.Matrix H_tmp2, double[] rel_error, double[] beta, double[] betamax, int epoch, NonnegativeMatrixFactorization.opt options)
-
do_momentum_w
public void do_momentum_w(Jama.Matrix W_tmp1, Jama.Matrix W, Jama.Matrix W_prev, Jama.Matrix H, Jama.Matrix H_prev, Jama.Matrix H_tmp1, double[] beta, int epoch, NonnegativeMatrixFactorization.opt options)
-
do_momentum_h
public void do_momentum_h(Jama.Matrix H_tmp1, Jama.Matrix H_tmp2, Jama.Matrix H, Jama.Matrix H_prev, double[] beta, int epoch, NonnegativeMatrixFactorization.opt options)
-
check_momentum_setting
public double[] check_momentum_setting(double[] betamax, NonnegativeMatrixFactorization.opt options)
-
normalize_WH
public void normalize_WH(Jama.Matrix W_new, Jama.Matrix H_new, Jama.Matrix V, Jama.Matrix W_orig, Jama.Matrix H_orig, int rank, java.lang.String type)
-
nnls_fpgm
public Jama.Matrix nnls_fpgm(Jama.Matrix WtW, Jama.Matrix WtX, Jama.Matrix X, Jama.Matrix W, NonnegativeMatrixFactorization.opt options)
-
nnls_init
public Jama.Matrix nnls_init(Jama.Matrix X, Jama.Matrix W, Jama.Matrix WtW, Jama.Matrix WtX)
-
nnls_orth
public Jama.Matrix nnls_orth(Jama.Matrix M, Jama.Matrix U, Jama.Matrix Mn)
-
SimplexProj
public Jama.Matrix SimplexProj(Jama.Matrix y)
-
SimplexColProj
public Jama.Matrix SimplexColProj(Jama.Matrix Y)
-
fro_mu_nmf
public void fro_mu_nmf()
-
display_info
public void display_info(java.lang.String method_name, int epoch, NonnegativeMatrixFactorization.info nmf_info, NonnegativeMatrixFactorization.opt options)
-
set_disp_frequency
public int set_disp_frequency(NonnegativeMatrixFactorization.opt options)
-
display_stop_reason
public void display_stop_reason(NonnegativeMatrixFactorization.opt options, java.lang.String disp_name, java.lang.String reason, boolean max_reached_flag)
-
check_stop_condition
public void check_stop_condition(int[] stop_flag, java.lang.String[] reason, boolean[] max_reached_flag, NonnegativeMatrixFactorization.info rev_info, int epoch, NonnegativeMatrixFactorization.info infos, NonnegativeMatrixFactorization.opt options, NonnegativeMatrixFactorization.stop_opt stop_options)
-
store_nmf_info
public void store_nmf_info(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, Jama.Matrix R, NonnegativeMatrixFactorization.opt options, NonnegativeMatrixFactorization.info infos, int epoch, int grad_calc_count, long elapsed_time, double[] f_val, double[] optgap)
-
eval_clustering_accuracy
public NonnegativeMatrixFactorization.accur eval_clustering_accuracy(Jama.Matrix H, int[] gnd, int classnum, int eval_num)
-
bestMap
public int[] bestMap(int[] L1, int[] L2)
-
hungarian
public void hungarian(int[] C, int[] T, int[][] A)
-
hmflip
public void hmflip(int[][] A, int[] C, int[] LC, int[] LR, int[][] U, int l, int r)
-
hmreduce
public void hmreduce(int[][] A, int[] CH, int[] RH, int[] LC, int[] LR, java.util.Vector<java.lang.Integer> SLC, java.util.Vector<java.lang.Integer> SLR)
-
hminiass
public void hminiass(int[][] A, int[] C, int[][] U)
-
hminired
public int[][] hminired(int[][] A)
-
compute_f
public void compute_f(double[] f, double[] p, double[] r, int[] T, int[] H)
-
calc_nmi
public double calc_nmi(int[] groundtruthAssignment, int[] algorithmAssignment)
-
calc_entropy
public double calc_entropy(int[] assignment)
-
unique
public int[] unique(int[] x)
-
calc_purity
public double calc_purity(int[] groundtruthAssignment, int[] algorithmAssignment)
-
count_occurrence
public int[] count_occurrence(int[] list)
-
MutualInfo
public double MutualInfo(int[] L1, int[] L2)
-
log2
public double log2(double x)
-
litekmeans
public void litekmeans(int[][] label, Jama.Matrix center, boolean[] bCon, double[] sumD, Jama.Matrix D, Jama.Matrix X, int k, java.lang.String Distance, Jama.Matrix startMatrix, int[] startVector, java.lang.String Start, int maxit, int reps, int clustermaxit)
-
nmf_cost
public double nmf_cost(Jama.Matrix V, Jama.Matrix W, Jama.Matrix H, Jama.Matrix R, NonnegativeMatrixFactorization.opt options)
-
copyInfo
public void copyInfo(NonnegativeMatrixFactorization.info srcInfo, NonnegativeMatrixFactorization.info destInfo)
-
get_nmf_default_options
public NonnegativeMatrixFactorization.opt get_nmf_default_options()
-
-