3
Loading Events
Home Online Courses Deep Learning using R (DLUR01)
DLUR01

Deep Learning using R

Learn deep learning in R using the torch ecosystem. Build MLPs, CNNs and transformer models through hands-on coding and gain practical skills for real research workflows.

  • Duration: 2 Days, 6 hours per day
  • Next Date: February 23-24, 2026
  • Format: Live Online Format
TIME ZONE

UK (GMT+1) local time - All sessions will be recorded and made available to ensure accessibility for attendees across different time zones.

£300Registration Fee

Register Now

Like what you see? Click and share!

5.0

from 200+ reviews

Course Description

This two-day workshop provides a comprehensive introduction to deep learning and its implementation in R using the torch package. Designed for participants new to deep learning, the course covers theoretical foundations, practical implementation, and modern architectures. Day 1 begins with the conceptual and mathematical basis of artificial neural networks, including biological inspiration, perceptrons, activation functions, and the universal approximation theorem. We cover training neural networks through backpropagation, gradient descent, and optimization algorithms, then implement multilayer perceptrons in torch for R for MNIST digit classification. Day 2 focuses on modern architectures: convolutional neural networks for image data (covering convolution operations, pooling, and CNN architectures), and transformer models for language (covering tokenization, embeddings, self-attention, and the GPT architecture). Participants implement a minimal GPT from scratch and learn to work with deep learning models in R. Through hands-on coding with real datasets, participants gain both conceptual understanding and practical skills in building, training, and applying deep learning models to research problems using the R ecosystem.

What You’ll Learn

During the course we will cover the following:

  • Understand the biological and mathematical foundations of artificial neural networks, from perceptrons to deep multilayer architectures.
  • Explain how forward propagation computes predictions and backpropagation computes gradients through neural networks.
  • Implement gradient descent optimization algorithms including SGD, momentum, and Adam for training networks.
  • Use activation functions (sigmoid, tanh, ReLU, GELU) appropriately and understand their roles in enabling non-linear representations.
  • Build multilayer perceptron (MLP) networks in torch for R using nn_module, defining layers and forward passes.
  • Create training loops implementing the forward pass, loss computation, backward pass, and parameter updates.
  • Apply regularization techniques including dropout, weight decay, and early stopping to prevent overfitting.
  • Work with torch tensors, autograd for automatic differentiation, and GPU acceleration for faster training.
  • Understand convolutional neural networks: convolution operations, filters, feature maps, pooling, and parameter sharing.
  • Implement CNNs in torch using nn_conv2d, nn_max_pool2d, and nn_batch_norm2d for image classification tasks.
  • Understand the transformer architecture including embeddings, self-attention mechanism (queries, keys, values), multi-head attention, positional encodings, and causal masking.
  • Implement a minimal GPT-style language model from scratch in torch for R for character-level text generation.
  • Use tokenization methods including character-level, byte-pair encoding (BPE), and subword tokenization.
  • Work with high-level torch interfaces such as luz for streamlined model training and evaluation.
  • Generate text using sampling strategies including temperature control, top-k sampling, and top-p (nucleus) sampling.
  • Monitor training progress through loss curves and validation metrics, and diagnose common training problems.
  • Choose appropriate neural network architectures for different data types: MLPs for tabular data, CNNs for images, transformers for text.
  • Understand the current landscape of large language models and their capabilities and limitations.

Course Format

Interactive Learning Format

Each day features a well-balanced combination of lectures and hands-on practical exercises, with dedicated time for discussing participants’ own data, time permitting.

Global Accessibility

All live sessions are recorded and made available on the same day, ensuring accessibility for participants across different time zones.

Collaborative Discussions

Open discussion sessions provide an opportunity for participants to explore specific research questions and engage with instructors and peers.

Comprehensive Course Materials

All code, datasets, and presentation slides used during the course will be shared with participants by the instructor.

Personalized Data Engagement

Participants are encouraged to bring their own data for discussion and practical application during the course.

Post-Course Support

Participants will receive continued support via email for 30 days following the course, along with on-demand access to session recordings for the same period.

Who Should Attend / Intended Audiences

This course is designed for researchers, data scientists, and professionals who want to learn deep learning from the ground up within the R ecosystem, particularly those applying neural networks to images, text, or other complex data and who prefer R over Python. It provides both theoretical foundations and practical implementation skills, covering key modern architectures such as multilayer perceptrons, convolutional networks, and transformers. Participants are expected to have familiarity with R programming, including writing functions, using loops, and working with packages, as well as some experience with basic data manipulation and introductory machine learning concepts such as train/test splits and overfitting. No prior experience with torch or neural networks is required, as all deep learning concepts are introduced from first principles, though the course involves substantial hands-on coding and therefore requires confidence in reading and writing R code. A basic quantitative background is also helpful, including exposure to linear algebra (vectors, matrices, matrix multiplication), calculus concepts (derivatives, gradients), and general mathematical notation, with a basic understanding of statistics and probability beneficial but not essential.

