Page 1 of 5

Patterns in Wordprinting

Posted: Mon Apr 05, 2010 10:04 pm
by _CaliforniaKid
A bit of trivia for your Monday afternoon. If none of these writers is the true author of the Book of Mormon, why does a clear "winner" emerge among them when we perform a Delta analysis of function words in the Book of Mormon?

Image

The moral of the story is that the presence of a clear pattern in our results does not necessarily indicate that our results are accurate. In any Delta analysis that chooses from a small pool of authors, one or two authors can be expected to emerge as clear winners relative to the others.

I'll have more on this once I get time to assemble some more sample texts.

Peace,

-Chris

Re: Patterns in Wordprinting

Posted: Mon Apr 05, 2010 10:46 pm
by _Nimrod
So, Paul wins with 2 Nephi, and Luke wins the rest and you strike out.

Reincarnation? Luke was reincarnated as Joseph Smith?

God inspired the author of the Book of Mormon and of Luke even to the point of wordprint characteristics (being God's), but does not so inspire Paul or you to the same degree?

Joseph Smith had a penchant for the Gospel according to Luke and read it so much he wrote the Book of Mormon to match?

I wonder if a wordprint comparison of Luke (and others) against the D&C and PoGP would yield a similar result, or one that is statistically significant?

Re: Patterns in Wordprinting

Posted: Mon Apr 05, 2010 10:57 pm
by _Uncle Dale
CaliforniaKid wrote:A bit of trivia for your Monday afternoon. If none of these writers is the true author of the Book of Mormon, why does a clear "winner" emerge among them when we perform a Delta analysis of function words in the Book of Mormon?

Image

The moral of the story is that the presence of a clear pattern in our results does not necessarily indicate that our results are accurate. In any Delta analysis that chooses from a small pool of authors, one or two authors can be expected to emerge as clear winners relative to the others.

I'll have more on this once I get time to assemble some more sample texts.

Peace,

-Chris


It would be helpful if you would supply your list of the frequently used
non-contextual words
compiled for your(?) study. If it is only based upon
a single word's recurrence (such as "and"), that might be part of the answer.

But I also do not understand why you have not used shorter textual
blocks than entire books in the Book of Mormon. If there is multiple
authorship in any one book (such as Isaiah and non-Isaiah text),
then the homogenization and over-generalization created by combining
many textual blocks into book-length segments might also be at play.

However, if Luke wrote the entire corpus (according to your calculations)
then the next logical step would be to compare Joseph Smith's use of
language with that of "Luke." If they are practically identical, then you
have a discovery worthy of professional, per-reviewed publication.

UD

Re: Patterns in Wordprinting

Posted: Mon Apr 05, 2010 11:06 pm
by _marg
CaliforniaKid wrote:

The moral of the story is that the presence of a clear pattern in our results does not necessarily indicate that our results are accurate. In any Delta analysis that chooses from a small pool of authors, one or two authors can be expected to emerge as clear winners relative to the others.


Sure that seems obvious. However if you are using that reasoning to discount the Jocker's findings I suspect you are creating a strawman argument because I doubt very much that is the sole basis behind their findings. I suspect there has to be much more to it than that, such as a strong statistical correlation between "winners" and in this case the Book of Mormon would probably be necessary. And probably there has to be a strong statistical difference between "winners versus losers". I don't know statistics but it just seems to me you must be leaving out important criteria.

Re: Patterns in Wordprinting

Posted: Mon Apr 05, 2010 11:09 pm
by _Danna
Could you provide your methodology so I can see what you have done?

Why did you test entire books instead of chapters? Given that the other hypothesis involves multiple authors - books are way too long as samples. Look what your methodolgy has done to your 'different genres' theory - Your method is clearly unable to detect these different genres in your book size samples, so why would you expect any ability to detect different authors.

Do you have a link for the program you used?

Re: Patterns in Wordprinting

Posted: Tue Apr 06, 2010 3:09 am
by _CaliforniaKid
Uncle Dale wrote:It would be helpful if you would supply your list of the frequently used non-contextual words compiled for your(?) study. If it is only based upon a single word's recurrence (such as "and"), that might be part of the answer.

The words used were the following: a, and, for, have, in, of, that, the, to, with. These are the words that appear at least once in every text sample I employed.

But I also do not understand why you have not used shorter textual blocks than entire books in the Book of Mormon.

Mostly because I just haven't gotten that far along in my analysis yet. Creating separate text files for every individual chapter is a time-consuming process, to say the least. But there are at least two other good reasons to use larger text blocks:

1) It's harder to get accurate word frequencies for smaller samples. Slight deviations over a small range will be averaged out over a large sample. For a small sample, though, small deviations can radically skew the results. In all the analyses I've done, the Book of Mormon has pretty consistent word-frequencies across all the big books, but the frequencies in the single-chapter books deviate substantially from those averages.
2) The Spalding-Rigdon folks have been inconsistent in their explanations of how Book of Mormon authorship was done. They want to explain stylistic and narrative consistencies across the whole Book of Mormon canon by arguing that editing was done in layers across the whole canon. But then they want to break it down into chapter-by-chapter chunks and argue for piecemeal authorship of the Book, with different authors contributing to different sections. The compatibility of these explanations has yet to be demonstrated to my satisfaction.

