Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 362 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Thomas Dean What Kitonum did wasn't factoring the polynomial in the usual sense, but rather factoring additive subparts. I don't think that there's any reasonable algorithm for it---it involves a lot of educated guesswork. I call it "subfactoring". 

@Thomas Dean For irreducible real polynomials in two variables, this is usually the best way to plot:

algcurves:-plot_real_curve(f, x, y);

One great thing about this is that you don't need to specify ranges for the variables---the command figures out appropriate ranges.

@nm The "main" for Maple is what is executing at the level where you type commands. No proc is equivalent to a "main".

@Joe Riel I didn't mean to imply that it was the same string. I'm just saying that é is a much-more-convenient way to enter e with an (acute) accent directly from the keyboard, rather than creating the string externally and copy-and-pasting or programming the bit-level manipulations of Unicode.

@lplex Maple understands most (perhaps all?) HTML &-codes directly typed into strings. So:

"décembre";

So copy-and-paste is not needed. This is much more user-friendly than Unicode (for direct keyboard input), even if it takes a few more bytes of memory. All such codes begin with &, are followed by some descriptive letters, and end with ;.

@Samir Khan You can easily directly compute the Katz centrality as below. This can be done in the worksheet anyplace after the graph G has been defined.


GT:= GraphTheory:  LA:= LinearAlgebra:
A:= Matrix(
    GT:-AdjacencyMatrix(G), shape= symmetric, datatype= hfloat
):
ME:= max(abs~(LA:-Eigenvalues(A)));
n:= upperbound(A,1):
CF:= 1.1: #Convergence factor: Can be any number > 1.
I__n:= Matrix(n, shape= identity, datatype= hfloat):
Ones:= Vector(n, 1, datatype= hfloat):
katz_centrality:= LA:-LinearSolve(I__n - A/CF/ME, Ones) -~ 1:

Then proceed with the sorting and plotting exactly as before.

@Adam Ledger CygWin is not a Linux virtual machine, it's just a Linux-like command-window environment. You can still run all your Windows programs from it, including Maple.

@Adam Ledger Yes, I was going to suggest that, although I don't know the precise details.

@Samir Khan  In the workbook attached to the section about centrality measures of graphs, you've misused the attenuation factor (alpha), which is the second parameter of GraphTheory:-KatzCentrality. You've used alpha=0.1, but this factor (for the results to be meaningful) must be smaller than the reciprocal of the eigenvalue of the adjacency matrix (A) of largest magnitude. In this case, that means it should be smaller than about 1/41. The reason for this is that the Katz measure is based on a matrix infinite geometric series with ratio alpha*A. This series diverges if alpha is larger than as stated above. The reason that KatzCentraility doesn't catch this is because it sums the series with the familiar geometric series formula: ((I-alpha*A^+)^(-1) - I), but this summation formula isn't valid for alpha larger than as stated above.

Actually, the bar chart produced for the Katz Centrality has a severe discontinuity for some alpha in 1/589.9390449..1/589.9390448, and the results seem meaningless to me for larger alpha. Since the reciprocal of the maximum eigenvalue of the weight matrix (not the adjacency matrix A) is in this interval, it must be that KatzCentraility is using rather than A. (I'd like to see a reference that backs up the validity of this.) If it's correct to use W, then certainly it's utterly meaningless to use alpha > 1/589.... 

@TianyuCheng The arrows, just like the curves, are generated in cartesian coordiantes. The transformation into polar coordinates causes some distortion.

@Adam Ledger Get CygWin on your Windows computers. It's a free, downloadable Linux-like "shell" command-window environment with all the standard Linux commands and text-processing tools. 

@Kitonum The polynomial is degree 8 wrt each of x and (and biquartic in y, thus symbolically solvable, though I didn't make use of that). So, splitting wrt x or gives 8 functions of y or x, respectively. Conveniently it turns out that in each case 4 of these functions are real-valued. The below plots show these 8 real-valued branches color-coded, so you can see where each connected component of the original plot comes from.

restart:
p:= add(seq((lambda/3)^k/k!, k= 0..4) *~ [1$3, -1/2, 1]):
pxy:= evalc(abs(eval(p, lambda= x+I*y))^2-1):
(d1,d2):= degree(pxy, x), degree(pxy, y):
plot(
    [seq([RootOf(pxy, x, index= k), y, y= -12..12], k= 1..d1)],
    color= [seq(COLOR(HUE, .85*(k-1)/(d1-1)), k= 1..d1)],
    thickness= 3
);
plot(
    [seq([x, RootOf(pxy, y, index= k), x= -6..7], k= 1..d2)],
    color= [seq(COLOR(HUE, .85*(k-1)/(d2-1)), k= 1..d2)],
    thickness= 3
);

@BarKop I just fully updated my Answer below to include summarize and programmatic extraction of r-squared and adjusted r-squared from the solutionmodule. Also, I added several more formatting tricks ("bells & whistles") to the plot.

Although I have no issue with Acer's final results and plot---they are equivalent to mine---I think that the huge ratio of singular values (exacerbated by lowering the svdtolerance) leads to the hard-to-believe t-values and p-values shown in his summarize chart.

I redid the worksheet above using a more-intuitive method to compute the ellipse fit's residuals so that they'd be directly comparable to those for the circle fit.

@rameen hamood I just put a Reply and worksheet below my Answer. Try it. But I can't tell what, if anything at all, you did wrong. It looks right to me. My first guess is that something messes up when you take variable names from palettes instead of typing them.

First 214 215 216 217 218 219 220 Last Page 216 of 709