Chapter 4 Computation Chapter
4.1 Rationale
Music theorists use their experience and intuition to build appropriate curricula for their aural skills pedagogy. Teaching aural skills typically starts with providing students with simpler exercises, often employing a limited number of notes and rhythms, and then slowly progressing to more difficult repertoire. This progression from simpler to more difficult exercises is evident in aural skills textbooks. Of the major aural skills textbooks such as the Ottman and Rogers (2014), Berkowitz (2011), Karpinski (2007), and Cleland and Dobrea-Grindahl (2010), each is structured in a way that musical material presented earlier in the book is more manageable than that nearer the end. In fact, this is true of almost any étude book: open to a random page in a book of musical studies and the difficulty of the study will likely scale accordingly to its relative position in the textbook. But it is not a melody’s position in a textbook that makes it difficult to perform: this difficulty comes from the structural elements of the music itself.
Intuitively, music theorists have a general understanding of what makes a melody difficult to dictate. Factors that might contribute to this complexity could range from the number of notes in the melody, to the intricacies of the rhythms involved, to the scale from which the melody derives, to even more intuitively understood factors such as how tonal the melody sounds. Although given all these factors, there is no definitive combination of features that perfectly predicts the degree to which pedagogues will agree how complex a melody is. In many ways, questions of melodic complexity are very much like questions of melodic similarity: it depends on both who is asking the question and for what reasons (Cambouropoulos 2009).
Examining the melodies presented in Figures 4.1 and 4.2, most aural skills pedagogues will be able to successfully intuit which melody is more complex, and presumably, more difficult to dictate.
While I reserve an extended discussion of what features might characterize why one melody is more difficult to dictate than the other for this chapter, I assume that these melodies differ in their ability to be dictated in some fundamental way when performed in a similar fashion. Additionally, many readers of this dissertation can draw from anecdotal evidence of their own as to how students at various stages of their aural training might fair when asked to dictate both melodies. For some, Melody 4.2 might be overwhelmingly difficult.
In fact, Melody 4.2 might be overwhelmingly difficult for the vast majority of musicians to dictate. From a pedagogical standpoint, educators need to be able to know how difficult melodies are to dictate in order to ensure a degree of fairness when assessing a student’s performance. While of course with each student there are inevitably many variables at play in aural skills instruction ranging from personal abilities, to the goals of the instructor in the scope of their course, I find it fair to claim that pedagogues assume that students will be expected to pass pre-established benchmarks throughout their aural skills education. As students progress, they are expected to be able to dictate more difficult melodies, yet exactly what makes a melody complex and thus difficult to dictate is often left to the expertise and intuition of a pedagogue. Intuition is an important skill for teachers to cultivate, but when it comes to determining objective measures of judgment, research from decision making science tends to suggest that no matter the expertise, collective and objective knowledge tends to outperform a single person’s judgment (Kahneman 2012; Logg, Minson, and Moore 2019; Meehl 1954). Having more clearly defined performance benchmarks also helps remove biases in grading that teachers may or may not be explicitly aware of. Recent research has suggested that even aural skills pedagogues are open to the idea of looking for more standardization in aural skills assessments (Paney and Buonviri 2014).
In this chapter, I survey and examine how tools from computational musicology can be used to help model an aural skills pedagogue’s notion of complexity in melodies. First, I establish that theorists agree on the differences in melodic complexity using results from a survey of 40 aural skills pedagogues. Second, I explore how both static and dynamic computationally derived abstracted features of melodies can and cannot be used to approximate an aural skills pedagogue’s intuition. Third and finally, I use evidence afforded by research in computational musicology to posit that the distributional patterns in a corpus of music can be strategically employed to create a more linear path to success among students of aural skills. I demonstrate how combining evidence from the statistical learning hypothesis, the probabilistic prediction hypothesis, and a newly posited distributional frequency hypothesis, it is possible to explain why some musical sequences in a melody are easier to dictate than others. Using this logic, I then create a new compendium of melodic incipits, sorted by their perceptual complexity, that can be used for teaching applications.
4.2 Agreeing on Complexity
Returning to melodies 4.1 and 4.2 from above, an aural skills pedagogue most likely has an intuition to which of the two melodies X or Y would be easier to dictate. Melody 4.1 exhibits a predictable melodic syntax and phrase structure, the chromatic notes resolve within the conventions of the Common Practice period, and the melody itself could be scored with tertian harmony. On the other hand, Melody 4.2’s syntax does not conform to the conventions of the Common Practice period and does not imply any sort of underlying harmony or predictiable phrase rhythm. The duration of the rhythms appear irregular and the melody implies an uneven phrase structure. Yet both melodies 4.1 and 4.2 have the exact same set of notes and rhythms. Despite these content similarities, it would be safe to assume that melody 4.1 is probably much easier to dictate than melody 4.2 assuming both were to be played in a similar fashion.
In fact, aural skills pedagogues tend to agree for the most part on questions of difficulty of dictation. To demonstrate this, I surveyed 40 aural skills pedagogues who all have taught aural skills at the post-secondary level. In this survey, participants were asked the questions presented in Table ?? and Table ?? using a sample of 20 melodies found in the a commonly used sight-singing text book (Berkowitz 2011). I present the details of the survey below.
4.2.1 Methods
To select the melodies used in this survey, I randomly sampled 30 melodies from a corpus of melodies (N = 481) from a subset of the Fifth Edition of the Berkowitz “A New Approach to Sight Singing” (Berkowitz 2011) in order to ensure a representative sampling of melodies that might be used in a pedagogical setting. After piloting the randomly sampled melodies on a colleague, I again randomly sampled half of this sub-set and then added in five more melodies that were not in the new set from earlier sections of the book in order to be more representative of materials students might find in the first two semesters of their aural skills pedagogy. I ran the survey from January 31st of 2019 until March 7th, 2019. The survey comprised of two sets of questions.
Six questions asked about the teaching background of respondents and can be found in ??. These questions were followed by asking participants to make five ratings over the 20 different melodies. The five questions can be found in ??. To encourage participation, two $30 cash prize were offered to two participants. The survey had questions that were specifically designed to gauge their appropriateness for use in a melodic dictation context. Participants were recruited exclusively online and all provided consent to partaking in the data collection as approved by the Louisiana State University Institutional Review Board.
The table below contains the questions used in the demographic questionnaire. Examples were given following each questions and can be found on the survey link.
| Demographic.Questions |
|---|
| What is your age, in years? |
| What is your educational status? |
| How many years have you been teaching Aural Skills at the University level? |
| Which type of syllable system do you prefer to use? |
| On which instrument have you gained the most amount of professional training? |
| What is the title of the last degree you received? |
| At what institution are you currently teaching? |
The table below contains the questions regarding the ratings of the melodies. Participants either responded using ordinal categories or moved a slider that sat atop a 100 point scale. The survey can be found at https://musiccog.lsu.edu/dictation_survey/aural_survey.html.
| Item.Questions |
|---|
| During which semester of Aural Skills would you think it is appropriate to give this melody as a melodic dictation? |
| How many times do you think this melody should be played in a melodic dictation considering the difficulty you noted in your previous question? Assume a reasonable tempo choice from 70-100BPM. |
| Please rate how difficult you believe this melody to be for the average second-year undergraduate student at your institution. The far left should indicate ‘Extremely Easy’ and the far right should indicate ‘Extremely Difficult’. |
| Please rate this melody’s adherence to the melodic grammar of the Common Practice Period. The far left should indicate ‘Not Well Formed’ and the far right should indicate ‘Very Well Formed’. |
| Is this melody familiar to you? |
Of the respondents, the average amount of years teaching aural skills was 8.76 years (\(SD = 7.60, R: 21-29\)). I plotted the breakdown of the respondent’s age and educational status below in Figure 4.3. Of the 40 respondents, all reported used some sort of movable system other than 2 who used a fixed system. The sample represented over 30 different institutions. Overall, the sample reflects a wide range of experience of teaching aural skills. The sample contains both younger and older individuals, as well as a range of experience. In the Figures 4.4 through ?? below, I list the 20 melodies sampled.
4.2.2 Agreeing on Difficulty
In order to assess the degree to which pedagogues agreed on a melody for melodic dictation, I first plotted the mean ratings for each melody across the entire sample along with their standard error of the means in Figure 4.24. The \(x\) axis uses the rank of the melodies, not their index position in the Berkowitz textbook. I chose to use this rank order metric as the number of a melody in a textbook is presumed to be best conceptualized as an ordinal variable. For example, it would be correct to assume that Melody 200 is more difficult than melody 2, but not by a factor of 100.
From Figure 4.24, there is an increasing linear trend from ratings of melodies being less difficult to more difficult across the sample. Using an intraclass coefficient calculation of agreement using a two-way model (both melodies and raters treated as random effects), the sample reflects an interclass correlation coefficeint of .79. According to Koo and Li (2016), this reflects a good degree of agreement between raters. This trend across the sample appears in the opposite direction when plotting the mean values to the fourth question in Figure 4.25 from the survey reflecting the melody’s adherence to the melodic grammar of the Common Practice period.
While similar trends appear here, yet in the opposite direction as expected, there is a clear breaking of linear trend in the far right potion of the graph that shows melodies that were sampled from the chapter of the corpus that contains atonal melodies. Using an intraclass coefficient calculation of agreement using a two-way model, with melodies and raters treated as random effects, the sample reflects an interclass coeffiecent of .65, which according to Koo and Li (2016) indicates a moderate degree of agreement among raters. This lower agreement rating is most likely due to the subjectiveness of this question. In their free text responses, many participants expressed difficulty in surmising what this meant.
The trends from Figure 4.24 and Figure 4.25 occur in the opposite direction. As the index or rank of the melody increases, so does the difficulty for the rating as would be expected. As the index or rank of the melody increases, its adherence to subjective ratings of melodic grammar of the Common Practice period decreases. Taken together, I ran a correlation on every one of the twenty melodies between a single rater’s judged difficulty and its judged adherence to tonal expectations of the common practice era. The correlations for all 20 melodies are plotted here in Figure 4.26. From this chart, we see this trend is not uniform across all melodies.
Overall, the sample exhibited an acceptable degree of inter-rater reliability as measured by the interclass correlation coefficient. Plotting the respondent’s answers across the textbook that melodies were taken from, with the book progressing from less to more difficult, it does appear that aural skills pedagogues tend to agree on how difficult a melody is when used in a dictation setting.
Central to my argument, there appears to a linear trend of difficulty across the sample based on the melodies rank in the sample. In fact, although I presented the data above as ordinal using rank in the textbook, when I ran a mixed-effects linear regression predicting melody difficulty with both rank order as a variable as well as the actual index number of the melody from the Berkowitz, the index model significantly outperforms the rank order model. Using the lme4 package (Bates et al. 2015), I fit two linear mixed effects models predicting difficulty of melody with subject and item both as random effects in the model, with the only difference in models being a melody rank or melody index. When comparing models, the index model (BIC = 6706.3) provided a better fit to the data (\(\chi^2\)=5.38, \(p<.05\)) than the rank model (BIC = 6711.7).
Taken together, both anecdotal and empirical evidence for this survey suggest that aural skills pedagogues tend to agree on how difficult a melody is for use in an aural skills setting. This sense of difficulty or complexity tracks as the book progresses, but to attribute the cause of a melody being difficult as its position in the book would be putting the cart before the horse. Having now formally established this almost intuitive notion, the remaining portion of this chapter investigates how computationally derived tools can be used to model these commonly held intuitions. In order to provide a sense of validity to the measure, I carry forward ratings from the survey reported and use the expert answers as the ground truth for the the resulting models.
4.3 Modeling Complexity
The ability to quantify what theorists generally agree to be melodic complexity depends on distilling complexity into its component parts. Earlier, when comparing melodies X and Y, some of the features put forward that might contribute to complexity were features such as note density, the melody’s rhythm, what scale the melody draws its notes from, and how tonal the melody might be perceived. Some combination of these component features presumably make up the construct of complexity.
Attempting to use features of a melody to to predict how well a melody is remembered has a long history. In 1933, Ortmann put forward a set of melodic determinants that he asserted predicted how well a melody was remembered. These features such as a melody’s repetition, pitch-direction, contour (conjunct-disjunct motion), degree, order, and implied harmony (chord structure) were deemed to affect the melody’s ability to be remembered (Ortmann 1933).
Since Ortmann, pedagogues such as Taylor and Pembrook have expanded on this research, finding significant effects of musical features such as length, tonality, as well as type of motion as well as an effect of experimental condition (Taylor and Pembrook 1983). Following up on Taylor’s investigation, Pembrook (1986) found evidence corroborating Ortmann’s initial claims that his four major determinants (repetition, note direction, conjunct-disjunct motion, degree of disjunctivness) had a significant main effects on an individual’s ability to take dictation, yet note that these values do not exhaustively explain the findings. In their discussion, they also note the problems of completely isolating the effects of certain musical features as when you change one parameter, others are also subject to change. When looking at changes in structural elements of melodies, there is a collinearity issue among features. Not only does this problem exist within features of melodies, but also among participants. In reflecting on other factors that might contribute to their results, the authors note
Clearly, a complete hierarchy of determinants would constitute a very long list, because not only would the many melodic structures be included, but also their interactions with subject and environmental variables. The ones included in the present study (musical experience, melodic carryover, and response method) provided evidence that the melodic determinants are not constant; rather, they vary as a function of the subject and environmental factors, which in turn can have significant effects on music discrimination and memory. (p. 33)
The authors later in the article go on to stress that future work should both replicate their findings as well as expand their modeling parameters. They call for a larger sample, a broader spectrum of musical experiences, and to investigate more musical features.
Since then, some, but not many researchers, have employed using features of the melodies to predict a behavioral measure in experimental settings. Not using as extensive of a battery as Ortman, Taylor, or Pembrook, researchers in music psychology such as as Akiva-Kabiri et al. (2009), Dewitt and Crowder (1986), Eerola, Louhivuori, and Lebaka (2009), Schulze and Koelsch (2012) have used the number of notes in a melody as a successful predictor of difficulty in melodic perception and discrimination tasks. Expanding on just using frequency of note counts, Harrison, Musil, and Müllensiefen (2016) instead of looking at single measures of melodic complexity, addressed the melodic collinearity issue noted by Taylor and Pembrook by using data reductive techniques to derive a single complexity measure found to be predictive in their statistical modeling deriving these measures from the FANASTIC toolbox (Mullensiefen 2009). Following this research, Baker and Müllensiefen (2017) also incorporated a similar measure of complexity in their model of leitmotiv recognition in which they predicted recall rates in a recognition paradigm.
Each of these examples operationalizes some feature of the melody with a quantitative, numerical proxy that is assumed to be able to be mapped to perception. Ortman referred to these as determinants, while others such as Müllensiefen refer to them as features (Mullensiefen 2009). Since the word feature refers to a ‘distinctive attribute’, I will use this terminology throughout the rest of the chapter, though note that other terms have been used.
4.3.1 What Are Features?
A feature can be either a quantitative or qualitative observable feature of a melody that is assumed to be perceptually salient to the listener. Features are often difficult to quantify with the traditional tools of music analysis. Often, these features come inspired from other domains like computational linguistics.
The nPVI began as a measure of rhythmic variability in language (Grabe 2002). Shown below, the nPVI quantifies the amount of durational variability in language. It works by comparing the variability of vowel length compared to syllable length
\[nPVI = 100 * [\sum_{k=1}^{m-1} | \frac{d_k - d_{k+1}}{(d_k + d_{k+1})/2}/(m-1)] \]
where \(M\) is the number of vowels in an utterance and \(d_k\) is th duration of the \(k^{th}\) item and has been used in musical contexts (VanHandel and Song 2010).
In linguistics, the nPVI has been used to delineate quantitative differences between stress and syllable timed languages. Recently in the past decade, music science researchers have used the nPVI to attempt to investigate claims about the relationship between speech and music (Daniele and Patel 2004; Patel and Daniele 2003; VanHandel and Song 2010). While results are mixed regarding the nPVI’s predictive ability and there have been recent calls to limit the measure’s use (Condit-Schultz 2019), it does serve as a very good example of a computational derived measure. Just like summarizing the range of a melody by subtracting the distance between the lowest and highest notes, the nPVI summarizes a phrase and importantly assumes that this measure is representative of the entire phrase the calculation was performed upon.
In computational musicology, features of melodies can generally be classified into two main types: static and dynamic features. Static features compute a summary measure over the entire melody while dynamic features calculate values for each event onset in a melody. One of the most complete set of static computational measures as applied to music perception come from Daniel Müllensiefen’s’ Feature ANalysis Technology Accessing STatistics (In a Corpus) or FANTASTIC toolbox (Mullensiefen 2009). According to FANTASTIC’s technical report,
“FANTASTIC is a program…that analyzes melodies by computing features. The aim is to characterise a melody or a melodic phrase by a set of numerical or categorical values reflecting different aspects of musical structure. This feature representation of melodies can then be applied in Music Information Retrieval algorithms or computational models of melody cognition.” (pp. 4)
Drawing from fields both central and peripheral to music science, FANTASTIC computes a collection of 38 features to analyze features of melodies and joined a large and continuing tradition of analyzing music computationally (Lomax 1977 , 1977; Eerola, Louhivuori, and Lebaka 2009; Huron 1994; Lartillot and Toiviainen 2007; McFee et al. 2015; Steinbeck 1982). Additionally, FANTASATIC also provides a framework for comparing the features of a melody with a parent corpus from which the melody is assumed to belong similar to a sample-population relationship.
4.3.2 Back to the Classroom
Returning to the Aural Skills classroom, many of these features can be used to approximate the previously established intuitions of complexity as agreed upon by theorists. Below in Figure 4.27, I plot the the mean difficulty and grammar ratings given by experts for each melody in the experimental sample against each of the output of FANTASTIC’s features by correlating the two measures. Additionally, ?? displays the five strongest positive and negatively correlated features of FANTASTIC’s output with the ground truth, expert ratings.
| Feature | Difficulty | Grammar |
|---|---|---|
| i.abs.std | 0.89 | -0.82 |
| i.abs.mean | 0.87 | -0.91 |
| step.cont.loc.var | 0.87 | -0.74 |
| i.entropy | 0.85 | -0.74 |
| p.entropy | 0.84 | -0.72 |
| d.median | -0.19 | 0.22 |
| d.eq.trans | -0.20 | 0.04 |
| mean.Yules.K | -0.43 | 0.40 |
| tonalness | -0.48 | 0.44 |
| mean.Simpsons.D | -0.57 | 0.50 |
From Figure 4.27 and Table ??, there are some features that share a strong relationship with the ground truth of the expert intuitions.
The top five features that correlate most strongly with the expert ground truths are related to the intervallic content of a melody.
The first two features, i.abs.std
and i.abs.mean
are derived measures using absolute interval distance computations.
The other top three features, step.cont.loc.var
, i.entropy
, and p.entroy
are related to entropy measures.
Of the negatively correlated features, two linguistically derived measures mean.Yules.K
and mean.Simpsons.D
both correlate with perceived difficulty, as does a measure of tonalnesss
which in FANTASTIC is based on the Krumhansl key profiles (Krumhansl 2001).
One problem in tackling this problem is that although many of these variables correlate strongly with our target variables– both grammar and difficulty ratings– one aspect not apparent in this analysis is the correlation between each of the features. In order to demonstrate this, in Figure 4.28 I visualize how a sample of features from the FANTASTIC toolbox correlate with one another with mode additionally included to highlight the breakdown of the corpus.
Among these variables, we see that there is a very high degree of correlation between many of the variables.
For example, the two features inspired from linguistics– mean.Yules.K
and mean.Simpsons.D
– exhibit an alarming degree of correlation.
We also see in this dataset evidence of the inappropriateness of including some variables such as d.median
, a measure relating rhythm.
Here in 4.28 we see computational evidence of claims made by Taylor and Pembrook (1983) when reviewing exactly what features might contribute to the degree of difficulty from a melodic dictation. Given this collinearlity problem, it becomes very difficult to be able to isolate the effect of one feature of the melody. One way to begin to understand these relationships would be to be to build statistical models that are able to partition covariance structures such as the general linear model when used in the context of multiple regression. Another method, as mentioned above, could instead take a more exhaustive, but less explanatory approach forward and follow past research (Baker and Müllensiefen 2017; Harrison, Musil, and Müllensiefen 2016), that uses data reductive techniques such as principal components analysis to obtain more accurate predictive measures of complexity.
In Figure 4.29, I plot eight features extracted via the FANASTIC Toolbox.
The figure plots linear models of each feature compared against the expert ratings of difficuty.
I additionally list the Pearson correlation coeffecient for each model.
From the plot, it is evident that some features correlate much stronger with the ground truth features than others.
For example, pitch.entropy
correlates with the ground truth data \(r = .84\).
Not only that, but the model is not being driven completely by outliers.
While some points fall below the regression line, extreme values are not driving this effect.
A similarly strong relatioship is evident with the step.cont.local.var
variable.
In line with work by Dowling, this provides further evidence that countour changes have a significant impact on how people hear melodies (Dowling 1978).
In exploring these relationships in multivariate context, when I combined the top four variables from 4.29 in a linear multiple regression model, the model was able to predict a high degree of variance \(F(4,15) = 30.47, p < .05, R^2 = .89\).
While this model is explicitly exploratory, this dataset will serve as a foundation to build future theories to test.
Relating back to its implication for aural skills pedagogy, the above analysis suggests that features derived from the FANTASTIC toolbox can provide a meaningful step forward in helping standardize the assessment of aural skills pedagogy. If pedagogues were able to employ tools such as the FANTASTIC toolbox, pedagogues could not only select melodies for their own work that are able to hold certain features constant, but the use of this research could also be used to generate melodies based on the desired difficulty parameter measures in order to design course curricula that would foster a more stable curricular path among students. Additionally, students could also work at slowly challenging themselves if this were to be incorporated into an online pedagogical learning application or website.
Although this approach has been relatively successful at modeling expert ratings, using FANTASTIC’s various linear combinations of these features does have important limitations. One of the most obvious limitations is that FANTASTIC’s measures tacitly assume listeners recall melodies in some sort of perceptual suspended animation. Illuminating this problem using a more tangible example, again returning to melodies 4.1 and 4.2, when the full set of FANTASTIC features are computed on both, the both melodies are computational equivalent in their range, pitch entropy, durtational range, durational entropy, length, tonalness, tonal clarity, tonal spike and stepwise contour global variation. This computation arises from computing a summary measure over the melody and not modeling it in terms of real time perception. In order to have a more phenomenologically appropriate model that incorporates computationally derived features, it is important to also consider dynamic models of music perception when modeling difficulty. Following up on another finding from this section, it also is worthy of mention that the variables with the strongest predictive powers tend to be those associated with information content. In the next section, I explore how using a dynamic approach such as Marcus Pearce’s implementation (Pearce 2005, 2018) of a multiple viewpoints model (Conklin and Witten 1995), might provide more insights into understanding the aural skills classroom.
4.3.3 Dynamic
The Information Dynamic of Music (IDyOM) model of Marcus Pearce is a computational model of auditory cognition (Pearce 2018). IDyOM is based on the assumption put forward by Leonard Meyer that musical style can be understood as a complex network of probabilistic relationships that underlie a musical style and is implicitly understood by a musical community (Pearce and Wiggins 2012; Pearce 2005, 2018) that incorporates a multiple viewpoint framework (Conklin and Witten 1995). Unlike measures from FANTASTIC, which calculate summary statistics based on melodic features, IDyOM works by calculating measures of expectancy of an event based on a predefined set of musical parameters that the model was trained on. As mentioned in Chapter 2, the IDyOM model relies on two important theoretical assumptions based on two neural mechanisms involved in musical enculturation: the statistical learning hypothesis and probabilistic prediction hypothesis. According to Pearce, the Statistical Learning Hypothesis (SLH) states that:
musical enculturation is a process of implicit statistical learning in which listeners progressively acquire internal models of the statistical and structural regularities present in the musical styles to which they are exposed, over short (e.g., an individual piece of music) and long time scales (e.g., an entire lifetime of listening). p.2 (Pearce, 2018)
The logic here is that the more an individual is exposed to a musical style, the more they will implicitly understand its internal syntax and rules. The SLH leads the corroborating probabilistic prediction hypothesis which Pearce states as:
while listening to new music, an enculturated listener applies models learned via the SLH to generate probabilistic predictions that enable them to organize and process their mental representations of the music and generate culturally appropriate responses. p.2 (Pearce, 2018).
IDyOM works by providing the model with a musical corpus that it assumes is representative of a genre or musical style. This musical corpus then serves as training data to approximate either a listener’s ground truth or musical style. After establishing this corpus, IDyOM then learns both long term and short term expectations of events using a variable-order Markov model in order to best optimize its predictive abilities in line with theoretical frameworks provided by Conklin and Witten (1995). The expectations that IDyOM calculates are based on a probability distribution of the proceeding events, which is then quantified in terms of information content (Shannon 1948). As detailed in a summary review article on IDyOM by Pearce, IDyOM has been successful at predicting
Western listeners’ melodic pitch expectations in behavioral, physiological, and electroencephalography (EEG) studies using a range of experimental designs, including the probe-tone paradigm visually guided probe-tone paradigm a gambling paradigm, continuous expectedness ratings, and an implicit reaction-time task to judgments of timbral change.
Peace notes some of IDyOM successes in modeling beyond expectation, including successes in modeling emotional experiences in music, recognition memory, perceptual similarity, phrase boundary perception and metrical inference. Importantly in reviewing IDyOM’s capabilities regarding memory for musical pitches, Pearce also claims that
A sequence with low IC is predictable and thus does not need to be encoded in full, since the predictable portion can be reconstructed with an appropriate predictive model; the sequence is compressible and can be stored efficiently. Conversely, an unpredictable sequence with high IC is less compressible and requires more memory for storage. Therefore, there are theoretical grounds for using IDyOM as a model of musical memory.
Peace notes four studies (Bartlett and Dowling 1980; Cohen, Cuddy, and Mewhort 1977; Cuddy and Lyons 1981; Halpern, Bartlett, and Dowling 1995) that show that more complex melodies are more difficult to hold in memory. This theoretical assertion and select empirical findings have important ramifications for the aural skills classroom. In a dictation setting, melodies that are more expected should tax memory less, thus making them easier to remember and dictate. If I assume that more expected melodies are easier to remember, then it follows that the information content measures of expectedness can then be used as a stand in measure of melodic memory. This notion is not new to music psychology and was discussed by David Huron relating exposure to musical material as following similar laws to the the Hick-Hyman hypothesis (Hick 1952; Hyman 1953), which Huron paraphrases as “processing of familiar stimuli is faster than processing of unfamiliar stimuli” (Huron 2006, 63)". Now a decade later, this assertion can be further investigated using tools from computational musicology. Combining the Hick-Hyman hypothesis together with the above statistical learning hypothesis and probabilistic prediction hypothesis, I then put forward a new hypothesis: the frequency facilitation hypothesis.
4.4 Frequency Facilitation Hypothesis
The frequency facilitation hypothesis (FFH) makes two important assumptions that rely on both the statistical learning hypothesis and the perceptual facilitation hypothesis. The first, as stated above, is that humans learn melodies via the statistical learning hypothesis. In line with Huron’s reading of the Hick-Hyman Law, melodic information that listeners are more familiar with will consequently be processed more quickly. More expected notes will tax memory processing less than unexpected notes. This assertion would also be predicted by the probabilistic prediction hypothesis. Thus, given a sequence any set of notes, the frequency facilitation hypothesis posits that the efficiency in which a melody is processed in memory is proportionally related to its degree of expectedness when quantified in information content. Specifically, measures of expectation derived from computational models of auditory cognition like IDyOM should be able to serve as a proxy for musical information. This falls within the bounds of Pearce’s assertion that using the expectancy measures from a melody could be used as a sort of memory proxy (Pearce 2018).
This hypothesis generates testable predictions that can be investigated to verify its verisimilitude. Important to aural skills pedagogy, the primary prediction from this hypothesis would be that melodic patterns that occur more frequently in a corpus will be be easier to remember than those occurring less frequently. These frequency patterns should then directly relate to the amount of information content calculated by IDyOM. If this relationship does exist, then it can be used to develop strategies that would then create a more linear path to success for students learning to take melodic dictation. In the final section of this chapter, I investigate this claim by conducting an analysis on a corpus of sight singing melodies to demonstrate this claim. I then take the findings from this corpus analysis and how it can be applied in the aural skills classroom.
4.4.1 Corpus Analysis
In order to investigate the frequency facilitation hypothesis, I conducted a corpus study using N = 622 melodies from the above using the Fifth Edition of the Berkowitz “A New Approach to Sight Singing” (Berkowitz 2011). The FFH predicts that more frequently occurring patterns will result in lower information content– a general by-product of quantifying musical feature tokens with information content in a multiple viewpoints framework– and that these lower information content measures, when quantified, will be able to predict load on memory.
In order to examine this, I first extracted a series of the most frequently occurring melodic tri-grams from a subset of the MeloSol corpus after transposing each melody to C major via the solfa
tool in humdrum.
I plot the resulting distributions of the top 1,000 patterns of each fixed order predictions below in 4.30 and 4.31.
From 4.30, we see that when plotted in terms of their frequency distributions, a small amount of the patterns make up for a very large the distribution of the corpus. As evident from 4.30, we see that with the addition of more tokens added to the n-grams, this results in a visual representation of why and how statistical predictions become more unreliable with higher order predictions (Conklin and Witten 1995). Intuitively, melodic patterns from the high frequency distribution of the table would seemingly be easier to remember and then dictate than those from the tails of the distributions.
Following up on this analysis, I then trained an IDyOM model on the same corpus of melodies and was able to calculate the average information content for the first five notes of each melody in the corpus. In this computation, I explicitly assume that the underlying corpus of data is representative of an individual’s personal expectations of musical material. In Figure 4.32, I visualize the cumulative information content of the first five notes of each of melodies that the corpus was trained on. I chose to additionally split the corpus into quintiles to further highlight the progressive changes in information content when these incipits are sorted based on their cumulative information content.
This observation may seem tautological, as this relationship would result from how information content is calculated since more expected patterns have less information content. The novel assertion here is connecting the cumulative information content to memory load. For example, in Figure 4.33, we see that when split into three sections, even just the opening of the first five notes of each melody increase per group.
To visualize what this might look like in a melodic dictation context, we could imagine randomly sampling melodies from even smaller sections. If quantified using information content measures, these five grams would then fill up the finite bin of memory faster than five grams that were more unexpected, or had more information content associated with them. I visualize this difference in Figure 4.34 where I plot similar lengths of five grams filling up the window of memory at different rates based on their cumulative information content.
Lastly, to further investigate this claim of cumulative information content, I calculated various information content measures for each melody used the survey above then using the resulting data to plot it against the measures of expert ratings of difficulty for the classroom. In Figure ??, the resulting visualization shows measures of information content to be very good predictors of difficulty ratings. I believe that this gives credence to thinking more about using computational measures in designing appropriate curricular measures.
4.4.2 Implications
If true, the frequency facilitation hypothesis would have direct implications for the aural skills classroom, specifically for melodic dictation. If measures of information content could be used as a more reliable proxy for load on memory, then a more linear path to learning patterns could result in better strategies for learning to take dictation. For example, the first practical application of this could be that information content could be a more accurate proxy for the limits of musical memory as opposed to using older measures asserted by the literature that follow in the George Miller 7 \(\pm\) 2 tradition, which attempts to logically substitute items in memory for musical notes. As discussed in Working Memory and Melodic Dictation, using measures of information content could provide an ecologically acceptable solution to the problems of chunking within music. For example, if this measure proved to be useful in pedagogical applications, pedagogues would have a very powerful tool to create curricula that was designed in a much more linear path to help students learn.
One of the major challenges in both teaching and learning aural skills beyond the identification of scale degrees is identifying them in a more ecological, melodic context. Presenting incipits of melodies could be then used as a very small intermediate step in teaching melodic dictation where students can experience more frequent successes in the aural skills classroom while trying to dictate progressively difficulty snippets. If they learn the more frequent n-grams first, they will find them easier, but more importantly will begin to recognize these patterns in longer exercises.
Instead of picking melodies for practice one-by-one, pedagogues could instead give students a large compendium of small dictation exercises that were ordered to increase in their melodic information content over the course of instruction. In this type of application, students would not be learning to increase their melodic information capacity limit per se, but could provide a valuable means to give students multiple, smaller attempts to learn to take dictation, rather than being overwhelmed with longer melodies that are given to study on the premise of more ecological validity. This could be done from the level of scale degree identification to that of full melodies. Future work should investigate this experimentally and look to model it using similar methodologies that have been employed in music psychology testing paradigms (Harrison, Collins, and Müllensiefen 2017; Wolf and Kopiez 2014). Finally, if useful, this type of modeling could also be used in future computational models of melodic dictation as explored in the final chapter of this dissertation.
4.4.3 Limitations of Frequency Facilitation Hypothesis
This conceptualization of calculating the information content of melodies is not without its limitations. One of the core assumptions to this approach is that statistical learning does in fact take place. While this assumption is ubiquitous in much of the music psychology literature, statistical learning as a concept has been critiqued in other related fields and deserves mentioning. Statistical learning rests on the premise that organisms are able to implicitly learn and track the statistical regularities in their environments. In the case of auditory learning, there is research to assert this claim from both the field of implicit learning and statistical learning as discussed by Perruchet and Pacton (2006). For example, extensive evidence as reviewed by Cleeremans and Dienes (2008) provides many examples of this, and especially worth highlighting is that people have been show to learn variable order n-gram patterns (Remillard and Clark 2001).
This assertion is importantly contrasted by work such as Jamieson and Mewhort (2009) who claim that explaining these phenomena as resulting in statistical learning is not necessary. Rather, Jamieson and Mewhort (2009) assert that employing memory models like that of Minerva 2 can accurately model behavioral patterns in individual responses without the theoretical framework of statistical learning. They instead note that similar results can be obtained from individuals making similarity judgments. This assertion is important to highlight because as noted by Perruchet and Pacton (2006), statistical learning depends on the tacit assumption that people might be performing some sort of real-time calculations on incoming stimuli in real time. Another important caveat in the corpus analysis above is it was done using fixed order search patterns, whereas the calculations from IDyOM are based on variable order Markov-Models.
4.5 Conclusions
In this chapter, I demonstrated how tools from computational musicology can be used as an aide in aural skills pedagogy. After first establishing the extent to which aural skills pedagogues agree on various melody parameters, I then show how two types of computationally derived features can stand in for a pedagogues intuition. First, using the FANTASTIC toolbox, I show how static abstracted features can help explain how theorists conceceptualize complexity. This first will help with selection of melodies and also provides insights as to which features of the melodies contribute most to perceived difficulty. Second, I demonstrated how assumptions derived from the IDyOM framework can serve as a basis for the intuitions of why smaller sequences of notes within melodies are more or less difficult to dictate. Using the logic that sequences that are easier to process are more expected and thus could plausbibly tax memory less than are more difficult to process. I relate this to the classrom by asserting that students could then take a melodic incipt approach to learning to dictate. I argued that using this smaller incipit based approach will allow students to not be overwhelmed in their learning by taking a more linear path to dictation, before moving on to more more ecologically valid melodies.
References
Ottman, Robert W., and Nancy Rogers. 2014. Music for Sight Singing. 9th ed. Upper Saddle River, NJ: Pearson.
Berkowitz, Sol, ed. 2011. A New Approach to Sight Singing. 5th ed. New York: W.W. Norton.
Karpinski, Gary S. 2007. Manual for Ear Training and Sight Singing. New York: Norton.
Cleland, Kent D., and Mary Dobrea-Grindahl. 2010. Developing Musicianship Through Aural Skills: A Holisitic Approach to Sight Singing and Ear Training. New York: Routledge.
Cambouropoulos, Emilios. 2009. “How Similar Is Similar?” Musicae Scientiae 13 (1_suppl): 7–24. https://doi.org/10.1177/102986490901300102.
Kahneman, Daniel. 2012. Thinking, Fast and Slow. London: Penguin Books.
Logg, Jennifer M., Julia A. Minson, and Don A. Moore. 2019. “Algorithm Appreciation: People Prefer Algorithmic to Human Judgment.” Organizational Behavior and Human Decision Processes 151 (March): 90–103. https://doi.org/10.1016/j.obhdp.2018.12.005.
Meehl, Paul E. 1954. Clinical Versus Statistical Prediction: A Theoretical Analysis and a Review of the Evidence. Minneapolis: University of Minnesota Press. https://doi.org/10.1037/11281-000.
Paney, Andrew S., and Nathan O. Buonviri. 2014. “Teaching Melodic Dictation in Advanced Placement Music Theory.” Journal of Research in Music Education 61 (4): 396–414. https://doi.org/10.1177/0022429413508411.
Koo, Terry K., and Mae Y. Li. 2016. “A Guideline of Selecting and Reporting Intraclass Correlation Coefficients for Reliability Research.” Journal of Chiropractic Medicine 15 (2): 155–63. https://doi.org/10.1016/j.jcm.2016.02.012.
Bates, Douglas, Martin Mächler, Ben Bolker, and Steve Walker. 2015. “Fitting Linear Mixed-Effects Models Using Lme4.” Journal of Statistical Software 67 (1). https://doi.org/10.18637/jss.v067.i01.
Ortmann, Otto. 1933. “Some Tonal Determinants of Melodic Memory.” Journal of Educational Psychology 24 (6): 454–67. https://doi.org/10.1037/h0075218.
Taylor, Jack A., and Randall G. Pembrook. 1983. “Strategies in Memory for Short Melodies: An Extension of Otto Ortmann’s 1933 Study.” Psychomusicology: A Journal of Research in Music Cognition 3 (1): 16–35. https://doi.org/10.1037/h0094258.
Pembrook, Randall G. 1986. “Interference of the Transcription Process and Other Selected Variables on Perception and Memory During Melodic Dictation.” Journal of Research in Music Education 34 (4): 238. https://doi.org/10.2307/3345259.
Akiva-Kabiri, Lilach, Tomaso Vecchi, Roni Granot, Demis Basso, and Daniele Schön. 2009. “Memory for Tonal Pitches: A Music-Length Effect Hypothesis.” Annals of the New York Academy of Sciences 1169 (1): 266–69. https://doi.org/10.1111/j.1749-6632.2009.04787.x.
Dewitt, Lucinda A., and Robert G. Crowder. 1986. “Recognition of Novel Melodies After Brief Delays.” Music Perception: An Interdisciplinary Journal 3 (3): 259–74. https://doi.org/10.2307/40285336.
Eerola, Tuomas, Jukka Louhivuori, and Edward Lebaka. 2009. “Expectancy in Sami Yoiks Revisited: The Role of Data-Driven and Schema-Driven Knowledge in the Formation of Melodic Expectations.” Musicae Scientiae 13 (2): 231–72. https://doi.org/10.1177/102986490901300203.
Schulze, Katrin, and Stefan Koelsch. 2012. “Working Memory for Speech and Music: Schulze & Koelsch.” Annals of the New York Academy of Sciences 1252 (1): 229–36. https://doi.org/10.1111/j.1749-6632.2012.06447.x.
Harrison, Peter M.C., Jason Jiří Musil, and Daniel Müllensiefen. 2016. “Modelling Melodic Discrimination Tests: Descriptive and Explanatory Approaches.” Journal of New Music Research 45 (3): 265–80. https://doi.org/10.1080/09298215.2016.1197953.
Mullensiefen, Daniel. 2009. “Fantastic: Feature ANalysis Technology Accessing STatistics (in a Corpus): Technical Report V1.5.”
Baker, David J., and Daniel Müllensiefen. 2017. “Perception of Leitmotives in Richard Wagner’s Der Ring Des Nibelungen.” Frontiers in Psychology 8 (May). https://doi.org/10.3389/fpsyg.2017.00662.
Grabe, Esther. 2002. “Durational Variability in Speech and the Rhythm Class Hypothesis.” Papers in Laboratory Phonology, 16.
VanHandel, Leigh, and Tian Song. 2010. “The Role of Meter in Compositional Style in 19th Century French and German Art Song.” Journal of New Music Research 39 (1): 1–11. https://doi.org/10.1080/09298211003642498.
Daniele, Joseph R, and Aniruddh D Patel. 2004. “THE INTERPLAY OF LINGUISTIC AND HISTORICAL INFLUENCES ON MUSICAL RHYTHM IN DIFFERENT CULTURES,” 5.
Patel, Aniruddh D., and Joseph R. Daniele. 2003. “Stress-Timed Vs. Syllable-Timed Music? A Comment on Huron and Ollen (2003).” Music Perception 21 (2): 273–76. https://doi.org/10.1525/mp.2<IP_ADDRESS>3.
Condit-Schultz, Nathaniel. 2019. “Deconstructing the nPVI: A Methodological Critique of the Normalized Pairwise Variability Index as Applied to Music.” Music Perception: An Interdisciplinary Journal 36 (3): 300–313. https://doi.org/10.1525/mp.2<IP_ADDRESS>0.
Lomax, Alan. 1977. Cantometrics: An Approach to the Anthropology of Music: Audiocassettes and a Handbook. Berkle, California: University of California Press.
Huron, David. 1994. “The Humdrum Toolkit: Reference Manual.” Center for Computer Assisted Research in the Humanities.
Lartillot, Olivier, and Petri Toiviainen. 2007. “A Matlab Toolbox for Musical Feature Extraction from Audio.” International Conference on Digigial Audio Effects, 237–44.
McFee, Brian, Colin Raffel, Dawen Liang, Daniel P W Ellis, Matt McVicar, Eric Battenberg, and Oriol Nieto. 2015. “Librosa: Audio and Music Signal Analysis in Python,” 7.
Steinbeck, W. 1982. Struktur Und Ähnlichkeit: Methoden Automatiserter Melodieanalyse. Kallel: Bärenreiter.
Krumhansl, Carol. 2001. Cognitive Foundations of Musical Pitch. Oxford University Press.
Dowling, W. Jay. 1978. “Scale and Contour: Two Components of a Theory of Memory for Melodies.” Psychological Review 84 (4): 341–54.
Pearce, Marcus. 2005. “The Construction and Evaluation of Statistical Models of Melodic Structure in Music Perception and Composition.” PhD thesis, Department of Computer Science: City University of London.
Pearce, Marcus T. 2018. “Statistical Learning and Probabilistic Prediction in Music Cognition: Mechanisms of Stylistic Enculturation: Enculturation: Statistical Learning and Prediction.” Annals of the New York Academy of Sciences 1423 (1): 378–95. https://doi.org/10.1111/nyas.13654.
Conklin, Darrell, and Ian H. Witten. 1995. “Multiple Viewpoint Systems for Music Prediction.” Journal of New Music Research 24 (1): 51–73. https://doi.org/10.1080/09298219508570672.
Pearce, Marcus T., and Geraint A. Wiggins. 2012. “Auditory Expectation: The Information Dynamics of Music Perception and Cognition.” Topics in Cognitive Science 4 (4): 625–52. https://doi.org/10.1111/j.1756-8765.2012.01214.x.
Shannon, Claude. 1948. “A Mathematical Theory of Communication.” Bell System Technical Journal 27: 379–423.
Bartlett, James C, and W Jay Dowling. 1980. “Recognition of Transposed Melodies: A Key-Distance Effect in Developmental Perspective,” 15.
Cohen, Annabel J., Lola L. Cuddy, and Douglas J. K. Mewhort. 1977. “Recognition of Transposed Tone Sequences.” The Journal of the Acoustical Society of America 61 (S1): S87–S88. https://doi.org/10.1121/1.2015950.
Cuddy, Lola L., and H. I. Lyons. 1981. “Musical Pattern Recognition: A Comparison of Listening to and Studying Tonal Structures and Tonal Ambiguities.” Psychomusicology: A Journal of Research in Music Cognition 1 (2): 15–33. https://doi.org/10.1037/h0094283.
Halpern, Andrea, James Bartlett, and W.Jay Dowling. 1995. “Aging and Experience in the Recognition of Musical Transpositions.” Psychology and Aging 10 (3): 325–42.
Hick, W. E. 1952. “On the Rate of Gain of Information.” Quarterly Journal of Experimental Psychology 4 (1): 11–26. https://doi.org/10.1080/17470215208416600.
Hyman, Ray. 1953. “Stimulus Information as a Determinant of Reaction Time.” Journal of Experimental Psychology 45 (3): 188–96. https://doi.org/10.1037/h0056940.
Huron, David. 2006. Sweet Anticipation. MIT Press.
Harrison, Peter M. C., Tom Collins, and Daniel Müllensiefen. 2017. “Applying Modern Psychometric Techniques to Melodic Discrimination Testing: Item Response Theory, Computerised Adaptive Testing, and Automatic Item Generation.” Scientific Reports 7 (1). https://doi.org/10.1038/s41598-017-03586-z.
Wolf, Anna, and Reinhard Kopiez. 2014. “Do Grades Reflect the Development of Excellence in Music Students? The Prognostic Validity of Entrance Exams at Universities of Music.” Musicae Scientiae 18 (2): 232–48. https://doi.org/10.1177/1029864914530394.
Perruchet, Pierre, and Sebastien Pacton. 2006. “Implicit Learning and Statistical Learning: One Phenomenon, Two Approaches.” Trends in Cognitive Sciences 10 (5): 233–38. https://doi.org/10.1016/j.tics.2006.03.006.
Cleeremans, Axel, and Zoltán Dienes. 2008. “Computational Models of Implicit Learning.” In The Cambridge Handbook of Computational Psychology, edited by Ron Sun, 396–421. Cambridge: Cambridge University Press. https://doi.org/10.1017/CBO9780511816772.018.
Remillard, Gilbert, and James M. Clark. 2001. “Implicit Learning of First-, Second-, and Third-Order Transition Probabilities.” Journal of Experimental Psychology: Learning, Memory, and Cognition 27 (2): 483–98. https://doi.org/10.1037//0278-73<IP_ADDRESS>3.
Jamieson, Randall K., and D. J. K. Mewhort. 2009. “Applying an Exemplar Model to the Serial Reaction-Time Task: Anticipating from Experience.” Quarterly Journal of Experimental Psychology 62 (9): 1757–83. https://doi.org/10.1080/17470210802557637.