If there is multiple authorship in any one book (such as Isaiah and non-Isaiah text)

Biblical chapters were omitted from the analysis entirely. The problem of smaller Bible quotations, however, cannot be any more resolved by breaking the Book of Mormon up into chapters than it is by my own approach. Such quotations are so astoundingly pervasive in the Book of Mormon, in fact, that I'm tempted to say we should either try to purge them altogether and re-run the analysis, or give up the word-frequency approach entirely. I suspect they strongly influence the results.

then the homogenization and over-generalization created by combining many textual blocks into book-length segments might also be at play.

There are always tradeoffs. The Jockers method homogenizes each author corpus into a single average, and then compares this average to small blocks of Book of Mormon text. This obscures differences that may exist between texts in the author's known corpus. (In fact, my Oliver Cowdery sample currently consists of two letters, and they have radically different word prints. They are closer to Chris Smith's average word print and to Joseph Smith's average word print, respectively, than they are to each other.) At least in comparing author averages to large, average Book of Mormon samples, we're comparing apples to apples.

Marg,

Sure that seems obvious. However if you are using that reasoning to discount the Jocker's findings I suspect you are creating a strawman argument because I doubt very much that is the sole basis behind their findings.

It wasn't obvious to Danna and Roger in our previous discussions. They specifically argued that because the Jockers results are non-random-- i.e. strongly select a relatively few authors as the creators of the Book of Mormon-- this was evidence that they were meaningful. When mikwut said he thought clear winners would emerge even in a non-meaningful study of impossible control authors, Danna and Roger expressed skepticism about this. In their opinion, the results for non-authors of the Book of Mormon should be randomly distributed.

At least, that's how I understood their earlier remarks.

Danna,

There are free programs on the Internet that will perform Delta authorship analysis, the best-known being Signature. However, the present version of Signature relies largely on measures that don't work for the Book of Mormon, such as sentence and paragraph length. I actually programmed my own statistical tool for this study, which I can tweak and customize at will in order to account for new variables or perform different kinds of analyses.

The methodology is strongly similar to the Jockers methodology, except that I'm focusing on "function words" rather than extending the number of studied words to include less frequent, presumably more contextual words like "power" and "king". Basically, it works let this. For each sample text/author corpus, we generate an average word frequency for each of the words being studied. We then transform these separate word frequencies into what's called a z-score (the purpose of which is basically to "weight" each word vector equally). We then find the "distance" between the author z-score and the sample text z-score for that vector. And then, finally, we average all the "distances" for the various word vectors together in order to get an average "distance" between the two texts. The author with the lowest "distance" score for a sample text is theoretically the most probable author of that text. Scores under "1" indicate that the text falls within the standard deviation for that author.

