Posts: 2,819Threads: 28 Member details
Posts: 2,819
Threads: 28
Thanks Received: 914 in 640 posts
Thanks Given: 928
Joined: May 2025
Reputation:
0
Location: Campinas (SP), Brazil
Country:
Here is a basic question abut the methodology. Consider this simple example.
The text one each page of a document is a string of Nk decimal digits, 0 to 9. The digits of each page k are generated independently by a process that depends on a vector Pk of 10 parameters, where Pk[7] is simply the probability that the process spits a 7 at each step. The set of all possible Pk is the canonical 9-dimensional simplex S of R^10, with vertices (1,0,0.,.0), (0,1,0,..0), (0,0,0,..1).
Let Ck[7] be the number of times the digit 7 appears on page k. The JS distance is defined between two probability distributions, so we need to estimate the probabilities Pk from the counts Ck. The naive way is to use the raw freauencies, Pk[7] = Ck[7]/Nk. Then of Ck[7] is zero, we get Pk[7] = 0.00; f Ck[7] = 1 and Nk = 100, we set Pk[7] = 1/Nk = 0.01, etc.
A better way is to use Bayes, assuming that any vector Pk in the simplex S is equally likely. I forgot what is the formula, but if Ck[7] = 0 and Nk is 100, it gives something like Pk[7] = 0.005, and if Ck[7] = 1, it gives something like Pk[7] = 0.015.
Is this how you compute the statistics vector of each page? (Except of course that you count 256 digraphs or other things).
All the best, --stolfi
Posts: 2,819Threads: 28 Member details
Posts: 2,819
Threads: 28
Thanks Received: 914 in 640 posts
Thanks Given: 928
Joined: May 2025
Reputation:
0
Location: Campinas (SP), Brazil
Country:
Here is another general questions about the JS distance. I have no experience with it (but I like its name for some reason), so sorry if the questions are stupid or obvious.
Suppose we are using it to compare D-dimensional data vectors which are probability distributions on D things. Since probs are non-negative and add to 1, each data vector is a point in the canonical (D-1)-dimensional simplex S with the D vertices (1,0,0,..0), (0,1,0,..0),.. (0,0,0,..1).
The JS distance Jdist is a metric on S. I suppose that it is distinct from the Euclidean metric Edist on S. How does Jdist(p,q) compare to Edist(p,q) for two points that are ε apart near the center of S? And for two points near a vertex of S?
What are the geodesics of Jdist in S? They are not straight in the Euclidean sense, are they?
Is there a mapping F of S to R^D or R^(D-1) such that Jdist(p,q) = Edist(F(p),F(q))?
All the best, --stolfi
Posts: 107Threads: 6 Member details
Posts: 107
Threads: 6
Thanks Received: 111 in 55 posts
Thanks Given: 60
Joined: Jul 2026
Reputation:
1
Location: United States
Yesterday, 05:44 PM
(This post was last modified: Yesterday, 05:47 PM by npcompl33t.)
ok, several questions here, let me know if i missed anything.
Do you use raw frequencies or Bayesian estimates?
Raw frequencies, without pseudo counts or Bayesian smoothing. I estimate a separate distribution of following glyphs for each starting glyph.
P(h\ |g)= C(g,h) \ sum_j C(g,j)
I then combine the JS divergences between these conditional distributions. A row contributes only if it has at least 3 transitions in each profile. Excluded weights are not redistributed to the remaining rows.
How does JS distance compare with Euclidean distance near the center
JS divergence is different than JS distance. JS distance is the square root of JS divergence. Near the center, small JS distances are approximately a constant multiple of Euclidean distances.
What changes near a vertex?
The factor 1/p makes changes involving rare categories more influential. There is not a simple conversion factor, it depends on the movement direction. Introducing a previously absent category can produce a larger JS change relative to Euclidean. JS is finite but it is sensitive near zero probabilities.
What are its geodesics?
There is a distinction between direct distance between two points or endpoints, and the length accumulated while travelling through intermediate distributions. Ordinary JS distance is generally not the shortest path along a simplex. Its infintesimal geometry is proportional to the Fisher-Rao metric. If we use local geometry to measure continuous path lengths, shortest paths become great circle arcs after transforming coordinates to sqrt(p_i). When mapped back to probabilities, they are generally curved. The curves i fitted above using ElPiGraph are fitted principle curves in the MDS representation, NOT JS geodesics.
Can JS distance be represented as Euclidean DIstance?
Yes, in Hlibert space, but not generally in R^D or R^D-1. In my model, pair dependent weights and row exclusions mean it is not ordinary JS on one fixed probability vector. It is probably better described as weighted JS dissimilarity, I do not claim all the guarantees of ordinary JS distance.
If i am trying to get to the heart of what you are asking with this line of inquiry, my guess would be something like: does the horseshoe and disputed ordering persist when sampling zeros/sparse rows/probability estimation is handled differently?
Is that accurate? Because I believe i can answer that question, but I would want to agree with you ahead of time on the actual test and what the results would indicate -- you still have not gotten back to me on the last test you suggested that I ran.
Posts: 2,819Threads: 28 Member details
Posts: 2,819
Threads: 28
Thanks Received: 914 in 640 posts
Thanks Given: 928
Joined: May 2025
Reputation:
0
Location: Campinas (SP), Brazil
Country:
Yesterday, 06:22 PM
(This post was last modified: Yesterday, 06:26 PM by Jorge_Stolfi.)
(Yesterday, 03:37 PM)npcompl33t wrote: You are not allowed to view links. Register or Login to view.Not at all, as i have explained with the multiple examples of paths between cities. I will use some maps below to illustrate. Your analogy is somewhat misleading, in a way that may be affecting many of your interpretations. You say: - Kansas City and Springfield are slightly ambiguous, going from OKC -> Springfield -> Kansas City is roughly the same distance as OKC->Kansas City -> Springfield. Its clear they both occupy the same 2 slots, but the relative ordering is uncertain
But that is not what you measure when you compare two pages p,q! In general, none of your curves goes through p or q, or even near them. What you measure is the distance between the two points on your route that are closest in some sense to p and q.
The two pages are Abilene and Albuquerque, and the projections on the route are Dallas and Oklahoma; and what you plot is the positions of these two cities along you route.
So you take several trips, starting from San Antonio or Houston, ending at Springfield or St. Louis, but mostly following the same route in between. For each trip you ask Google Maps which are the best exits for Abilene and Albuquerque, and it always tell you Dallas and Oklahoma. Depending in where you started, you will plot the two pages at different t values -- those of Dallas and Oklahoma -- but always in the same order and at the same distance apart.
But that does not imply that Abilene and Albuquerque are close together, or that they are aligned in the N-S direction. That apparent stability of the order and separation of Abilene and Albuquerque is an artifact of the set of routes you picked, not a property of the two pages.
Quote: (Yesterday, 02:38 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.Let v be the dominating direction of the current fitted curves. In those plots, the projection of v run mostly left to right. What would happen to the fitted curves if you stretched the data along a direction u in R^256 that is perpendicular to v? Wouldn't the new fitted curves run mostly in the direction u? Wouldn't that completely scramble the t order of the sections?
The projections run mostly left to right because I have the same dimension on the X axis in each plot, MDS1. MDS1 captures the most obvious temporal gradient, Beep! You are assuming the conclusion here...
That is not the temporal gradient. It is just the direction in R^256 space along which the data has maximum extent,according to whatever criterion MDS uses.
Quote:Basically, [the left-right diection] is because of the way that I've plotted them, it is not an artefact of the method. The line does indeed move in different directions perpendicular to this in certain regions, which is why i included the MDS5 and MDS6 charts.
Sorry, I was not asking for a different plot projection. I was asking what happens if you stretch the data in R^256 space before applying MDS etc.
That would change the direction of maximum extent of the data. The new MDS1 could be almost perpendicular to the old one, leading to completely different ordering of the sections and pages.
The longest mostly straight road trip between two state capitals in the US would probably be Sacramento to Augusta (Maine). But if a passing black hole were to stretch the US (not just the map!) in the N-S direction by a factor of 3, the longest mostly straight trip would be something like New Orleans to Minneapolis. Then the relative order of Denver and Miami, projected onto this new route, would be opposite to the old one...
Quote:A vertical white streak cannot exist across all color swabs, and they are not plotting artefacts..
Please look again at You are not allowed to view links. Register or Login to view.. Those white vertical streaks, across each color swab, are real, quite obvious, and obviously a bug. From what I understand, as the curves vary, the t-value of each page should vary smoothly over its range -- and the t-values of different pages should not change in absolute lockstep.
The streaks may not be a plotting bug, as I guessed before (they are not aligned from section to section), but they must be the result of a spurious quantization of the t-values occurring somewhere.
Quote:I tested both the lower portion [of f84v] and the lower circular together. Including the circular does reduce how much of an outlier this is, but not by enough to resolve it's anomalous status.
By "lower circular" you mean the mini-parag at bottom right, beyond the pool?
Quote:Many of the astro/cosmo sections exhibit word construction that seems somewhere in between pharma and Herbal B.
Here is another Free Advice (you can heed it without registering, but only for this month, hurry!) You should consider only text that consists of full parags. Excluding labels, titles, radial lines, circular text, etc. And mini-parags like those on f84v, f67r2, f68v3.
Which means excluding half of the Astro/Cosmo pages and all of Zodiac, unfortunately. But those non-parag texts are expected to be anomalous, and the position of a page could shift a lot simply because it has more or fewer labels compared to normal text.
Quote:As i mentioned, the missing bifolia from Quire 8/H would likely greatly have aided in understanding more about this transition if we had them.
They could... Or they could have broken the current ordering...
Quote:If this were just chol, I would agree with you, but it is not. It is ALL vocabulary. When arranged in the way my chronology , the total vocabulary retained from the start falls gradually each step, such that by the end (bio) almost nothing remains.
Bio is indeed the only section where it would make sense to use page similarity (specifically, lexeme sharing) to infer the correct reading order. Because it is the only section where one may expect a single continuous discourse that extend across page boundaries.
But, even there, the computed ordering may not be the reading order. In a novel where the story mostly switches back and forth between two locations with mostly different characters, ordering the pages by lexeme sharing would put all the pages of location A together before those of location B, or the other way around.
Quote:the gradient separates known topical sections.
Beep! I still see no "gradient" between the sections.
I see 4-5 well-separated clusters with are not linearly arranged in any of the 2D projections I have seen, including those I made 20+ years ago.
Those clusters can always be ordered by projecting along some axis, straight or curved; but there is no justification for interpreting that order as chronological.
Even because that concept may not be well defined. For each section, there is the time when the Scribe put it to vellum, and the time when the Author created the draft. There may be also the times when one or more earlier drafts were written. And, if each section is a transcription/translation/adaptation of an older ur-book by a different Ur-Author, there would be the dates when those ur-books were written. These various dates may well be in different orders...
All the best, --stolfi
Posts: 107Threads: 6 Member details
Posts: 107
Threads: 6
Thanks Received: 111 in 55 posts
Thanks Given: 60
Joined: Jul 2026
Reputation:
1
Location: United States
Yesterday, 06:52 PM
(This post was last modified: Yesterday, 07:05 PM by npcompl33t.)
(Yesterday, 06:22 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.Your analogy is somewhat misleading, in a way that may be affecting many of your interpretations. You say: - Kansas City and Springfield are slightly ambiguous, going from OKC -> Springfield -> Kansas City is roughly the same distance as OKC->Kansas City -> Springfield. Its clear they both occupy the same 2 slots, but the relative ordering is uncertain
My city example was answering a much narrower question you had posted, I am not claiming it is a perfect analogy to what was happening. My central point was uncertainty about pairwise orderings does not logically imply uncertainty about every ordering, I was responding directly to some of your narrower questions to illustrate what was happening.
You are right that similar projected positions do not establish 2 pages are close in the feature space. In fact, this analysis demonstrates narrow position ranges can coexist with substantial perpendicular variation.
You are conflating 3 diffrent quantities:
- transition similarity between two pages
- their distance from the fitted curve
- their separation along that curve
The instability charts show the third quantity. Your analogy also has a critical omission. The fitted routes respond to the observations, they are not simply independently selected highways onto which unrelated cities are projected.
(Yesterday, 02:38 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.Let v be the dominating direction of the current fitted curves. In those plots, the projection of v run mostly left to right. What would happen to the fitted curves if you stretched the data along a direction u in R^256 that is perpendicular to v? Wouldn't the new fitted curves run mostly in the direction u? Wouldn't that completely scramble the t order of the sections? The projections run mostly left to right because I have the same dimension on the X axis in each plot, MDS1. MDS1 captures the most obvious temporal gradient, [/quote]
You're right. I misunderstood you. Unequally stretching can change distances and not the fitted route. However, it is important to distinguish arbitrary distortion from plausible alternative measurement choices. Simply showing a sufficiently extreme stretch changes the answer does not invalidate the analysis. Showing a modest or defensible change alters the broad ordering would. That is why i undertook this analysis, i tested variants of these assumptions, and found that in general the overall path is stable, with certain relative orderings subsequently identified as uncertain.
You are also correct, I should have said MDS1 is the leading coordinate of the distance derived embedding.
(Yesterday, 02:38 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.Please look again at You are not allowed to view links. Register or Login to view.. Those white vertical streaks, across each color swab, are real, quite obvious, and obviously a bug. From what I understand, as the curves vary, the t-value of each page should vary smoothly over its range -- and the t-values of different pages should not change in absolute lockstep.
The streaks may not be a plotting bug, as I guessed before (they are not aligned from section to section), but they must be the result of a spurious quantization of the t-values occurring somewhere.
Genuinely empty columns may be present, but i suspect that many of the stripes you are looking at actually do have some values in them. There are several relevant properties of the implementation, none of which are bugs.
- It projects continously ont line segments, it does not round to nearest nodes
- Many pages project exactly onto the same polyline corder or endpoint. Distinct observations can share a position and move together
- The chart bins positions into 100 intervals
- The ensemble consists of separately optimized fits, including distinct starting routs and penalties. It is not a continuous sweep guaranteed to fill every position.
- If you give me a specific 'streak' to look into, i can and i will report exactly what is going on. Is there one you would prefer?
(Yesterday, 02:38 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.Here is another Free Advice (you can heed it without registering, but only for this month, hurry!) You should consider only text that consists of full parags. Excluding labels, titles, radial lines, circular text, etc. And mini-parags like those on f84v, f67r2, f68v3. I did in fact do this. I looked at circular text because you explicitly asked about it. i also looked into f86v4, somehow this seems to have been turned into f84 v in your response, so maybe wires got crossed somewhere on this.
(Yesterday, 02:38 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.They could... Or they could have broken the current ordering... 
They absolutely would not, and if you actually read my analysis, i tested exactly the impact they would have, including wild assumptions placing them far away from their current centroid. It breaks nothing, its position changes the preferred ordering of 3b/3a. I did quite an in-depth analysis on this in the OP on this thread, so its frustrating that you seem to have not actually read that.
(Yesterday, 02:38 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.But, even there, the computed ordering may not be the reading order. In a novel where the story mostly switches back and forth between two locations with mostly different characters, ordering the pages by lexeme sharing would put all the pages of location A together before those of location B, or the other way around.
you are correct, deliberately shuffling these would break the gradient. I am not claiming to have recovered reading order. I am claiming to have recovered production order. In your example, ordering the pages would reverse the authors decision to shuffle two distinct chronologies together, and would recover their true state prior to being shuffled. This is similar to what is happening with Herbal A and Herbal B.
(Yesterday, 02:38 PM)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.I see 4-5 well-separated clusters with are not linearly arranged in any of the 2D projections I have seen, including those I made 20+ years ago.
Those clusters can always be ordered by projecting along some axis, straight or curved; but there is no justification for interpreting that order as chronological.
Clusters and a gradient are not mutually exclusive. No-where do i claim a single 2d plot places them into a linear arrangement. In-fact, i make the point several times in the original horseshoe thread that this is not the case and is expected.
Posts: 2,819Threads: 28 Member details
Posts: 2,819
Threads: 28
Thanks Received: 914 in 640 posts
Thanks Given: 928
Joined: May 2025
Reputation:
0
Location: Campinas (SP), Brazil
Country:
(Yesterday, 05:44 PM)npcompl33t wrote: You are not allowed to view links. Register or Login to view.ok, several questions here Thanks for these answers!
Quote:P(h|g)= C(g,h) / sum_j C(g,j) I then combine the JS divergences between these conditional distributions. A row contributes only if it has at least 3 transitions in each profile. Excluded weights are not redistributed to the remaining rows.
Here "row" means a left character g, correct? So you consider only digraphs of characters g that occur at least three times on the page?
Let G(p) be the set of g characters that qualify for a page p. Then for any page p and any g in G(p) you have a distribution H(p,g), a vector of M probabilities P(h|g), where M is the size of the alphabet you are using. Check?
How do you combine those vectors into the vectors of 256 numbers that you feed to MDS?
Then to measure the distance of two pages p,q you compute
- NP33dist(p,q) sum{ Jdiv(H(p,g),H(q,g)) : g in G(p)∩G(q) } / |G(p)∩G(q)|
Is that right?
Quote:In my model, pair dependent weights and row exclusions mean it is not ordinary JS on one fixed probability vector. It is probably better described as weighted JS dissimilarity, I do not claim all the guarantees of ordinary JS distance.
OK.
Quote:Near the center [of the prob simplex], small JS distances are approximately a constant multiple of Euclidean distances.
Yeah, I should have guessed that from symmetry.
Quote:If i am trying to get to the heart of what you are asking with this line of inquiry, my guess would be something like: does the horseshoe and disputed ordering persist when sampling zeros/sparse rows/probability estimation is handled differently?
I did not have a specific aim, but yes, generally I worry about the impact of the measurement method on the results -- including clustering, alignment, and ordering of the data points.
Quote:The factor 1/p makes changes involving rare categories more influential. ... JS is finite but it is sensitive near zero probabilities.
This is why I asked about how the probabilities are estimated.
Any way you estimate the probabilities P(h|g), the result will have an uncertainty that depends on how many times g occurs in the page. If on two pages p,q there are 10 occurrences of "g" but 3 and 4 of "gh", respectively, intuitively those two pages are more similar on that particular digraph than if they had 1000 "g" and 300 and 400 "gh". But the JS divergences and distances use the probabilities P(h|g) which are 0.30 and 0.40 in both cases.
This obliviousness to the counts is already a problem for interpretations. But the sensitivity of JS metric to small probability values makes the problem worse. That might justify using the Bayesian estimates of P(h|g) instead of the simple frequencies, since it would ensure that all probabilities are nonzero.
In particular, if g does not occur on a page at all, the Bayesian P(h|g) will be 1/M for all h (not 0/0). Then you should not have to exclude any rows. But ideally one should also keep track of the uncertainties, and use them to compute weights for MDS, curve fitting, etc. But that looks like a huge complication...
Quote:When mapped back to probabilities, the geodesics are generally curved.
This may have a bearing on the question of how close to alignment three or more sections are.
If the sections are mapped to points of R^256 and measured with the Euclidean metric, alignment would mean the obvious thing -- they lay near some straight line of R^256. But we could also compare their prob vectors with JS distance and check how much Jdist(A,B) + Jdist(B,C) is equal to Jdist(A,C). This alignment criterion could disagree with the Euclidean one. Which one would be right?
Quote:Can JS distance be represented as Euclidean DIstance? Yes, in Hlibert space, but not generally in R^D or R^D-1.
If this mapping existed, then we could apply it and work with Euclidean metric -- which we understand better. Or less poorly...
Quote:you still have not gotten back to me on the last test you suggested that I ran.
Sorry, which one was that? You did several...
All the best, --stolfi
Posts: 2,819Threads: 28 Member details
Posts: 2,819
Threads: 28
Thanks Received: 914 in 640 posts
Thanks Given: 928
Joined: May 2025
Reputation:
0
Location: Campinas (SP), Brazil
Country:
9 hours ago
(This post was last modified: 9 hours ago by Jorge_Stolfi.)
(Yesterday, 06:52 PM)npcompl33t wrote: You are not allowed to view links. Register or Login to view.Genuinely empty columns may be present, but i suspect that many of the stripes you are looking at actually do have some values in them. There are several relevant properties of the implementation, none of which are bugs. - The chart bins positions into 100 interval
That may be it? In the plot image you posted, the t scale 0-1 is ~520 pixels. So it may be a "beating" between the bin spacing and the pixel spacing.
Looking at the magnified image, in fact I see that the white streaks are not perfectly white, just very faint.
Anyway, I was confused by those streaks into thinking that, for each curve, all the pages of a section projected on the same dark vertical streak, which seems to be ~0.01 wide in the t axis.
I understand now that this is not the case, right? for each curve, the page t's are scattered over a range of ~0.10 or more, with their positions shifting depending on the curve because of the starting point variation. Moreover, their t-order can change depending on the curve, especially for a F1 curve versus an F2 curve. Is this correct?
Quote:I did in fact do this. I looked at circular text because you explicitly asked about it. i also looked into f86v4, somehow this seems to have been turned into f84 v in your response, so maybe wires got crossed somewhere on this.
Oops! I don't know when and why the switch happened, but I was puzzled too.
So - f84v is an ordinary inlier in the Bio section?
- f86v4 is a Cosmo-like page that you placed at the end of you H-3b section because of statistics, but which is still an outlier there?
Quote:I did quite an in-depth analysis on this in the OP on this thread, so its frustrating that you seem to have not actually read that.
Sorry, I think I wrote that there was a lot of stuff to take in... an many of the details of method and nomenclature I am still trying to understand.
Quote:In your [novel] example, ordering the pages would reverse the authors decision to shuffle two distinct chronologies together, and would recover their true state prior to being shuffled. I am not claiming to have recovered reading order. I am claiming to have recovered production order.
In my example both the order of writing and the story time switch back and forth between the two settings. Like between a band of robbers on the run, and the investigators who are trying to find and catch them. So ordering the pages by similarity would have been just wrong.
Quote:This is similar to what is happening with Herbal A and Herbal B.
In that case it is quite possible (but not certain!) that Herbal-A and Herbal-B were produced in distinct epochs separated by some interval.
But it is still not certain that the statistical differences are directly due to passage of time. Again, if the differences turn out to be due to a "spelling reform", that would almost surely be the case. But they may also be due to other causes, like two different classes of plants which somehow imply very different vocabularies.
Or they are recordings of plant lore from two distinct herbalists, who spoke different dialects. That is a common situation when anthropologists record local legends, linguists record languages or dialects, journalists record war veteran stories, etc. Then Herbal-A and Herbal-B could have been created in parallel -- some plants from Mary today, some from Nancy tomorrow, some more from Mary the next day...
Quote:Clusters and a gradient are not mutually exclusive. No-where do i claim a single 2d plot places them into a linear arrangement. In-fact, i make the point several times in the original horseshoe thread that this is not the case and is expected.
But if they do not lie in an approximately straight line, what is the meaning of "gradient"?
If you take any 5 clusters in R^256 space, you can always find a projection onto some R^6 subspace such that their centroids lie on equally spaced points along an arbitrary parabolic curve. Then, on any projection from that R^6 to R^2, they will seem to be equally spaced along a parabolic curve.
Granted, you are choosing the R^6 subspace and the projection by some fixed criterion (the MDS one). Not by computing a projection that would have that specific result. Then finding that the projected centroids lie close to a parabolic curve would indeed be a somewhat non-trivial fact. But still not as impressive as if they fell close to a straight line.
But also, if you have 5 clusters in R^256, you can always find a polynomial curve of degree 4 that goes through all their centroids. In fact, for any specified order of the 5 clusters, there is a direction d in R^256 (actually MANY directions) such that the centroids project on that axis in the specified order; and then one can always find a curve of degree 4 in R^256 that goes through the centroids in that order. An then the same will happen on any 2D projection of the points and the curve;
So, if the centroids of your sub-sections do not lie on or close to a straight line, but you sill claim that there is a "gradient" along some snaking and twisting curve, you need to explain whether and when a bunch of centroids would not show a gradient, and how significant your "gradient" actually is.
All the best, --stolfi
Posts: 107Threads: 6 Member details
Posts: 107
Threads: 6
Thanks Received: 111 in 55 posts
Thanks Given: 60
Joined: Jul 2026
Reputation:
1
Location: United States
(11 hours ago)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.Here "row" means a left character g, correct? So you consider only digraphs of characters g that occur at least three times on the page?
Yes, correct, or more precisely 'starting glyph unit g'. The threshold is 3 outgoing transitions from g, not three occurrences of each bigram dh.
(11 hours ago)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.Let G(p) be the set of g characters that qualify for a page p. Then for any page p and any g in G(p) you have a distribution H(p,g), a vector of M probabilities P(h|g), where M is the size of the alphabet you are using. Check?
Yes.
(11 hours ago)Jorge_Stolfi wrote: You are not allowed to view links. Register or Login to view.How do you combine those vectors into the vectors of 256 numbers that you feed to MDS?
MDS is not fed a 256d feature vector per page. Classic MDS is done by pairwise dissimilarity of the page vectors, producing an NxN matrix, that MDS uses to produce the coordinates.
Quote:Any way you estimate the probabilities P(h|g), the result will have an uncertainty that depends on how many times g occurs in the page. If on two pages p,q there are 10 occurrences of "g" but 3 and 4 of "gh", respectively, intuitively those two pages are more similar on that particular digraph than if they had 1000 "g" and 300 and 400 "gh". But the JS divergences and distances use the probabilities P(h|g) which are 0.30 and 0.40 in both cases.
This obliviousness to the counts is already a problem for interpretations. But the sensitivity of JS metric to small probability values makes the problem worse. That might justify using the Bayesian estimates of P(h|g) instead of the simple frequencies, since it would ensure that all probabilities are nonzero.
In particular, if g does not occur on a page at all, the Bayesian P(h|g) will be 1/M for all h (not 0/0). Then you should not have to exclude any rows. But ideally one should also keep track of the uncertainties, and use them to compute weights for MDS, curve fitting, etc. But that looks like a huge complication... 
Actually, thanks, this is a great suggestion.
It is substantially more complex, but I think it might be a genuinely more accurate picture. What do you think of something like this:
- Use each pages transition counts to estimate a posterior distribution for each row
- Draw alternative probability profiles from those posteriors
- Recompute the dissimilarities and MDS for each row
- Refit curves
- Report whether the horseshoe survives uncertainty in the underlying profiles.
If I were to do the above, would that be enough to settle the matter for you?
Quote:If the sections are mapped to points of R^256 and measured with the Euclidean metric, alignment would mean the obvious thing -- they lay near some straight line of R^256. But we could also compare their prob vectors with JS distance and check how much Jdist(A,B) + Jdist(B,C) is equal to Jdist(A,C). This alignment criterion could disagree with the Euclidean one. Which one would be right?
Jdist(A,B) + Jdist(B,C) means the embedded B lies on the straight segment between embedded A and C.
Quote:Can JS distance be represented as Euclidean DIstance? Yes, in Hlibert space, but not generally in R^D or R^D-1.
If this mapping existed, then we could apply it and work with Euclidean metric -- which we understand better. Or less poorly...
[/quote]
Classical MDS using JS divergence can construct an exact Euclidean representation. I could probably figure out a way to adjust my exact distance formula to one that would work. Maybe something like a fixed weighted sum would work i think. I would be happy to add it into the above Bayesian model if you feel that it would help convince you of the results. But if I do this and it comes back as a horseshoe or gradient will you accept that the gradient exists?
Your own 2000 paper seems to suggest that it does. Didn't you find that the word length distribution is almost perfectly binomial? How would the entire text have a binomial length distribution if sections are driven by different topics with different vocabularies? Every section individually must have a binomial distribution, what changes is the word families, not the construction. This is consistent with a gradient over the course of the entire MS, not separate topic driven vocabularies.
Quote:Sorry, which one was that? You did several...
You are not allowed to view links. Register or Login to view. Nablator even answered your question and gave you an exact list of mappings.
Posts: 216Threads: 4 Member details
Posts: 216
Threads: 4
Thanks Received: 192 in 103 posts
Thanks Given: 604
Joined: Feb 2024
Reputation:
0
Country:
Oh yes, son, I was there... 49 years ago, back when the VMS wasn't solved.
First came the frequency, then entropy, ... Every year a new metric, even more complex than the last one. I witnessed the infamous npcompl33t and Stolfi debate over "geodesics on Hilbert space", then a couple of posts later "infinite dimensional Hadamard Space ellipses" or some crap that flew over my head.
Nobody took simple substitution seriously. Too many people busy crunching too many numbers, nobody had even seriously tried simple substitution. I know it sounds ridiculous but it's true! Little did we know...
|