Equipment and Software requirements

A laptop or desktop computer with a functioning installation of R and RStudio is required. Both R and RStudio are free, open-source programs compatible with Windows, macOS, and Linux systems.

A working webcam is recommended to support interactive elements of the course. We encourage participants to keep their cameras on during live Zoom sessions to foster a more engaging and collaborative environment.

While not essential, using a large monitor—or ideally a dual-monitor setup—can significantly enhance your learning experience by allowing you to view course materials and work in R simultaneously.

All necessary R packages will be introduced and installed during the workshop. A comprehensive list of required packages will also be shared with participants ahead of the course to allow for optional pre-installation.

Download R Download RStudio Download Zoom

Dr. Mark Andrews

Dr. Mark Andrews

Mark is a psychologist and statistician whose work lies at the intersection of cognitive science, Bayesian data analysis, and applied statistics. His research focuses on developing and testing Bayesian models of human cognition, with a particular emphasis on language processing and memory. He also works extensively on the theory and application of Bayesian statistical methods in the social and behavioural sciences, bridging methodological advances with real-world research challenges.

Since 2015, Mark has co-led a programme of intensive workshops on Bayesian data analysis for social scientists, funded by the UK’s Economic and Social Research Council (ESRC). These workshops have trained hundreds of researchers in the practical application of Bayesian methods, particularly through R and modern statistical packages.

 

Education & Career
• PhD in Psychology, Cornell University, New York (Cognitive Science, Bayesian Models of Cognition)
• MA in Psychology, Cornell University, New York
• BA (Hons) in Psychology, National University of Ireland
• Senior Lecturer in Psychology, Nottingham Trent University, England

 

Research Focus
Mark’s work centres on:
• Bayesian models of human cognition, especially in language processing and memory
• General Bayesian data analysis methods for the social and behavioural sciences
• Comparative studies of Bayesian vs. classical approaches to inference and model comparison
• Promoting reproducibility and transparent statistical practice in psychological research

 

Current Projects
• Developing Bayesian cognitive models of memory and linguistic comprehension
• Exploring Bayesian approaches to regression, multilevel, and mixed-effects models in psychology and social science research
• Co-leading ESRC-funded workshops on Bayesian data analysis for applied researchers

 

Professional Consultancy & Teaching
Mark provides expert training and advice in Bayesian data analysis for academic and applied research projects. His teaching portfolio includes courses and workshops on:
• Bayesian linear and generalized linear models
• Multilevel and mixed-effects models
• Cognitive modelling with Bayesian methods
• Applied statistics in R for psychologists and social scientists

He is also an advocate of open science and is experienced in communicating complex statistical methods to diverse audiences.

 

Teaching & Skills
• Instructor in Bayesian statistics, time series modelling, and machine learning
• Strong advocate for reproducibility, open-source tools, and accessible education
• Skilled in R, Stan, JAGS, and statistical computing for large datasets
• Experienced mentor and workshop leader at all academic levels

 

Links
University Profile
Personal Page
ResearchGate

Session 1 – 02:00:00 – Introduction to Artificial Neural Networks
This session establishes the conceptual and historical foundations of neural networks. We begin with biological neurons and how they inspired artificial neurons, tracing the history from early perceptrons through AI winters to the modern deep learning revolution. The perceptron model is introduced: weighted sums of inputs, bias terms, and activation functions that introduce non-linearity. We explore why single-layer perceptrons are limited and how multilayer networks overcome these limitations through hidden layers. Various activation functions are covered (sigmoid, tanh, ReLU, GELU) with their mathematical properties and practical trade-offs. Network architecture is explained: input layers receiving features, hidden layers extracting representations, and output layers making predictions. The universal approximation theorem is discussed, showing that neural networks can approximate any continuous function given sufficient capacity. The session concludes with the modern deep learning revolution enabled by GPUs, large datasets, and algorithmic improvements.

Session 2 – 02:00:00 – Training Neural Networks
This session explains how neural networks learn from data through backpropagation and gradient descent. We begin with loss functions that quantify prediction errors: mean squared error for regression, cross-entropy for classification. Backpropagation is explained as the method for computing gradients of the loss with respect to every parameter in the network, using the chain rule to propagate errors backward through layers. Gradient descent and its variants are covered: stochastic gradient descent (SGD), momentum methods that accelerate convergence, and adaptive methods like Adam that adjust learning rates per parameter. The mechanics of batch training are explained: mini-batches, epochs, and iterations. Overfitting in neural networks and regularization techniques are covered in detail: dropout (randomly disabling neurons during training), weight decay (L2 regularization penalizing large weights), and early stopping (halting training when validation performance plateaus). Train/validation/test splitting strategies for deep learning are discussed. The session introduces torch for R’s fundamental concepts: tensors (multidimensional arrays), autograd (automatic differentiation for computing gradients), and computational graphs that track operations for backpropagation.

