Harry Garst

174 Reputation

5 Badges

13 years, 198 days

MaplePrimes Activity


These are replies submitted by Harry Garst

@mmcdara 

Thanks for your reply.

in 2D these plots make clear that rotation changes the variance of the projections:

I found these animated gifs here:

https://stats.stackexchange.com/questions/2691/making-sense-of-principal-component-analysis-eigenvectors-eigenvalues

 

In 3D I think the projections should be on a plane. I would like to make semi-transparant XYZ planes with projections on them for a few points. Sure, it would be a mess if the data cloud consists of a large number of observations.

I never seen an animation in 3D using a rotating XYZ plane with projections on them for a few data points.

Maple animations can be very insightful, at least for me.

 

@mmcdara 

Thanks a lot! This is really helpful. 

kind regards,

Harry

@mmcdara 

A mixture model will be fine.

But on a general level I am trying to figure out the equations for the EM algorithm:

http://www.di.fc.ul.pt/~jpn/r/EM/EM.html

https://www.youtube.com/watch?v=StQOzRqTNsw

However, a Maple demonstration would be great.

My other questions (tetrachoric and polychoric correlations) could probably be solved with the 'fsolve' command and a bivariate normal distribution (as suggested by a collegue). Comparing observed proportions in a contingency table and expected proportions in a bivariate distribution with  a fixed correlation coefficient, but at least for polychoric correlations it has to be solved iteratively.
In R the code would be available, but to translate R into Maple may not be an easy job.

 

Thanks both of you!

I learned something new again!

Harry

@tomleslie 

Maybe the OP meant Tanis and not Tannis.

If so, you can find everything on this website: 

http://www.math.hope.edu/tanis/maplemat.html

 

@tomleslie 

I did not choose it: it is the default option in my version of Maple.

I started using Maple in 1995 when everything was rather simple. All the later innovations in the interface I have tried to ignore. 

What is now the preferred way and why are there so many options?

@Carl Love 

 

Amazing!

(My only consolation is that there seems to be no single Maple command to accomplish the splitting of polynomials this way. Perhaps no one thinks this is a fruitful strategy).

@John Fredsted 

Thank a lot! 

(It took me a whole day to write the proc and you write only one line and the result is the same!)

@Kitonum 

Thanks a lot!

I still cannot find it in the HELP pages. 

Harry


 

restart; with(LinearAlgebra); M := Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); r := RowDimension(M); L := Matrix(1, 3, [a, b, c])

_rtable[18446746060682104694]

 

Matrix(%id = 18446746060751755134)

(1)

Let_me_sit_on_row := proc (M::Matrix, R::Matrix, rij::integer)::Matrix; local K, Z, N, i, r, w; r := RowDimension(M); K := `<|>`(IdentityMatrix(RowDimension(M)), ZeroVector(RowDimension(M))); w := r+3-rij; Z := Matrix(4, 1, [1, 2, 3, 4]); for i from 0 to w-3 do Z := RowOperation(IdentityMatrix(r+1), [r-i, r-i+1]).Z end do; Z := convert(Z, list); N := `<,>`(K[() .. (), Z])^%T.M+`<,>`(`<,>`(ZeroMatrix(r, r), R)[Z, () .. ()]); return N end proc

Let_me_sit_on_row(M, L, 1); Let_me_sit_on_row(M, L, 2); Let_me_sit_on_row(M, L, 3); Let_me_sit_on_row(M, L, 4)

_rtable[18446746060751748622]

 

_rtable[18446746060751737670]

 

_rtable[18446746060751733934]

 

Matrix(%id = 18446746060751729478)

(2)

``


 

Download def_mapleprimes_insert_row.mw

@_Maxim_

 

Thanks a lot!

I was able to modify your code to get what I wanted (without knowing anything of a Groebner basis at all) .

kind regards,

Harry Garst

@Kitonum 

 

Thanks a lot! This is a very interesting solution.

kind regards,

Harry Garst

as I said I looking for a combination of factored polynomials. What I have done so far is to factor subsets of the polynomial. That strategy worked for smaller problems (see attached maple file), but now I would like to find out the most efficient strategy. I guess that this is also a well-known problem for mathematicians (I myself am a psychologist).

yes, indeed. Both replies are extremely helpful. (Although there are good reasons for trying a matrix solution: the expression is an element from a matrix inversion).

 

Thanks a lot.

Harry Garst

@Harry Garst 

 

When I square the denominator in your example both subs and algsubs give the intended result.

subs_versus_algsubs2.mw

1 2 3 Page 1 of 3