"Everything can be taken from a man but one thing: the last of human freedoms—to choose one's attitude in any given set of circumstances, to choose one's own way." - Viktor Frankl, Man's Search for Meaning
"Learn from yesterday, live for today, hope for tomorrow. The important thing is to not stop questioning." - Albert Einstein
"The ability to control impulse is the base of will and character. By the same token, the root of altruism lies in empathy, the ability to read emotions in others; lacking a sense of another's need or despair, there is no caring." - Daniel Goleman, Emotional Intelligence
"The more that you read, the more things you will know. The more that you learn, the more places you'll go." - Dr. Seuss
"Any road followed precisely to its end leads precisely nowhere." - Frank Herbert
"All children are artists. The problem is how to remain an artist once they grow up." - John Wooden
"Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful." - Pablo Picasso
"For in everything it is no easy task to find the middle, e.g. to find the middle of a circle is not for every one but for him who knows; so, too, any one can get angry—that is easy—or give or spend money; but to do this to the right person, to the right extent, at the right time, with the right motive, and in the right way, that is not for every one, nor is it easy..." - Aristotle, The Nicomachean Ethics
"The most important investment you can make is in yourself." - Warren Buffett
"Only a life lived for others is a life worthwhile." - Albert Einstein
"Strong minds discuss ideas, average minds discuss events, weak minds discuss people." - Socrates
"Trust but verify." - Ronald Reagan
"Ex nihilo nihil fit." Nothing comes from nothing. - Parmenides
“Do what you can, where you are, with what you have.” - Theodore Roosevelt
"Be who you are and say what you mean. Because those who mind don't matter and those who matter don't mind!" - Dr. Seuss
"Expect problems and eat them for breakfast." - Alfred A. Montapert
"No matter how busy you are, stay in contact with your friends. They are your fuel."   - Pablo Picasso
"It is not that we have a short space of time, but that we waste much of it. Life is long enough, and it has been given in sufficiently generous measure to allow the accomplishment of the very greatest things if the whole of it is well invested. But when it is squandered in luxury and carelessness, when it is devoted to no good end, forced at last by the ultimate necessity we perceive that it has passed away before we were aware that it was passing. So it is—the life we receive is not short, but we make it so, nor do we have any lack of it, but are wasteful of it. Just as great and princely wealth is scattered in a moment when it comes into the hands of a bad owner, while wealth however limited, if it is entrusted to a good guardian, increases by use, so our life is amply long for him who orders it properly." - Seneca
"For by wise counsel you can wage your war, and in an abundance of counselors there is victory and safety."  Seek to make your life long and its purpose in the service of your people." - Chief Tecumseh (Shawnee tribe)
"Learn the rules like a pro, so you can break them like an artist." - Pablo Picasso
"I saw that to accomplish anything I must bring all physical and moral faculties into play, exercise strict self-control and play the chameleon." - Ian Kelly, Casanova
"Chance favors the prepared mind." - Louis Pasteur
"Si vis amari, ama." If you wish to be loved, love. - Seneca
"One can have no smaller or greater mastery than mastery of oneself." - Leonardo da Vinci
"Outstanding leaders go out of their way to boost the self-esteem of their personnel. If people believe in themselves, it's amazing what they can accomplish." - Sam Walton
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart." s - Steve Jobs
"One repays a teacher badly if one remains only a pupil." - Friedrich Nietzsche
"Be so busy improving yourself that you have no time to criticize others." - Chetan Bhagat
"Strong opinions, weakly held." - Bob Sutton
"The best people possess a feeling for beauty, the courage to take risks, the discipline to tell the truth, the capacity for sacrifice. Ironically, their virtues make them vulnerable; they are often wounded, sometimes destroyed." - Ernest Hemingway
"We are living in a culture entirely hypnotized by the illusion of time, in which the so-called present moment is felt as nothing but an infinitesimal hairline between an all-powerfully causative past and an absorbingly important future. We have no present. Our consciousness is almost completely preoccupied with memory and expectation. We do not realize that there never was, is, nor will be any other experience than present experience. We are therefore out of touch with reality. We confuse the world as talked about, described, and measured with the world which actually is. We are sick with a fascination for the useful tools of names and numbers, of symbols, signs, conceptions and ideas." - Alan Watts
"Just because you do not take an interest in politics doesn’t mean politics won’t take an interest in you.” - Pericles
"Live a good life. If there are Gods and they are just, then they will not care how devout you have been, but will welcome you based on the virtues you have lived by. If there are Gods, but unjust, then you should not want to worship them. If there are no Gods, then you will be gone, but will have lived a noble life that will live on in the memories of your loved ones." - Marcus Aurelius
"A man that studieth revenge keeps his own wounds green." - Francis Bacon
"Missing out on some opportunity never bothers us. What’s wrong with someone getting a little richer than you? Someone will always be getting richer faster than you. It’s crazy to worry about this. This is not a tragedy." - Charlie Munger
"Survival machines that can simulate the future are one jump ahead of survival machines who can only learn on the basis of overt trial and error. The trouble with overt trial is that is takes time and energy. The trouble with overt error is that it is often fatal. Simulation is both safer and faster. The evolution of the capacity to simulate seems to have culminated in subjective consciousness." - Richard Dawkins, The Selfish Gene
"Life as we find it is too hard for us; it brings too many pains, disappointments and impossible tasks. In order to bear it we cannot dispense with palliative measures… There are perhaps three such measures: powerful deflections, which cause us to make light of our misery; substitute satisfactions, which diminish it; and intoxicating substances, which make us insensible to it." - Sigmund Freud, Civilization and its Discontents
"To get what you want, you have to deserve what you want.  - Charlie Munger
"Sweat is the cologne of accomplishment." - Heywood Hale Broun
"People who read Cosmopolitan magazine are very different from those who do not." - Donald Berry, Statistics: A Bayesian Perspective
"A user interface should be so simple that a beginner in an emergency can understand it within ten seconds" - Ted Nelson
"Programs must be written for people to read, and only incidentally for machines to execute." - Hal Abelson & Jerry Sussman, Structure and Interpretation of Computer Programs