Session 3 – 02:00:00 – Multilayer Perceptrons with torch
This session provides hands-on implementation of multilayer perceptrons using torch for R. We begin with torch fundamentals: creating and manipulating tensors, understanding devices (CPU vs GPU), and data types for numerical computation. Building networks with nn_module is covered in detail: defining the network class, specifying layers in initialize, implementing the forward method that computes predictions. Network architecture decisions are discussed: number of hidden layers, layer widths, activation functions between layers. The complete training loop is implemented step-by-step: moving data to device, forward pass through the network, computing loss, backward pass to compute gradients, and optimizer step to update parameters. We apply these concepts to MNIST digit classification, building a complete MLP (784 input units → hidden layers → 10 output units) and training it to recognize handwritten digits. Monitoring training progress through loss curves and validation accuracy is demonstrated. The luz package is introduced as a high-level interface for torch, providing streamlined training workflows. Practical tips are covered: debugging network architecture errors, common mistakes (forgetting to zero gradients, incorrect tensor shapes), and using GPU acceleration to speed up training. By the end of this session, participants have trained a working neural network and understand the full pipeline from data to trained model.

Session 4 – 02:00:00 – Convolutional Neural Networks
This session introduces convolutional neural networks (CNNs), the dominant architecture for image data and spatial data more generally. We begin by explaining the limitations of MLPs for images: treating an image as a flat vector loses spatial structure, and fully-connected layers require prohibitive numbers of parameters for high-resolution images. Convolutional layers are introduced as a solution: local receptive fields, parameter sharing through filters/kernels, and translation invariance that allows learning features independent of position. The convolution operation is explained in detail: sliding filters across the input, computing dot products to create feature maps, and stacking multiple filters to detect different patterns. Pooling layers are covered for dimensionality reduction and local invariance: max pooling taking the maximum value in each region, average pooling, and stride as an alternative. CNN architectures are discussed: stacking convolutional layers to build hierarchical representations, increasing the number of filters in deeper layers, and typical patterns (conv-relu-pool). Implementation in torch is covered using nn_conv2d (2D convolution), nn_max_pool2d (pooling), and nn_batch_norm2d (batch normalization for stable training). We apply CNNs to image classification tasks using real-world image datasets, demonstrating how CNNs exploit spatial structure for superior performance. Visualizing learned features and filters provides intuition about what CNNs learn in early vs deep layers. Applications beyond computer vision are discussed, including any data with spatial or local structure.

Session 5 – 02:00:00 – Introduction to Language Models and Transformers
This session introduces language models and the transformer architecture that powers modern large language models. We begin with the language modeling task: predicting the next word or token given previous context, and how this simple objective enables learning rich representations of language. The historical progression from recurrent neural networks (RNNs) to transformers is sketched, motivating the attention mechanism as a more effective way to model long-range dependencies. Tokenization methods are covered: character-level (splitting text into characters), byte-pair encoding (BPE learning subword units from data), and WordPiece tokenization used by modern LLMs. Embeddings are introduced: representing discrete tokens as continuous vectors that capture semantic relationships. The self-attention mechanism is explained in detail: the query-key-value formulation, computing attention scores between all pairs of tokens, and using attention weights to aggregate information. Multi-head attention extends this by learning multiple attention patterns in parallel. Positional encodings are covered as the method for incorporating word order into the model. Causal masking is explained for autoregressive generation: preventing the model from attending to future tokens during training. Transformer blocks combine attention with position-wise feedforward networks. The GPT architecture is introduced as a decoder-only transformer using causal masking for unidirectional language modeling. This session provides the conceptual foundation for implementing transformers in the next session.

Session 6 – 02:00:00 – Implementing and Using GPT Models
This session combines from-scratch implementation with practical approaches to working with transformer models in R. We begin by implementing a minimal GPT from scratch in torch, walking through each component: token embeddings, positional encodings, masked self-attention, multi-head attention, feedforward layers, and stacking transformer blocks. Training a character-level language model on a small text corpus (such as Shakespeare) demonstrates the complete pipeline. Text generation is covered in detail: autoregressive sampling one token at a time, temperature scaling to control randomness, top-k sampling (restricting to k most likely tokens), and top-p/nucleus sampling (restricting to cumulative probability p). Having understood transformers from first principles, we discuss practical approaches to using pre-trained models in R, including options for bridging to Python libraries when needed using reticulate. We discuss the landscape of large language models: GPT-4, Claude, LLaMA, and the growing open-source ecosystem. Scale effects and emergent capabilities are explained: how larger models develop abilities not present in smaller models. Current applications are surveyed: text generation, classification, question answering, summarization, and embeddings for semantic search. The session concludes with understanding the capabilities and limitations of LLMs, including hallucination, reasoning abilities, and appropriate use cases. Participants leave with both the foundational understanding from building transformers from scratch and knowledge of how to integrate deep learning into R-based workflows.

