<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Machine Learning | Bas Nijholt</title><link>https://www.nijho.lt/tag/machine-learning/</link><atom:link href="https://www.nijho.lt/tag/machine-learning/index.xml" rel="self" type="application/rss+xml"/><description>Machine Learning</description><generator>Hugo</generator><language>en-us</language><copyright>© 2026</copyright><lastBuildDate>Wed, 18 Dec 2024 00:00:00 +0000</lastBuildDate><image><url>https://www.nijho.lt/media/icon_hu_408a8f6cef43e327.png</url><title>Machine Learning</title><link>https://www.nijho.lt/tag/machine-learning/</link></image><item><title>Psychedelic Data Science 🍄</title><link>https://www.nijho.lt/post/advent-of-open-source/18-psychedelic-data-science/</link><pubDate>Wed, 18 Dec 2024 00:00:00 +0000</pubDate><guid isPermaLink="false">/post/advent-of-open-source/18-psychedelic-data-science/</guid><description>&lt;p&gt;(See my &lt;a href="../"&gt;intro post&lt;/a&gt;)&lt;/p&gt;&#10;&lt;p&gt;📝 Note: Running out of awesome projects and I want to save the best for last, so today just something fun.&lt;/p&gt;&#10;&lt;p&gt;While preparing for this advent calendar, I browsed through my 382 GitHub repositories and rediscovered this time capsule from 8 years ago. It explores the language of psychedelic experiences through data science - with an interesting hypothesis: do psychedelic experiences generate richer vocabulary compared to other substance reports?&lt;/p&gt;&#10;&lt;h2 id="-origin-story"&gt;📖 Origin Story &lt;a class="anchor" href="#-origin-story" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Back in 2015, when I was still &amp;ldquo;young&amp;rdquo; (before back pain and two-day hangovers became a thing), I was learning data science and natural language processing. I had an amusing hypothesis: surely people describing their psychedelic experiences would use richer vocabulary than those writing about stimulants - I mean, who hasn&amp;rsquo;t pondered the linguistic complexity of &amp;ldquo;everything is connected&amp;rdquo; versus &amp;ldquo;I cleaned my entire apartment at 4 AM&amp;rdquo;? Erowid.org, with its thousands of detailed first-person narratives across different substances, provided the perfect dataset to test this theory.&lt;/p&gt;&#10;&lt;h2 id="-technical-highlights"&gt;🔧 Technical Highlights &lt;a class="anchor" href="#-technical-highlights" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Natural language processing of experience reports&lt;/li&gt;&#10;&lt;li&gt;Vocabulary richness analysis across substance categories&lt;/li&gt;&#10;&lt;li&gt;TF-IDF vectorization for text analysis&lt;/li&gt;&#10;&lt;li&gt;Support Vector Machine classification of experience types&lt;/li&gt;&#10;&lt;li&gt;Web scraping with BeautifulSoup&lt;/li&gt;&#10;&lt;li&gt;K-means clustering for discovering common themes&lt;/li&gt;&#10;&lt;li&gt;Word cloud generation to visualize vocabulary differences&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-impact"&gt;📊 Impact &lt;a class="anchor" href="#-impact" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A learning project that helped understand:&#10;&lt;ul&gt;&#10;&lt;li&gt;How different experiences shape language use&lt;/li&gt;&#10;&lt;li&gt;Processing subjective experience narratives&lt;/li&gt;&#10;&lt;li&gt;Document classification techniques&lt;/li&gt;&#10;&lt;li&gt;The challenges of quantifying vocabulary richness&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;10 GitHub stars&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-challenges-and-solutions"&gt;🎯 Challenges and Solutions &lt;a class="anchor" href="#-challenges-and-solutions" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Implementing respectful web scraping&lt;/li&gt;&#10;&lt;li&gt;Controlling for report length and education level&lt;/li&gt;&#10;&lt;li&gt;Creating meaningful metrics for vocabulary richness&lt;/li&gt;&#10;&lt;li&gt;Visualizing linguistic patterns across categories&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-lessons-learned"&gt;💡 Lessons Learned &lt;a class="anchor" href="#-lessons-learned" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Putting things on GitHub means it&amp;rsquo;s less likely forgotten things get lost&lt;/li&gt;&#10;&lt;li&gt;Early data science projects often reveal our initial fascinations&lt;/li&gt;&#10;&lt;li&gt;Web scraping requires both technical skill and ethical consideration&lt;/li&gt;&#10;&lt;li&gt;Text analysis tools have evolved dramatically since 2015&lt;/li&gt;&#10;&lt;li&gt;Sometimes the most interesting projects are the ones you almost forgot about&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Want to explore this intersection of psychedelics, language, and data science? Check out &lt;a href="https://github.com/basnijholt/psychedelic-data-science" target="_blank" rel="noopener"&gt;the project on GitHub&lt;/a&gt;!&lt;/p&gt;&#10;&lt;p&gt;#OpenSource #Python #DataScience #NLP #MachineLearning&lt;/p&gt;&#10;</description></item><item><title>Adaptive 📈</title><link>https://www.nijho.lt/post/advent-of-open-source/16-adaptive/</link><pubDate>Mon, 16 Dec 2024 00:00:00 +0000</pubDate><guid isPermaLink="false">/post/advent-of-open-source/16-adaptive/</guid><description>&lt;p&gt;(See my &lt;a href="../"&gt;intro post&lt;/a&gt;)&lt;/p&gt;&#10;&lt;p&gt;During my PhD, I was running quantum transport simulations on our 800-core computational cluster.&#10;Traditional parameter sweeps using dense grids were hitting the cluster&amp;rsquo;s limits - wasting precious compute time on uninteresting regions while potentially missing important features.&#10;Most parameter spaces we explored were &amp;ldquo;boring&amp;rdquo; with occasional interesting regions that required higher sampling density.&lt;/p&gt;&#10;&lt;h2 id="-origin-story"&gt;📖 Origin Story &lt;a class="anchor" href="#-origin-story" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Initially, in 2016, I had a collection of one-off adaptive sampling scripts.&#10;Together with Joseph Weston and the support of my PhD advisor Anton Akhmerov, we turned it into a full-fledged Python package &amp;ldquo;&lt;a href="https://github.com/python-adaptive/adaptive" target="_blank" rel="noopener"&gt;Adaptive&lt;/a&gt;&amp;rdquo;.&#10;What began as an internal tool to make our cluster usage more efficient slowly gained traction in the wider scientific computing community.&lt;/p&gt;&#10;&lt;h2 id="-technical-highlights"&gt;🔧 Technical Highlights &lt;a class="anchor" href="#-technical-highlights" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Multiple adaptive sampling strategies (1D, 2D, ND, averaging stochastic functions)&lt;/li&gt;&#10;&lt;li&gt;Parallel execution support (local, MPI clusters, distributed systems)&lt;/li&gt;&#10;&lt;li&gt;Live plotting in Jupyter notebooks with real-time feedback&lt;/li&gt;&#10;&lt;li&gt;Customizable loss functions for different sampling priorities&lt;/li&gt;&#10;&lt;li&gt;Minimal dependencies&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-impact--applications"&gt;📊 Impact &amp;amp; Applications &lt;a class="anchor" href="#-impact--applications" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;1164 GitHub stars and thousands of daily downloads&lt;/li&gt;&#10;&lt;li&gt;Cited in 20+ scientific publications&lt;/li&gt;&#10;&lt;li&gt;Dependency of many packages, most notably: Orange Quantum System&amp;rsquo;s Quantify software for controlling real quantum computers!&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Used in cutting-edge research across fields:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Quantum Computing&lt;/strong&gt;: Simulating and controlling superconducting qubits and trapped ion systems&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Quantum Physics&lt;/strong&gt;: Exploring topological quantum systems and novel materials&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Materials Science&lt;/strong&gt;: Studying graphene and other 2D materials&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Engineering&lt;/strong&gt;:&#10;&lt;ul&gt;&#10;&lt;li&gt;Optimizing radar system performance&lt;/li&gt;&#10;&lt;li&gt;Fluid dynamics simulations&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Chemistry&lt;/strong&gt;: Molecular modeling and vibrational spectroscopy&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Most Unexpected Use&lt;/strong&gt;: Found in a paper on predicting energy usage of wartime bungalows!&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This range of applications shows how a tool built for quantum transport simulations can find surprising uses across disciplines, from fundamental physics to everyday buildings.&lt;/p&gt;&#10;&lt;h2 id="-challenges-and-solutions"&gt;🎯 Challenges and Solutions &lt;a class="anchor" href="#-challenges-and-solutions" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Making parallel execution truly scalable while maintaining sampling intelligence&lt;/li&gt;&#10;&lt;li&gt;Creating intuitive visualization tools for complex parameter spaces&lt;/li&gt;&#10;&lt;li&gt;Handling stochastic functions and noisy data&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-lessons-learned"&gt;💡 Lessons Learned &lt;a class="anchor" href="#-lessons-learned" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Building a user base takes active effort - giving talks and engaging online made all the difference&lt;/li&gt;&#10;&lt;li&gt;Good documentation converts interested users into regular contributors&lt;/li&gt;&#10;&lt;li&gt;This was my first open source package and learned all about packaging, testing, and CI/CD&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Want smarter parameter space exploration? Check out &lt;a href="https://github.com/python-adaptive/adaptive" target="_blank" rel="noopener"&gt;Adaptive on GitHub&lt;/a&gt; or try our &lt;a href="https://adaptive.readthedocs.io/en/latest/tutorial/tutorial.html" target="_blank" rel="noopener"&gt;interactive tutorial&lt;/a&gt;!&lt;/p&gt;&#10;&lt;p&gt;#OpenSource #Python #ScientificComputing #ParallelComputing #Programming&lt;/p&gt;&#10;</description></item><item><title>PhD Thesis Cover Design 🎨</title><link>https://www.nijho.lt/post/advent-of-open-source/14-phd-thesis-cover-design/</link><pubDate>Sat, 14 Dec 2024 00:00:00 +0000</pubDate><guid isPermaLink="false">/post/advent-of-open-source/14-phd-thesis-cover-design/</guid><description>&lt;p&gt;(See my &lt;a href="../"&gt;intro post&lt;/a&gt;)&lt;/p&gt;&#10;&lt;p&gt;When most people think of open source, they think of software. But what about open-sourcing your PhD thesis and creating a generative art system for its cover?&lt;/p&gt;&#10;&lt;h2 id="-origin-story"&gt;📖 Origin Story &lt;a class="anchor" href="#-origin-story" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;With my PhD defense approaching and needing around 100 copies of my thesis, I faced a design challenge. As someone more comfortable with Python than Photoshop, I turned what started as a simple visualization idea into a full-blown generative art project with machine learning-based clustering.&lt;/p&gt;&#10;&lt;figure id="figure-multiple-printed-copies-of-the-thesis"&gt;&lt;img src="https://www.nijho.lt/post/advent-of-open-source/14-phd-thesis-cover-design/image_2_hu_8cd2dfb49d0239e5.webp" srcset="https://www.nijho.lt/post/advent-of-open-source/14-phd-thesis-cover-design/image_2_hu_91ed23b7c6d41771.webp 400w, https://www.nijho.lt/post/advent-of-open-source/14-phd-thesis-cover-design/image_2_hu_8cd2dfb49d0239e5.webp 760w, https://www.nijho.lt/post/advent-of-open-source/14-phd-thesis-cover-design/image_2_hu_1ad1cec7a7457f36.webp 1200w" sizes="auto, (max-width: 760px) 100vw, 720px" width="760" height="616" alt="A photograph of multiple printed copies of Bas&amp;#39;s PhD thesis laid out on a table outdoors. Each copy has a unique, colorful, generated cover design. Potted plants are visible in the background." loading="lazy" data-zoomable&gt;&lt;figcaption&gt;Multiple printed copies of the thesis&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h2 id="-technical-highlights"&gt;🔧 Technical Highlights &lt;a class="anchor" href="#-technical-highlights" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Generated 3,671 unique covers from quantum physics simulation data&lt;/li&gt;&#10;&lt;li&gt;Used VGG16 neural network to extract features from covers&lt;/li&gt;&#10;&lt;li&gt;Implemented K-means clustering to group similar designs&lt;/li&gt;&#10;&lt;li&gt;Created interactive IPywidgets for design selection&lt;/li&gt;&#10;&lt;li&gt;Built a Binder app for real-time color scheme adjustment&lt;/li&gt;&#10;&lt;li&gt;Added unique edition numbers (1/120, 2/120, etc.)&lt;/li&gt;&#10;&lt;li&gt;Made both thesis and cover design code fully open source&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The project combines:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Adaptive sampling for physics simulations&lt;/li&gt;&#10;&lt;li&gt;Neural networks for image feature extraction&lt;/li&gt;&#10;&lt;li&gt;Interactive visualization tools&lt;/li&gt;&#10;&lt;li&gt;Parallel processing for batch generation&lt;/li&gt;&#10;&lt;li&gt;Version control for scientific writing&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-impact"&gt;📊 Impact &lt;a class="anchor" href="#-impact" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Thesis repository: 14 GitHub stars&lt;/li&gt;&#10;&lt;li&gt;Cover design repository: 36 GitHub stars&lt;/li&gt;&#10;&lt;li&gt;Real-world adoption: &lt;a href="https://repository.tudelft.nl/record/uuid:e88a1897-0033-47e3-8b4f-84fd9cd5eec0" target="_blank" rel="noopener"&gt;Dr. Tomas Pippia from TU Delft&lt;/a&gt; used the code to create his own thesis cover&lt;/li&gt;&#10;&lt;li&gt;~100 unique printed copies, each with its own generated cover and edition number&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-challenges-and-solutions"&gt;🎯 Challenges and Solutions &lt;a class="anchor" href="#-challenges-and-solutions" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Managing 3,671 unique PDF files and their conversions&lt;/li&gt;&#10;&lt;li&gt;Creating a clustering system for visually similar designs&lt;/li&gt;&#10;&lt;li&gt;Building interactive tools for non-technical collaborators&lt;/li&gt;&#10;&lt;li&gt;Ensuring consistent print quality across designs&lt;/li&gt;&#10;&lt;li&gt;Balancing artistic appeal with scientific relevance&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="-lessons-learned"&gt;💡 Lessons Learned &lt;a class="anchor" href="#-lessons-learned" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Open source isn&amp;rsquo;t just about code - it&amp;rsquo;s about sharing knowledge&lt;/li&gt;&#10;&lt;li&gt;Python can be a powerful tool for creative projects&lt;/li&gt;&#10;&lt;li&gt;Machine learning can help solve unexpected problems&lt;/li&gt;&#10;&lt;li&gt;Good visualization requires both technical skill and artistic sense&lt;/li&gt;&#10;&lt;li&gt;Interactive tools make collaboration with non-programmers easier&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="-fun-fact"&gt;📚 Fun Fact &lt;a class="anchor" href="#-fun-fact" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Due to COVID restrictions, I defended my thesis without any guests present. The silver lining? I still have about 100 beautifully unique copies at home, each with a different generated cover and edition number. If you&amp;rsquo;d like a physical copy of this piece of quantum physics meets generative art, just let me know!&lt;/p&gt;&#10;&lt;p&gt;Want to create your own thesis cover or see how I wrote mine? Check out the &lt;a href="https://github.com/basnijholt/thesis-cover" target="_blank" rel="noopener"&gt;thesis cover project&lt;/a&gt; and &lt;a href="https://github.com/basnijholt/thesis" target="_blank" rel="noopener"&gt;thesis source&lt;/a&gt;!&lt;/p&gt;&#10;&lt;p&gt;#OpenSource #PhD #Python #MachineLearning #DataVisualization&lt;/p&gt;&#10;</description></item><item><title>Crafting unique Ph.D. thesis covers with Python 🎨</title><link>https://www.nijho.lt/post/thesis-cover/</link><pubDate>Sat, 04 Apr 2020 13:40:00 +0000</pubDate><guid isPermaLink="false">/post/thesis-cover/</guid><description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://quantumtinkerer.tudelft.nl/blog/thesis-cover/" target="_blank" rel="noopener"&gt;quantumtinkerer.tudelft.nl/blog/thesis-cover&lt;/a&gt; on 2020-04-04 13:40.&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;I will hand out around a hundred copies of my thesis to my defense committee, colleagues, and my family and friends.&#10;Let&amp;rsquo;s be honest, most people will probably not get further than attempting to read the summary and appreciating the cover.&#10;Four years of work has gone into generating the content of the thesis, so I figured, at least some thought has to go into the design of its cover.&#10;Unfortunately, I am by no means an expert on a graphical design or even competent enough to attempt to use any kind of graphic design software.&#10;But luckily for me, I do consider myself an expert in Python &lt;i class="fab fa-python"&gt;&lt;/i&gt;, and why not make the thesis design a fun process?&lt;/p&gt;&#10;&lt;h2 id="initial-design-adaptive-sampling-and-data-visualization"&gt;Initial Design: Adaptive Sampling and Data Visualization &lt;a class="anchor" href="#initial-design-adaptive-sampling-and-data-visualization" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;My vague plan was to somehow incorporate a plot resulting from a simulation run with &lt;a href="https://adaptive.readthedocs.io/" target="_blank" rel="noopener"&gt;Adaptive&lt;/a&gt; [&lt;a href="https://github.com/python-adaptive/adaptive" target="_blank" rel="noopener"&gt;source&lt;/a&gt; &lt;i class="fab fa-github"&gt;&lt;/i&gt;], the software I wrote during my Ph.D. to adaptively sample functions in parallel and my proudest work.&#10;I even had a potential simulation result in mind that I would use for it, specifically, one that has been on the background of my good friend’s phone for some years and one that has earned me quite some internet points on &lt;a href="https://www.reddit.com/r/dataisbeautiful/comments/eaap3p/python_quantum_research_art_saving_1000s_hours_of/" target="_blank" rel="noopener"&gt;Reddit&lt;/a&gt;.&#10;This plot (below) is one of the results of Chapter 4 of &lt;a href="http://files.nijho.lt/thesis.pdf" target="_blank" rel="noopener"&gt;my thesis&lt;/a&gt; [&lt;a href="https://github.com/basnijholt/thesis" target="_blank" rel="noopener"&gt;source&lt;/a&gt; &lt;i class="fab fa-github"&gt;&lt;/i&gt;] and &lt;a href="https://arxiv.org/abs/1807.01940%ef%bf%bc" target="_blank" rel="noopener"&gt;this paper&lt;/a&gt;.&lt;/p&gt;&#10;&lt;video style="width: 100%;max-width: 500px;" controls&gt;&#10; &lt;source src="https://user-images.githubusercontent.com/6897215/233811442-ce9bc475-af15-4b89-9578-67925419b769.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10;&lt;/video&gt;&#10;&lt;p&gt;I went back to the code that generates the plot and started hacking away in Matplotlib.&#10;Quickly, I realized that not only the plot above was going to look cool, but that many other data sets that I had also resulted in beautiful patterns.&#10;I hit the paradox of choice: I had a total of &lt;em&gt;3671&lt;/em&gt; unique data sets (all for Majorana devices with either different parameter sweeps or different physical effects that were included in the model) and no idea how I was going to make a selection.&lt;/p&gt;&#10;&lt;p&gt;This is an early attempt (and rather ugly in hindsight)&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://user-images.githubusercontent.com/6897215/233811538-dc3b5b86-6f6f-4bd6-840c-e466918ce151.jpeg" alt="early-attempt" loading="lazy" data-zoomable&gt;&lt;/figure&gt;&lt;p&gt;I decided to postpone the choice of which data to use and just focus on how to plot the data first.&#10;I experimented with different colormaps, fading colormaps that gradually reveal the underlying triangulation better, and more.&#10;On a weekend night, after telling &lt;a href="https://github.com/sbalk" target="_blank" rel="noopener"&gt;a friend&lt;/a&gt; I was with about my plans, we (as usually happens) started to program some of the ideas we came up with.&#10;We settled on a design where the triangulation would slowly fade from the top to bottom and where each triangle simultaneously transitioned from a solid color (the average of the values at its vertices) to densely interpolated values.&#10;See &lt;a href="https://github.com/basnijholt/thesis-cover/blob/master/generate-covers.ipynb" target="_blank" rel="noopener"&gt;this Jupyter notebook&lt;/a&gt; which generated the final version of the cover.&#10;After we also chose a nice colormap (by simply creating the cover for each possible colormap,) the following was suggested: “You know what would be even cooler?! To make every cover unique.”&#10;Ten minutes later, I had started 3671 jobs on our computational cluster.&#10;When the files slowly started to appear on my computer (I have my local files synced with the cluster), we could not have been more excited.&#10;There were simply so many cool looking alternatives.&#10;Too many to manually select now, to be honest&amp;mdash;a problem for later I thought.&lt;/p&gt;&#10;&lt;h2 id="overcoming-the-paradox-of-choice-clustering-and-neural-networks"&gt;Overcoming the Paradox of Choice: Clustering and Neural Networks &lt;a class="anchor" href="#overcoming-the-paradox-of-choice-clustering-and-neural-networks" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Four months later, with the rest of my thesis completely done and about a day left on the deadline to submit my thesis, I found myself facing the selection problem I had successfully ignored for so long.&#10;There must be a smarter way to select the covers, I thought.&#10;Many of them look roughly similar (and some of them are even quite boring or not ecstatically pleasing), so it does not make sense to scroll through all of them.&#10;I could cluster them by similarity and then I would just have to choose the nicely looking clusters while being able to instantly discard many.&lt;/p&gt;&#10;&lt;p&gt;Finally, a good application to use neural networks!&lt;/p&gt;&#10;&lt;p&gt;I still had the 3671 covers in pdf format in some folder, so using the wonderful &lt;a href="https://www.gnu.org/software/parallel/" target="_blank" rel="noopener"&gt;GNU Parallel&lt;/a&gt;, I converted and rasterized all of them to jpeg with&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find . -iname &lt;span class="se"&gt;\*&lt;/span&gt;pdf -print0 &lt;span class="p"&gt;|&lt;/span&gt; parallel -0 sips -s format jpeg &lt;span class="o"&gt;{}&lt;/span&gt; --out &lt;span class="o"&gt;{&lt;/span&gt;.&lt;span class="o"&gt;}&lt;/span&gt;.jpg&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I used a pre-trained convolutional neural network model (&lt;a href="https://keras.io/applications/#vgg16" target="_blank" rel="noopener"&gt;VGG16&lt;/a&gt;) to extract features in a lower-dimensional representation.&#10;I fed the feature arrays to a &lt;a href="https://en.wikipedia.org/wiki/K-means_clustering" target="_blank" rel="noopener"&gt;K-Means clustering algorithm&lt;/a&gt; that sorted them in 80 clusters.&#10;To procrastinate a little more, I created an interactive widget using &lt;a href="https://ipywidgets.readthedocs.io/" target="_blank" rel="noopener"&gt;&lt;code&gt;ipywidgets&lt;/code&gt;&lt;/a&gt; (see video below) to facilitate the selection process.&lt;/p&gt;&#10;&lt;video style="width: 100%;max-width: 800px;" controls&gt;&#10; &lt;source src="https://user-images.githubusercontent.com/6897215/233811575-98ea0be2-33f4-47f4-b3ee-f8e7bdf3c475.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10;&lt;/video&gt;&#10;&lt;p&gt;These are the clusters that I selected in a grid&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://user-images.githubusercontent.com/6897215/233811546-36be2cec-eb8c-437a-88d1-595a8602a7ba.jpeg" alt="chosen-clusters-front-and-back" loading="lazy" data-zoomable&gt;&lt;/figure&gt;&lt;p&gt;The selection process was done using &lt;a href="https://github.com/basnijholt/thesis-cover/blob/master/thesis-cover-selection.ipynb" target="_blank" rel="noopener"&gt;this Jupyter notebook&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Finally, I copied the selected clusters into different folders and used the OS&amp;rsquo;s file explorer to manually select a few covers from each cluster.&lt;/p&gt;&#10;&lt;h2 id="final-touches-fine-tuning-colors-and-adding-edition-numbers"&gt;Final Touches: Fine-Tuning Colors and Adding Edition Numbers &lt;a class="anchor" href="#final-touches-fine-tuning-colors-and-adding-edition-numbers" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Then I printed an initial version of my thesis, however, I wasn&amp;rsquo;t really happy with the colors.&lt;/p&gt;&#10;&lt;p&gt;To choose the right color scheme I got help from a non-tech savvy friend who went to art school.&#10;Due to the COVID-19 crisis, we couldn&amp;rsquo;t sit side by side, so I created &lt;a href="https://mybinder.org/v2/gh/basnijholt/thesis-cover/master?filepath=color-picker.ipynb" target="_blank" rel="noopener"&gt;this Binder &amp;ldquo;app&amp;rdquo;&lt;/a&gt; with sliders.&lt;/p&gt;&#10;&lt;video style="width: 100%;max-width: 800px;" controls&gt;&#10; &lt;source src="https://user-images.githubusercontent.com/6897215/233811609-8fa74955-0c51-443e-9a87-115921530b7d.mp4" type="video/mp4"&gt;&#10; Your browser does not support the video tag.&#10;&lt;/video&gt;&#10;&lt;p&gt;Additionally, since all of them were different anyway, I gave them an identifier and added&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;edition n of 120&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;to the back.&lt;/p&gt;&#10;&lt;p&gt;These are a few examples of the final result (click on one of the images to open gallery view)&lt;/p&gt;&#10;&lt;div class="gallery"&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0061.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0061.pickle_hu_8e2f6288e2299f4b.webp" width="350" height="242" alt="Image 1 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0087.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0087.pickle_hu_cfe0a7647b8b4d1a.webp" width="350" height="242" alt="Image 2 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0094.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0094.pickle_hu_4767f3839b1f22bc.webp" width="350" height="242" alt="Image 3 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0119.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0119.pickle_hu_9a20ab2d5318b96f.webp" width="350" height="242" alt="Image 4 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0254.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha__data_learner_0254.pickle_hu_e670a31aca40cc2e.webp" width="350" height="242" alt="Image 5 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha2__data_learner_0175.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-alpha2__data_learner_0175.pickle_hu_236481dab96c15b5.webp" width="350" height="242" alt="Image 6 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-rotation-0-90-move-so-slowly__data_learner_0457.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-rotation-0-90-move-SO-slowly__data_learner_0457.pickle_hu_cc81d6c6a833f7ce.webp" width="350" height="242" alt="Image 7 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-rotation-0-90-move-so-slowly__data_learner_0699.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-rotation-0-90-move-SO-slowly__data_learner_0699.pickle_hu_4744ce916ab208d2.webp" width="350" height="242" alt="Image 8 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-rotation-0-90-move-so-slowly__data_learner_0811.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__gradient-sweep-rotation-0-90-move-SO-slowly__data_learner_0811.pickle_hu_5f6e91d59b7c978e.webp" width="350" height="242" alt="Image 9 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__mu-sweep2__data_learner_0179.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__mu-sweep2__data_learner_0179.pickle_hu_ad9a40d0f92c3c0f.webp" width="350" height="242" alt="Image 10 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__mu-sweep2__data_learner_0254.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__mu-sweep2__data_learner_0254.pickle_hu_2e0e64805618b36d.webp" width="350" height="242" alt="Image 11 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10; &lt;a href="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__mu-sweep2__data_learner_0255.pickle.jpg"&gt;&lt;img src="https://www.nijho.lt/media/albums/basnijholt-thesis-cover/data__mu-sweep2__data_learner_0255.pickle_hu_e7bc31a50788a8cd.webp" width="350" height="242" alt="Image 12 of 12" loading="lazy" data-zoomable&gt;&lt;/a&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;A few days later, this was delivered to my doorstep&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://user-images.githubusercontent.com/6897215/233811518-bd5426d6-05bc-4c7a-854a-4c373aa21fcf.jpg" alt="theses-everywhere" loading="lazy" data-zoomable&gt;&#10;&lt;img src="https://user-images.githubusercontent.com/6897215/233811525-645b67a4-a9ea-48ba-a391-4639ed92c19d.jpg" alt="printed" loading="lazy" data-zoomable&gt;&lt;/p&gt;&#10;&lt;p&gt;And finally I mailed them to my Ph.D. committee&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://user-images.githubusercontent.com/6897215/233811533-3b85ff8d-8359-453b-8aa1-ef653629a0f4.jpg" alt="mail" loading="lazy" data-zoomable&gt;&lt;/figure&gt;&lt;p&gt;Now it&amp;rsquo;s time to start preparing for my defense at May 11, 2020 at 15:00!&lt;/p&gt;&#10;&lt;h3 id="notes"&gt;Notes &lt;a class="anchor" href="#notes" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The data and code to generate all printed covers is available at &lt;a href="https://github.com/basnijholt/thesis-cover" target="_blank" rel="noopener"&gt;basnijholt/thesis-cover&lt;/a&gt; &lt;i class="fab fa-github"&gt;&lt;/i&gt;&lt;/li&gt;&#10;&lt;li&gt;The simulation code that generates the data is available at &lt;a href="https://github.com/basnijholt/spin-orbit-nanowires" target="_blank" rel="noopener"&gt;basnijholt/spin-orbit-nanowires&lt;/a&gt; &lt;i class="fab fa-github"&gt;&lt;/i&gt;&lt;/li&gt;&#10;&lt;li&gt;The video of the Reddit post is generated using &lt;a href="https://gist.github.com/basnijholt/7aaeb7b9c506f830e6791d264a6cf467" target="_blank" rel="noopener"&gt;this code&lt;/a&gt; &lt;i class="fab fa-github"&gt;&lt;/i&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>Python-adaptive</title><link>https://www.nijho.lt/project/adaptive/</link><pubDate>Fri, 06 Jul 2018 00:00:00 +0000</pubDate><guid isPermaLink="false">/project/adaptive/</guid><description/></item></channel></rss>