Our goal in interior design is to improve the user experience by better managing the space available in the intervened environment. We love to transform the lives of people, improving their quality of life through design and decoration.
At Eclectic our concept and theme is tailored to your comfort and lifestyle. A lot of thinking and detailing goes into our mind during the creative process to provide you an organized and beautiful space. We pay attention to everything from layout to color to material selection to lighting, installation and custom furniture from the scratch to the last finest detail.
Residential
Modular furniture
Commercial Design
Interior Design Consultation
Lighting & Soft Furnishings
Interior Decor


Adapters
-
Represents an adapter that holds data to be rendered.
See moreDeclaration
Swift
public protocol Adapter : AnyObject
-
An adapter for
UITableView
. It can be inherited to implement customized behavior or give some unimplemented methods of delegate or dataSource.Attention : In UIKit, if inheriting the @objc class which using generics, the delegate and dataSource are don’t work properly, so this class doesn’t use generics, and also the class inherited this class shouldn’t use generics.
See moreDeclaration
Swift
open class UITableViewAdapter : NSObject, Adapter
-
An adapter for
UICollectionView
. It can be inherited to implement customized behavior or give some unimplemented methods of delegate or dataSource.Attention : In UIKit, if inheriting the @objc class which using generics, the delegate and dataSource are don’t work properly, so this class doesn’t use generics, and also the class inherited this class shouldn’t use generics.
See moreDeclaration
Swift
open class UICollectionViewAdapter : NSObject, Adapter
-
An adapter for
See moreUICollectionView
withUICollectionViewFlowLayout
inherited fromUICollectionViewAdapter
.Declaration
Swift
open class UICollectionViewFlowLayoutAdapter : UICollectionViewAdapter


