NEWS
mpath 0.4-2.26 (2024-06-27)
- modify call on pamr:::balanced.folds
mpath 0.4-2.25 (2024-03-09)
- modify function R/check_s to add argument dfun such that s (robust parameter sigma in the paper Unified Robust Estimation) value >=1 for classification; previously s >=0. Such a change is needed to essure that g(s(0))=1. check_s is used in functions irglm and irglmreg
mpath 0.4-2.24
- replace read.xls from R package gdata in vignette/brcancer.Rnw with openxlsx from package openxlsx
mpath 0.4-2.22 (2022-02-21)
- change COCO to IRCO which best describes the algorithm and is easier to understand
- change ccglm to irglm, ccsvm to irsvm in files in folders R/src/man/vignettes, NAMESPACE, .Rbuildignore
mpath 0.4-2.21 (2022-02-09)
- change R/compute_wt.R and R/compute_g.R, where z values must be non-negative in the past versions. This restriction is removed since z can be negative when the loss function is negative loglikelihood function in the exponential family, for instance, the gamma distribution
- export functions cfun2num, y2num, y2num4glm, check_s, used in R package ccboost
mpath 0.4-2.20 (2021-12-03)
- zipath calculated residuals = sqrt(weights)*(Y - Yhat), where weights were sum to 1. This has been recalculated such that weights are sum to n, where n is the sample size.
mpath 0.4-2.19 (2021-04-05)
- fix a bug in R/glmreg.R when computing nulldev.
mpath 0.4-2.18 (2021-02-15)
- fix a bug in src/gfunc.f when probability is close to 0/1 in binary case
- add more description of s value in man/nclreg_fit.Rd
- pass argument offset in
cv.nclreg.matrix <- function(x, y, weights, offset=NULL, ...){
RET <- cv.nclreg_fit(x, y, weights, offset=offset, ...)
- R/nclreg.R with argument standardize=TRUE generates potentially quite different prediction error and variable selection compared to standardize=FALSE for brcancer.Rnw in the vigenette folder. Largely revoke the changes to mpath version 0.3-15 with respect to standardize argument in R/nclreg.
- Does argument standardize have the similar impact to R/ccglmreg as R/nclreg?
mpath 0.4-2.17 (2020-12-13)
- add .Rbuildignore to ignore three Rmd files in vignettes
- dontrun the example in man/cv.ccsvm for which on CRAN r-oldrel-windows-x doesn't work and could not be reproduced on current system
mpath 0.4-2.16 (2020-11-10)
- change function names from coglm to ccglm, coreg to ccglmreg, cosvm to ccsvm, etc.
- move ccglmExample.Rmd, ccsvmExample.Rmd and german.Rmd out of vignettes folder (mpath_vignettes) to avoid some errors in some systems on CRAN/rhub for unknown reasons. Set up static link in vignettes instead
- How to build mpath:
R CMD build --compact-vignettes="both" mpath
mpath 0.4-2.15
- TODO: work in progress on R/coglm on general glm and minor changes on R/coreg
- fix src/coreg_onelambda when calling update_wt, where fk_old should be replaced with etastart, as in R/coreg - typeA
mpath 0.4-2.14
- change R/co to R/coglm by adding dfun="poisson", "negbin"
- add dfun="poisson", "negbin" in R/coreg and make changes accordingly: src/coreg_ad, src/coreg_fortran
- add src/loss3 and src/compute_wt3 for dfun="poisson" and "negbin"
- modify R/coglm.R such that weights_update is initialized as in version 0.4-2.13 for dfun=1,4,5, not equal weights
mpath 0.4-2.13
- Fix a bug with standardize=TRUE, which doesn't generate meaningful coef for R/coreg when dfun=5. For instrance, when s is large, the coef should be similar to glmreg when family="binomial", but it is not. The reason is that coreg calls for glmreg_fit_fortran, with input start, this may lead to saturated binomial model fitting. This would be the same if calling R/glmreg. Thus, glmreg_fit_fortran doesn't call updated start if dfun=5
- add argument standardize in src/coreg_onelambda, and pass this argument to src/glmreg_fit_fortran. Previously, it was set as 0 in the latter
- add argument rescale in R/coreg and subsequentially related src/coreg_ad, src/coreg_fortran, src/coreg_onelambda
- fix a bug in src/glmreg_fit_fortran: input maxit was changed if family=1. This has unexpected sequence since this subroutine is repeated in a loop. Modify src/glmreg_fit_fortran to maintain the old x values if standardize=TRUE and family=1
- consequently, make changes in R/nclreg which uses src/glmreg_fit_fortran, following R/coreg regarding argument standardize
mpath 0.4-2.12
- modify cfun="ecave" and "gcave" in src/loss2, change the intercept to 0 from previous values, which are possibly < 0
- change ytmp to y in R/coreg when calling Fortran subroutine coreg_ad and coreg_fortran, and change y to ytmp in src/coreg_onelambda when calling src/glmreg_fit_fortran. The reason is that in coreg_ad and coreg_fortran, the repsonse variable is +1/-1 when dfun=5, and in glmreg_fit_fortran, the response variable is 1/0 when family=2 (binomial)
mpath 0.4-2.11
- add parallel computing in R/glmregNB
- modify src/coreg_fortran to simplify. TODO: similar changes in src/coreg_ad, src/ncvreg_ad, src/ncvreg_fortran
- in R/cv.glmreg, when type="loss" and family="binomial", it meant for loglikelihood loss function, thus, we seek maximum value, unlike for type="error", we seek minimum value. Modified the code accordingly
mpath 0.4-2.10
- change definition of gcave for cfun, derivative, loss function in both src and R codes. This expands the range of gcave for s from (0, 1] to (0, \infty) and derivative bounded away from \infty at argument 0 when s \in (0, 1).
- change the parameterization of tcave from 1-sigma to sigma
mpath 0.4-2.9
- add a factor to cfun in src/compute_v.f from cfun=2-6 such that For gcave and $\sigma=1, z=0$, the derivative is -1. For other concave functions, we have derivative -1 at $z=0$. Furthermore, the derivative = -1 as $\sigma \to \infty$ except for dcave, where the derivative = $-\frac{1}{z+1}$ as $\sigma \to \infty$
mpath 0.4-2.8
- add weights in src/loss2.f and change codes calling loss2 in R and src folders
- fix a bug in src/compute_z.f for cfun=6 when z=0 - rewrite the expression
- for cfun=6, the domain of s value is changed from >= 1 to 0 < s <= 1 such that g(z) is concave when z >= 0.
mpath 0.4-2.6
- update check_s in R/co.R
- remove 1/2 in objective function in man/ncl.Rd, ncl,_fit.Rd, nclreg.Rd, nclreg_fit.Rd
- add man/co.Rd, co_fit.Rd, coreg.Rd, coreg_fit.Rd
- add co_evalerr R function and replace evalerr in co.R and coreg.R
- changes to R/co.R on initial values when cfun is not 4
- develop assign_s to assign default s value when missing in R/co.R and R/coreg.R
- src/lmnetGLM.f: removing checking convergency of b0, intercept
- src/glmreg_fit_fortran.f: add a check about y value: 0 <= y <= 1 if family=2
- R/predict.glmreg.R has a bug with new offset
- fix bugs with new offset in predict.nclreg, predict.coreg, predict.ncl, predict.co, cv.glmreg.R, cv.glmregNegbin.R
- make b0=0 if intercept=FALSE in src/lmnetGLM.f
- R/glmreg.R: compute lambda sequence for alpha=0 with alpha=1e-3
mpath 0.4-2.5
- add R/check_s for R/co and R/coreg
- remove cost argument in src/loss.f, and make changes accordingly in: R/ncl.R, R/nclreg.R, src/loss.f, src/mpath_init.c, src/nclreg_ad.f, src/nclreg_fortran.f
mpath 0.4-2.4
- make type.init="co" work in R/coreg function for dfun=1, 4 or 5
- make type.init="bst" or "heu" work in R/coreg function for cfun=4 and dfun=1 or 4
- complete src/compute_u for dfun from 1-7
- complete src/compute_z for sfun from 1-7
- complete src/compute_g for dfun from 1-7
- complete src/compute_v for cfun from 1-7
- develop loss2 to compute composite loss values
- problems occur in nclreg, and revoke version 0.4_2.2 the following files: R/ncl.R, R/nclreg.R, src/loss.f, src/mpath_init.c, src/nclreg_ad.f, src/nclreg_fortran.f
mpath 0.4-2.3
- remove cost argument in src/loss, src/nclreg_ad, src/ncl_fortran
mpath 0.4-2.2
- remove cost argument in R/co, R/coreg since they weren't used in optimization problems, unlike the bst package. Remove cost in src/coreg_ad src/coreg_fortran, src/loss2
mpath 0.4-2.1
- remove cost argument in ncl, nclreg, co, coreg since they weren't used in optimization problems, unlike the bst package, but still use bst/loss function with cost=0.5, then mutiply 2, to be consistent with the optimization problem. Fix cost in src/loss.f accordingly. Make similar changes to src/loss2.f
mpath 0.3-25 (2020-04-22)
- fix bugs in R/p_zipath.R when no variable is selected in zipath
- remove fit object in the output of cv.zipath so that predict an object of cv.zipath is not feasible, and should be via zipath. The reason for such change is that cv.zipath can take both formula and matrix, hence predict on cv.zipath object can easily lead to problems in codes.
- minor bugs fix after running: R CMD check --run-dontrun mpath_0.3-25.tar.gz
mpath 0.3-24 (2020-03-24)
- remove zeroinfl function and data from pscl
- offset related updates: R functions init, logLik.glm, cv.glmreg.R, cv.glmregNegbin.R, zipath (fit0); Fortran subroutine zi_onelambda remove 4 lines and simply use the updated mu and eta, and compute yhat=yhat+offset in midloop and midloopGLM
- change the default value of init.theta from 1 to NULL in R/zipath.R. This allows user specified initial value of theta regardless whether theta.fixed is TRUE/FALSE
mpath 0.3-22 (2020-02-19)
- copy R function zeroinfl from package pscl, which is scheduled to be archival on 2020-03-04, and archiving this will necessitate also archiving its strong reverse dependencies. Consequently, changes were made on NAMESPACE file.
mpath 0.3-21 (2020-01-10)
- subroutine linkinv in midloopGLM.f needs safeguard with too small mu for poission, just like negbin
mpath 0.3-20 (2019-11-10)
- glmnet 3.0_0 doesn't export nonzeroCoef and plotCoef function, therefore copy the relevant R files in glmnet
mpath 0.3-19 (2019-11-07)
mpath 0.3-18 (2019-10-06)
- gfortran in GCC trunk aka 10.0.0 is reporting new warnings
mpath 0.3-17 (2019-08-01)
- add intercept option in penalized regression
- make clarity in vignettes/kkt.Rnw
mpath 0.3-16 (2019-07-10)
- to avoid mismatch between predictor variables and the estimated coefficients - this can happen if the input data contains response variable but not appropriately handled, add the following line in R/predict.glmreg.R
if(dim(object$beta)[1] != m) stop("number of columns in newx should be the same as number of rows in beta\n")
mpath 0.3-15 (2019-06-05)
- still use active set, as in version 0.3-13, but change the number of maximum iteration from 100 to 2 when determining active set in outloop.f. Similarly in lmnetGaussian.f. This will reduce the computing times in case of nonconvergence. The program looks for a cycle that repeats itself, default is 2
- fix bugs in nclreg_ad.f regarding m_act and jk, and similar bugs in zipath_active.f
mpath 0.3-14
- changes related to zipath: src/zi_onelambda to replace src/zi.f, and convergency criteria is changed
- zipath can be slow for some data, and change outloop subroutine from active set to nonactive set can help substantially. The reason is that the active set approach can repeat the cycle without convergence. Will be addressed in version 0.3-15.
mpath 0.3-13 (2019-05-19)
- fix bugs in Fortran subroutines, mostly related to uninitialized values after dynamic allocate of vectors.
- in vignettes/brcancer.Rnw, compare type.path="nonative" and "active"
- in man/nclreg.Rd, provide examples of different solution paths
mpath 0.3-11
- implement both active and nonactive path in R zipath function
mpath 0.3-10
- update zipath_fortran subroutine with an active set approach. Is this faster than nonactive approach?
mpath 0.3-9
- Major improvement on zipath.R. Replace the R codes with Fortran codes to compute lmax. Compute the solution path with zipath_fortran subroutine to replace the R codes.
mpath 0.3-8
- R zipath function has both Fortran and R computations, can be useful to compare the results.
- changes were made on how active set works in src/outloop.f file. Now, we cycle through the active set until convergence, then cycle through all the variables ONCE, this is an reverse to the previous procedure. This includes changes in outloop.f, midloop.f, midloopGLM.f, lmnetGLM, add src/find_activeset.f to simplify the codes.
- R/nclreg seems to be incorrect when update beta[activeset, i], since activeset is relative to the current x.act, not x. The new Fortran subroutine using dynamic allocation to deal with this. The Fortran subroutine nclreg_fortran.f conducts the three layers of iteration loops, lambda, MM and internal penalty estimation loop.
- Not a good idea to convert theta.ml R function to Fortran subroutine since the speed actually is slower in Fortran. This is probably because digamma and trigamma functions in a Fortran subroutine used C functions. In contrast, the R function theta.ml directly used these C functions. Maybe there are other reasons. But we leave a glmregNB.R with the Fortran subroutine glmregnb_fortran.
- To do: coefficients of zipath are on the rescaled predictors when standardize=TRUE; needs to be converted to the original scale (somehow the related codes at the end of zipath_fit are commented)
mpath 0.3-7 (2019-02-27)
- changes were made to make offset in glmreg work. This includes changes in outloop.f, midloop.f, midloopGLM.f, lmnetGLM.
- Changes were made in midloopGLM.f so that iterations run and check for convergency for b0 as well as beta
- Changes were made in zipath to make offset work
- offset is now working in glmregNB, zipath, cv.glmreg, cv.glmregNB and cv.zipath
mpath 0.3-6 (2019-01-14)
- fix bugs when all elements of penalty.factor=0 in glmreg_fit or glmregNB. In this case, we set lambda=0 for each variable, and all penalty.factor=1.
- fix bugs when all elements of penalty.factor.count=0 or penalty.factor.zero=0 in zipath. In this case, we set corresponding lambda = 0.
- fix bugs when activeset=NULL in nclreg function
mpath 0.3-5 (2018-07-21)
- add vignette to illustrate classification of cancer patients with penalized robust nonconvex loss functions
- change zipath function to cycle through warm start. The results can be different from the previous versions.
- fix bugs with zipath when trace=TRUE and the zero component is an intercept-only model
mpath 0.3-4 (2017-10-23)
- add type="active" in R/nclreg_fit function
- fix a bug with cv.zipath when plot.it=TRUE
- add stopImplicitCluster() after registerDoParallel
mpath 0.3-3 (2017-08-18)
- cycle through active set with modified codes in Fortran files in src directory
mpath 0.3-2
- To register native routines and to disable symbol search.
$cd mpath
$R
> tools::package_native_routine_registration_skeleton(".")
copy and paste the full output in a packagename_init.c (i.e., mpath_init.c) file to be put in src/
- change convergence criteria in nclreg.R
d1 <- sum((fk_old - fk)^2)
#d1 <- sum((fk_old - fk)^2)/sum(fk_old^2) ### this can cause a problem if fk_old is zero
- another change of convergence criteria in nclreg.R: comment out the following lines
#if(k > 1){
# if(los[k] > los[k-1]){
#k <- iter
- fix a bug in nclreg.R: lambda.min.ratio was not used in computing lambda with glmreg_fit
- in nclreg.R, computing solution path stops if the numbers in exponential function become too big (infinite)
if(any(is.nan(h))){ # exit loop
stopit <- TRUE
break
- add type.init and relevant arguments in nclreg_fit function to have three types of initial parameters and lambda values
- replace fraction with lambda in cv.glmreg.R, cv.nclreg.R, cv.zipath.R and cv.glmregNB.R. This only affects the values of x-axis in plots, but not cross-validation results
- add type.path to have two different updating methods when computing solution paths
mpath 0.3-1
- add ncl and nclreg, and relevant files for nonconvex-based models
- fix a bug computing penval in glmreg, add penalty.factor when calling penGLM in glmreg and zipath. These bugs don't affect the previous analysis results
mpath 0.2-4 (2016-08-30)
- after a change of penGLM subroutine in midloop.f (removing unused argument n), glmreg.R and zipath.R were changed when invoking penGLM.
mpath 0.2-3 (2016-08-30)
- change the format of b0 and beta in glmreg function when standardize=FALSE, to be consistent with standardize=TRUE
- for findlam function in glmreg.R, change
if(standardize)
weights <- weights/sum(weights)
to
if(family=="gaussian" || standardize)
weights <- weights/sum(weights)
This corrects an error in glmreg with family="gaussian" and standardize=FALSE
- In src/lmnetGLM.f, remove lmnetGLM subroutine, which was not used anymore
- fix subroutines in lmnetGLM.f, lmnetGaussian.f, midloop.f and outloop.f regarding gfortran warning messages with an email request from cran.R-project on August 28, 2016
mpath 0.2-1 (2016-02-05)
- add parallel computing for cross-validation in cross-validation function
- remove vuong test, based on Wilson (2015), The misuse of the Vuong test for non-nested models to test for
zero-inflation, Economics Letters, 127: 51:53
mpath 0.1
- change glmcd on how the response variable y is scaled for family other than gaussian
- 8-25-2012 modification on gzipath_0.1-9.tar.gz
b0 should be the average of response variable y for non-standardized case, in an agreement with the so determined lambda max for which beta = 0. This is correct in R function lmnet, see zipath_0.1-2_08_10_2012.tar.gz
- for weighted penalized regression glmreg_fit, with standardize=TRUE, the weights are normalized to n*weights/sum(weights). Now added standardize=FALSE and the weights are not normalized.
- zipath function was modified to incorporate glmreg_fit for weighted penalized Poisson and Negative Binomial regression. The tuning parameters were changed based on modified glmreg_fit.
- for rescale=TRUE and penalty="mnet" or "snet" in zipath, data driven lambda.zero[1] (i.e., the maximum value of lambda in zero component) is too small, now changed to 0.5*sqrt(lambda.zero[1]). This may be modified if the maximum value of lambda in glmreg was changed in the similar situations.
- change package name to ‘mpath’
- apply patch from Martyn Plummer <[email protected]> to replace isna and lgamma in src Fortran file to avoid failure on some platforms
- change src/midloop.f, now saturated model only applies to logistic regression
- add penalty.factor.count and penalty.factor.zero in zipath function to allow different penalties for each of the variables.
- add vignette to illustrate analysis of German health care demand
- fix a bug in function estfunReg, which is supposed to work only for one penalty parameter
- fix a bug in src/lmnetGaus.f, computing meanx
- vignette file was updated to be consistent with the corresponding paper Wang et al (2015)
- fix bugs in cv.glmreg.Rd, cv.glmregNB.Rd and cv.zipath.Rd
- in findlam function, verify 0 < alpha <= 1
- fix a bug with intercept estimate for family="gaussian"
- remove the threshold value mu=1000 for family=4 in midloop.f, lines 167 and 207
- change function name predict.zeroinfl1 to predictzeroinfl1
- editorial changes to files in man directory
- rebuild static_german.pdf, updating a reference
- fix a bug in loss function for family="gaussian"
- minor changes to print lambda 4 digits