invpd and scalars
by Sven Schreiber
Hi,
I've noticed the following behavior of the invpd function: invpd(-1)
yields -1; instead and as expected, invpd(-I(2)) throws an error about
non-pd-ness of the input. Shouldn't this apply to scalar inputs as well?
thanks
sven
2 days, 13 hours
about the eigensym() and princomp() help
by Sven Schreiber
Hi all,
I'm currently comparing more closely the different ways of how to
compute principal components, leading to some remarks or suggestions
(and questions) about the respective documentation.
1) eigensym:
(i) The resulting eigenvalues are ascending, and there's a relatively
complicated code example about how to get them in descending order, namely:
<help-now>
matrix U
e = eigensym(A, &U)
Tmp = msortby((-e' | U)',1)'
e = -Tmp[1,]'
U = Tmp[2:,]
# now largest to smallest eigenvalues
print e U
</help-now>
I guess that this help predates the introduction of the mreverse()
function? Because the same effect can be achieved simply by doing:
<help-simple>
# now largest to smallest eigenvalues
e = mreverse(e)
U = mreverse(U')'
</help-simple>
So, OK to change the help example there? Or am I missing something?
(ii) The mreverse() calls in hansl take a little time. Certainly not
dramatic, but if you need the descending ordering, I found that this
little overhead is what makes the eigensym-based solution slightly
slower than using svd(). So a follow-up question or suggestion: Why not
introduce an optional boolean 3rd arg to eigensym, switching to
descending order? I'm guessing that the reordering at the C level (or
even BLAS?) would be noticeably faster than in hansl.
2) princomp:
There's a verbal explanation of how they are computed, which I find
difficult to follow. I have verified that the following computations
coincide:
<hansl>
clear
A = mnormal(30,10)
matrix v = empty # to hold eigenvectors etc.
# eigensym-based
m = cdemean(A)
eigensym(m'm, &v)
pe = m * mreverse(v')'
# plain princomp
pp = princomp(A, cols(A), TRUE)
set assert warn
assert(sum(abs(pe - pp)) == 0)
</hansl>
I think it would be helpful to include an example like this one in the
princomp help. Or maybe a variant based on the correlation matrix
(default in princomp) instead of the covariance like here. OK?
thanks
sven
1 week, 1 day
Esc key to get out of a deletion dialog
by Sven Schreiber
Hi, this is a minor problem in the GUI program:
- have the window with installed function packages open
- right-click on any package, then select deactivate/delete...
- a new small dialog appears asking for confirmation
- hit the Esc key with the intention to cancel the operation
(effectively to choose "No" in the dialog)
- but this is treated like a "Yes", and the package is deleted (or an
error about missing access rights occurs)
This is only about using "esc" on the keyboard, not any problem with
mouse clicking.
Not sure whether this is a GTK issue or fixable by gretl itself.
thanks
sven
2 weeks, 3 days
cannot run standard gretl package on Debian under WSL (Windows subsystem for Linux)
by Sven Schreiber
Hi,
I have Debian Linux installed within the WSL on Windows 11. I can
install the standard gretl package there alright. However, when I try to
execute "gretl", I get the following error:
(gretl_x11:7726): GLib-GIO-ERROR **: 12:24:09.681: Settings schema
'org.gnome.desktop.interface' is not installed
Trace/breakpoint trap
In contrast, I can run "gretlcli" OK.
I believe that this desktop interface thing can be switched off at
configure time, if I were to compile myself. This is not the point and
the aim right now, however - this report is only about the standard
package.
I guess this might have to be reported to the Debian guys / Dirk
Eddelbuettel, but I wanted to hear your opinions first. Perhaps there is
a run-time switch as well?
thanks
sven
2 weeks, 5 days