{% extends "layout.html" %} {% set loggedIn = false %} {% set external_journey = true %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} {% include "includes/great-header-event-page.html" %}
Clothing, footwear and fashion Creative and media Electronics and IT hardware Giftware, jewellery and tableware Retail and luxury Textiles, interior textiles and carpets Household goods, furniture and furnishings Education and training Legal services
Germany France Italy Austria Switzerland
Occasionally exporting Regularly exporting
To attend this ‘Meet the buyer’ event, you need to have registered for general entry to Tradexpo Paris.
Cost: Free
200 buyers to meet Currently 28 buyers available . More buyers added each week
Mr Bricolage
France
Marie Dugary
CEO
Mr. Bricolage is a French retail chain offering home improvement and do-it-yourself goods. The company has around 80 shops and 435 franchise stores across France and also has operations across numerous European countries, as well as in South America and North Africa.
To be added soon.
To be added soon.
To be added soon.
LeClerc
France
Bernard Le Blanc
Merchandising Director
E.Leclerc is a French cooperative society and hypermarket chain, headquartered in Ivry-sur-Seine. E.Leclerc was established on 1 January 1948. Leclerc currently has more than 500 locations in France and 114 stores outside of the country, as of 2012.
Carrefour
France
Noëlle Pierrick
Merchandising Director
Carrefour is a French multinational retailer headquartered in Boulogne Billancourt, France, in the Hauts-de-Seine Department near Paris. It is one of the largest hypermarket chains in the world (with 1,462 hypermarkets at the end of 2016). Carrefour operates in more than 30 countries, in Europe, the Americas, Asia and Africa.
Casino
France
Éloïse Marguerite
Merchandising Director
Groupe Casino (or Casino Guichard-Perrachon) is a French mass retailer with operations around the world. The company is listed on the NYSE Euronext Paris stock exchange and its majority shareholder is Rallye SA. The company's head office is in Saint-Étienne.
To be added soon.
Mr Bricolage
Germany
Marie Dugary
Chief Buyer
Mr. Bricolage is a French retail chain offering home improvement and do-it-yourself goods. The company has around 80 shops and 435 franchise stores across France and also has operations across numerous European countries, as well as in South America and North Africa.
Norma
France
Nicole Papin
Merchandising Director
Norma is a German manufacturer of machine joining components, such as hose couplings, clamps and quick connectors. The company’s products are used in industries such as automotive, aviation, construction and shipping, and for purposes such as cooling, emission outputs, hoses, water pipes and sterile pharmaceuticals production.
Leroy merlin
France
Geoffroy Mélody
Business Development Manager
"Leroy Merlin is a French headquartered home improvement and gardening retailer serving several countries in Europe, Russia, Asia, South America and Africa. Generally established on the outskirts of major towns and cities, Leroy Merlin stores are large centres (9000 m2 on average) providing self-service and sales assisted services. Its business is centred on six main sectors: DIY, building, gardening, sanitary equipment, renewable energy, and interior decoration."
To be added soon.
To be added soon.
DIT ‘Meet the buyer’ events exist to connect UK products and services with interested buyers from overseas. If your company exports - or if you’re interested in beginning to sell to new global markets - then ‘Meet the buyer’ events offer a great opportunity to meet face to face with potential suitors for your products and services. And if you’re a non UK based company interested in buying a particular product or service, ‘Meet the buyer’ events allow you to explore the British market for potential suppliers that can help with your requirements. How it works The concept is simple. DIT sources a selection of buyers to participate in a ‘Meet the buyer’ event. Once registered to attend, UK businesses can then request face to face meeting slots with any of these buyers over the course of the event. Buyers receive attendee meeting requests - and if they wish to meet, a meeting will be scheduled. On the day of the event, UK sellers meet up with international buyers. Both parties hopefully leave the event with a host of new contacts, promising leads - and ultimately, fresh business.
Free
Palais des Expositions Carrefour Charles Lindbergh Le Bourget, Île-de-France