I haven't incorporated the Nearest Shrunken Centroids improvement, at least not yet. But that's just a slightly different way of organizing the Delta data, if I understand correctly. (I haven't really looked into NSC yet.)

Peace,

-Chris

Re: Patterns in Wordprinting

Posted: Tue Apr 06, 2010 4:23 am
by _Danna
CaliforniaKid wrote:There are always tradeoffs. The Jockers method homogenizes each author corpus into a single average, and then compares this average to small blocks of Book of Mormon text. This obscures differences that may exist between texts in the author's known corpus. (In fact, my Oliver Cowdery sample currently consists of two letters, and they have radically different word prints. They are closer to Chris Smith's average word print and to Joseph Smith's average word print, respectively, than they are to each other.) At least in comparing author averages to large, average Book of Mormon samples, we're comparing apples to apples.


The Jocker's word print has 110 parameters, yours has ten. And if I understand your method, you average that down to one figure. The Jockers word list was repeatedly tested with split-half testing of known documents to determine which set of words gave the most accurate differentiation between the known authors. You are not comparing apples to apples at all.

for what it's worth I disagree with Marg that there was more to the Jockers' conclusion than their study findings alone (if that was what she was actually saying). Their hypothesis was based on reports of the work of other authors appearing in the BoMor, but their findings stand alone as results of their statistical investigation.

There are free programs on the Internet that will perform Delta authorship analysis, the best-known being Signature. However, the present version of Signature relies largely on measures that don't work for the Book of Mormon, such as sentence and paragraph length. I actually programmed my own statistical tool for this study, which I can tweak and customize at will in order to account for new variables or perform different kinds of analyses.


Are you following the Jockers' methodology though? You cannot arbitrarily change their methodology then claim to have 'disproved' it. You have changed an important feature by using a very short list of 'function words', which is essential to your genre theory, but to change any more that that, you are introducing too many confounds to allow comparison. Have you tested to see whether your function words actually differentiate between your known authors? The point of Jockers' study is that the words they use have been tested and shown to differentiate between the authors at about 90% accuracy. Without knowing how well your function words do this, it is impossible to calculate the probability of getting the results you got and thus see how useful they are.

The methodology is strongly similar to the Jockers methodology, except that I'm focusing on "function words" rather than extending the number of studied words to include less frequent, presumably more contextual words like "power" and "king". Basically, it works let this. For each sample text/author corpus, we generate an average word frequency for each of the words being studied. We then transform these separate word frequencies into what's called a z-score (the purpose of which is basically to "weight" each word vector equally). We then find the "distance" between the author z-score and the sample text z-score for that vector. And then, finally, we average all the "distances" for the various word vectors together in order to get an average "distance" between the two texts. The author with the lowest "distance" score for a sample text is theoretically the most probable author of that text. Scores under "1" indicate that the text falls within the standard deviation for that author.


Can you explain what you used to calculate Z-scores and why - this calculation is not part of delta which uses relative frequencies.

However, NSC does do this for each of the 110 words across known all samples. Assuming you used all your samples to calculate z-scores, you have then obliterated any 'word-print' pattern by combining the z-scores into what is effectively a single 'difference' (distance) score. Another critical feature of Jockers' NSC work is that the scores for each word are compared separately to get a pattern across the target vocab - one author may use 'and' at twice the normal rate, another 'the' - in your analysis they will have the same 'distance' score. This is directly related to the original development of NSC as a classification tool in genetic analysis. Your analysis obliterates the 'print', and would be unable to detect and weigh different author prints within a target sample. You need to provide some heavy justification for 'lumping' as opposed to the 'splitting' Jockers method describes.

In sum, I think you have changed too many features to claim to have either replicated Jockers, or to have performed a delta test.

Critical features you need to address are:

Validating your target word list before applying the test

Conducting analysis which looks at the use of each target word, (the word-print), not a single difference score (basically, just applying delta according to Jockers' method but using your validated wordlist).

Using chapters instead of books (which you say you are moving on to).

-------------------------------------------------
Here is Jockers' method from the pre-print (I know it is a lot to post, but their pre-print is available free from Jockers' site now). Note that most of it concentrates on validating the wordlist, which is critical to the analysis:


Jockers' Method:

Methodology
As described in the previous section, our data consist
of 239 samples of unknown authorship (corresponding
to chapters from the Book of Mormon) and
217 samples written by seven known authors. We
refer to this analysis as the ‘seven-author case’. The
number of text samples used for this analysis is
as follows: Cowdery (nineteen), Pratt (fifty-three),
Rigdon (twenty-three), Spalding (seventeen),
Isaiah-Malachi (seventy), Barlow (twelve), and
Longfellow (twenty-three). We used a set of 110
words or ‘features’, obtained in three steps:
(1) We selected the words that occurred at least
once in the samples from each author and
also at least once in the Book of Mormon.
This resulted in a set of 521 words.
(2) We selected the subset of these 521 words that
have a mean relative frequency, across the
456 samples, of at least 0.1%. This resulted
in a set of 114 words.
(3) We removed the words ‘god’, ‘ye’, ‘thy’, and
‘behold’, as these occurred at much higher
frequencies in texts relating to biblical subject
matter.
The resulting list of 110 words is available in
Appendix B.31
In order to compute delta scores and apply
NSC, we first converted the 110 word counts for
each text into relative word frequencies. For NSC,
we formatted the data as a matrix of dimension
456 x 110 (number of samples by number of
words). We subtracted out the mean from each
column and divided the entries in each column
by the standard deviation for that column. We
then applied NSC to the data, using the ‘pamr’
(Prediction Analysis for Microarrays) package that
is freely available on the R-statistical software
website.32

Both delta and NSC involve the selection of
tuning parameters. For both methods, this tuning
parameter determines the number of words to
include in the classifier. In order to determine the
success rates of NSC and delta at classifying chapters
of known authorship, and in order to select a
value for the tuning parameters, we performed
cross-validation. Roughly speaking, cross-validation
is performed as follows, for a range of values of the
tuning parameter:
(1) Randomly split the samples of known authorship
into two sets: a ‘training set’, containing
most of the samples, and a ‘test set’, containing
a smaller portion of the samples.
(2) Perform the classification method of interest
(either delta or NSC) for a given value of the
tuning parameter, training on the training set
and testing on the test set.
(3) Compute the error fraction from the number
of misclassified test set samples.
Cross-validation allowed us to estimate the error
that we would obtain if we tried to classify the
samples of known authorship using NSC and delta.
The above process was repeated multiple times, and
the average misclassification error rate recorded.
The lowest delta error rate of 11.1% was obtained
using ninety words. This means that if we used delta
to classify a new sample written by one of the seven
known authors, then the probability of correct classification
would be 88.9%. The lowest NSC error
rate was obtained when all 110 words were included;
the error rate was 8.8%. This means that we would
expect to classify correctly a new sample written
by one of the seven candidate authors 91.2% of
the time. Since there are seven candidate authors,
a classifier that selected an author completely at
random would give a correct classification rate of
1/7 or 14.3%, and an average misclassification error
rate of 6/7, or 85.7%. Therefore, the low error rates
obtained using NSC and delta are impressive. The
fact that NSC results in lower error rates indicates
that this method is appropriate for authorship attribution,
and may in this case be superior to delta.
Using delta, five of the 239 chapters of the
Book of Mormon were incorrectly assigned to control
author Longfellow (none to Barlow), an error
rate of 2.1%. Using NSC, only two chapters
were assigned incorrectly to Longfellow (none to
Barlow), an error rate of 0.8%. To provide best
estimates of individual chapter authorship for
the five authors who are linked historically to the
Book of Mormon (Spalding, Rigdon, Cowdery, and
Pratt) or who are known to have contributed
(Isaiah-Malachi), we also performed a second delta
and NSC analysis (hereafter referred to as the ‘fiveauthor
case’) in which we omitted the Barlow and
Longfellow control texts. In the five-author case,
the lowest NSC error rate was obtained using 108
words (listed in Appendix B)

Re: Patterns in Wordprinting

Posted: Tue Apr 06, 2010 6:07 am
by _marg
Danna wrote:

for what it's worth I disagree with Marg that there was more to the Jockers' conclusion than their study findings alone (if that was what she was actually saying).


I don't believe I said that but perhaps you could help. I took it that Chris was saying that no matter what writers are tested using this Delta statistical analysis there will always be a winner amongst the group, there will always be one writer closer in match than other writers to a text, even if none of them wrote the text. So it seems to me there has to be more to it than that for a wordprint analysis to indicate whether a writer is a likely author or not of a text. The analysis if it is going to offer value must be able to provide a means to eliminate writers as well as to indicate how likely a writer is a contributing author of a text. And I believe that's what the Jocker's studies have done. By using control writers known to have not contributed to a text, the other writers tested ( correct me if I'm wrong) would have to show a significant statistical difference to the control writers to be considered a contributing author or the author of a text. So it seems to me Chris is leaving out that aspect of the word print testing by Jockers.

