<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rakshit Kumar Singh on Medium]]></title>
        <description><![CDATA[Stories by Rakshit Kumar Singh on Medium]]></description>
        <link>https://medium.com/@GreatRSingh?source=rss-171af7204bf3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aOjgJeJpW8vLcAw63FhQBQ.jpeg</url>
            <title>Stories by Rakshit Kumar Singh on Medium</title>
            <link>https://medium.com/@GreatRSingh?source=rss-171af7204bf3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 10:58:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@GreatRSingh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Google Summer of Code 2022]]></title>
            <link>https://medium.com/@GreatRSingh/google-summer-of-code-2022-586ef86f1ee1?source=rss-171af7204bf3------2</link>
            <guid isPermaLink="false">https://medium.com/p/586ef86f1ee1</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Rakshit Kumar Singh]]></dc:creator>
            <pubDate>Sun, 27 Aug 2023 22:06:00 GMT</pubDate>
            <atom:updated>2023-08-27T22:06:00.711Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*tVwo3kQF4F6sZhl9.png" /></figure><p>I was fortunate to participate as a contributor to <a href="https://summerofcode.withgoogle.com/">Google Summer of Code 2023</a>, working with <a href="https://deepchem.io/">DeepChem</a> (<a href="https://www.openchemistry.org/gsoc/">Open Chemistry</a>), an Open-Source initiative that aims to democratize the use of deep learning in various fields, such as drug discovery, material science, quantum chemistry, and biology. The project provides high-quality tools that enable researchers to use deep learning to address complex problems in these fields.</p><p>Recently, DeepChem has been shifting its backend from TensorFlow to PyTorch. This transition requires the porting of models that were previously built in TensorFlow to PyTorch.</p><p>In this forum post, I will provide comprehensive documentation and a detailed description of all the tasks and projects I have undertaken throughout the summer period.</p><h3><strong>Project Title</strong></h3><h4><a href="https://summerofcode.withgoogle.com/programs/2023/projects/Pu8up6x4"><strong>Porting SeqToSeq and DTNN Model to PyTorch</strong></a></h4><p>This project aims to create an equivalent model for the Deep Tensor Neural Network (DTNN) [1] model and Sequence To Sequence (SeqToSeq) [2] model in PyTorch. This requires translating the TensorFlow models into their PyTorch equivalents.</p><h3>Some Important Links</h3><blockquote><strong><em>My GitHub:</em></strong><em> </em><a href="https://github.com/GreatRSingh"><em>https://github.com/GreatRSingh 1</em></a></blockquote><blockquote><strong><em>My LinkedIn:</em></strong><em> </em><a href="https://www.linkedin.com/in/rakshit-singh-ai/"><em>https://www.linkedin.com/in/rakshit-singh-ai/</em></a></blockquote><blockquote><strong><em>DeepChem Home Page:</em></strong><em> </em><a href="https://deepchem.io/"><em>https://deepchem.io/</em></a></blockquote><blockquote><strong><em>DeepChem GitHub:</em></strong><em> </em><a href="https://github.com/deepchem/deepchem"><em>https://github.com/deepchem/deepchem</em></a></blockquote><blockquote><strong><em>Proposal Link:</em></strong><em> </em><a href="https://drive.google.com/file/d/1fX2KEGUkqX1YhmBtUY57qTutOGV-iyXh/view?usp=sharing"><em>Link</em></a></blockquote><h3>Preface</h3><p>Molecular property prediction plays a pivotal role in drug discovery. Recent advancements in deep learning have revolutionized this domain, offering promising alternatives that can automatically extract intricate features from molecular structures.</p><p><strong>Deep Tensor Neural Network</strong> is based on the <strong>many-body Hamiltonian</strong> concept, which is a fundamental principle in quantum mechanics. DTNN receives a molecule’s distance matrix and membership of its atom from its <strong>Coulomb Matrix representation</strong>. Then, it iteratively refines the representation of each atom by considering its interactions with neighboring atoms. Finally, it predicts the energy of the molecule by summing up the energies of the individual atoms.</p><p><strong>Sequence To Sequence</strong> consists of two parts called the <strong>encoder</strong> and <strong>decoder</strong>. The job of the encoder is to transform the input sequence into a single, fixed-length vector called the <strong>embedding</strong>. That vector contains all relevant information from the input sequence. The decoder then transforms the embedding vector into the output sequence. And if we keep the <strong>input</strong> and <strong>output</strong> the same then it can work as an <strong>AutoIncoder</strong>.</p><h3>Contents covered in the blog</h3><ul><li>DTNN Model</li><li>Layers of DTNN Model</li><li>Usage of DTNN Model</li><li>SeqToSeq Model</li><li>Layers of SeqToSeq Model</li><li>Fixes and Additions to DeepChem</li><li>Future Scope</li><li>Acknowledgment</li><li>References</li></ul><h3><strong>Expected Deliverables</strong></h3><blockquote><em>✅</em>Porting Embedding, Step, and Gather Layer of DTNN Model.</blockquote><blockquote><em>✅</em>Create Torch Model with utility functions of DTNN.</blockquote><blockquote><em>✅</em>Porting Encoder and Decoder Layer of SeqToSeq Model.</blockquote><blockquote><em>🔄</em>Create Torch Model with utility functions of SeqToSeq. (In Progress)</blockquote><h3>Deep Tensor Neural Network</h3><h4>Encoding Molecular Representation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*ITfNGRIQPBmsEkge.png" /></figure><p>Molecules are encoded as input for the neural network by a vector of nuclear charges and an inter-atomic distance matrix. In our implementation, we use a Coulomb Matrix for this purpose. This description is complete and invariant to rotation and translation.</p><h4>Network architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*ql_PqhLrfiqUsotp.png" /></figure><p>Each atom type corresponds to a vector of coefficients Ci(0) which is repeatedly refined by interactions Vij. The interactions depend on the current representation Cj(t) as well as the distance Cij to an atom j. After T iterations, an energy contribution Ei is predicted for the final coefficient vector Ci(T). The molecular energy E is the sum of all these atomic contributions.</p><p>Corresponding PRs:</p><ol><li><a href="https://github.com/deepchem/deepchem/pull/3513">Porting DTNN Class · Pull Request #3513</a> +633 -7</li><li><a href="https://github.com/deepchem/deepchem/pull/3514">Porting DTNNModel Class · Pull Request #3514</a> +251 -5</li></ol><h3>Layers of DTNN Model</h3><h4>DTNNEmbedding Layer</h4><p>The embedding layer creates ‘n’ number of embeddings as <strong>Initial Atomic Descriptors</strong>. According to the required weight initializer and periodic table length (Total number of unique atoms).</p><p>Corresponding PRs:</p><ol><li><a href="https://github.com/deepchem/deepchem/pull/3415">Porting DTNNEmbedding Layer · Pull Request #3415</a> +108 -0</li><li><a href="https://github.com/deepchem/deepchem/pull/3455">DTNNEmbedding Layer Parameter Error Fix · Pull Request #3455</a> +17 -14</li></ol><h4>DTNNStep Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/0*D0IgHKew0gSYgDas.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/0*8qZwV2Dq4Hn7D_jT.png" /></figure><p>The Step Layer Encodes the atom’s interaction Vij with other atoms according to distance relationships dij. Then sum them up to get the final output Ci(t+1). Here, W are weights and b are bias.</p><p>Corresponding PRs:</p><ol><li><a href="https://github.com/deepchem/deepchem/pull/3436">Porting DTNNStep Layer · Pull Request #3436</a> +201 -0</li><li><a href="https://github.com/deepchem/deepchem/pull/3454">DTNNStep Parameter error Fix · Pull Request #3454</a> +28 -24</li></ol><h4>DTNNGather Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/0*J-ArMvTMYNOloRyp.png" /></figure><p><strong>Predict Molecular Energy</strong> using atom_features and atom_membership. This Layer gathers the inputs from the step layer according to atom_membership and calculates the total Molecular Energy.<br>The bias parameters, as well as weights, are initially set to zero.</p><p>Corresponding PRs:</p><ol><li><a href="https://github.com/deepchem/deepchem/pull/3446">Porting DTNNGather Layer · Pull Request #3446</a> +171 -1</li></ol><h3>Usage of DTNN Model</h3><p>The script below is an example of how to use this model:</p><p>&lt;script src=”<a href="https://gist.github.com/GreatRSingh/d4ce94dc3deefa8d3f33fd99582a36ce.js">https://gist.github.com/GreatRSingh/d4ce94dc3deefa8d3f33fd99582a36ce.js</a>&quot;&gt;&lt;/script&gt;</p><h3>Sequence To Sequence</h3><h4>Encoding Molecular Representation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*xP1fBlu5KgOWKDyK.png" /></figure><p>We will be representing each word in a language as a one-hot vector, or giant vector of zeros except for a single one (at the index of the word).</p><h4>Network Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/0*UixmaUy_FFEdm4Jo.png" /></figure><p>The seq2seq model consists of two subnetworks, the encoder and the decoder. At each time step, the decoder generates an element of its output sequence based on the input received and its current state, as well as updating its own state for the next time step. The input and output sequences are of fixed size.<br>The critical point of this model is how to get the encoder to provide the most complete and meaningful representation of its input sequence in a single output element to the decoder because this vector or state is the only information the decoder will receive from the input to generate the corresponding output.</p><h3>Layers of SeqToSeq Model</h3><h4>EncoderRNN Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/0*aexq0dMC_8xSdh6F.png" /></figure><p>It takes input sequences and converts them into a fixed-size context vector called the “embedding”. This vector contains all relevant information from the input sequence. This context vector is then used by the decoder to generate the output sequence and can also be used as a representation of the input sequence for other Models.</p><p>Corresponding PRs:</p><ol><li><a href="https://github.com/deepchem/deepchem/pull/3536">Porting encoder rnn · Pull Request #3536</a> +104 -1</li></ol><h4>DecoderRNN Layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/0*9iZD_yoaV6WLOzBZ.png" /></figure><p>The decoder transforms the embedding vector into the output sequence. It is trained to predict the next token in the sequence given the previous tokens in the sequence. It uses the context vector from the encoder to help generate the correct token in the sequence.</p><p>Corresponding PRs:</p><ol><li><a href="https://github.com/deepchem/deepchem/pull/3537">Porting decoder rnn ·Pull Request #3537</a> (Under Progress)</li></ol><h3>Fixes and Additions to DeepChem</h3><p>I have made a total of <strong>14</strong><strong>* PRs, 86+ commits, and 5709+ additions</strong> in total.<br>*: Only useful PRs counted, not Work Review PR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/0*0BmlmHt_Qib1oLC4.png" /></figure><p>DeepChem suite now includes:</p><ul><li>A Torch Backend Based DTNN Model.</li><li>A separate Batch Utility function.</li></ul><h3>Pull Requests to solve issues:</h3><ol><li><a href="https://github.com/deepchem/deepchem/pull/3207">Changing indent width to 4 · Pull Request #3207</a> +2,180 −2,073</li><li><a href="https://github.com/deepchem/deepchem/pull/3241">Adding Usage Examples to Splitters · Pull Request #3241</a> +127 -0</li><li><a href="https://github.com/deepchem/deepchem/pull/3255">Porting SetGather · Pull Request #3255</a> +192 -1</li></ol><p>Some Works in SeqToSeq Model are remaining which will be completed in the next few weeks.</p><p>You can find my progress reports, made throughout the summer, for the project at the <a href="https://forum.deepchem.io/t/google-summer-of-code-2023-porting-seqtoseq-and-dtnn-model/964/13">DeepChem Forum</a></p><h3>Future Scope</h3><p>A good upgrade to the SeqToSeq Model could be Adding an Attention Layer to it based on [3]. It has the potential to improve its performance and work on even a small amount of data.</p><h3>Acknowledgment</h3><p>I want to give a big shoutout to my mentors <a href="https://www.linkedin.com/in/bharath-ramsundar-13275230/">Bharath Ramsundar</a>, <a href="https://www.linkedin.com/in/tony-davis-696487112/">Tony Davis</a>, and <a href="https://www.linkedin.com/in/shaipranesh-s-921461215/">Shaipranesh S</a>, along with the amazing DeepChem community. Your guidance, suggestions, and discussions have been invaluable. Also a special mention to <a href="https://www.linkedin.com/in/aryan-ab/">Aryan Amit Barsainyan</a> and <a href="https://www.linkedin.com/in/riya-singh28/">Riya Singh</a> for always supporting me in this journey.</p><p>Being a part of this organization has provided me with real-world insights into the inner workings of ML models, especially those using graph-based neural networks. I’m committed to continuing my contributions by enhancing project implementations, addressing issues, and supporting the community as much as I can.</p><p>A special thank you to Google for making all of this possible!</p><h3>References</h3><p>[1] <a href="https://arxiv.org/abs/1609.08259">Quantum-Chemical Insights from Deep Tensor Neural Networks</a><br>[2] <a href="https://arxiv.org/abs/1409.3215">Sequence to Sequence Learning with Neural Networks</a><br>[3] <a href="https://arxiv.org/abs/1706.03762">Attention Is All You Need</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=586ef86f1ee1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Starter Guide]]></title>
            <link>https://medium.com/@GreatRSingh/machine-learning-starter-guide-fffcd1f7930e?source=rss-171af7204bf3------2</link>
            <guid isPermaLink="false">https://medium.com/p/fffcd1f7930e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Rakshit Kumar Singh]]></dc:creator>
            <pubDate>Sat, 26 Aug 2023 18:39:36 GMT</pubDate>
            <atom:updated>2023-08-26T18:39:36.292Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zeq-bZYeG0MzSKgH5QMgJw.jpeg" /></figure><p><em>Machine learning is a regal art of teaching computers to learn without being explicitly programmed. By analyzing the collected wisdom of the ages and identifying the royal decrees, machine-learning algorithms can make prophecies and commands that would be difficult or impossible for humans to make.</em></p><p>Or Simply:</p><p><em>Machine learning is a way of teaching computers to learn without being explicitly programmed. Computers can learn from data and identify patterns, which allows them to make predictions and decisions that would be difficult or impossible for humans to make.</em></p><p><strong><em>“People worry that computers will get too smart and take over the world, but the real problem is that they’re too stupid and they’ve already taken over the world.” — Pedro Domingos</em></strong></p><h3>A general pipeline for Machine Learning is :</h3><p>1. python</p><p>2. Numpy</p><p>3. Pandas and Matplotlib</p><p>4. Sklearn</p><p>5. Tensorflow / PyTorch — implementation know-how</p><p>6. Mathematics</p><h3>Python</h3><p>Python is a general-purpose, high-level programming language that is easy to learn and use. It is often used for web development, data science, and machine learning. Python has a large and active community, and there are many resources available to help you learn the language.</p><p>Some of the benefits of learning Python:</p><ul><li>It is easy to learn and use.</li><li>It is powerful and versatile.</li><li>It has a large and active community.</li><li>It is free and open-source.</li></ul><p>Resources:</p><ol><li><a href="https://www.youtube.com/playlist?list=PLKnIA16_Rmvb1RYR-iTA_hzckhdONtSW4">100 Days of Python Programming — CampusX</a></li><li><a href="https://www.youtube.com/watch?v=x7X9w_GIm1s&amp;ab_channel=Fireship">Python in 100 Seconds — FireShip</a></li><li><a href="https://www.python.org/">https://www.python.org/</a></li><li><a href="https://books.goalkicker.com/PythonBook/">Free Python Programming Book (goalkicker.com)</a></li></ol><h3><strong>Numpy</strong></h3><p>Nearly every scientist working in Python draws on the power of NumPy.</p><p>NumPy brings the computational power of languages like C and Fortran to Python, a language much easier to learn and use. With this power comes simplicity: a solution in NumPy is often clear and elegant.</p><p>Resources:</p><ol><li><a href="https://numpy.org/">NumPy- Website</a></li><li><a href="https://www.youtube.com/watch?v=QUT1VHiLmmI&amp;ab_channel=freeCodeCamp.org">Python NumPy Tutorial for Beginners — FreeCodeCamp</a></li><li><a href="https://numpy.org/learn/">NumPy — Learn</a></li></ol><h3>Pandas</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pa25YKj3R1zy1M-n3R6EaQ.png" /></figure><p><strong>Pandas</strong> is a fast, powerful, flexible, and easy-to-use open-source data analysis and manipulation tool, built on top of the <a href="https://www.python.org/">Python</a> programming language.</p><p>Resources:</p><ol><li><a href="https://pandas.pydata.org/">pandas — Python Data Analysis Library (pydata.org)</a></li><li><a href="https://www.youtube.com/watch?v=gtjxAH8uaP0&amp;ab_channel=freeCodeCamp.org">Pandas &amp; Python for Data Analysis by Example — Full Course for Beginners — FreeCodeCamp</a></li></ol><h3>Matplotlib</h3><p>Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Matplotlib makes easy things easy and hard things possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*IWerpqpgwqlV7quP.png" /></figure><ol><li><a href="https://matplotlib.org/">https://matplotlib.org/</a></li><li><a href="https://matplotlib.org/stable/tutorials/introductory/quick_start.html">Quick start guide — Matplotlib 3.7.2 documentation</a></li><li><a href="https://www.youtube.com/watch?v=OZOOLe2imFo&amp;ab_channel=NeuralNine">Matplotlib Full Course — Data Science Fundamentals — NeuralNine</a></li></ol><h3>SkLearn</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/0*601Ln-OaUuAUpACv" /></figure><p>Scikit-learn is a free and open-source machine learning library for the Python programming language. It provides a range of supervised and unsupervised learning algorithms for tasks such as classification, regression, and clustering. The library is built on top of NumPy, SciPy, and matplotlib. Scikit-learn is widely used in academia and industry alike for developing machine learning models.</p><p>Resources:</p><ol><li><a href="https://www.youtube.com/playlist?list=PLKnIA16_Rmvbr7zKYQuBfsVkjoLcJgxHH">100 Days of Machine Learning — CampusX</a></li><li><a href="https://scikit-learn.org/stable/">scikit-learn</a></li><li><a href="https://scikit-learn.org/stable/getting_started.html">Getting Started — scikit-learn 1.3.0 documentation</a></li></ol><h3>PyTorch</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*i_fgInLKgmjKIWtw" /></figure><p>PyTorch is a powerful and versatile framework that caters to both beginners and experienced researchers in the field of machine learning and artificial intelligence. Its dynamic computation graph, GPU acceleration, and emphasis on flexibility make it a preferred choice for building and experimenting with various types of machine-learning models.</p><p>Resources:</p><ol><li><a href="https://www.youtube.com/playlist?list=PLyMom0n-MBroupZiLfVSZqK5asX8KfoHL">Deep Learning with PyTorch: Zero to GANs — Jovian</a></li><li><a href="https://pytorch.org/">PyTorch</a></li></ol><h3>Mathematics</h3><p>First Year College maths is very important for basics.</p><p>Resources:</p><ol><li>An Introduction to Statistical Learning — Book</li><li>Ncert Class-12 — Book</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fffcd1f7930e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>