<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: northern-64bit</title>
    <description>The latest articles on DEV Community by northern-64bit (@northern64bit).</description>
    <link>https://dev.to/northern64bit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F779447%2Fad03d881-4ed8-4dc2-a1b2-76460cd78282.png</url>
      <title>DEV Community: northern-64bit</title>
      <link>https://dev.to/northern64bit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/northern64bit"/>
    <language>en</language>
    <item>
      <title>I made a follow-up package, scikit-multilearn-ng, to the widely used scikit-multilearn package for multilabel classification</title>
      <dc:creator>northern-64bit</dc:creator>
      <pubDate>Sun, 28 Jan 2024 15:18:09 +0000</pubDate>
      <link>https://dev.to/northern64bit/i-made-a-follow-up-package-scikit-multilearn-ng-to-the-widely-used-scikit-multilearn-package-for-multilabel-classification-jf0</link>
      <guid>https://dev.to/northern64bit/i-made-a-follow-up-package-scikit-multilearn-ng-to-the-widely-used-scikit-multilearn-package-for-multilabel-classification-jf0</guid>
      <description>&lt;p&gt;After needing to use scikit-multilearn and detecting errors, I opened a PR and waited. But after double checking I saw that there hadn't been any commits in 7 months (now 9 months) and that it had not been a release since 2018, I dug in and found out that no one had access to the PyPi credentials and so on. So I opened a discussion about creating a fork and many were eager for it.&lt;/p&gt;

&lt;p&gt;So after some developing, I'm here to introduce scikit-multilearn-ng (GitHub: &lt;a href="https://github.com/scikit-multilearn-ng/scikit-multilearn-ng"&gt;https://github.com/scikit-multilearn-ng/scikit-multilearn-ng&lt;/a&gt;), an advanced, open-source tool for multi-label classification in Python. It's a direct successor to scikit-multilearn and brings a host of improvements and new features.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Makes scikit-multilearn-ng Stand Out?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Integration with scikit-learn&lt;/strong&gt;: This package not only integrates with the scikit-learn ecosystem but also extends its capabilities, making it a natural fit for those familiar with scikit-learn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expanded Algorithm Collection&lt;/strong&gt;: Among its new offerings are StructuredGridSearchCV and the SMiLE algorithm, specifically designed for more complex multi-label classification tasks, including handling missing labels and heterogeneous features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Source Philosophy&lt;/strong&gt;: As a community-driven project, it's free to use and open for contributions, perfect for collaborative development.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Should You Consider Upgrading?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ease of Transition&lt;/strong&gt;: For those already using scikit-multilearn, upgrading is as simple as switching the dependency to scikit-multilearn-ng. Your existing code will work without any changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active Development and Support&lt;/strong&gt;: scikit-multilearn-ng offers bug fixes and new features, ensuring your projects stay current and robust.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you're a seasoned Python developer or just starting out in machine learning, scikit-multilearn-ng is worth exploring.&lt;/p&gt;

&lt;h3&gt;
  
  
  Some Example Use Cases:
&lt;/h3&gt;

&lt;p&gt;A simple example use case is iterative splitting multilabel data between train and test data while trying to maintain the distribution of each label between the training and test sets. This is particularly useful for datasets where certain label combinations are rare.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;skmultilearn.model_selection&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;iterative_train_test_split&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="c1"&gt;# Assuming X is your feature matrix and y is your label matrix
# X should be a numpy array or a sparse matrix
# y should be a binary indicator matrix (each label is either 0 or 1)
&lt;/span&gt;
&lt;span class="c1"&gt;# Define the size of your test set
&lt;/span&gt;&lt;span class="n"&gt;test_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;

&lt;span class="c1"&gt;# Perform the split
# The function returns flattened arrays, so you need to reshape them
&lt;/span&gt;&lt;span class="n"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;X_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;iterative_train_test_split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;test_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;test_size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Reshape the outputs back to the original shapes
&lt;/span&gt;&lt;span class="n"&gt;num_labels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;y_train&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reshape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;num_labels&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;y_test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reshape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;num_labels&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But it also supports advanced problem transformations to single label problems:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;skmultilearn.problem_transform&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BinaryRelevance&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn.svm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SVC&lt;/span&gt;

&lt;span class="c1"&gt;# Initialize and train
&lt;/span&gt;&lt;span class="n"&gt;classifier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BinaryRelevance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;classifier&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;SVC&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;require_dense&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;classifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Predict
&lt;/span&gt;&lt;span class="n"&gt;predictions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;classifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_test&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Please contribute and star the project!
&lt;/h2&gt;

&lt;p&gt;I'm looking forward to your feedback, questions, and how you might use it in your projects!&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>python</category>
      <category>opensource</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Aspiring 16 year old quant developer contributing to Open Source Application</title>
      <dc:creator>northern-64bit</dc:creator>
      <pubDate>Fri, 24 Dec 2021 19:26:40 +0000</pubDate>
      <link>https://dev.to/northern64bit/aspiring-16-year-old-quant-developer-contributing-to-open-source-application-16k4</link>
      <guid>https://dev.to/northern64bit/aspiring-16-year-old-quant-developer-contributing-to-open-source-application-16k4</guid>
      <description>&lt;p&gt;You may wonder who I am after reading the title. I’m a 16 year old who is in high school, with the dream of becoming a quant developer. This is my dream as I know this role comes with many flexible tasks, it uses math &amp;amp; finance which I find very interesting and where I can, apply my coding skills. &lt;/p&gt;