Re: Patterns in Wordprinting

Posted: Tue Apr 06, 2010 6:20 am
by _CaliforniaKid
Danna wrote:The Jocker's word print has 110 parameters, yours has ten.

Yes; Jockers used much looser parameters for determining which words are non-contextual. And actually, he found that the inclusion of more words actually strengthened the authorship attribution results within his control samples. But I'd argue that that's because the author samples were largely internally homogenous, but different from each other in terms of genre. So under those circumstances, the more genre-sensitive you make the method, the more accurate your author-attribution results would be. (Including more words might indeed improve author attibution if all texts are of the same type and genre, as in the Federalist Papers case. Here the more "contextual" words might be indicative of the particular concerns and thought processes of the individual authors. But I'd expect that it would decrease attribution strength across genres. This is one of the hypotheses I'm going to be testing in more detail.)

And if I understand your method, you average that down to one figure.

That's no different from what Jockers does. It's just how Delta works. Note that what's being averaged is not the word frequencies themselves, but the distances between the texts based on each frequency vector. So, we're treating each word vector independently right up until the end, and then we're taking the averages of the distances for each vector in order to get a sort of "total distance" across all vectors.

The Jockers word list was repeatedly tested with split-half testing of known documents to determine which set of words gave the most accurate differentiation between the known authors.

