<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/bayesian-neural-networks-in-tidymodels-with-kindling--b8zydlsfj" -->

---
title: Bayesian Neural Networks in {tidymodels} with {kindling}
description: Bayesian Neural Networks (BNNs) replace fixed weights with probability distributions, enabling uncertainty quantification. This tutorial demonstrates how to...
canonical: https://daily.dev/posts/bayesian-neural-networks-in-tidymodels-with-kindling--b8zydlsfj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Bayesian Neural Networks in {tidymodels} with {kindling} | daily.dev
og:description: Bayesian Neural Networks (BNNs) replace fixed weights with probability distributions, enabling uncertainty quantification. This tutorial demonstrates how to...
og:url: https://daily.dev/posts/bayesian-neural-networks-in-tidymodels-with-kindling--b8zydlsfj
og:image: https://api.daily.dev/og/posts/B8ZYdlsFj.png
og:image:alt: Bayesian Neural Networks in {tidymodels} with {kindling}
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Bayesian Neural Networks in {tidymodels} with {kindling}

**[R-bloggers](https://daily.dev/sources/rbloggers)** · 7 min read · 0 upvotes · 0 comments

## Summary

Bayesian Neural Networks (BNNs) replace fixed weights with probability distributions, enabling uncertainty quantification. This tutorial demonstrates how to implement BNNs in R using the {kindling} v0.3.0 package within a {tidymodels} workflow. It covers the theoretical foundations (variational inference, reparameterisation trick, ELBO loss), setup with LibTorch, and a practical classification example on the iris dataset using the train_nnsnip() interface with custom BayesLinear layers. Two training approaches are shown: standard cross-entropy loss and a custom ELBO loss, with the latter improving accuracy from 66.7% to 84.7%.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.r-bloggers.com/2026/03/bayesian-neural-networks-in-tidymodels-with-kindling/>

## Similar posts on daily.dev

- [You can do more for neural networks in R with \{kindling\}](https://daily.dev/posts/you-can-do-more-for-neural-networks-in-r-with-kindling--ofyw6ceda) · R-bloggers · 0 upvotes · 0 comments
- [Beyond Point Predictions: A Practical Introduction to Bayesian Neural Networks](https://daily.dev/posts/beyond-point-predictions-a-practical-introduction-to-bayesian-neural-networks-ddmcefkrh) · Towards Data Science · 0 upvotes · 0 comments
- [New R Package \{bdlnm\} Released on CRAN: Bayesian Distributed Lag Non-Linear Models in R via INLA](https://daily.dev/posts/new-r-package-bdlnm-released-on-cran-bayesian-distributed-lag-non-linear-models-in-r-via-inla-t98jkvc5m) · R-bloggers · 0 upvotes · 0 comments

---

Tags: [#r](https://daily.dev/tags/r)

[View this post on daily.dev](https://daily.dev/posts/bayesian-neural-networks-in-tidymodels-with-kindling--b8zydlsfj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Bayesian Neural Networks in {tidymodels} with {kindling}","url":"https://daily.dev/posts/bayesian-neural-networks-in-tidymodels-with-kindling--b8zydlsfj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/bayesian-neural-networks-in-tidymodels-with-kindling--b8zydlsfj"},"datePublished":"2026-03-20T13:14:53.846Z","dateModified":"2026-03-20T13:15:19.701Z","description":"Bayesian Neural Networks (BNNs) replace fixed weights with probability distributions, enabling uncertainty quantification. This tutorial demonstrates how to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2f40e83efc3c60facd422b3896304e85?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2f40e83efc3c60facd422b3896304e85?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"R-bloggers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"R-bloggers","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/98bcbbdf72774292a55ceda8f2277f1e","url":"https://daily.dev/sources/rbloggers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/bayesian-neural-networks-in-tidymodels-with-kindling--b8zydlsfj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"r","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"R-bloggers","item":"https://daily.dev/sources/rbloggers"},{"@type":"ListItem","position":3,"name":"Bayesian Neural Networks in {tidymodels} with {kindling}"}]}
```