1
If you haven't already, now it's time to log in to your GitHub account and set up your GitHub Page by following the instructions here.Make sure to add some reasonable content to your new page.
--- layout: base title: the JavaScript organization full: true sitemap: priority: 1.0 changefreq: yearly ---
Are you a JavaScript developer looking for free webspace to host your project?
Check out GitHub Pages. To make things perfect we provide you with a free and sleek URL like one of these:
https://foo.js.org
Your page just has to provide some reasonable content with a clear connection to JavaScript! Follow these four steps to get your own free JS.ORG subdomain for your GitHub Page:
ImportantAs the owner of the repository, you keep complete control over your published content. But that also means that all rights and duties that come along with publishing a website remain in your responsibility.
Have a look at our Terms and Conditions for more details.


The currently logged in user details. A user is considered logged-in if there is a cookie present that was previously created in the SAML Response section by clicking on Post Response.
Copy Metadata


Linear Models: Multiple variables with interactions
Contents
Linear Models: Multiple variables with interactions#
Introduction#
Here you will build on your skills in fitting linear models with multiple explanatory variables to data. You will learn about another commonly used Linear Model fitting technique: ANCOVA.
We will build two models in this chapter:
Model 1: Is mammalian genome size predicted by interactions between trophic level and whether species are ground dwelling?
ANCOVA: Is body size in Odonata predicted by interactions between genome size and taxonomic suborder?
So far, we have only looked at the independent effects of variables. For example, in the trophic level and ground dwelling model from the first multiple explanatory variables chapter, we only looked for specific differences for being a omnivore or being ground dwelling, not for being specifically a ground dwelling omnivore. These independent effects of a variable are known as main effects and the effects of combinations of variables acting together are known as interactions — they describe how the variables interact.
Chapter aims#
The aims of this chapter are\(^{[1]}\):
Creating more complex Linear Models with multiple explanatory variables
Including the effects of interactions between multiple variables in a linear model
Plotting predictions from more complex (multiple explanatory variables) linear models
Formulae with interactions in R#
We’ve already seen a number of different model formulae in R. They all use this syntax:
response variable ~ explanatory variable(s)
But we are now going to see two extra pieces of syntax:
y ~ a + b + a:b
: Thea:b
means the interaction betweena
andb
— do combinations of these variables lead to different outcomes?y ~ a * b
: This a shorthand for the model above. The means fita
andb
as main effects and their interactiona:b
.
Model 1: Mammalian genome size#
\(\star\) Make sure you have changed the working directory to Code
in your stats coursework directory.
\(\star\) Create a new blank script called ‘Interactions.R’ and add some introductory comments.
\(\star\) Load the data:
load('../data/mammals.Rdata')
If mammals.Rdata
is missing, just import the data again using read.csv
. You will then have to add the log C Value column to the imported data frame again.
Let’s refit the model from the first multiple explanatory variables chapter, but including the interaction between trophic level and ground dwelling. We’ll immediately check the model is appropriate:
model <- lm(logCvalue ~ TrophicLevel * GroundDwelling, data= mammals)
par(mfrow=c(2,2), mar=c(3,3,1,1), mgp=c(2, 0.8,0))
plot(model)
Now, examine the anova
and summary
outputs for the model:
anova(model)
| Df | Sum Sq | Mean Sq | F value | Pr(>F) | |
|---|---|---|---|---|---|
| TrophicLevel | 2 | 0.8141063 | 0.40705316 | 8.061439 | 4.036387e-04 |
| GroundDwelling | 1 | 2.7469218 | 2.74692183 | 54.401106 | 2.335706e-12 |
| TrophicLevel:GroundDwelling | 2 | 0.4312875 | 0.21564376 | 4.270693 | 1.499280e-02 |
| Residuals | 253 | 12.7749466 | 0.05049386 | NA | NA |
Compared to the model from the first multiple explanatory variables chapter, there is an extra line at the bottom. The top two are the same and show that trophic level and ground dwelling both have independent main effects. The extra line shows that there is also an interaction between the two. It doesn’t explain a huge amount of variation, about half as much as trophic level, but it is significant.
Again, we can calculate the \(r^2\) for the model:
\(\frac{0.81 + 2.75 + 0.43}{0.81+2.75+0.43+12.77} = 0.238\)
The model from the first multiple explanatory variables chapter without the interaction had an \(r^2 = 0.212\) — our new model explains 2.6% more of the variation in the data.
The summary table is as follows:
summary(model)
Call:
lm(formula = logCvalue ~ TrophicLevel * GroundDwelling, data = mammals)
Residuals:
Min 1Q Median 3Q Max
-0.52294 -0.17069 -0.01003 0.11920 0.83057
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.95895 0.04407 21.760 < 2e-16
TrophicLevelHerbivore 0.05351 0.05535 0.967 0.334605
TrophicLevelOmnivore 0.23281 0.05226 4.455 1.26e-05
GroundDwellingYes 0.25487 0.06509 3.915 0.000116
TrophicLevelHerbivore:GroundDwellingYes 0.03033 0.07857 0.386 0.699791
TrophicLevelOmnivore:GroundDwellingYes -0.14761 0.07930 -1.861 0.063839
(Intercept) ***
TrophicLevelHerbivore
TrophicLevelOmnivore ***
GroundDwellingYes ***
TrophicLevelHerbivore:GroundDwellingYes
TrophicLevelOmnivore:GroundDwellingYes .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2247 on 253 degrees of freedom
(120 observations deleted due to missingness)
Multiple R-squared: 0.2381, Adjusted R-squared: 0.223
F-statistic: 15.81 on 5 and 253 DF, p-value: 1.504e-13
The lines in this output are:
The reference level (intercept) for non ground dwelling carnivores. (The reference level is decided just by the alphabetic order of the levels)
Two differences for being in different trophic levels.
One difference for being ground dwelling
Two new differences that give specific differences for ground dwelling herbivores and omnivores.
The first four lines, as in the model from the ANOVA chapter, which would allow us to find the predicted values for each group if the size of the differences did not vary between levels because of the interactions. That is, this part of the model only includes a single difference ground and non-ground species, which has to be the same for each trophic group because it ignores interactions between trophic level and ground / non-ground identity of each species. The last two lines then give the estimated coefficients associated with the interaction terms, and allow cause the size of differences to vary between levels because of the further effects of interactions.
The table below show how these combine to give the predictions for each group combination, with those two new lines show in red:
Not ground |
Ground |
|
|---|---|---|
Carnivore |
0.96 = 0.96 |
0.96 + 0.25 = 1.21 |
Herbivore |
0.96 + 0.05 = 1.01 |
0.96 + 0.05 + 0.25 + 0.03 = 1.29 |
Omnivore |
0.96 + 0.23 = 1.19 |
0.96 + 0.23 + 0.25 - 0.15 = 1.29 |
So why are there two new coefficients? For interactions between two factors, there are always \((n-1)\times(m-1)\) new coefficients, where \(n\) and \(m\) are the number of levels in the two factors (Ground dwelling or not: 2 levels and trophic level: 3 levels, in our current example). So in this model, \((3-1) \times (2-1) =2\). It might be easier to understand why graphically:
The prediction for the white boxes above can be found by adding the main effects together but for the grey boxes, we need to find specific differences. So there are \((n-1)\times(m-1)\) interaction coefficients (count the number of grey boxes) to add.
If we put this together, what is the model telling us?
Herbivores have the same genome sizes as carnivores, but omnivores have larger genomes.
Ground dwelling mammals have larger genomes.
These two findings suggest that ground dwelling omnivores should have extra big genomes. However, the interaction shows they are smaller than expected and are, in fact, similar to ground dwelling herbivores.
Note that although the interaction term in the anova
output is significant, neither of the two coefficients in the summary
has a \(p<0.05\). There are two weak differences (one
very weak, one nearly significant) that together explain significant
variance in the data.
\(\star\) Copy the code above into your script and run the model.
Make sure you understand the output!
Just to make sure the sums above are correct, we’ll use the same code as in the first multiple explanatory variables chapter to get R to calculate predictions for us, similar to the way we did before:
# a data frame of combinations of variables
gd <- rep(levels(mammals$GroundDwelling), times = 3)
print(gd)
[1] "No" "Yes" "No" "Yes" "No" "Yes"
tl <- rep(levels(mammals$TrophicLevel), each = 2)
print(tl)
[1] "Carnivore" "Carnivore" "Herbivore" "Herbivore" "Omnivore" "Omnivore"
Again, remember that the each = 2
option repeats each value twice in succession; the times = 3
options repeats the whole set of values (the whole vector) three times.
# New data frame
predVals <- data.frame(GroundDwelling = gd, TrophicLevel = tl)
# predict using the new data frame
predVals$predict <- predict(model, newdata = predVals)
print(predVals)
GroundDwelling TrophicLevel predict
1 No Carnivore 0.9589465
2 Yes Carnivore 1.2138170
3 No Herbivore 1.0124594
4 Yes Herbivore 1.2976624
5 No Omnivore 1.1917603
6 Yes Omnivore 1.2990165
\(\star\) Include and run the code for gererating these predictions in your script.
If we plot these data points onto the barplot from the first multiple explanatory variables chapter, they now lie exactly on the mean values, because we’ve allowed for interactions. The triangle on this plot shows the predictions for ground dwelling omnivores from the main effects (\(0.96 + 0.23 + 0.25 = 1.44\)), the interaction of \(-0.15\) pushes the prediction back down.
Model 2 (ANCOVA): Body Weight in Odonata#
We’ll go all the way back to the regression analyses from the Regression chapter. Remember that we fitted two separate regression lines to the data for damselflies and dragonflies. We’ll now use an interaction to fit these in a single model. This kind of linear model — with a mixture of continuous variables and factors — is often called an analysis of covariance, or ANCOVA. That is, ANCOVA is a type of linear model that blends ANOVA and regression. ANCOVA evaluates whether population means of a dependent variable are equal across levels of a categorical independent variable, while statistically controlling for the effects of other continuous variables that are not of primary interest, known as covariates.
Thus, ANCOVA is a linear model with one categorical and one or more continuous predictors.
We will use the odonates data that we have worked with before.
\(\star\) First load the data:
odonata <- read.csv('../data/GenomeSize.csv')
\(\star\) Now create two new variables in the odonata
data set called logGS
and logBW
containing log genome size and log body weight:
odonata$logGS <- log(odonata$GenomeSize)
odonata$logBW <- log(odonata$BodyWeight)
The models we fitted before looked like this:
We can now fit the model of body weight as a function of both genome size and suborder:
odonModel <- lm(logBW ~ logGS * Suborder, data = odonata)
summary(odonModel)
Call:
lm(formula = logBW ~ logGS * Suborder, data = odonata)
Residuals:
Min 1Q Median 3Q Max
-1.3243 -0.3225 0.0073 0.3962 1.4976
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.39947 0.08475 -28.311 < 2e-16 ***
logGS 1.00522 0.22367 4.494 1.99e-05 ***
SuborderZygoptera -2.24895 0.13540 -16.610 < 2e-16 ***
logGS:SuborderZygoptera -2.14919 0.46186 -4.653 1.07e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.6499 on 94 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.7549, Adjusted R-squared: 0.7471
F-statistic: 96.5 on 3 and 94 DF, p-value: < 2.2e-16
Again, we’ll look at the anova table first:
anova(odonModel)
| Df | Sum Sq | Mean Sq | F value | Pr(>F) | |
|---|---|---|---|---|---|
| logGS | 1 | 1.144458 | 1.1444583 | 2.710007 | 1.030601e-01 |
| Suborder | 1 | 111.967748 |<PHONE_NUMBER> | 265.132794 | 4.154783e-29 |
| logGS:Suborder | 1 | 9.144522 | 9.1445216 | 21.653669 | 1.068365e-05 |
| Residuals | 94 | 39.696969 | 0.4223082 | NA | NA |
Interpreting this:
There is no significant main effect of log genome size. The main effect is the important thing here — genome size is hugely important but does very different things for the two different suborders. If we ignored
Suborder
, there isn’t an overall relationship: the average of those two lines is pretty much flat.There is a very strong main effect of Suborder: the mean body weight in the two groups are very different.
There is a strong interaction between suborder and genome size. This is an interaction between a factor and a continuous variable and shows that the slopes are different for the different factor levels.
Now for the summary table:
summary(odonModel)
Call:
lm(formula = logBW ~ logGS * Suborder, data = odonata)
Residuals:
Min 1Q Median 3Q Max
-1.3243 -0.3225 0.0073 0.3962 1.4976
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.39947 0.08475 -28.311 < 2e-16 ***
logGS 1.00522 0.22367 4.494 1.99e-05 ***
SuborderZygoptera -2.24895 0.13540 -16.610 < 2e-16 ***
logGS:SuborderZygoptera -2.14919 0.46186 -4.653 1.07e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.6499 on 94 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.7549, Adjusted R-squared: 0.7471
F-statistic: 96.5 on 3 and 94 DF, p-value: < 2.2e-16
The first thing to note is that the \(r^2\) value is really high. The model explains three quarters (0.752) of the variation in the data.
Next, there are four coefficients:
The intercept is for the first level of
Suborder
, which is Anisoptera (dragonflies).The next line, for
log genome size
, is the slope for Anisoptera.We then have a coefficient for the second level of
Suborder
, which is Zygoptera (damselflies). As with the first model, this difference in factor levels is a difference in mean values and shows the difference in the intercept for Zygoptera.The last line is the interaction between
Suborder
andlogGS
. This shows how the slope for Zygoptera differs from the slope for Anisoptera.
How do these hang together to give the two lines shown in the model? We can calculate these by hand:
\(\star\) Add the above code into your script and check that you understand the outputs.
We’ll use the predict
function again to get the predicted values from the model and add lines to the plot above.
First, we’ll create a set of numbers spanning the range of genome size:
#get the range of the data:
rng <- range(odonata$logGS)
#get a sequence from the min to the max with 100 equally spaced values:
LogGSForFitting <- seq(rng[1], rng[2], length = 100)
Have a look at these numbers:
print(LogGSForFitting)
[1] -0.891598119 -0.873918728 -0.856239337 -0.838559945 -0.820880554
[6] -0.803201163 -0.785521772 -0.767842380 -0.750162989 -0.732483598
[11] -0.714804206 -0.697124815 -0.679445424 -0.661766032 -0.644086641
[16] -0.626407250 -0.608727859 -0.591048467 -0.573369076 -0.555689685
[21] -0.538010293 -0.520330902 -0.502651511 -0.484972119 -0.467292728
[26] -0.449613337 -0.431933946 -0.414254554 -0.396575163 -0.378895772
[31] -0.361216380 -0.343536989 -0.325857598 -0.308178207 -0.290498815
[36] -0.272819424 -0.255140033 -0.237460641 -0.219781250 -0.202101859
[41] -0.184422467 -0.166743076 -0.149063685 -0.131384294 -0.113704902
[46] -0.096025511 -0.078346120 -0.060666728 -0.042987337 -0.025307946
[51] -0.007628554 0.010050837 0.027730228 0.045409619 0.063089011
[56] 0.080768402 0.098447793 0.116127185 0.133806576 0.151485967
[61] 0.169165358 0.186844750 0.204524141 0.222203532 0.239882924
[66] 0.257562315 0.275241706 0.292921098 0.310600489 0.328279880
[71] 0.345959271 0.363638663 0.381318054 0.398997445 0.416676837
[76] 0.434356228 0.452035619 0.469715011 0.487394402 0.505073793
[81] 0.522753184 0.540432576 0.558111967 0.575791358 0.593470750
[86] 0.611150141 0.628829532 0.646508923 0.664188315 0.681867706
[91] 0.699547097 0.717226489 0.734905880 0.752585271 0.770264663
[96] 0.787944054 0.805623445 0.823302836 0.840982228 0.858661619
We can now use the model to predict the values of body weight at each of those points for each of the two suborders:
#get a data frame of new data for the order
ZygoVals <- data.frame(logGS = LogGSForFitting, Suborder = "Zygoptera")
#get the predictions and standard error
ZygoPred <- predict(odonModel, newdata = ZygoVals, se.fit = TRUE)
#repeat for anisoptera
AnisoVals <- data.frame(logGS = LogGSForFitting, Suborder = "Anisoptera")
AnisoPred <- predict(odonModel, newdata = AnisoVals, se.fit = TRUE)
We’ve added se.fit=TRUE
to the function to get the standard error around the regression lines. Both AnisoPred
and ZygoPred
contain predicted values (called fit
) and standard error values (called se.fit
) for each of the values in our generated values in LogGSForFitting
for each of the two suborders.
We can add the predictions onto a plot like this:
# plot the scatterplot of the data
plot(logBW ~ logGS, data = odonata, col = Suborder)
# add the predicted lines
lines(AnisoPred$fit ~ LogGSForFitting, col = "black")
lines(AnisoPred$fit + AnisoPred$se.fit ~ LogGSForFitting, col = "black", lty = 2)
lines(AnisoPred$fit - AnisoPred$se.fit ~ LogGSForFitting, col = "black", lty = 2)
\(\star\) Copy the prediction code into your script and run the plot above.
Copy and modify the last three lines to add the lines for the Zygoptera. Your final plot should look like this:


Human psychology is incredibly complicated but we all consider it to be simple. Human psychology has forever been unpredictable. Our behavior and mentality are the outcomes of what we see, read, or with whom we interact.
In the past few decades, we humans have been more and more connected to computers and technology. We tend to spend more time in the virtual world and amidst the pandemic, we are forced to stay indoors, and naturally, our screen time increases. As the overlap between man and machine expands, the relevance of human-computer interaction (HCI) analysis can solely increase
Cyberpsychology is relatively a new concept and was introduced in order to understand HCI in a better way. Cyberpsychology is the ﬁeld of study that deals with the mental as well as emotional effects on users because of the web and technology. It is also known as ‘internet psychology’ or ‘web psychology’.
Highlight
Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia
Cyberpsychology helps us to understand how we humans think and behave in different ways while using and as a result of using the internet and technology. Cyberpsychology primarily focuses on the effects of social media and virtual reality on the minds of users. While all the statistical and theoretical research in this ﬁeld is predicted around Internet usage, it includes the study of the psychological ramiﬁcations of cyborgs, AI, and virtual reality too. Cyberpsychology additionally deals with topics that may seem to be science ﬁction stuff, however quickly turning into science fact.
Addiction studies, E-therapy, virtual reality, cyberbullying and online harassment, telehealth, etc. are the few ﬁelds where cyberpsychology is applied. E-therapy is a therapeutic counseling service provided to a patient over the internet and it has always been a controversial topic. Research has shown that the psychological state of Internet users is affected. For instance, their attention span becomes shorter, some get addicted to technology, whereas some are misled or mislead others using fake news and so on.
The number of internet and computer users is increasing at a rapid speed around the world, and as a result the impact of technology on the human psyche continues. Unintentionally, there will be an amendment in our interactions with one another and on our perceptions of the globe that is virtually at our ﬁngertips.
We humans forever tend to blame others for our own mistakes and also the same happens when it involves the internet and technology. We are the ones who don’t know how to use technology and the internet effectively and more safely. Humans have a tendency to alter according to situations but sometimes we get obsessed and forget to maintain the balance we require which in turn affects our productivity.
Ultimately, cyberpsychology research aims to make users understand the consequences of overuse of the internet and technology and ways to use it in a better and secure manner.