This is one of my major objections to the Jockers method. By splitting the author corpuses in half, we're still ensuring that each half is an average across multiple texts. In other words, genre differences will tend to be "flattened" on both sides of the control comparison. To get a better idea of the accuracy of the method for cross-genre comparison, you'd need to divide the authors' texts according to genre, and test the different genres against each other. And to get a good idea of how accurate the method is for small samples, you'd need to separate out single, small texts from the author corpus and test them individually against the author corpus rather than doing the sort of aggregate corpus-halving by which he produced his favorable accuracy ratings. (Single-text testing is how my own program handles its control tests. The results so far have been fairly non-robust. In fairness to Jockers, he does say that in his control-halving he divided the samples into a larger and smaller portion. But it's still not comparable to using small, individual texts.)

Are you following the Jockers' methodology though? You cannot arbitrarily change their methodology then claim to have 'disproved' it. You have changed an important feature by using a very short list of 'function words', which is essential to your genre theory, but to change any more that that, you are introducing too many confounds to allow comparison.

The function words are of course included in the Jockers study, so if they aren't accurate measures of authorship then they would throw off his results. But I generated my list of words using simply a more rigorous application of his own selection criteria. I do intend to do some additional programming so that I can do the study the way he does it and see if I get better results, but I'm not there yet. (Programming is time-consuming work, as evidenced by how far behind I am on my homework as a result of this project!)

Have you tested to see whether your function words actually differentiate between your known authors?

To some extent, they do. But I have also observed strong genre linkages. I'd argue that the genre linkages are probably stronger than the author linkages, and will confound any analysis that ignores them (as Jockers' does). One of the things I'm eventually going to try is to "subtract out" the influence of genre. But that will require a lot more work and a large number of samples from many genres and many authors.