&lt;p&gt;I have been developing computer programs since I was 11 years old. The first programming language I learned was html if you even dare to call it one. Quickly after this, I learned JavaScript, Python and then C. Python is by far my favourite programming language, since it’s easy to use, clear and has many powerful libraries. &lt;/p&gt;

&lt;p&gt;I started to make my own programs and discovered that I could use Python libraries to speed up development. From this, I learned about open-source projects which helped me a lot as I was able to read code from more experienced developers which helped me learn solutions in my code and improved my coding skills. After a while, I thought it was time to publish my own open-source repository: A stocks discord bot, which is a bot version of one of my GitHub stock programs, to possibly help other developers and traders.&lt;/p&gt;

&lt;p&gt;Another thing that I’ve heard that’s very important is networking. So, I thought that it would be best to contribute to a project with a large community, high coding standard (to learn from it) and experienced contributors that are ready to help. If I stick to this, I thought, I may even get to get some valuable connections to industry professionals.&lt;/p&gt;

&lt;p&gt;In August 2021, I sent a message to the Gamestonk Terminal (GST) Discord after seeing their brilliant work and discovering it. At that time, I was working on my previously mentioned open-source Discord bot and was motivated to continue with it. However, I immediately changed my mind after seeing all the features of GST and their contributor’s work. &lt;/p&gt;

&lt;p&gt;The repository was nearly a match made in heaven, since it was scripted in python, has multiple pull requests merged every day, and maintains high code standard by experienced developers. In addition, it’s the best financial open-source project on GitHub (at least according to me). &lt;/p&gt;

&lt;p&gt;Based on my experience with Discord bots, I got the idea of implementing one specifically for GST. The more I thought about it, the better of an idea it was in my mind. The reasons were that the bot can be widely distributed to phones, since it’s so easy to use via the Discord chat and can even be used by non-tech savvy users, a bot makes it easier to get fresh and easily shareable data for your investment conversations.&lt;br&gt;
I knew that by adding the bot to GST, the project would grow and be better since more users would get to know it. So, I asked in the Discord server of the repository if I could help and possibly make a Discord bot to make it more widely distributed and usable on the phone.&lt;/p&gt;

&lt;p&gt;To my surprise the response was very positive and I started to develop it right away. In the beginning I was a bit lost, since I have never thought about code architecture (most of my other applications were a 1000+ lines in one huge file) and I got the responsibility of the whole project. These troubles got quickly fixed after some calls with the creator of GST, Didier R. Lopes, who really helped me; I learned lots about making a robust, structured and easily understandable application. &lt;/p&gt;

&lt;p&gt;From then on it was just adding feature after feature and improvements from many other GST contributors. This was the case until I had several difficult challenges. The first one was that we wanted to implement a menu like the terminal has – this was solved by adding reactions: 0,1,2,3,..9 to the message so the user could select the command through a reaction. The next challenge was when a menu had more than 10 commands – which I solved by implementing “pagination”, which is a sort of scrolling system via buttons formatting the message like a book. However, this resulted in an additional bug with the emoji detection system due to it being loop and the “pagination” being a loop too. Therefore, I started to experiment with multithreading of which I knew nothing about. But after some time, I managed to merge the code bits from the two loops together into one loop.&lt;/p&gt;

&lt;p&gt;Overall, the development process was exciting and a great learning experience that I wish every other young developer can have. My two cents are to make real useful code with simplicity and understandability in mind to improve your code, since it helps more than leetcode and super theoretical programs that never can be contributed to by other programmers.&lt;/p&gt;

&lt;p&gt;The hard part (or rather the time-consuming part) is to understand code from other people to the extent that you can contribute to it in a meaningful way, so I needed to learn to use many other libraries. This is not meant to discourage you, but to get real hands-on experience with the libraries. It’s also more meaningful to learn more new libraries and function if it has a purpose. &lt;/p&gt;

&lt;p&gt;The Discord bot has a multitude of functions from the terminal and is easy to set up &amp;amp; host so that it’s easy to use the terminal on any device and to share it with other people. It’s also awesome to use it to show the underlying data of your investing thesis quickly to your friends in your own Discord server.&lt;/p&gt;

&lt;p&gt;Here’s a link to it:&lt;br&gt;
&lt;a href="https://github.com/GamestonkTerminal/GamestonkTerminal/tree/main/discordbot"&gt;https://github.com/GamestonkTerminal/GamestonkTerminal/tree/main/discordbot&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Currently I’m looking forward to improving the bot and continue to work with the GST team. My long-term goal is to become a quant (quantitative analyst/researcher/developer), but there’s a long way there since I’m currently only in high school. Thus, I’m ready to contribute on other finance open-source applications at any time, so please contact me on GitHub: &lt;a href="https://github.com/northern-64bit"&gt;https://github.com/northern-64bit&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Merry Christmas! &lt;br&gt;
northern-64bit&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>discord</category>
    </item>
  </channel>
</rss>
