As one of two summer 2017-18 student interns for the Kōrero Māori project with Dragonfly Data Science, Te Hiku Media and Te Pūnaha Matatini, we were assigned to help collect corpus of te reo Māori text that would be used to train the written language model component of a te reo Māori computer natural language processing engine. When ready, the natural language processor will be used as the base for making software like Apple’s artificially intelligent ‘Siri’, that will be capable of understanding te reo Māori.
One text source in particular was identified that is publicly available online and known to contain te reo Māori – that is the New Zealand Parliamentary Debates as recorded in the Hansard reports.
The written record of Parliamentary Debates (Hansard) make up over 700 volumes of text that span from 1854 to the present day, and daily reports continue to be published online within a fews hours of each new thing spoken in Parliament.
Working through the Hansard
A variety of challenges were encountered while programming an algorithm that could successfully sort through the text in all the volumes, accounting for a variety of text structures, and detecting and extracting te reo Māori.
- Hansard volumes prior to 1867 are assembled from newspaper publications and the like – the Hansard reporters first began their work in 1867.
- Prior to volume 410 (1977), speeches were not always directly quoted and were often written in a narrative style. It is a possibility that at times te reo was spoken but only recorded as a narrative in english. From volume 410 onwards, all speeches are directly quoted.
- Prior to volume 483 (1987), the volumes are published using non-digital means. Digital text has been generated from optical character recognition of scans – OCR from the earlier volumes is not the best. From volume 483 (1987) onwards the debates are published using computer word processing software.
- In 1994 the Hansard reports begin to use macronised vowels for te reo Māori words.
- From volume 606 (2003) onwards, the daily Hansard reports are available online as HTML formatted web pages.
In the end, the programme extracts segments of speech that have a high percentage of Māori words. It also counts all the Māori, non-Māori and ambiguous (e.g. ‘he’, ‘to’, ‘a’) words that are spoken within each day of debates.
Across the 700+ volumes, the programme has sorted through over 420 million words to detect about 7400 speech segments that are at least 50% te reo and have a combined total of about 390,000 Māori words.
History of Te Reo in Parliament
Several interesting discoveries were made after examining the result and making a graph (see figure below):
- Up until the 1980s the proportion of te reo Māori speech in Parliament was barely anything – less than 0.1% for more than 130 years. However over the last 2-3 decades the growth trend in the percentage of te reo spoken in Parliament is very remarkable, even reaching as high as 2% in a year.
- We found that Māori words make up about 0.2-0.4% of what people say in Parliament on average if they aren’t speaking in te reo Māori – most probably common words like names.
- A cluster of te reo speeches around the 1940s.
- Several MP speeches that include other polynesian languages are counted to contain about 50% – 70% “Māori” words – this is due to similarity between languages and alphabets.
Interpretation of the growth trend
Viewing Parliament and the New Zealand House of Representatives in the context of an institution that endeavours to represent the whole of Aotearoa New Zealand, the kinds of social interactions that occur within Parliament can also be interpreted as a general indicator, as an approximation, and as the emergent result of the many kinds of cultural interactions and social dynamics that are happening on the ground across broader New Zealand society as a whole. In this sense, the amount of te reo spoken in Parliament, or any language for that matter, reflects the current position that language has in society. The growth in te reo Māori used in Parliament appears to parallel the time period from when Te Kohanga Reo and Te Reo Māori revitalisation movement began, as well as from the time when the process of settling Tiriti grievances began.
Over the summer we interns managed to aggregate several thousand te reo sentences combined, including from sources such as the historical Māori newspapers. However, over 100,000 sentences are required to train a good language model, so there is still a lot more corpus gathering to be done.
The program scripted for the Hansard debates can be run again and again as new debates are published to continue growing the corpus of te reo Māori. The script can also be adapted and reworked to sort through other text sources that consist of paragraphs and sentences, particularly bilingual text.
In addition, with a little more work on this particular code we can start to keep account of:
- The percentage of Māori spoken by each Member of Parliament over time
- The percentage of Māori spoken by each Party over time
- Count other Pacific/Polynesian languages when spoken in Parliament
The sudden upswing in te reo in Parliament in the last 20 – 30 years is astounding. From practically 0 to 1-2% in a couple of decades, imagine what it could look like in years to come:
- When the percentage of Te Reo spoken in Parliament begins to match the size of the Māori population (~15%).
- When the percentage of Te Reo spoken in Parliament approaches 50%, and the nation is almost 100% Māori bilingual.
No doubt, machines that have learnt to kōrero Māori will play an important part in such developments as we continue the journey onward into the technological future. Performing this mahi as a tauira intern for the Kōrero Māori project has been a great learning experience. I have been able to learn from professionals and sharpen my programming and data processing skills all for this deeply meaningful kaupapa with compelling implications for the digital future of languages indigenous to Te Moana-nui-a-Kiwa, and I am very humbled to have had the opportunity to contribute to its development.
William Asiata is a BSc Mathematics graduate from the University of Canterbury and a current Master of Information Technology student at the University of Auckland. William is passionate about the development and application of social choice algorithms to the construction of social networking systems, and how this will impact the future of civic technologies. William is also interested in the social evolution of peoples across Oceania.
Before I started working as a research assistant on the Hidden Networks project, the only woman from the history of New Zealand science I could name was Joan Wiffen, the “dinosaur lady” who discovered New Zealand’s first dinosaur fossils in Hawke’s Bay. She was a remarkable woman who contributed much to palaeontology here in New Zealand; she was also, incidentally, very white. I too am outwardly (that is, I pass as) very white. But as a mixed-race woman of Samoan descent, when I started this project I was very interested to learn about the contributions of non-Pākehā – chiefly, Māori and Pacific Island – women to science in Aotearoa. For the purposes of my research, I’ve taken “woman in science” to broadly mean a woman who has made a contribution to science in New Zealand, including both professional scientists with academic backgrounds and amateur scientists who have added to the pool of knowledge in their field, like Joan Wiffen.
The more I researched, the whiter the history of women in science in New Zealand came to look. Unsurprising really: according to Elizabeth McKinley, in 1998 just 1.5% of total employees at seven Crown Research Institutes in New Zealand identified as Māori women; there were none in management positions, and only two scientists. In ‘Finding Matilda’, Kate Hannah notes that “the historiography of science in New Zealand … tends to inadvertently reinforce [the] camouflage” of women. They are marginalized, but not absent: if you go looking, as I have, you’ll find a staggering number of women in New Zealand science from the 14th century to present-day. Yet from the beginnings of European presence in New Zealand, the overwhelming majority of these women were white. A feminist revisionist history of science aims not only to make science less male-centric (i.e. demonstrate, through promotion of women’s work both quantitatively and qualitatively, that science never has been just a man’s world) but also to make it less monochromatic (so to speak), which means celebrating the scientific achievements of brown women in New Zealand’s history, and showing that science never has been just a white world either.
In fact, the first women who made scientific contributions in Aotearoa were not Pākehā but Māori. I was delighted to learn of Whakaotirangi, who in the 1300s “was responsible for safeguarding the seed of the kūmara” as the Tainui Waka journeyed to Waikato. She was the wife of Hoturoa, the leader of the Tainui Waka migration from Hawaiki to Aotearoa, but also an important historical figure in her own right. In ‘Whakaotirangi: A Canoe Tradition’, Diane Gordon-Burns and Rāwiri Taonui explore how her importance has been diminished in post-European contact accounts of the Tainui migration. Tainui and Te Arawa traditions both speak of Whakaotirangi: she appears to be a noble and important ancestor in the history of both iwi. While she is most remembered for bringing kūmara to Waikato, she was also responsible for a number of other plants brought from Hawaiki. On arrival in Waikato, Whakaotirangi built gardens in which she experimented with growing and tending to a variety of plants, both for sustenance and medicinal purposes. She discovered how to make the kūmara, which had come from a much warmer climate, grow in the cooler land her people had settled. Her work was crucial for the establishment of the Tainui people: it provided them with a reliable food supply as they adjusted to life in a new land. She was also involved in commissioning, building and launching the Tainui canoe. Her profile on the Royal Society of New Zealand website, as part of their series 150 Women in 150 Words, credits her as “one of New Zealand’s first scientists”.
Around the middle of the 1400s, another important ancestor of the Waikato people appeared. Kahu (also known as Kahupeka, Kahupekapeka, Kahukeke, or Kahurere) was a Tainui woman who experimented with plants – such as harakeke, koromiko, kawakawa and rangiora – as medicinal remedies. She did so during her great journey: walking inland through the King Country while grieving the death of her husband (who in some accounts is Rakataura; in others Uenga). She gave names to different sites along her journey (such as Te Manga-Wāero-o-Te Aroaro-ō-Kahu – ‘the stream in which Kahu’s dogskin cloak was washed’) – these names tell the story of her journey and preserve the history of the land. At some point during her journey she was ill, which may have been why she sought out plants for their medicinal properties. Unfortunately there are many different versions of Kahupeka’s story, and in them there are few mentions of her medicinal experimentations with indigenous flora. In some versions Rakataura doesn’t die, and he and Kahu traverse the countryside naming places together, as explorers.
In Māori culture, practitioners or experts in any skill or art are known as tohunga. The Tohunga Suppression Act 1907 made tohunga status a punishable offence. The Act was repealed only in 1962, and so much of the knowledge surrounding this customary way of knowing has been suppressed – my search for tohunga wahine (female practitioners) who might count as women of science has not produced significant results. However, it is worth noting that the sources I accessed relied upon the written record. Other sources, such as Māori oral histories, may be much more fruitful.
The next Māori woman in science that I was able to find wasn’t born until the 19th century. Makereti Papakura (Margaret Pattison Thom; she also went by Maggie and was of Te Arawa and Tuhourangi iwi) was born to a Māori mother and an English father in the Bay of Plenty in 1873. She was raised by her mother’s aunt and uncle in Parekarangi, a rural area. She didn’t learn English until she was ten years old, speaking only Māori until her father took over her education. After her schooling, Papakura moved to Whakarewarewa, where she became an accomplished tourist guide. She gave herself the surname Papakura after a nearby geyser when a tourist she was guiding asked if she had a Māori surname. Clearly, the name stuck. In 1891 she married surveyor Francis Joseph Dennan; they had one child together before divorcing in 1900. In 1905 she wrote Guide to the hot lakes district. Papakura travelled to England in 1912, and married Richard Charles Staples-Browne. She had first met Staples-Brown when he was on a tour of New Zealand, and had reconnected with him while she was part of a Māori tour party in England. They divorced in 1924, but Papakura remained in England and in 1926 she enrolled at Oxford University, studying a BSc in anthropology. She died on April 16, 1930, only two weeks before her thesis, The old-time Māori – in which Papakura combined customary knowledge with scholarly conventions – was due to be examined. It was published posthumously, eight years later. Her thesis covers Māori social and familial structures, housing, weaponry and relationship with fire. She was meticulous in her writing, and wrote letters to her people in New Zealand during her drafting process, to ensure her account was as accurate as possible.
Bessie Te Wenerau Grace (1889-1944; Ngāti Tūwharetoa) was the first Māori woman university graduate, graduating from Canterbury University with a BA in 1926. She was the granddaughter of Ngāti Tūwharetoa chief Horonuku Te Heuheu. She then went on to receive an MA with first-class honours in modern languages from London University. In London she also became a nun, Sister Eudora. She worked as headmistress of St Michael’s School in Melbourne. In 1945, Dame Mira Szászy (1921-2001; Ngāti Kurī, Te Rarawa, and Te Aupōuri), a prominent Māori leader, became the first Māori woman to graduate with a degree from the University of Auckland. She went on to complete a postgraduate diploma in social sciences from the University of Hawaii and worked hard to improve the welfare of Māori women throughout her life. In 1949, Rina Winifred Moore (1923-1975; Ngati Kahungunu, Rangitane and Te Whanau-a-Apanui) graduated from the University of Otago with a Bachelor of Medicine and Bachelor of Surgery – and in so doing, became the first Māori woman doctor in New Zealand. In her career she worked to improve public perceptions of the mentally ill and was one of the first doctors in New Zealand to prescribe the contraceptive pill.
It has been harder for Māori and Pacific Islanders to enter scientific professions, as they are forced to combat social prejudices that expect them to fail – that tell them this is not where they belong. It has been harder for women to enter scientific professions because, again, they have to fight against the social biases that tell them ‘this is not your world’. Until the late 20th century, many women were expected to give up their careers when they married – motherhood and the domestic sphere became their full-time responsibilities. Some women chose to remain unmarried and childless in pursuit of scientific careers, while others stopped working when they married. Māori and Pacific women have to fight both gender and racial biases for their place in the world of science. This has been the case throughout the post-contact history of Aotearoa, and continues to be so.
Today, there are increasing numbers of Māori and Pacific Island women in science, with some of them working at the intersection of traditional knowledge and western science. Dr Ocean Mercier (Ngāti Porou) is a Senior Lecturer in Māori Science (the intersection of western science and mātauranga Māori) at Victoria University of Wellington. She has a PhD in Physics and was awarded the New Zealand Association of Scientists (NZAS) inaugural Lucy Cranwell Medal (previously the Science Communicators’ Medal) in 2017. Science researcher Hokimate Harwood (Ngāpuhi) combines western scientific and Māori customary knowledge in her research of the feathers in kahu huruhuru (feather cloaks). Her use of microscopy to identify the origins of feathers used in precious cloaks has been pioneering. She is a Bicultural Science Researcher at Te Papa. Her sister, Dr Matire Harwood (Ngāpuhi; PhD MBChB), is a Senior Lecturer at the University of Auckland Medical School and has done crucial research into indigenous healthcare throughout her career. Her efforts have been widely recognised, and in 2017 she was awarded a fellowship to the L’Oréal UNESCO For Women in Science programme.
Victoria University science educator Dr Hiria McRae (Te Arawa, Tūhoe, Ngāti Kahungunu) has created and developed a new educational model aimed at raising Māori students’ engagement in high schools. Through her research projects she has made important contributions to the field of Māori education.
Victoria University astrophysicist, science lecturer and research fellow Dr Pauline Harris (Rongomaiwahine and Ngāti Kahungunu), who has a PhD in astroparticle physics, is a key figure in the revitalisation and teaching of Māori astronomy. She is also involved in the search for extra-solar planets. Connected to Harris’s Māori astronomy programme is Pounamu Tipiwai Chambers, an undergraduate student at Victoria University who has employed Māori astronomical and navigational knowledge in undertaking waka voyages across the Pacific.
Another remarkable young woman, Alexia Hilbertidou (of Greek and Samoan descent), has founded GirlBoss New Zealand, an organisation aimed at the empowerment of young women in STEM studies after she felt alienated as the only girl in her year thirteen physics for engineering class. She was also part of NASA’s SOFIA project, making her the youngest person ever to be part of a NASA mission.
My blog post aims to contribute towards the unmasking of Māori and Pacific women’s contributions to science in both historical and contemporary landscapes. We are already seeing some important changes: many Māori women in science today combine customary and scientific knowledge to great success, a road paved by Makereti Papakura and her BSc thesis. However, Māori and Pacific women are still dramatically under-represented in fields of science, particularly at senior and management levels. It is therefore important that we keep up the momentum of positive change not only by looking forward but also by looking back: the successes of past figures provide an encouraging bevy of ‘shoulders to stand on’ for women in science today.
This post was written as part of my summer scholarship research on the Hidden Networks project, supervised by Rebecca Priestley and Kate Hannah.
If you’re interested in learning more about the women I’ve mentioned, you might enjoy some of these sources:
- Colenso, William, ‘Contributions towards a better Knowledge of the Maori Race’, in Transactions and Proceedings of the Royal Society of New Zealand 1868-1961, Vol. 14, 1881, pp. 33-48. http://rsnz.natlib.govt.nz/volume/rsnz_14/rsnz_14_00_000690.html
- ‘Dr Ocean Mercier wins prestigious Science Communicator’s Medal.’ https://www.victoria.ac.nz/news/2017/11/dr-ocean-mercier-wins-prestigious-science-communicators-medal
- GirlBoss New Zealand. https://www.girlboss.nz/
- Hilbertidou, Alexia, ‘NASA SOFIA Experience’, U.S. Embasssy & Consulate in New Zealand. https://nz.usembassy.gov/alexia-hilbertidou-nasa-sofia-experience/
- ‘Hokimate Harwood – Identifying feathers’, Museum of New Zealand Te Papa Tongarewa. https://collections.tepapa.govt.nz/topic/3657
- Mack, Ben, ‘How Dr Matire Harwood is addressing inequities in healthcare for indigenous people’, Idealog, 3 November 2017. https://idealog.co.nz/etc/2017/11/how-dr-matire-harwood-addressing-inequities-healthcare-indigenous-people
- ‘Māori science education model developed’, Radio New Zealand, 28 August 2015. https://www.radionz.co.nz/news/te-manu-korihi/282635/maori-science-education-model-developed
- McKinley, Elizabeth. ‘Brown Bodies, White Coats: Postcolonialism, Māori women and science’, in Discourse: Studies in the Cultural Politics of Education 26 no. 4, 2005, pp. 481-496. http://www-tandfonline-com.helicon.vuw.ac.nz/doi/full/10.1080/01596300500319761?scroll=top&needAccess=true
- Morton, Jamie, ‘Royal Society tackling diversity issues’, New Zealand Herald, 26 October 2016. http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=11736157
- Morton, Jamie, ‘Q&A: NZ science’s own ‘Hidden Figures’, New Zealand Herald, 24 January 2017. http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=11787672
- Northcroft-Grant, June. ‘Papakura, Makereti’, Dictionary of New Zealand Biography, first published in 1996. https://teara.govt.nz/en/biographies/3p5/papakura-makereti
- ‘Researcher to teach traditional Māori astronomy’, Radio New Zealand, 17 June 2013. https://www.radionz.co.nz/news/te-manu-korihi/137868/researcher-to-teach-traditional-maori-astronomy
- Royal, Te Ahukaramū Charles, ‘Waikato tribes – Ancestors’, Te Ara – the Encyclopedia of New Zealand, http://www.TeAra.govt.nz/en/waikato-tribes/page-3
- Shaw, Aimee, ‘Meet Alexia Hilbertidou, the 18-year-old founder of GirlBoss and the youngest person to be involved with Nasa’s Sofia mission’, New Zealand Herald, 11 July 2017. http://www.nzherald.co.nz/business/news/article.cfm?c_id=3&objectid=11888757
- Tipiwai Chambers, Pounamu. ‘Te Ara Tauira’ in Salient, 1 May 2017. http://salient.org.nz/2017/05/te-ara-tauira-4/
Beth Rust is a BA(Hons) history graduate from Victoria University of Wellington. For her Honours thesis she researched the writings of Christine de Pizan, a 15th-century humanist and early defender of womankind. This past three months she has been working as a research assistant on the project ‘Hidden Networks: hybrid approaches for the history of science’. Beth is just about to start a job in the public service, and she is very excited to take the skills she has learned from her summer research into her new role. She loved being a summer scholar.
I wrote this algorithm to classify people by gender, but one of the biggest things I learned was how machine learning can reinforce racism and perform poorly on ethnic minorities.
Machine learning – or programs that are able to learn from and improve on past experience and data – is often accused of reinforcing human biases such as racism and sexism. However, it can be a bit unclear how exactly this happens.
How does an automatic soap dispenser fail to recognize black people’s hands? How does image recognition software come to classify people in kitchens as women, regardless of their actual gender? How does artificial intelligence that seeks to predict criminal recidivism produce results that are consistently biased against black people?
This walk-through hopes to give you a bit of an insight into one example of racism in machine learning, and how this comes to be.
The algorithm will be used as part of research into gender equity in STEM fields in New Zealand. A lot of information about who works in certain research centres or who graduated from university is publicly available online (for example, here are university records from NZ between 1870 and 1961), but it doesn’t explicitly include their gender. While a person reading the information can usually guess their gender quite easily and with a high degree of accuracy, it’s obviously very impractical to read and classify thousands or hundreds of thousands of observations. This is where this algorithm hopes to simplify and speed up the process of identifying women in STEM fields.
Training and testing data: Selecting appropriate data
Getting good data for the training and test sets is a really important part of machine learning. Your model is only as good as the data you train and test it on, so getting this right is key.
The starting point of my dataset is the 100 most common names for boys and girls born in New Zealand in each year, going back to 1954. One major drawback of this dataset is that it only includes people born in New Zealand, not those that emigrated here. This means the dataset is almost exclusively made up of Anglo-Saxon names, and does not reflect New Zealand’s large Asian and Pacific populations.
🎉 New #data alert! 🎉
We’ve just updated our figures on a topic that’s always popular – #baby names 👶🏽
Charlotte and Oliver topped the 2017 charts, but we’re sure you’ll spot plenty of other familiar names. Know anyone with a name that made the top 50? pic.twitter.com/A1eHH4kGq5
— Figure.NZ (@FigureNZ) January 30, 2018
It also doesn’t include any Māori names, presumably because the Māori population isn’t large enough for these names to make the top 100 list. I’ve tried to remedy this by adding the top 20 Māori names for boys and girls from several years to the dataset. However, 91% of the training dataset is still made up of Anglo-Saxon names, while only 9% is made up of Māori names.
These biases in the training dataset mean that the model is likely to recognize the patterns that indicate gender in Anglo-Saxon names, while not picking up on patterns that indicate gender in the names of other cultures. The same biases in the testing dataset mean that the accuracy of the model probably only applies to Anglo-Saxon names, and that it may do much worse on names of other nationalities.
Selecting useful features for the algorithm
It’s important to consider what features would be most useful in predicting the desired classes. I started off by using the last letter of each name to predict gender. Most Anglo-Saxon names for men end with a consonant, while most Anglo-Saxon names for women end with a vowel.
There are also some pairs of letters that are more common for one gender than the other. For example, the last letter ‘n’ is indicative of a male name (e.g. Brian, Aidan, John), but the suffix ‘yn’ is indicative of a female name (eg. Robyn, Jasmyn). Because of this, using both the last letter of each name and the suffix as features results in higher accuracy than just using the final letter. This gave me an accuracy of about 73% on a testing dataset that includes both Anglo-Saxon and Māori names.
This overall accuracy is lower than it would have been on a testing dataset made up of only Anglo-Saxon names because these features don’t perform as well with names of other origins. In a New Zealand context, this causes the most problems with Māori names. Most Māori names end in vowels, regardless of gender (examples of male Māori names include Tane and Nikau, while female Māori names include Aroha and Kaia). This means this particular feature doesn’t do a very good job with names of Māori origin.
The same problem would likely apply to other ethnicities, too. For example, Japanese, Chinese, Vietnamese, Italian and Hispanic names all often end in vowels, regardless of gender.
Imbalanced classes and the problems they cause
Imbalanced classes, or classes that are very different in their size, can also create problems for machine learning algorithms. In this case, ethnicity is an imbalanced class that is likely to influence people’s names. In the 2013 census, 74% of New Zealanders identified as European, 15% as Māori, 12% as Asian and 7% as Pacific. (Note that Statistics New Zealand allows you to identify with more than one ethnicity, therefore these numbers don’t add up to 100%).
Imbalanced classes often result in high accuracy within the majority class (in this case, European) and low accuracy within the minority classes (Māori, Asian and Pacific). This particular algorithm has an overall accuracy of about 73%. The accuracy within Māori names is about 69%, while the accuracy within European names is 75%.
The class imbalances in the data explain why the overall accuracy may not be a very good way of assessing whether the algorithm is working well. As well as checking the accuracy within each subgroup, it can be a good idea to look at precision and recall for more information on where the algorithm is doing well and where it’s doing poorly.
Precision tells us how much of a classified group actually belongs to that group. In this case, for example, precision of female names is the percentage of names classified as female that are actually female. It is calculated by dividing the number of true positive (number of women classified as female) by all positives (number of women and men classified as female).
Recall is the percentage of a particular group that has been classified as belonging to that group. For example, recall of male names is the percentage of male names that have been classified as male. Recall is calculated by dividing the number of true positives (number of men classified as male) by the number of true positives and false negatives (number of men classified as female).
The tables below show the precision, recall and a couple of other metrics on how well the algorithm is doing. The differences between the overall table and the tables by ethnicity show that it’s likely that this algorithm is systematically worse with non Anglo-Saxon names, specifically Māori names in this instance.
For Māori names only:
Here we can see that both precision and recall is very low for male Māori names. This means that only a small percentage of the names classified as being male actually are male (low precision) and an even smaller percentage of male Māori names have been classified as being male (low recall).
This is probably because most Māori names end in vowels, regardless of their gender. The algorithm does alright on female Māori names, because it has seen many instances of female names ending in vowels before. But it hasn’t seen many male names ending in vowels, so it fails to classify most of these names correctly.
For European names only:
Because machine learning algorithms with imbalanced classes usually do worse in the smaller classes, they can further marginalise minority groups by routinely misclassifying them or failing to take into account patterns that are unique to the smaller group. In this example, this is likely to be the case with ethnic minorities.
It seems that this algorithm is likely to really only do a good job on Anglo-Saxon names. This limits the situations in which it would be appropriate to use it, and risks reinforcing Eurocentricity and a focus on whiteness.
This example shows how difficulties in getting hold of representative datasets, selecting features and unbalanced classes can cause algorithms to perform poorly on minority groups. These are only a couple of the many ways machine learning can contribute to the marginalisation of minorities, and it’s important to consider how this might happen in the particular algorithm you’re working on.
The consequences of bias in machine learning can range from the irritation of not being able to get soap out of an automatic dispenser, to the devastation of being given a longer prison sentence. As these algorithms become more and more ubiquitous, it is essential that we consider these consequences in the design and application of machine learning.
See this paper for a more detailed look at how imbalanced classes affect machine learning algorithms.
Emma Vitz is a recent Statistics & Psychology graduate of Victoria University who is starting a new role at an actuarial consulting company in Auckland. Emma enjoys applying data science techniques to all kinds of problems, especially those involving people and the way they think.
“I just don’t care!” the doctor said, in response to a query on a personal health-related issue during a recent New Zealand television interview.
I certainly had never heard a doctor speak in this way – and it made me curious to hear more in his live talk.
I was not disappointed. The thought-provoking comments kept coming: “The right way to build public trust is to earn public trust, and to share data” and, “The paradigm of medicine has somewhat shifted”.
In his unique and energetic style, Dr. Ben Goldacre got his message across to the audience at the Mercury Theatre in Auckland this September. A British physician, researcher, columnist, and author, Dr. Goldacre has made it his mission to tackle “bad science”, whether it is used by drug companies, politicians, journalists, or researchers.
Dr. Goldacre explained the misrepresentation of the research life cycle (objective – data collection – data analysis – publication – evaluation), showing the audience the easiest way to mispresent science and the shortcomings of medicine.
Using statistical data taken from newspapers, advertisements, and the research reports, the audience learned how so-called “in-depth scientific research” can be used as a clever marketing tool and how defined research objectives can often by driven by profit.
One telling example of misrepresented data is the sudden drop in the number of tonsillectomies carried out on children in Hornsey, North London. There was a big discrepancy before and after 1929 – that is, from a few hundred cases down to almost nothing. After some investigation, it was revealed that the decline in the number of tonsil operations coincided with the retirement of one individual medical officer at a particular school, replaced by someone with a different opinion as to the merits of the treatment. Such a case reveals the power of doctors’ choices, rather than patients’ needs. It also shows that how unreliable the data will be if the full picture is not disclosed.
Sharing a more recent case, Dr. Goldacre explained the use of statins, a medicine to lower cholesterol in the blood. Many treatment options are available to lower cholesterol against a placebo, but these have not been tested against one another to determine “real world effects”, including death. Dr. Goldacre and his team approached the UK National Health Service (NHS) to collect patient information. If patients agreed, doctors would be able to randomize the treatment options, ultimately finding the optimal treatment for considerably less resource compared to the traditional “door knocking” data collection method. Nevertheless, this was thwarted by opposition from ethics groups arguing that patients should have a choice.
Dr. Goldacre’s presentation led me to wonder; what role does the general public play in formulating bad science? Surely it is not just the domain of motivated organisations, unreliable researchers, and sensationalist media. Bad science can, and often is, disseminated by all walks of life.
How can we stop its spread? Transparency may be the answer – including that of research objectives, processes, and publication. If research objectives are set for the benefit of all, or purely for the improvement of a company’s bottom line, the public should know – and in a language they can understand. Let consumers make up their own minds.
Unfortunately, providing scientific data to the wider public and expecting people to reach their own conclusions may not be sufficient. Effective communication is also a critical element in combatting bad science. Nowhere is this more eloquently stated than in Professor Shaun Hendy’s timely book, Silencing Science: “The job of the scientist is not just to deliver the facts, but also to engage democratically to assist the community to weigh the full breadth of evidence” (p96).
Indeed, scientists and research providers should communicate well, working together in the best interests of the public.
As a consumer and a citizen in a world of information overload, it can be easy to be misled by a well-packaged data snapshot. We need to embrace a reliable and complete picture, and in terms we can understand. This will allow us to make our own choices in areas as broad as health, education, career, life-style, and more.
As a student of science and maths, I am beginning to grasp the moral imperative of the scientific community. Scientists should not only be answerable to their fund providers, but to everyone. A good start would be the publication of research findings representing the whole truth.
14-year-old Tristan Pang is a maths and physics major at the University of Auckland. He is also the creator of Tristan’s Learning Hub, producer and broadcaster of Youth Voices, founder and webmaster of several community websites, frequent speaker at schools, organizations and conferences, and tutors students from primary school level through to university. He aspires to make a difference in the world.
In the immortal words of Vanilla Ice – Stop, collaborate and listen. Collaboration is a cornerstone of modern science and with flight tickets cheaper than ever before and the internet effectively eliminating the expense of correspondence, academics and researchers are looking further afield and reaching more contemporaries across the globe. However, different institutions have different facilities and research focuses, not everyone speaks the same language, and so perhaps these researchers may be picky when it comes to who they work with. It raises the question of whether they do have a preference in collaborator based on affiliation and, if so, can this preference be measured and distilled into cold, hard data?
Of course they do, and of course it can be. More to the point, why?
Arguably the most tangible and conveniently quantifiable means in which academic collaboration manifests is in scientific papers and articles, typically with several authors from varying affiliations. A notable drawback in previous studies on research collaboration is that the measures used (such as the fractional count detailed in Nature Index) consider results for each institution, rather than individual academic, and disregard the size of each institution; as a result, smaller and younger institutions may stack up unfavourably compared to those that are more established and larger. For example, take a look at how the eight New Zealand universities compare against each other:
- The nodes representing each university are weighted by their respective output (total number of co-authored papers by academics affiliated with these universities).
- The links connecting universities to each other are weighted by the number of papers co-authored by researchers from both institutions.
- The higher the link weight, the more that the connected universities are attracted to each other.
The skewing effect that university size has on this network is pretty apparent from how Lincoln University has much fewer co-authorships with Victoria University and University of Waikato than with the rest of the network, given its relatively small output. Also of note is that the University of Auckland and AUT have a much lower link weight than one would expect for two universities across the street from each other, yet the University of Auckland and the University of Canterbury have a much stronger link despite being at opposite ends of the country.
First, to address the effect of institution output. We do this using something we call the revealed comparative preference (RCP) of an institution i for collaborating with institution j:
where Xij is the number of co-authorships between i and j, Xi is the total number of papers co-authored by i with other institutions in the data set, and X is the total number of co-authorships between all the institutions in the data set.
Plainly speaking, it’s a measure of whether two institutions are doing more than collaborating than we might expect with each other relative to their tendency to collaborate with the other universities in the data set. If Pij > 1 , then universities i and j share more co-authorships than we expect relative to the other institutions in the data set, so we say they have a comparative preference for collaborating with each other. Conversely, Pij < 1 indicates that the two universities are doing less than we might expect.
Anyway. Here’s the NZ university network revised with the links now weighted by their corresponding RCP values:
Better. Here it’s apparent that AUT has a stronger link with Auckland Uni in addition to Lincoln and Waikato, and it should be pointed out that University of Auckland, AUT and Massey University are also closer to each other in the network, bearing in mind that all three have campuses within Auckland.
Now with a working measure, we move on to a larger sample. Bring on the Australians.
Clearly the Tasman Sea has a solid effect on the way New Zealand based researchers connect with those based in Australia; the links within the NZ cluster of universities have greater RCP weightings than those within the Australian cluster, implying a preference for domestic rather than trans-Tasman co-operation. Another feature to consider is that the Australian universities in the same states are grouped together, which is consistent with the idea that geographical proximity plays a significant part in a researcher’s choice of collaborator.
It would only be natural to wonder how academics interact on a global scale – do we ever grow out of talking almost exclusively to our friends and shun outsiders in some weird, grown up, Mean Girls-esque collection of cliques?
From observing how the Dutch and German institutions are grouped together, we might conclude that the language barrier is a large hurdle to overcome when jointly writing scientific literature – this also seems apparent from the Chinese-Hong Kong cluster, as well as Korean and Japanese institutions as well. But languages also tend to cluster geographically, so it is hard to disentangle the effect of language from distance.
It’s no question that with the constant progress of technology, connecting with people is becoming less costly. However, there are factors remaining that impede the prospect of a totally connected scientific community, some of which have been speculated on here. Of course pictures and hand waving don’t constitute a solid argument, but a thorough analysis of these factors and their effect on university collaboration will be in store for you, dear reader.
In the meantime, perhaps one should learn German, or Mandarin, or Dutch, or even Japanese. It’s not that hard.
About the data visualisations
In order to make the larger graphs efficient enough to be used in browser, the amount of connections a node could have to other nodes was limited to its top four RCP values. This change had no significant effect on the clustering observed when the full connection matrix was used. The change was only implemented for the QS, ANZAC and benchmark data sets.
Bonnie Yu is a research assistant at Te Pūnaha Matatini and a member of Te Pūnaha Matatini’s Whānau group for emerging scientists. Her research projects focus on university collaboration networks.
The data visualisations of this post were prepared by fellow research assistant, Nickolas Morton.
By Caleb Gemmell and Catherine Webb
The Equity Office – Te Ara Tautika – at the University of Auckland has published an equity profile of the university for 2014. The purpose of these yearly publications is admirable – to transparently report how the university is progressing towards its goals of ethnic, gender and disability equity. Upon reading it, however, we were puzzled by the presentation of some of the data. So, in the helpful spirit of our previous Not Such a Silly Idea blog series, we started doing a little deconstruction.
Page 47 is about women in the ‘academic pipeline for advancement to senior positions. It shows the presence of women in the university from junior positions (undergraduate students) through to senior positions (professors).
There are several issues with this graph. First of all, can you tell what the Y axis is trying to measure? The numbers are too small to be a sheer headcount. A percentage, then. Eventually, we worked out that this is the percentage made up by women of the total FTE (full-time equivalent). Please label your axes.
Secondly, this graph looks deceptively like a time-series. It gives the impression that we are following a cohort of women over time through their academic careers (which would actually be very useful, by the way). However, the data is simply a snapshot in time across many categories. Truly, there is no reason for this data to be presented in a line graph; this is an ordinal scale, and the categories are discreet. It would be better represented by something like a bar chart.
The report’s use of the term ‘academic pipeline’ to describe the chart suggests that the report’s authors are attempting to show the retention of women as they progress through university careers, to gain an idea of where and with what magnitude women drop out of academia. Unfortunately, the overall impression we get from this graph – that women’s university careers tend to wane above Assistant Lecturer until an uptick in the Senior Leadership Team – is not a valid conclusion to draw from a snapshot of data that compares the results of non-contemporary cohorts.
Another reason the pipeline analogy is inappropriate here is that it implies it is normal to progress from student to staff, and from teaching staff to management. This is not the norm. It is fairly unusual to enter the workforce as a teaching academic with little prior experience. The inclusion of the Senior Leadership Team on the end of this progression is especially strange, since many of those positions are not academic at all – for instance, directors of HR, library, or finance – and certainly don’t require you to be a professor first!
So, we tried to present the Equity Office’s information in a more useful way.
This pulls out the clearest information the data has to offer, showing how the gender composition of each academic position has changed since 2000. Whereas the line graph appeared to prompt lateral comparison, this graph highlights the change over time within each category. It cannot be called a pipeline, but it is useful!
You can see that there is now a more granular breakdown, including HoDs and deans. We did this to be more informative and to smooth the sudden jolt between professors and senior leadership. Something we noticed, apart from the greatly improved gender ratio in almost every category in 2014, was the huge change in the ‘Heads of Departments and Schools’ category. We realised that the Faculty of Arts and the Faculty of Medical and Health Sciences (FMHS) were the only faculties which included both departments and schools, and that the schools were created additionally after 2000. That meant a greater number of heads in total, but not necessarily a greater proportion of women.
 The use of the category Assistant Lecturer, is its self curious, since no such employment position exists at the University of Auckland. The report’s authors say that the Assistant Lecturer category “…includes GTAs [graduate teaching assistants] tutors etc.” However, GTAs are typically postgraduate students, so would be represented twice in this data. The position of Tutor at UoA has not been in current use for several years, having been replaced by the position of Professional Teaching Fellow (PTF), which is presumably included in the etc. Missing from data are post-doctoral fellows, research fellows and senior research fellows. These positions often make up a sizable fract of many departments, the latter two positions being comparable in seniority to the positions of Lecturer and Senior Lecturer. The data is further confused by the fact that the mid-ranges of the pipeline might be better thought to consist of three parallel streams: PTFs (responisible for teaching only), Research Fellows (typically engaged in research, but not teaching), and Lecturers (engaged in both research and teaching).
