<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://lenarddome.com/feed.xml" rel="self" type="application/atom+xml"/><link href="https://lenarddome.com/" rel="alternate" type="text/html" hreflang="en"/><updated>2026-10-16T18:00:22+00:00</updated><id>https://lenarddome.com/feed.xml</id><title type="html">blank</title><subtitle>Computational cognitive scientist working on formal models of learning, generalisation, and decision-making. </subtitle><entry><title type="html">R/C++ implementation of a parameter space partitioning routine</title><link href="https://lenarddome.com/blog/2022/psp-cpp/" rel="alternate" type="text/html" title="R/C++ implementation of a parameter space partitioning routine"/><published>2022-12-02T15:09:00+00:00</published><updated>2022-12-02T15:09:00+00:00</updated><id>https://lenarddome.com/blog/2022/psp-cpp</id><content type="html" xml:base="https://lenarddome.com/blog/2022/psp-cpp/"><![CDATA[<p><img src="https://raw.githubusercontent.com/lenarddome/psp/main/docs/logo.png" alt="PSP"/></p> <p><a href="https://cran.r-project.org/package=psp"><img src="https://cranlogs.r-pkg.org/badges/grand-total/psp" alt=""/></a> <img src="https://img.shields.io/github/v/release/lenarddome/psp?include_prereleases" alt="GitHub release (latest SemVer including pre-releases)"/> <img src="https://img.shields.io/cran/l/psp" alt="CRAN/METACRAN"/></p> <h3 id="implements-an-n-dimensional-parameter-space-partitioning-algorithm-for-evaluating-the-global-behaviour-of-formal-computational-models-as-described-by-pitt-kim-navarro-and-myung-2006">Implements an n-dimensional parameter space partitioning algorithm for evaluating the global behaviour of formal computational models as described by <a href="https://psycnet.apa.org/doiLanding?doi=10.1037/0033-295X.113.1.57">Pitt, Kim, Navarro and Myung (2006)</a></h3> <p><br/></p> <p>If you want to quickly catchup with parameter space partitioning, <a href="https://www.andywills.info/2021-06-23-psp/">click here</a>.</p> <p>To quickly install the latest version:</p> <div class="language-r highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">devtools</span><span class="o">::</span><span class="n">install_github</span><span class="p">(</span><span class="s2">"lenarddome/psp"</span><span class="p">)</span><span class="w">
</span></code></pre></div></div> <p>As of the version 0.5-dev, <a href="https://github.com/lenarddome/psp"><code class="language-plaintext highlighter-rouge">psp</code></a> recieved significant improvements. As the graph below, the C++ implementation can be 100x faster than the simple R implementation.</p> <figure> <picture> <img src="/assets/img/psp_benchmark_plot.png" class="img-fluid rounded z-depth-1" width="600" height="auto" data-zoomable="" onerror="this.onerror=null; document.querySelectorAll('.responsive-img-srcset').forEach(function(el){ el.remove(); });"/> </picture> </figure> <p>Since the original R package came out, we have been struggling with one simple thing: <em>performance</em>. Parameter space partitioning can take a long time if the models are complex or have many parameters. The more parameter the model has, the larger the space we need to explore becomes.</p> <p>While there are various ways to go about it, the first step was to re-implement our parameter space partitioning routine in C++. The goal was to significantly improve single-core performance, which must come before any parallelisation.</p> <p>This was a big step and I am incredibly happy that it was a succesful one.</p>]]></content><author><name></name></author><category term="code"/><category term="cognitive-science"/><summary type="html"><![CDATA[an example of a blog post with some code]]></summary></entry></feed>