subroutine get_int_parms(sml,eps,big,mnlam,rsqmax,pmin,exmx);
to
subroutine get_int_parms(sml,eps,big,mnlam,rsqmax,pmin,exmx,itrace);
taking on itrace as a switch for tracing progress. Added an entry
chg_itrace
to change itrace
.
Changed all calls to get_int_parms
to include extra parameter.
Corresponding changes to glmnet.control.R
to include itrace
as a
parameter.
Fixes in relax.glmnet.R
for displaying the progress by
temporarily turning off and on tracing, if it was on.
spstandard
, spstandard1
, multspstandard1
had jerr
as an unused
argument. coxnet1
, fishnet1
, spfishnet1
had isd
as an
unused argument.risk
had ni
as an unusued argument.In all these cases, I merely added a no-op statement to the
function/subroutine (e.g. jerr = jerr * 1
or ni = ni * 1
) to stop
compiler warnings. More advanced compilers may detect these
shenanigans. We can address that later if it comes up.
multstandard1
has an extra tabl between the
arguments ju
and xm
that I removed. This is most likely because
Emacs replaces 8 spaces with tabs. gfortran
compiler warns that the variable alf
is
uninitialized in elnet1
. The logic is correct, but the compiler
is unable to detect it. So I initialized alf=1
and combined it
with a previous fix for alm=0.0
in elnet1
. I am reasonably
certain this will not affect any logic.Note that it is Mortran processing that generates unusued labels. So each time you run Mortran to generate the Fortran, you will have to deal with the problem of unused labels. No worries, however, if you follow this procedure.
SUtools
package, after deleting your old one, if you had it.GLMNET_DIR
is your glmnet
package directory.library(SUtools) GLMNET_DIR <- "~/GITHUB/glmnet" mortran <- readLines(file.path(GLMNET_DIR, "inst", "mortran", "glmnet5dpclean.m")) result <- process_mortran(input_mortran_file = "glmnet5dpclean.m", pkg_name = "glmnet", control = sutools_control(fix_allocate = FALSE))
The fortran file can now be written out to a file. For example, you may choose to overwrite the old fortran with the new fortran.
writeLines(fixed_fortran, file.path(GLMNET_DIR, "src", "glmnet5dpclean.f"))
Mortran would branch to :again: when convergence was not reached, and not check if maxit had been reached. On the new mac M1 this could get into a state with a degenerate example where it never terminated. Added a maxit check immediately after again throughout.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.