Meet Stephen Marsland – a professor of scientific computing in the computer science cluster of the School of Engineering and Advanced Technology (SEAT) at Massey University. Stephen is also Te Pūnaha Matatini’s new Theme Leader: Complex Data Analytics. “Data is cool at the moment… but it would be nice to see people using it well and understanding what they can and can’t infer from analysis,” Stephen says. Find out more about Stephen’s research and what he hopes to achieve in his new role in the below Q&A.
Tell us about your research, including projects aligned with Te Pūnaha Matatini
My first area of research is the mathematics of shape analysis. This is primarily concerned with geodesics on the diffeomorphism group, which is a mathematical way of describing how flows of smooth, invertible transformations can deform one shape into another in the shortest possible way. I also study invariants to the actions of the groups that can deform images.
More related to Te Pūnaha Matatini is my work in machine learning, which has two parts at the moment: I’m thinking about manifold learning, where we try to find low-dimensional representations of high-dimensional data, and I’m also thinking about dealing with learning about multiple sources of data where all that you see is the combination of the sources. The first is a popular question, but I’m thinking about it very much from the point of view of differential geometry, and how that can help. I’ve got multiple projects going on there with collaborators in England and China.
The second project is with Marcus Frean, another Te Pūnaha Matatini principal investigator. So for example, you might see images of an object on different backgrounds, and you want to work out that the object and the background are different pieces of information.
I’ve got a very big project called AviaNZ going on that combines the shape analysis and machine learning, which is looking at birdsong recognition, in the hope that we can develop algorithms that will recognise birds from their calls and then infer the number of birds from how they are calling.
Finally, I’m interested in complex systems in their classic sense, both complex networks (which are networks with properties such as scale-freeness, or that are small worlds) and also systems where the interactions between agents cause the emergence of high-level properties. I’ve got a variety of projects with students looking at this, including in health, marriage systems, and soon, the evolution of barter (this last one will be funded by Te Pūnaha Matatini).
What attracted you to the role of Theme leader: Complex Data Analytics?
Data analytics underlies everything that we are trying to do in Te Punaha Matatini, but it isn’t really getting the recognition as a subject in its own right. I’m hoping that by exploring more of the links with the other themes I can make people more aware of how much data analytics there is going on, and what tools are available.
How can complex data analytics benefit New Zealand?
Data is cool at the moment (big data is mentioned everywhere) but it would be nice to see people using it well and understanding what they can and can’t infer from analysis. We collect data everywhere on everything, but lots of it doesn’t actually get used for much. For example, there are thousands of automatic recorders around New Zealand recording birdsong. But unless you have tools to analyse the data, you’ve just got a lot of memory used up storing sound that nobody will ever pay any attention to. Turning data into information isn’t easy, but it has to be done, and done well, to make the collection of the data worthwhile.
We recently caught up with Principal Investigator Dr Michael Plank, a senior lecturer in the School of Mathematics and Statistics at the University of Canterbury. Mike has taken on the role of Theme Leader: Complexity and the Biosphere while Alex James is on hiatus. As a research theme leader, Mike will be steering Te Pūnaha Matatini’s research projects that build a better understanding of New Zealand’s environment and the interactions between biodiversity, the economy, and human decision-making.
Tell us about your research, including projects aligned with Te Pūnaha Matatini
My research is in biological modelling and ranges from the very small (intracellular dynamics) to the very large (marine ecosystems). A common theme in my research is investigating how collective phenomena emerge from interactions among individuals, whether on the scale of single human cell, or the scale of an ocean. I am interested in the insights that relatively simple mathematical models can give into the ways these complex systems function – and why they sometimes go wrong.
One of my projects aligned with Te Pūnaha Matatini is modelling the emergent behaviour of fishers stemming from their decisions about which species or sizes of fish to target. Principles from ecology suggest that natural predators tend to spread their effort according to the productivity of their prey. So why shouldn’t humans behave like natural predators and spread their fishing efforts according to the productivity of the fish? If this really happens, it could change the way we design fishing regulations from top-down control to a bottom-up approach that recognises the effect of the fish stock on the behaviour of fishers as well as the other way round.
What attracted you to the role of Theme Leader: Complexity and the Biosphere?
We have some really exciting projects going on in the Biosphere theme. I’m really looking forward to a new project that will look at the interplay of ecological dynamics, geospatial data, and social attitudes to map the effectiveness of large-scale predator control. Other projects include investigating the effects of social contact networks on epidemic spread, and harnessing the huge potential of citizen science to enhance conservation projects.
We have some amazing scientists and students involved with these projects and I’m excited to work with them and see how we can turn the scientific results into real impacts for New Zealand’s unique ecosystems.
How can research using complex systems, networks, and data assist New Zealand’s environment?
New Zealand is facing a range of pressing environmental issues, including loss of our endemic native flora and fauna, agricultural pest invasions, and management of our fisheries. We have a large amount of data relating to these, for example the Department of Conservation’s tier 1 monitoring programme, and catch data from our Quota Management System. At the same time, we’re investing substantial money and resources into these areas, but we’re not always making full use of the data that are available. Te Pūnaha Matatini’s research programme has the potential to really add value to our conservation dollar by helping us target our resources to areas where they will have the most impact.
Taking a complex systems and network approach also gives us opportunities to look at environmental issues at a larger spatial scale, rather than focusing on projects in isolation. As a simple example, a predator control programme in an area of Department of Conservation land might reduce or even eliminate the possum population in the short-term. But if there is adjacent, privately owned land without any control, the possums are likely to re-invade in the long-term. Viewing the whole country as an interconnected network gives us a better ability to predict long-term outcomes, and therefore a better chance of eliminating possums for good.
By Jonathan Goodman
Never do things by halves, jump in the deep end, give it a go, eat your vegetables, trust your supervisors. This is all good advice and I now realise I must have taken it, having presented at the first conference I have ever attended, then attending another conference three days later run by an organisation I had never heard of before. I have also joined the Te Pūnaha Matatini Whānau committee based solely on my supervisor’s advice. Before I go on, I must admit that all of these actions have proved to be worthwhile and rewarding.
The first conference was the Te Pūnaha Matatini cross-theme hui. This was the first Te Pūnaha Matatini gathering I have attended since joining the Centre of Research Excellence as a PhD student at the start of the year. The hui consisted of a series of short talks, including my first at a conference, interspersed with four rounds of the “Research Knockout” – a game designed by Alex James. The game started with the creation of teams of 3-5 researchers from Te Pūnaha Matatini’s three research themes. Each team then generated a potential research project. Each round of the knockout consisted of pairing up the groups and amalgamating their ideas into an enhanced version. This continued until there were just two groups remaining. In the grand finale, there was a final presentation followed by a vote. The winning research topic was ‘Measuring the impact of the communication of science’.
The question of science outreach also came up at the conference run by the New Zealand Association of Scientists (NZAS). The conference was held at Te Papa in Wellington and celebrated the 75th anniversary of the Association. The conference had a selection of engaging speakers looking at the role of scientists in the past, the present, and into the future. A number of speakers talked about science communication.
One of the presenters, Simon Nathan, spoke about James Hector and how he effectively pushed the cause of New Zealand science, through his role of Chief Government Scientist, by constantly reminding politicians about the value of science. Rebecca Priestley talked about how science outreach was different back in the days of the Department of Scientific and Industrial Research (DSIR). Instead of scientists engaging in outreach programs, interested journalists and citizens would phone and be able to speak directly with the scientist who was in the best position to answer their queries. Te Pūnaha Matatini’s own Shaun Hendy presented on how social media is currently the only way scientists are able to directly communicate with the population without the risk of their message being obscured. His three guidelines for public engagement were very apt.
1) Not be d!@#s
2) Get on social media
3) See rule number 1.
The other major theme of the conference was the structure of the pathways inside and outside academia for emerging researchers. I will touch on this in another blog post on the Te Pūnaha Matatini Whānau page.
Having had a rewarding weekend forming connections with talented scientists, and with the science community as a whole, I will sign off hoping that I have followed Shaun’s rules.
Welcome back to Not Such a Silly Idea! In this exciting new season, two summer students continue to critique a government document, and this time they have interactive visualisations! In case you missed the first part of our epic journey, you can read instalments one, two, three and four.
One of the claims made in the National Statement of Science Investment (NSSI) which we wanted to look into was based on this graph (Figure 1) on page 20 of the NSSI:
The NSSI asserts that the government’s investment in science has “increased by over 70% since 2007/08”, and that “our science has improved in response”. This is followed with several graphs which show things like increasing publication rate, increasing number of papers in top journals, growing research workforce, and increasing international collaboration over time. These graphs each stand on their own, but fail to relate these improvements to the amount of money the government has been spending on science. One of our goals was to re-visualise these graphs in a way that clearly showed a correlation (or not) with increasing government investment, and we will address that later on. But before that, we had to investigate this data on government spending.
We remain puzzled that the NSSI claims an “over 70%” increase in government expenditure in the last eight years, when according to their own data the increase is more than 80%. Self-deprecation aside, when we went back to The Treasury we discovered that the graph on page 20 is not adjusted for inflation. This immediately indicated that the increase in spending was not quite as significant as claimed, since the government would have had to up their investment by about 40% just to compensate for the devaluing dollar. Using the Reserve Bank calculator, we found that government spending on science has actually increased 55% (not 82%) since 2007/08 and 46% (not 87%) since 2004/05.
After adjustment the government’s spending still showed a rise, however, so we started looking for the implications of that rise. We created the graph below to see whether the government might be able to claim New Zealand’s burgeoning number of publications as correlated with its financial support. To make this graph we had to include a time lag. Cash pays for research, but it takes time for that research to be published. We weren’t sure, though, how long that lag is on average. We did a regression analysis of our data using this equation, in case you’re interested:
We used a range of time lags between investment and publication, from no lag to four years. The time lag that showed the strongest correlation was two years. (We have far too little data to infer anything universal from this – it is simply our best guess.)
And voila, there is a positive correlation between the amount of money poured into ‘science and innovation’ and the number of papers churned out. But what does the money do? Do scientists publish more frequently when they are better funded? In other words, does greater funding increase productivity measured in papers per full-time researcher? Or does the money go towards increasing the number of people producing papers in the first place?
Six years ago, Professor Shaun Hendy published this paper (page 56). It drew the conclusion that although our publication output increased hugely from 1990-2008, that increased output was due to a rise in the number of researchers, not the number of papers each researcher produces in a year. Having read this paper, we expected to find similar results for 2000-2014, but we were surprised to see that both FTEs and productivity have been steadily on the rise, according to both OECD and Statistics New Zealand data.
The publication output numbers we retrieved from SciVal, and we found two different sets of researcher full-time equivalents (FTE) data; one in the Main Science and Technology Indicators database on OECD.Stat, and the other in the R&D surveys on Statistics NZ. There was a confusing discrepancy between these sources because the latter breaks down Higher Education researcher FTEs into ‘researcher’ and ‘student researcher’, while OECD.Stat makes no distinction, and the numbers didn’t come to the same total. Our best guess is that one counts only PhD students, while the other also includes Masters.
These two graphs are very interesting, because in spite of the differences, they support that both the number of science researchers and their productivity has increased.
So, apart from the fact that MBIE needs to be careful with accurately presenting information, we can conclude government investment in science has indeed increased, and that it is correlated with increased output of publications, increased research workforce, and increased productivity. Of course, just from these graphs we can’t be sure which way round the causal relationship works. A great incentive, surely, for both parties to keep up the good work!