In python, we have a very power package for mathematical models, which is named 'statsmodels'.
import statsmodels.formula.api as sm model = sm.ols(formula = 'amzn~spy',data = df).fit() print model.summary()
We built a simple linear regression model above by using the ols() function in statsmodels. The 'model' instance has lots of properties. The most commonly used one is parameters, or slope and intercept. We can access to them by:
print 'pamameters: ',model.params [out]: pamameters: Intercept 0.000012 spy 0.492112 print 'residual: ', model.resid.tail() [out]: residual: Date 2016-12-22 -0.003360 2016-12-23 -0.008219 2016-12-28 0.000477 2016-12-29 -0.006303 2016-12-30 -0.021211 print 'fitted values: ',model.predict() [out]: fitted values: [-0.00070299 -0.00218348 0.00068734 0.00046907 -0.00277819 0.00103882]
Now let's have a look at our fitted line:
plt.figure(figsize = (15,10)) plt.scatter(df.spy,df.amzn) plt.xlabel('spx_return') plt.ylabel('amzn_return') plt.plot(df.spy,model.predict(),color = 'red') plt.show()
The red line is the fitted linear regression straight line. As we can see there are lot of statistical results in the summary table. Now let's talk about some important statistical parameters.


{% block additionals %}{% if additional.registrars or additional.contacts or additional.hosts %} {% import 'objects.html' as obj %}


