To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
The relative malleability of adults’ first language grammar, and thus the contribution of the post-adolescent individual to historical language change, is a contested issue in linguistic research. The argument revolves around the extent to which it is possible for post-adolescent individuals to modify the grammatical system of their native language(s). This chapter summarises the contribution of several areas of linguistics to this debate, highlighting in particular some historical sociolinguistic studies of English. We then review the evidence from over forty-six longitudinal linguistic panel studies, confirming that some adults can adjust their native repertoires across the life-course, even into old age. Yet many questions remain to be answered with regard to the nature of post-adolescent linguistic lability. We discuss several questions of particular importance for the study of generational language change.
In its history, the phonology of Irish English went through a number of stages in which features arose and subsequently declined. Many of the traits to be seen in the textual record for early modern Irish English were lost by the nineteenth century, with others being retained, such as the incomplete long vowel shift and dentalisation of stops before R. The early twentieth century saw a change in supraregional Irish English given the endonormative reorientation which set in after independence in 1922. Language contact between Irish and English has been a consistent theme in Ireland’s history and has led to a prolonged language shift, which culminated in the accelerated switch in the mid nineteenth century with the vast majority of the population being native speakers of English by the onset of the twentieth century. The language shift also resulted in many instances of grammatical transfer from Irish to English, a small number of which remained emblematic of Irish English and have survived to this day.
• To know the inspiration behind the genetic algorithm.
• To understand the concept of natural selection, recombination, and mutation.
• To understand the correlation between nature and genetic algorithm.
• To formulate the mathematic representation of genes and fitness theory.
• To implement natural selection through roulette wheel.
• To implement recombination or crossover.
• To implement the process of mutation.
• To understand the elitism and its implementation.
• To discuss the advantages and disadvantages of genetic algorithms.
22.1 Intuition of Genetic Algorithm
Genetic algorithm (GA) is inspired by nature, and it plays a vital role in the field of machine learning (ML). It selects the best-optimized solution from all available possible solutions or candidates. As nature selects the best possible candidates using the theory of evolution, in the same way, the GA selects the best possible solution from the available solutions.
One of the applications of GAs in ML is to select the global minima from all possible (local) minima by using natural selection. In earlier chapters, we learned that during the training of an artificial neural network, the main goal is to obtain the weights with a minimum cost function value. The gradient descent algorithm is commonly used to find the local minima of the cost function. But, we must find the global minima to reach the optimal weights. A GA can be used to find the global minima out of all available local minima or possible solutions. In this case, the set of possible local minima becomes the population containing possible candidates.
In this chapter, we will discuss inspiration from nature which is the main driving concept in working of GAs and their implementation. To get a good idea about the GA, we will discuss the basics of natural selection by revisiting the theory of evolution in the next section.
22.2 The Inspiration behind Genetic Algorithm
The concepts discussed in this chapter are also available in the form of the free online Udemy Course, Genetic Algorithm for Machine Learning by Parteek Bhatia,
The GA is one of the first and most well-regarded evolutionary algorithms in computer science literature. John Holland, a researcher at the University of Michigan, gave this algorithm in the 1970s, but it became popular in the ‘90s.
Chapter 5 focuses on Ghana, one of Africa’s most institutionalized democracies, and contrasts its relatively balanced allocation of development finance with the regional favoritism observed in Zambia. Ghana’s stable two-party system – dominated by the National Democratic Congress (NDC) and the New Patriotic Party (NPP) – is characterized by cross-ethnic coalitions. While the NDC has traditionally drawn support from the Volta region and the Muslim North, and the NPP from the Akan-dominated Ashanti region, ethnic fragmentation has encouraged both parties to target swing regions through strategic resource allocation. Ghana’s political landscape is shaped by a commitment to ethno-regional balance in leadership and efforts to institutionalize regional equity, which curtail ethnic favoritism. Decentralization and broad-based representation further incentivize parties to compete in swing constituencies. Despite ongoing challenges such as rent-seeking and rising debt, Ghana’s independent institutions and vibrant civil society help constrain ethnic favoritism – offering a stark contrast to Zambia’s declining accountability during its democratic transition.
• To learn about different phases of data pre-processing like data cleaning, data integration, data transformation, and data reduction.
• To understand the need for feature scaling.
• To comprehend normalization and standardization techniques for feature scaling.
• To understand principal component analysis for feature extraction.
• To pre-process the categorical data for building machine learning models.
3.1 Need for Data Pre-processing
We live in an age where data is considered oil because we need data to train machine learning (ML) algorithms. The most important job for a data analyst is to collect, clean, and analyze the data and build ML models on the cleaned dataset. But often, the raw data that we obtain is noisy. It consists of many discrepancies, inconsistencies, and often missing values. To understand this situation, let us consider an example.
Suppose we have to predict the house price, and for this, we have collected data from a few previous transactions, as shown in Figure 3.1.
In a perfect situation, the captured data should be of this format, as shown in Figure 3.1. Here, we have the size of the house and the number of bedrooms as input features, while the price is the output attribute. We can predict the price of an unknown instance through regression.
But practically, in most situations, the captured data is not of good quality, and usually, we have a dataset, as shown in Figure 3.2.
You can see that this data is messy. There are a lot of unknown or missing values, and if we trained the model on this data, its prediction would be very poor. Also, you can identify the noise and incorrect labels like the second record price is incorrect and will result in poor model training.
We can also consider some more examples like if someone entered –1 in the “salary credited” column in the case of employee dataset. It does not make any sense and will be considered noise. Sometimes, we may have an unrealistic and impossible combination of data; for example, let us consider a record where we have Gender–Male and Pregnant–Yes.
This chapter presents a sociolinguistically focused overview of the history of Received Pronunciation (RP). The sociolinguistic community for whom it is a vernacular is a small one numerically but its form of speech had an outsized historical and sociolinguistic impact for over a century. Fundamental sociological and historical changes have since upended the sociolinguistic status of the elite sociolect in Great Britain and across the world. In attempting to place RP within the overall history of the English language, its development as a vernacular has often been overshadowed by, and confused with, its status as a standard accent in certain contexts and settings. The present discussion will distinguish between vernacular and standard, and focus on the variation and change of a vernacular elite sociolect over time, with an emphasis on the evolutions that took place in the period after the Second World War in Great Britain.
Word combinations can be “compositional” (the meaning of the whole is straightforwardly and transparently derivable from the individual parts) or else “non-compositional” (and not so easily derivable). Chapter 3 discusses the combination WRENCH-ENGAGING SURFACE from a dental patent which has a non-compositional purpose or design component in its meaning (the surface is designed for engagement with a wrench), and this was crucial for a determination of patent infringement or not. The precise meaning of another word combination REHAB FOR BILLY was at the center of a libel suit over whether BILLY was actually in, or going into, rehab.
Word combinations, especially compound nouns, feature regularly in trademark disputes. The basic categories of trademark law are summarized, generic, descriptive, suggestive, arbitrary, and fanciful terms. The chapter then exemplifies genericness with APP STORE and gives semantic, grammatical, and corpus evidence for making this classification. It cannot be a trademark. HALF PRICE BOOKS is argued to be a descriptive term, not a generic one, and can be trademarked as long as “secondary meaning” is proven, whereby it also refers to a particular company.
• To know about various integrated development environments of Python.
• To implement basic programming constructs using Python.
• To understand the usage of various data types like numbers, list, tuple, strings, set, and dictionary.
• To compare various data types like list, tuple, dictionary, and set.
• To use if and looping statements in Python.
• To define user-defined functions.
Today, Python is known to be one of the most in-demand programming languages. As per the stats of GitHub (a provider of Internet hosting for software development), Python is the second most popular programming language, following JavaScript, as shown in Figure 2.1, and soon it may be on the top of the chart. Python surpassed Java, PHP, and other prominent languages in 2019.
Python is easy and versatile. So it is acclaimed as the major programming language to work on many new-age technologies like machine learning (ML), artificial intelligence, data science, and natural language processing. The creator of Python, Guido van Rossum, in 1991, stated that Python is a high-level programming language, and its core design philosophy is about code readability and syntax, which allows programmers to express concepts in a few lines of code. Interestingly, the name Python is inspired by Guido's favorite television show Monty Python's Flying Circus.
In this chapter, we will discuss various programming constructs of Python so that you can easily implement ML algorithms by using it. Before writing the actual code in Python, let us focus on the features of Python that make it so popular and unique.
2.1 Features of Python
Features offered by Python can be visualized in Figure 2.2. Talking about them profoundly, the main features of Python are as follows:
• Beginner's Language: Python is not only just easy to code and learn, but also fast to grasp, and hence it is a suitable choice for any novice user who wants to learn to program. This is why nowadays this language is introduced to students in schools.
• Interpreted: Unlike other programming languages such as C or C++, Python does not require you to compile programs before executing them. It is an interpreted language, i.e., the code written in Python gets processed in real-time line by line.
• Interactive: The interactive feature of Python enables real-time feedback, allowing programmers to experiment, debug, and make adjustments on the go.
This chapter discusses the perceptions of English variation from the earliest available commentary to the present day. Historical commentary on English variation from various sources is discussed and contrasted with contemporary accounts of the perception of variation in English. The chapter discusses commonalities in the perception of regional variation over time, examining three overarching themes: the presence of a linguistic hierarchy; the focus on the ‘best’ forms of English in areas (and occupations) proximal to the centres of power, and general concerns about language change.
Chapter IV discusses various Sumerian and Akkadian stories as examples for myth as a fundamental instrument of thought and its explanatory, orientational, and worldmaking functions, as well as a reflection upon forms of political governance.
• To understand the need for simple linear regression.
• To comprehend the concept of hypothesis and parameters of simple linear regression.
• To understand mathematical modeling of cost function and its minimization.
• To understand the importance and different steps of the gradient descent algorithm.
• To comprehend the mathematical modeling of the gradient descent algorithm.
• To understand the role of learning rate α.
5.1 Introduction to Simple Linear Regression
As discussed in earlier chapters, regression predicts a continuous value or real-valued output. This chapter will discuss how regression works (from a mathematical aspect) to predict the continuous value for the given dataset. Our first learning algorithm is simple linear regression. In this section, we will discuss the fundamental concepts and mathematical modeling of simple linear regression.
We usually have a dependent variable having a continuous value whose value we wish to predict based on one or more independent variables. If we have only one independent or input variable, this situation is known as simple linear regression (also called univariate regression). If we have multiple independent or input variables, it is known as multiple linear regression or multivariate regression.
Linear regression could be used for studying patterns in different real-life scenarios. Consider a research lab where a researcher wants to understand how the stipend is effected by the years of experience, or, in simple words, we wish to predict the stipend based on the years of experience of the researcher. Machine learning (ML) is about learning from past experiences or data. Thus, to predict the researcher's stipend, we have to collect some data about past researchers, specifically their stipend and experience.
In the supervised learning models, we need a dataset called a training set. We will use the dataset as given in Table 5.1 for training the model, and our job will be to build the ML model that learns from this data and hence predicts the stipend of a researcher based on his experience. Here, the stipend will be considered the dependent or output variable because it depends on the researcher's years of experience. Thus, years of experience will be considered an independent or input variable. So, we will use simple linear regression to build the ML model. For proceeding with this problem, we will use a dataset of researchers’ stipends with their corresponding years of experience, as shown in Table 5.1.