Can you explain what you used to calculate Z-scores and why - this calculation is not part of delta which uses relative frequencies.

Z-scores are indeed part of Delta, and Jockers does use them. This is what he's referring to when he says, "We subtracted out the mean from each column and divided the entries in each column by the standard deviation for that column."

A z-score is the word frequency for a text, minus the mean frequency across all texts (which ends up cancelling out in a Delta analysis), divided by the standard deviation across all texts. For a Delta analysis, we generate a separate z-score for each of the word vectors under study. What this basically does is weights each word vector equally. If we used absolute frequencies rather than z-scores, word vectors with higher absolute variance across all text samples would end up more heavily weighted in the final Delta comparison. For example, if "and" occurs between 20 and 100 times per thousand words across all samples, whereas "for" occurs between only 5 and 10 times per thousand words across all samples, then aggregating the frequency distances between texts would result in the "for" distances being swamped out by the much larger "and" distances. Dividing each word vector by its standard deviation normalizes the various word vectors by their variance so that now they are comparable and equally weighted.

The use of standard deviation in weighting the word vectors assumes that the "spread" of each word vector across all our sample texts is a typical spread. If we have an overly large number of samples from one author or genre, then the standard deviation for one or more of the word vectors used in the analysis might skew small, in which case the vector(s) in question would still be unduly weighted. This is probably the case in Jockers' analysis, since so many of his samples were from the Book of Mormon.

Assuming you used all your samples to calculate z-scores, you have then obliterated any 'word-print' pattern by combining the z-scores into what is effectively a single 'difference' (distance) score. Another critical feature of Jockers' NSC work is that the scores for each word are compared separately to get a pattern across the target vocab - one author may use 'and' at twice the normal rate, another 'the' - in your analysis they will have the same 'distance' score.

No, that's not how it works. A sample text that uses "and" at twice the normal rate would be strongly attributed to the previous author, whereas a sample text that uses "the" at twice the normal rate would be attributed to the latter. The averaging isn't done until the very end. The individual vectors are kept separate until we've determined the differences between the author and the sample for each vector. Only then are the distances for all the vectors averaged in order to get a mean distance between the sample and author.

Hope that clarifies things for you.

Peace,

-Chris

Re: Patterns in Wordprinting

Posted: Tue Apr 06, 2010 6:29 am
by _CaliforniaKid
marg wrote:The analysis if it is going to offer value must be able to provide a means to eliminate writers as well as to indicate how likely a writer is a contributing author of a text.

One would think, right? But no, Jockers' attribution probabilities are actually relative probabilities, assuming that one of the authors included in the study was the author of the text.

And I believe that's what the Jocker's studies have done. By using control writers known to have not contributed to a text, the other writers tested ( correct me if I'm wrong) would have to show a significant statistical difference to the control writers to be considered a contributing author or the author of a text. So it seems to me Chris is leaving out that aspect of the word print testing by Jockers.

In the results I reported in the OP, Luke shows a significant statistical difference to myself and Paul. That's exactly my point. The fact that the Rigdon samples turn out to be stylistically much closer to the Book of Mormon than Barlow or Longfellow does not mean that Rigdon is the author. It means only that the Rigdon samples are stylistically much closer to the Book of Mormon than Barlow or Longfellow, just as Luke and Acts are stylistically closer to it than my own works and the authentic Pauline epistles are.

Peace,

-Chris