We are in the San Francisco Bay Area but our photography services are available across the 50 states. If you're local to the Bay Area, we can meet to discuss details. If you're anywhere else in the 50 states, we can discuss details via email or phone. You ship us your items, we photograph and ship them safely back to you. Once we recieve your items, depending on the project, we typically start by sending you a few images as a sample to confirm if the images work for you. Based on your feedback, we photograph the rest.
Our Guarantee: If we deliver images that are not a close enough representation of your product, we don't charge you. So try us out with a few pieces - we have no minimums.
If you have any questions, please reach out. Contact


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StreamIn
Input Stream.
| Field Summary | |
|---|---|
static int |
END_OF_STREAM
end of stream char. |
| Method Summary | |
|---|---|
int |
getCurcol()
Getter for curcol . |
int |
getCurline()
Getter for curline . |
boolean |
isEndOfStream()
Has end of stream been reached? |
int |
readChar()
Read a char. |
int |
readCharFromStream()
reads a char from the stream. |
void |
setLexer(Lexer lexer)
Setter for lexer instance (needed for error reporting). |
void |
ungetChar(int c)
Unget a char. |
| Field Detail |
|---|
static final int END_OF_STREAM
| Method Detail |
|---|
int getCurcol()
curcol
.
int getCurline()
curline
.
int readCharFromStream()
int readChar()
void ungetChar(int c)
c
- charboolean isEndOfStream()
true
if end of stream has been reachedvoid setLexer(Lexer lexer)
lexer
- Lexer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Click a discount to modify, toggle it's active status with the checkbox on the left, or delete a discount with the "x" on the right.
| Name | Items | Code | Compounds | Amount |
|---|---|---|---|---|
| {{discount.name}} | Global Discount Item: {{discount.itemName}} | {{discount.code}} |
{{discount.compound == 'true' ? 'Yes' : 'No'}} | {{discount.amount | currency}} |


People's Art Archive
This is where we test some of the ideas we have for the People's Art Archive.
This post provides a general description of our ideas for the project.
Everything here is a work in progress.
This is where we test some of the ideas we have for the People's Art Archive.
This post provides a general description of our ideas for the project.
Everything here is a work in progress.


{{ player.full_name }}
AGA Info
ID: {{ player.aga_id }}
Rank: {{ player.aga_rank }}
This Episode
Wins: {{ episode_stats.wins }}
Losses: {{ episode_stats.losses }}
This Season
Wins: {{ season_stats.wins }}
Losses: {{ season_stats.losses }}
Overall
Wins: {{ league_stats.wins }}
Losses: {{ league_stats.losses }}
Games Played
| White | Black | Handicap | Komi | Season | Episode | Played | |
|---|---|---|---|---|---|---|---|
| {% if game.winner.name == 'white' %} {{ game.white.full_name }} {% else %} {{ game.white.full_name }} {% endif %} | {% if game.winner.name == 'black' %} {{ game.black.full_name }} {% else %} {{ game.black.full_name }} {% endif %} | {{ game.handicap }} | {{ game.komi }} | {{ game.season }} | {{ game.episode }} | {{ game.played_at }} |


Here is how losing weight has helped a Croston performer sing better
by Natalie WalkerLosing weight can have a positive impact on a number of things, as a Croston woman reveals how even losing a few pounds has improved her singing.
Linda Green has been able to hit the high notes and keep in tune as losing just one stone has improved her singing.
The 58-year-old, from Croston, says that even just over a stone has kept aided her breathing, meaning she can hold longer notes.
She explains: “I stayed at my goal weight until I was made redundant from my job in 2008.
“I tried to maintain on my own but gradually weight crept up and I never managed to get less than 13lb over my original goal weight.
“In 2018, my husband became seriously ill and lost a great deal of weight. He couldn’t face food and I was trying anything in a desperate attempt to get any sort of calories into him.
“Of course, I ended up eating what I was trying to feed him and the pounds started to accumulate.”
In August 2018 and with her husband in recovery, Linda stepped through the doors of WeightWatchers (WW) at St Mary’s Priory Club, Leyland, weighing 9st 8 1/2lbs.
She followed the WW Freestyle plan, adopting the 80/20 rule (eat healthy foods 80 per cent of the time).
The ease of the plan and addition of the digital tools and group support played a huge part in her success, as she adds: “The app and WW Facebook group are a great help and I am confident that, with WW, the support from my coach, Michelle Hartley and fellow members, I will stick with the programme and maintain easily.
“I feel great that I can now wear clothes that show my shape rather than hiding it. I am under 5 feet tall and, it is a strange thing but, being slimmer, I feel taller. When I look in the mirror I see a more elongated shape rather than a short, dumpy one.”
As she joined the gym and started pilates, she slimmed down to 8st 5lb. She says her weight loss has given her further benefits, including feeling more toned and finding it easier to breathe which she says helped her sing better.
Linda sings on an ad hoc basis with a group of friends and attends various organised events.
She says: “When you are singing, you get lots of oxygen into your system, as you are taking deep breaths.
“So even losing a bit of weight can help with your breathing.
“This in turn boosts your serotonin levels. Singing is a very joyful thing to do and to sing for other people gives me great pleasure.”
Linda will be singing under her stage name Miss Scarlett McCorr for Good Old Days at The Village Hall, in Hutton, on Friday, December 6, at 7.30pm.
The event is organised by Paul Russell of the Well Dressed Gentlemen.
Tickets are £12 and can be bought by calling 01772 611011. All proceeds will go towards St Catherine’s Hospice.


Technology consulting in Web/Mobile and Cloud development. Specializing in High Scalability, Big Data, User Experience, Cross Platform Development, Gaming.


This example demonstrates the navigation inside and outside of the tree with TAB and arrow keys.
There are three trees with different values of tabbable option.
NOTE: The example is experimental: backspace, spacebar and arrow keys don't work correctly in input fields for now.