Master
2019/2020

# Mathematical Programming in R

Category 'Best Course for Career Development'

Category 'Best Course for Broadening Horizons and Diversity of Knowledge and Skills'

Type:
Bridging course (Applied Statistics with Network Analysis)

Area of studies:
Applied Mathematics and Informatics

Delivered by:
International laboratory for Applied Network Research

When:
1 year, 1 module

Mode of studies:
offline

Master’s programme:
Applied Statistics with Network Analysis

Language:
English

ECTS credits:
3

### Course Syllabus

#### Abstract

The course of «Mathematics» is aimed at formation of skills of solving applied mathematical problems with the use of complex analytical tools, in particular the R programming language. The main provisions of the discipline should be used further in the study of the following disciplines: • Introduction to Network Analysis; • Data Mining; • Categorical Data Analysis.

#### Learning Objectives

- Form the basic knowledge of possibilities for usage of computing language in mathematics
- Understand the fundamentals of programming, including functional and objet-oriented paradigm
- Apply R language in specific calculus

#### Expected Learning Outcomes

- Know basic theoretical and applied approaches to solving problems of mathematical analysis.
- Know basic approaches and principles of the theory of algorithms and the organization of the data structures.
- Know structures and applied approaches for usage of R programming language ecosystem for mathematical computations.
- Be able to differentiate data structures being obtained in R ecosystem and choose appropriate methods for data preparation for mathematical computations.
- Be able to utilize methods of mathematical analysis and aspects of linear algebra in applied problems.
- Know principles of functional programming (using R programming language).
- Manage to provide skills for setting-up R ecosystem on a computer machine or server machine to produce mathematical computations.
- Be able to estimate effective hardware and software resources for mathematical computations.
- Be able to design and implement adequate algorithmic model of a mathematical problem using programming language procedures.
- Manage to provide skills for creation of static and dynamic reports and presentations of mathematical computations using R programming language and open-source based applications.
- Be able to present the mathematical computations results in computer-aimed and reader-aimed forms.
- Manage to utilize open-source applications and tools for visualization purposes.

#### Course Contents

- Introduction to principles of mathematical analysis and linear algebraDescription of sets. Principles of sets formation. Basic operations upon sets. Specifics of functions and their linkage with sets. Classification of numbers and functions. Numbers as elements of data structures. Complex data structures and mathematical objects. Matrices and operations upon them. Principles of mathematical limits in context of analyzing complex sets. Functions in computational and graphical forms. Aspects of production of mathematical computations using applications and tools like electronic sheets applications. Advantages and limits of such tools.
- Introduction to R programming language: origins and specificsGeneral comparison of R, SPSS and MATLAB (focus on UI, core engine and functionality). The main and specific advantage of R language over other packages and/or languages. Language S as a predecessor of R: main stages of development and the role or R in that. Types of R realizations: CRAN-R and MRAN. Overview of differences and mechanisms. Defining an «environment». 2 types of environment and how they affect the workflow. Defining «packages» in R: how to apply a package, how to install, how to load. Outlining regular errors while working with package system in R. Looking for help: 5 ways of searching for solutions in the Net. Defining problems with Google search engine in case of R errors. The importance of built-in documentation and CRAN search databases. How to create and load an R-script in Console and RStudio. Principles of code organization in R. Code highlighting. Defining an «object» in various cases. Calling and saving functions as objects. Empirical representation of functional programming.
- The R ecosystem: obtaining functions for computational problems in mathematicsProcess of algorithm creation. Tools and ways to create algorithms. Essence of graphical and tabular representations of algorithms. Linkage of graphical representation of algorithms with programming languages. The nature of “code”. Creating a simple algorithms and its representation in code. Creating a first mathematical function to solve the Archimedes ' principle and its consequences. Going through the infinite small and infinite big functions. Obtaining a plotting representation of the functions using R programming language. Extremum of the function of many variables from the point of R algorithm and manual computation algorithm. Working with remarkable limits and their applications to different problems.
- The R ecosystem: data structures for executing complex matrix computationsData storage and representation in R language: what is a vector, a matrix, a list with a special attention on their usage and advantages. “Data.Frame” as a Swiss knife for storing table-based data. One of the most useful data type in R is list – a powerful object for storing big data structures. A small talk about types of exception formats: NULL, NA, NaN, ±Inf. How can we modify and change variable's representation in R. Working with vectors, matrices, lists. Considering advantages of using lists in a workflow. Learning 2 ways of loading packages in R: lazy mode and normal mode. Consideration the hidden features of “NA” in various cases. Trying to create a numeric vector, a factor and a character vector. Learning how to convert data from one variable/object type to another. Exporting data to different file types.
- Mathematical operations and exploratory data analysis in RStandard functions for producing basic and applied math functions. Specifics of designing analysis with default functions. Learning how to find specific arguments possible for math functions. Loading additional packages and functions for producing complex mathematical computations. Matrix operations in R: specifics and solutions. Basics of Exploratory Data Analysis (EDA). Consideration of data filtering with a focus of “Data.Frame” structures.
- The R ecosystem: functions, loops, conditional statementsExtending programming capabilities. Defining conditional statements. Roles in mathematical analysis. Structure of conditional statements. Necessary and optional arguments. Building a conditional statement. Adopting conditional statements with mathematical and statistical computations. A loop. Types of loops in R. Drawbacks of using looping in R. Necessary cases for usage of looping: while, repeat, for. Combining loops with conditional statements. Defining functions. Outlining structure of a simple function. Types of functions: local function and global function. Differences and use-cases. Adding functions to mathematical and statistical computations. Writing a complex function with conditional statement.
- Presenting the results of mathematical analysis using LaTeX and R.Talking about the genesis of RMarkdown: its linkage with Markdown mark-up language. Outline the basic principles of reporting and presentation creation using RMarkdown. Define the core structure of a typical RMarkdown document. Trying to use as many format options as possible. Working with R code snippets. Pointing out problems with image support in RMarkdown and effective practices. Consideration of the reporting process using R and RMarkdown.

#### Assessment Elements

- Class attendancesClass attendances are controlled, and contribute 12% to the final mark.
- Interim testing (the Quizzes)The interim testings (Quizzes) consist of 10 parts. Each interim test consists of 8-10 questions, in a format of closed questions (choosing the right answer / answers out of 4+ possible variants) and in a format of opened questions (where students need to provide with appropriate algorithm or code snippet) or multiply-choice (where several variants are possible).
- Individual project assignment