Setting up an MSc Data Science at the University of Aberdeen

Bjoern Schelter, University of Aberdeen
Marco Thiel, University of Aberdeen

ABSTRACT

Recently, we have set up an MSc degree in Data Science at the University of Aberdeen; it is taught in the Wolfram Language. This degree is part of a larger effort of using the Wolfram Language in projects ranging from nursery/preschool level, primary and secondary school, to university level and academic and industrial research. 
In this presentation we will discuss some of the experiences we have made while developing this degree. This includes a discussion of the requirements as communicated to us from industrial stakeholders, to expectations of the students, up to technologies and methodologies we use for our teaching.

Philosophy of the MSc Data Science

the MSc is a hands-on one year degree

students have a wide range of backgrounds and interests

most students will not have any prior programming skills

the entire degree is taught in the Wolfram Language

the teaching is very interactive; WL needs to be spoken (live-coding)

Market Analysis

SetDirectory[NotebookDirectory[]];
Grid[Style[#,13]&/@#&/@Import["Computational Studies - market research.xlsx"][[2]][[4;;,1;;5]],Frame->All,Background->{None,{LightGray}}]

Data science related degrees

SetDirectory[NotebookDirectory[]];
marketdata=Import["Computational Studies - market research.xlsx"][[2]][[5;;]];
universities=Interpreter["University"][marketdata[[1;;-2,1]]];cleanup=GatherBy[Transpose[{{(Entity["Imperial College London", Entity["University","ImperialCollegeLondon::x6ts9"], "Entity[\"University\", \"ImperialCollegeLondon::x6ts9\"]", "university"]),(Entity["Imperial College London", Entity["University","ImperialCollegeLondon::x6ts9"], "Entity[\"University\", \"ImperialCollegeLondon::x6ts9\"]", "university"]),(Entity["Lancaster University", Entity["University","LancasterUniversity::nfsd4"], "Entity[\"University\", \"LancasterUniversity::nfsd4\"]", "university"]),(Entity["Brunel University", Entity["University","BrunelUniversity::t8876"], "Entity[\"University\", \"BrunelUniversity::t8876\"]", "university"]),(Entity["Imperial College London", Entity["University","ImperialCollegeLondon::x6ts9"], "Entity[\"University\", \"ImperialCollegeLondon::x6ts9\"]", "university"]),(Entity["Lancaster University", Entity["University","LancasterUniversity::nfsd4"], "Entity[\"University\", \"LancasterUniversity::nfsd4\"]", "university"]),(Entity["Imperial College London", Entity["University","ImperialCollegeLondon::x6ts9"], "Entity[\"University\", \"ImperialCollegeLondon::x6ts9\"]", "university"]),(Entity["Newcastle University", Entity["University","NewcastleUniversity::74t79"], "Entity[\"University\", \"NewcastleUniversity::74t79\"]", "university"]),(Entity["Imperial College London", Entity["University","ImperialCollegeLondon::x6ts9"], "Entity[\"University\", \"ImperialCollegeLondon::x6ts9\"]", "university"]),(Entity["Imperial College London", Entity["University","ImperialCollegeLondon::x6ts9"], "Entity[\"University\", \"ImperialCollegeLondon::x6ts9\"]", "university"])},Flatten @Position[universities,#]&/@Select[universities,Head[#]==Failure&]}],First][[All,1]];
(universities[[#[[2]]]]=#[[1]])&/@ cleanup;
dataclean=Flatten/@Transpose[{universities,marketdata[[1;;-2,2;;]]}];
GeoBubbleChart[Rule@@@dataclean[[All,{1,-2}]],GeoBackground->"Satellite",GeoRange->"Country",ImageSize->Large]

totalStudent=ReverseSortBy[{#[[1,1]],Total[#[[All,-2]]]}&/@GatherBy[dataclean,First],Last];
BarChart[totalStudent[[All,2]],ChartLabels->Evaluate[Rotate[#,Pi/2]&/@Flatten[StringSplit[CommonName[totalStudent[[All,1]]],{",","-"}]]],ImageSize->Full,PlotTheme->"Marketing"]

Button[Style["Uni-Rankings",Bold,20],SystemOpen["https://www.thecompleteuniversityguide.co.uk/league-tables/rankings?v=wide"]]

Quiet[studentpopulation={#,#[[1]][(EntityProperty["all students", EntityProperty["University","TotalEnrollment"], "EntityProperty[\"University\", \"TotalEnrollment\"]"])]}&/@totalStudent;
unirankings=Select[Import["https://www.thecompleteuniversityguide.co.uk/league-tables/rankings?v=wide","Data"][[2,1,2]],Head[#]==List&];
unisfromranking=Interpreter["University"][StringJoin["University of "]<>#&/@(StringTrim/@unirankings[[All,3]])];
unirankrules=Rule@@@Select[Transpose[{unisfromranking,ToExpression[StringDrop[unirankings[[All,1]],-2]]}],Head[#[[1]]]==Entity&];
studentsvsrank=Flatten[{#,#[[1]]/.unirankrules}]&/@totalStudent;]
ListPlot[Select[studentsvsrank[[All,{3,2}]],NumberQ[#[[2]]]&&NumberQ[#[[1]]]&],PlotRange->{All,{0,250}},PlotTheme->"Marketing",ImageSize->Large,FrameLabel->{"rank","# students"},LabelStyle->Directive[Bold,16],PlotLabel->"students vs rank"]

Fit linear model

lmf=Fit[Select[studentsvsrank[[All,{3,2}]],NumberQ[#[[2]]]&&NumberQ[#[[1]]]&],{1,x,1/x},x]

Estimated number of students at saturation.

lmf/.x->29

What’s the relevance of the title of the degree

FeatureSpacePlot[dataclean[[All,{2,-2}]],LabelingFunction->Callout,PlotTheme->"Scientific",ImageSize->Full,LabelStyle->Directive[11]]

How to name the degree?

Getting to know each other

we use webforms to interact with students and get their feedback.

in the first lecture we ask them to fill in a form to adjust the content closely to their background and expectations.

Button[Style["Getting to know each other!",Directive[Bold,17]],SystemOpen["https://www.wolframcloud.com/obj/7efe81ad-06af-47a3-b75e-3ee81979df67"]]

Analysis of the results

Programming skills

Histogram[ReverseSort["programming"/.(mscanswers[All]//Normal//DeleteDuplicates)//Normal][[1;;16]],PlotRange->{{0,10},All},AxesLabel->{"programming skills","number of students"},LabelStyle->Directive[Bold,15],ImageSize->Full,Ticks->{Range[10],Automatic}]

Interests

WordCloud[Flatten[ReverseSort["groupnumbr"/.(mscanswers[All]//Normal//DeleteDuplicates)//Normal]],ImageSize->Large]

Degree/background

WordCloud[Flatten["degree"/.Normal[DeleteDuplicates@ds[Select[StringLength[#code]<3&]]]],ImageSize->Large]

Comments on the initial form.

Prepend[Style[#,Directive["Arial",14]]&/@DeleteDuplicates[Flatten[ReverseSort["expectation"/.(mscanswers[All]//Normal//DeleteDuplicates)//Normal]]],Style["Comments",Directive[Bold,Underlined,18]]]//Column[#,Frame->All]&

Where do the students come from?

Research into computational thinking

Wolfram Language based MSc in Data Science at the University of Aberdeen

Why study Data Science?

Data Science is one of the hottest areas right now, with a huge demand for highly qualified experts. A recent report by IBM (https://www.ibm.com/downloads/cas/3RL3VXGA). Data Science has the largest predicted growth in job postings; and high salaries. Data Scientists have the most analytical roles on the market and require a large set of skills including statistics, programming, algorithm development, analytical thinking,  and proper knowledge of the subject matter. Highly developed communication skills are also a crucial factor. It also can be argued that statistical models are often a first step towards properly interpreting the data and understanding what they want to tell us.

The numbers have no way of speaking for themselves. We speak for them. We imbue them with meaning. 
															Nate Silver, The Signal and the Noise

There are many tools that are used for data science these days (e.g. R and Python); functional languages and especially multi-purpose languages such as the Wolfram Language have considerable advantages in this area. In a recent and brilliant presentation (https://www.youtube.com/watch?v=8cisIZkA_J0) by Dr Alan Calvitti in a presentation  on “Functional Dataflow: Wolfram Livecoding Session”.

Also, the Wolfram Language has very rich data built right into the language. Combining different data sources often leads to a dramatic increase in the interpretability of data. Furthermore, the Wolfram Language offers high level access to databases such as mySQL and Mongo. Especially, when it comes to a deep understanding, where physical models become more important the Wolfram Language excels.

At Aberdeen we will teach a wide variety of skills to make sense of data; this will be enabled by the Wolfram Language. The degree has been developed in close collaboration with and support of Wolfram Research. The successful graduates will also receive an official document from Wolfram Research that certifies proficiency and fluency in it.

Syllabus of our degree

There will be eight block taught courses over two terms plus a thesis. In the first term we will discuss the following:

01 Introduction to programming

02 Introduction to data science

03 Machine Learning

04 Statistics an Time Series Analysis

In the second term we will several more specialised topics will be discussed:

05 Data visualisation

06 Advanced statistics and special applications

07 Audio and video analysis

08 Case studies

This will be followed up by a project. Here is a link to the website of the degree. (https://www.abdn.ac.uk/study/postgraduate-taught/degree-programmes/1198/data-science/)

Our degree is embedded into a rich infrastructure of related degrees such as a degree in Petroleum Data Management (https://www.abdn.ac.uk/study/postgraduate-taught/degree-programmes/1009/petroleum-data-management/), which is partially taught in the Wolfram Language, and an up-coming degree in Health Data Science. We also offer Wolfram Language based courses such as Mathematical Modelling, which complement this degree.

01 Introduction to programming

In this module we will experience the full power of the Wolfram Language and study algorithms that help to make sense of the world. The course will go beyond what would usually be called “introduction to programming”, as we will explore advanced concepts and programming styles as well as the basics. 
In order to harness existing algorithms in, e.g. R and Python, we will also discus the respective links in the Wolfram Language.

02 Introduction to data science

In this module we will develop a typical workflow of a data science project. Emphasis will be put on gathering, cleaning and organising data. We will follow the data cleaning procedure that Stephen Wolfram describes in his blog (https://blog.stephenwolfram.com/2017/04/launching-the-wolfram-data-repository-data-publishing-that-really-works/) post about the launch of the Wolfram Data Repository, where a hierarchy of levels of computability of data is introduced.

The Wolfram Language offers powerful tools such as SemanticImport and its Entity framework.

03 Machine Learning

Machine Learning (ML) is one of the hottest methods and experts are highly sought after by the industry. We will use the ML framework in the Wolfram Language from very high level to low level. We will also discuss approaches to understand what is going on inside of the “black-box” ML methods. How can we understand why a neural network took a certain decision?

04 Statistics and time series analysis

Here we will introduce the concepts of descriptive statistics and discuss time series analysis. Just like the entire degree this course is very practical. We will discuss applications from climate science, finance, health, and many others. We will also use skills from the first two courses to use the University’s access to Thomson Reuters financial database.

05 Data Visualisation

Communicating results of an analysis is crucial for a successful data analysis pipeline. Visualisations are a powerful tool to efficiently communicate even complicated connections and relationships. In this module we will study the art of data visualisation to create stunning graphics that tell stories. These visualisations support the analysis and lead to interpretable and actionable information.

06 Advanced statistics and special applications

In this module we discuss more advanced statistical tools an techniques. Some topics covered are: likelihood, advanced hypothesis testing, bootstrapping, outlier detection, imputation and mixed effect models. Predicting effect sizes and medial study planning will also be part of this course.

07 Audio, image and video analysis

In this course we introduce tools needed to analyse audio recordings, images and videos. 
The module will include aspects of image enhancements, content detection, segmentation analysis (e.g. detection of tumors in medical imaging data), subtitle analysis, and many other techniques. 
For the audio analysis we address signal transforms and filtering, audio content classification, speech recognition, audio segmentation, alignment and temporal modelling. 
The image analysis section we deal with digital image fundamentals, intensity transformation, and spatial filtering, filtering in the frequency domain, image restoration,  wavelets, and other image transformations, image compression and watermarking, morphological image processing, feature extraction and pattern classification, among others.

08 Case studies

In the case study course, students work jointly with an academic advisor on practical data analysis problems; in some cases with industrial involvement. These projects will closely reflect typical problems in the industry or in academic settings.

XX Project

This is a (industry led) final project. There will be three supervisors, two academics and one industry partner.

Student questions to address

Why Mathematica/the Wolfram Language?

“Can we make the degree tutorial driven/practical?”

“Can we have more practicals?”

“Will there be guest lecturers?”

“Can we get industry experience?”

Technology used

We record the lectures and the setup is ready for off-site delivery.

Zoom/OBS

QR codes

Codeshare.io

Data server (SQL,Mongo) also on Amazon Cloud

Sound setup (microphones, loudspeakers)

Pushbullet

Datasets

Kaggle

AWS S3 cloud

Mongo Atlas

https://www.statista.com

https://eos.com/landviewer/

IFTTT

Teaching methodology

learning Mathematica as a spoken language (link to computational conversations)

live coding: egg hunt, “gladiator fights”, small group programming, starting with blank notebook developing a subject (similar to computational conversations),

address current events

small how-to-videos

skype office hours

lectures recorded (and transcribed)

Interactive lecture

randomnumberbin=Databin["hdJHnr9e"];

CloudDeploy[FormFunction[{"numbers","Type in a sequence of 100 random digits."}->String,DatabinAdd[randomnumberbin,<|"trial"-> #numbers|>]&,AppearanceRules->{"Title"-> "I bet you cannot make random numbers.\n","Description"->"People are very bad at creating random numbers. We will use a simple test based on entropies to determine whether the random numbers are truely random.\n\n"}],"https://www.wolframcloud.com/objects/82c95f19-3c17-449c-9845-18e524fcdbb6",Permissions->"Public"]

digits=Select[Characters[Normal[Values[randomnumberbin]][[1,2,-1]]],MemberQ[CharacterRange["0","9"],#]&];

digits

Entropy[digits]//N

Next, we can ask the computer to generate 100 sequences of truely random data.

(*Table[Entropy[RandomInteger[{0,9},Length[digits]]]//N,{100}];*)

For each of them we calculate the distribution.

dist0=SmoothKernelDistribution[Table[Entropy[RandomInteger[{0,9},Length[digits]]]//N,{100}]];

We can then calculate the probability that the time series of the student(s) is truly random.

Plot[PDF[dist0,x],{x,2.2,2.35},PlotRange->All,Filling->Bottom]

Probability[x≤Entropy[digits],x\[Distributed]dist0]

We an also check whether sequences of two numbers are random.

(*Table[Entropy[Partition[RandomInteger[{0,9},Length[digits]],2]]//N,{100}];*)

dist=SmoothKernelDistribution[Table[Entropy[Partition[RandomInteger[{0,9},Length[digits]],2]]//N,{100}]];

Entropy[Partition[digits,2]]//N

Once more, the probability for student generated data tends to be rather small.

Probability[x<=Entropy[Partition[digits,2]]//N,x\[Distributed]dist]

Example “Computational Egg-Hunt”

This is one of the games we use to make the students speak the Wolfram Language. The students have to follow a trail of computational questions the answer of which provides a hint as to where to find the next clue.

Due to time reasons we jump somewhere into the middle of the egg-hunt:

Step ...

Hyperlink["https://www.wolframcloud.com/obj/m.thiel/Published/EggHuntPage2.nb"]

Solution

temp=ToExpression[Import["https://www.wolframcloud.com/obj/f4302cf6-2652-46fe-b48b-c064b071662c"]]

Manipulate[Image[Partition[temp,m],ImageSize->400],{m,1,250,1}]

list=ToExpression@Import["https://www.wolframcloud.com/obj/f4302cf6-2652-46fe-b48b-c064b071662c"];Manipulate[Image[Partition[list,m],ImageSize->Large],{m,1,250,1}]

Next step

Hyperlink["https://www.wolframcloud.com/obj/m.thiel/Published/EggHunt1"]

Solution

SystemOpen["https://www.dropbox.com/s/37j319y2ym51smw/image1.png?dl=0"]

SystemOpen["https://www.dropbox.com/s/d5usb6kgunfrky0/image2.png?dl=0"]

pic2=Import["~/Downloads/image2.png"]

pic1=Import["~/Downloads/image1.png"]

-

ImageAdjust[-]