Testimonials

PRStats offers a great lineup of courses on statistical and analytical methods that are super relevant for ecologists and biologists. My lab and I have taken several of their courses—like Bayesian mixing models, time series analysis, and machine/deep learning—and we've found them very informative and directly useful for our work. I often recommend PRStats to my students and colleagues as a great way to brush up on or learn new R-based statistical skills.

Rolando O. Santos

PhD Assistant Professor, Florida International University

Courses attended

SIMM05, IMDL03, ITSA02, GEEE01 and MOVE07

Testimonials

PRStats offers a great lineup of courses on statistical and analytical methods that are super relevant for ecologists and biologists. My lab and I have taken several of their courses—like Bayesian mixing models, time series analysis, and machine/deep learning—and we've found them very informative and directly useful for our work. I often recommend PRStats to my students and colleagues as a great way to brush up on or learn new R-based statistical skills.

Rolando O. Santos

PhD Assistant Professor, Florida International University

Courses attended

SIMM05, IMDL03, ITSA02, GEEE01 and MOVE07

Testimonials

PRStats offers a great lineup of courses on statistical and analytical methods that are super relevant for ecologists and biologists. My lab and I have taken several of their courses—like Bayesian mixing models, time series analysis, and machine/deep learning—and we've found them very informative and directly useful for our work. I often recommend PRStats to my students and colleagues as a great way to brush up on or learn new R-based statistical skills.

Rolando O. Santos

PhD Assistant Professor, Florida International University

Courses attended

SIMM05, IMDL03, ITSA02, GEEE01 and MOVE07

Frequently asked questions

Everything you need to know about the product and billing.

When will I receive instructions on how to join?

You’ll receive an email on the Friday before the course begins, with full instructions on how to join via Zoom. Please ensure you have Zoom installed in advance.

Do I need administrator rights on my computer?

Yes — administrator access is recommended, as you may need to install software during the course. If you don’t have admin rights, please contact us before the course begins and we’ll provide a list of software to install manually.

I’m attending the course live — will I also get access to the session recordings?

Yes. All participants will receive access to the recordings for 30 days after the course ends.

I can’t attend every live session — can I join some sessions live and catch up on others later?

Absolutely. You’re welcome to join the live sessions you can and use the recordings for those you miss. We do encourage attending live if possible, as it gives you the chance to ask questions and interact with the instructor. You’re also welcome to send questions by email after the sessions.

I’m in a different time zone and plan to follow the course via recordings. When will these be available?

We aim to upload recordings on the same day, but occasionally they may be available the following day.

I can’t attend live — how can I ask questions?

You can email the instructor with any questions. For more complex topics, we’re happy to arrange a short Zoom call at a time that works for both of you.

Will I receive a certificate?

Yes. All participants receive a digital certificate of attendance, which includes the course title, number of hours, course dates, and the instructor’s name.

When will I receive instructions on how to join?

You’ll receive an email on the Friday before the course begins, with full instructions on how to join via Zoom. Please ensure you have Zoom installed in advance.

Do I need administrator rights on my computer?

Yes — administrator access is recommended, as you may need to install software during the course. If you don’t have admin rights, please contact us before the course begins and we’ll provide a list of software to install manually.

I’m attending the course live — will I also get access to the session recordings?

Yes. All participants will receive access to the recordings for 30 days after the course ends.

I can’t attend every live session — can I join some sessions live and catch up on others later?

Absolutely. You’re welcome to join the live sessions you can and use the recordings for those you miss. We do encourage attending live if possible, as it gives you the chance to ask questions and interact with the instructor. You’re also welcome to send questions by email after the sessions.

I’m in a different time zone and plan to follow the course via recordings. When will these be available?

We aim to upload recordings on the same day, but occasionally they may be available the following day.

I can’t attend live — how can I ask questions?

You can email the instructor with any questions. For more complex topics, we’re happy to arrange a short Zoom call at a time that works for both of you.

Will I receive a certificate?

Yes. All participants receive a digital certificate of attendance, which includes the course title, number of hours, course dates, and the instructor’s name.

Still have questions?

Can’t find the answer you’re looking for? Please chat to our friendly team.

×

Tickets

The numbers below include tickets for this event already in your cart. Clicking "Get Tickets" will allow you to edit any existing attendee information as well as change ticket quantities.
DLUR01 ONLINE
DLUR01 ONLINE
£ 300.00
Unlimited
£300.00
23rd February 2026 - 24th February 2026
Delivered remotely (United Kingdom), Western European Time, United Kingdom
A group of flying Macaws