<?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 Shravan Raina on Medium]]></title>
        <description><![CDATA[Stories by Shravan Raina on Medium]]></description>
        <link>https://medium.com/@shravan.raina20?source=rss-2123d08b01fd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Shravan Raina on Medium</title>
            <link>https://medium.com/@shravan.raina20?source=rss-2123d08b01fd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 23:25:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shravan.raina20/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[Project Management Softwares and its usage]]></title>
            <link>https://medium.com/@shravan.raina20/project-management-softwares-and-its-usage-3d456a0d628e?source=rss-2123d08b01fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d456a0d628e</guid>
            <dc:creator><![CDATA[Shravan Raina]]></dc:creator>
            <pubDate>Sun, 15 Oct 2023 16:12:17 GMT</pubDate>
            <atom:updated>2023-12-01T07:36:24.144Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Authors: </strong>Shravan Raina, Somanshu Bhat, Sanjyot Kotgire, Ketan Aggarwal</blockquote><p>A specialized tool called “Project Management Software” helps people and groups plan, organize, and carry out projects effectively. Project managers may use it as a central platform to set deadlines, assign resources, monitor advancement, and communicate with other team members. Streamlining project workflows and increasing overall efficiency, these programs frequently contain features like task management, document sharing, communication tools, and reporting functions.</p><p>Project management software helps with efficient project planning and successful completion within predetermined schedules and budget restrictions by offering a thorough picture of project operations and simplifying communication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*Xtb6X-BXyG-JKLcg" /><figcaption><a href="http://surl.li/mtghh">http://surl.li/mtghh</a></figcaption></figure><h3><strong>Purpose of Project Management Softwares</strong></h3><ol><li><strong>High Level Project Overview:</strong> The components of your project work together as a whole thanks to project management software. A solution like this can help you manage the teams working on the same project from different departments and make sure that everything is finished on schedule. Everyone may examine the most recent updates and communicate about project status by logging into your cloud-based project management platform.</li><li><strong>Task Management: </strong>It’s crucial to keep track of each specific task that each member of your team needs to do when you’re project managing. You can assign tasks and receive notifications when they are finished using a project management software. You can also manage deliverables and deadlines with some programmes.</li><li><strong>Reporting: </strong>With the help of dashboards and automatically created reports, modern project management software offers powerful capabilities that let you access real-time data. Your leadership team may keep informed and understand how each project’s responsibilities and milestones contribute to overall team performance and project profitability with the help of convenient reports at their disposal.</li><li><strong>Time Tracking: </strong>An essential component of project management software is automated time tracking, especially if you want to bill your clients correctly. You can record the hours spent on each activity and combine them with project and customer data using software that counts billable and non-billable hours to produce detailed reports that support important rate decisions.</li></ol><h3><strong>Why Use Project Management Software?</strong></h3><ol><li><strong>Better Project Planning:</strong> Business owners must have access to a long-term perspective on their projects. The more you prepare for the future, the better able you will be to steer clear of typical issues. Your team will be able to cooperate and stay on task once you have a reliable framework in place. Project management software gives you a high-level perspective that has all the information you need to create workflows that are tailored specifically to your company.</li><li><strong>Ease of Communication: </strong>Without a tracking system, it is almost impossible to keep track of everything your team does. You can monitor client history, keep track of all your work in one place, and collaborate with your team using notes and messages thanks to project management software. Since you won’t be using email or other tools as frequently, you’ll be more likely to stay concentrated on your current task and steer away from expensive side projects.</li><li><strong>Faster Project Completion: </strong>Many people discover that using project management software keeps them organised and keeps their projects going along more quickly. You have all the tools you need to stay current on the status of your projects and make quick adjustments as needed with features like task management, collaboration, and reporting.</li><li><strong>Better Budgeting:</strong> It’s simple to estimate their likely cost if your projects are well-organized and you are aware of how much time you are spending on each one. When you combine that data with invoicing information, you can estimate each project’s actual cost before you ever begin.</li><li><strong>Balanced resource management:</strong> Experienced project managers are aware that in order to successfully complete projects, they’ll need a resource management plan that allows them to keep their teams in tip-top shape without overloading them with work or the opposite. It is crucial to recognise the value of resource planning since it promotes higher working standards. The best features for identifying resource bottlenecks and knowing when to add extra team members are found in project and resource management software, like the heatmap that follows and gives insight into the workloads of the full portfolio of resources.</li><li><strong>Enhanced customer satisfaction: </strong>Improved customer satisfaction is another of project management software’s commonly mentioned advantages. When a job is completed on time and within budget, the client smiles as they leave, and a happy client is one you will work with again. Smart project management software provides the capabilities necessary for the continuation of this customer/supplier relationship. You may focus your efforts, accomplish your objectives, increase your deliverability, and increase your likelihood of success by using basic project management software tactics. When combined, these advantages can drastically change how commercial operations are conducted. Project-centric businesses would always struggle to concurrently meet the three limitations of budget, scope, and quality without the advantages of project management software.</li></ol><h3>Who Uses Project Management Software?</h3><p>Project management software is used by various kinds of businesses to keep track of their projects. They are most effective when used in groups, but you can also use them to manage your own or another person’s initiatives. Project management software provides a solution to put clients at the forefront of your organisation while preserving internal productivity and efficiency if you work in the professional services sector.</p><h3>How to choose the right project management software?</h3><ol><li><strong>Features and Requirements:</strong> There are tools available for every level of demand, ranging from basic to-do lists to intricate velocity charts. Analyse your needs, including the scope of your projects, the people involved, your project management approach, and more.<br>A powerful programme like MS Projects may be the best choice for you if you’re a project manager who needs to budget and have a plan for how the job will be broken down. But if you want a Kanban board that keeps you organised, helps you assign tasks, manage due dates, etc., a project management tool like Kissflow Projects will be ideal.</li><li><strong>Methodology: </strong>Record-keeping, documentation, and a clearly defined workflow are highly valued by teams that use proactive methodologies like the waterfall technique. It emphasises establishing dependencies and determining priorities. You require a tool that can help with this. However, it demands a lot of flexibility if you’re utilising a reactive technique like Agile or Lean. To support this type of iterative work, the tool needs to be adaptable and versatile enough.</li><li><strong>Budget: </strong>The amount of money you’re willing to spend on your project management software is the next issue you need to think about. There are tools with different levels of functionality that are free to use as well as others that cost thousands of dollars. You can make checklists and tick off accomplished tasks with the aid of a straightforward, cost-free project management application. However, if you want more sophisticated features, you might choose to choose the more expensive models.</li><li><strong>Ease of Use:</strong> Only when your teams regularly use the project management software will it be of any use. Some project management applications can be so complex that your team may need several days of training before they can use them effectively. Not every firm needs such sophisticated tools. What you should be searching for is a straightforward user interface with robust features. You require a tool that can be altered to suit your requirements. A smart project management tool will be time-saving, versatile, and scalable as your company expands.</li></ol><h3>Essential Features in a project management software</h3><p><strong>Kanban board</strong></p><p>A Kanban board is a simple tool for tracking progress and visualising your work. What has to be done and where tasks are stalled are both readily apparent.</p><p><strong>Task management</strong></p><p>Users can keep track of tasks and subtasks via task management. For instance, the task “write a blog” can be broken down into the subtasks of copywriting, editing, and SEO optimisation. These smaller duties are all carried out by various team members. Task prioritisation, deadline setting, and improved teamwork are all possible.</p><p><strong>Scheduling</strong></p><p>Because projects are transient, scheduling is one of the most crucial software functions. To maintain strong collaboration over your projects, you must have the option to customise deadlines, dependable tasks, buffers, and other factors.</p><p><strong>Collaboration</strong></p><p>A collaboration tool will assist you maintain information flow so that everyone is informed if you need to speak with your team frequently. Additionally, search for software that offers a chat platform, task management for the project team, and a mechanism to track version changes. When a task is finished, a deadline is coming, or something demands your attention, you need to be informed right away. No matter where you are, you can stay connected thanks to smartphone alerts.</p><p><strong>Integration</strong></p><p>There are numerous moving pieces in projects. Every time something changes, you need to be aware of the effect of each variable on the others. In other words, search for features that aid in the analysis of resource allocation and trade-offs as they relate to the overall timeline of your project. Your system ought to enable you to store all of your files in a single, central database for simple sharing and rapid access. It is extremely helpful when working in distributed teams or with clients who can provide immediate feedback.</p><p><strong>Dashboard and Reporting</strong></p><p>The easiest way to gain a strategic overview of the projects’ status is through dashboards and reports. In particular, you must be aware of how things stand at the conclusion of each week or month. You should search for a project management tool that organises all the data pertaining to budget, timeline, team performance, and resource usability into an organised document. You may get a high-level overview of the various projects using the graphs and visual metrics in the project overview.</p><p>You can quickly learn the status of each project, how many are finished, and how much time and money were spent on various initiatives. You can find out where your team struggles and where it might do better by creating reports.</p><h3>Project Management Softwares</h3><p><strong>ASANA:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nNxacwO8ivjLbIuT.png" /><figcaption><a href="http://surl.li/mtgem">http://surl.li/mtgem</a></figcaption></figure><p>Asana is a complete work management solution that meets the dynamic and ever-changing demands of enterprise enterprises, going beyond the capabilities of standard project management software. Asana links everything of the work your organization conducts to your top objectives and business plan, even though you may still manage your chores with its assistance.</p><p><strong>TRELLO:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NmL8XfXVRYrl2SDL.png" /><figcaption><a href="https://1000logos.net/trello-logo/">https://1000logos.net/trello-logo/</a></figcaption></figure><p>Atlassian is the owner of the Kanban-board-style project management app Trello. Project tasks in Trello are nested beneath boards that are identified with a broad subject. You may, for instance, have separate boards labeled “Not started,” “In Progress,” and “Complete.” When you require a basic tool for small tasks, the arrangement makes it straightforward to follow project progress from board to board.</p><p><strong>MICROSOFT OFFICE:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*QvsOh-EscgaaDtPI.jpg" /><figcaption><a href="http://surl.li/mtgdd">http://surl.li/mtgdd</a></figcaption></figure><p>The reason Microsoft Office is frequently referred to be a project management tool is mostly because their products are necessary for any kind of business. Microsoft Office products are frequently the first tools managers turn to when they start experimenting with project management since we already know and understand how to use them. However, in practice, you’re best suited using Excel spreadsheets and documents in combination with comprehensive project management software because they weren’t designed for collaborative use.</p><p><strong>NOTION:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*30Xz4MMjBhOA4dSQ.jpg" /><figcaption><a href="http://surl.li/mtget">http://surl.li/mtget</a></figcaption></figure><p>Notion is a sophisticated tool for creating and archiving dynamic sheets, notes, and documents. Though Notion’s collaborative features sometimes feel limiting, this works well for businesses or people that just need a more structured place for ideas and thoughts.</p><p><strong>SIMIO:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/0*whBuITEtBP5jhWbZ.png" /><figcaption><a href="http://surl.li/mtgbz">http://surl.li/mtgbz</a></figcaption></figure><p>Using Simio, you may create and run dynamic models of systems to observe their behavior. Simio “acts out” and shows a three-dimensional animation of your system’s actions over time. Before you construct or modify your suggested systems, you may view them in action with Simio. With Simio, 3D animation is an easy and organic aspect of modeling. You may enjoy a 3D experience that is really immersive using Simio. Realistic spatial linkages can be used to arrange your model in a way that closely resembles your actual system.</p><p><strong>CONCLUSION:</strong></p><p>Project management software is akin to an electronic toolkit that facilitates increased productivity and efficiency for teams and businesses. It serves as a flexible organizer that lets you make a detailed plan by outlining tasks, establishing due dates, and allocating responsibilities to team members. It serves as a virtual conference room as well, allowing team members to interact, exchange files, and update everyone on the status of the project. It also gives you useful information via data and charts, which makes it simpler for you to comprehend the project’s progress, spot problems, and come to wise conclusions.</p><p>This program eliminates misconceptions and maintains accountability by making sure that all parties involved are aware of their roles and the status of the project. Project management software is a vital tool for today’s teams and enterprises because it streamlines project management, improves communication, and facilitates sound decision-making.</p><p><strong>References:</strong></p><ol><li><a href="https://kissflow.com/project/benefits-of-project-management-software/">https://kissflow.com/project/benefits-of-project-management-software/</a></li><li><a href="https://www.forecast.app/blog/benefits-of-using-project-management-software">https://www.forecast.app/blog/benefits-of-using-project-management-software</a></li><li><a href="https://zapier.com/blog/free-project-management-software/">https://zapier.com/blog/free-project-management-software/</a></li><li><a href="https://www.accelo.com/resources/blog/what-is-project-management-software/">https://www.accelo.com/resources/blog/what-is-project-management-software/</a></li><li><a href="https://niftypm.com/blog/benefits-of-project-management-software/">https://niftypm.com/blog/benefits-of-project-management-software/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d456a0d628e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Power of Transfer Learning in Machine Learning]]></title>
            <link>https://medium.com/@shravan.raina20/power-of-transfer-learning-in-machine-learning-9b464f6ed360?source=rss-2123d08b01fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b464f6ed360</guid>
            <dc:creator><![CDATA[Shravan Raina]]></dc:creator>
            <pubDate>Thu, 12 Oct 2023 14:14:14 GMT</pubDate>
            <atom:updated>2023-11-26T17:44:49.423Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Authors:</strong> Shravan Raina, Somanshu Bhat, Ketan Aggarwal, Sankalp Kokse</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*i3fuU7iVvO3e7tlQAhkLpw.png" /><figcaption>src:-<a href="https://i.ytimg.com/vi/pFQ2qVqsLvg/maxresdefault.jpg">https://i.ytimg.com/vi/pFQ2qVqsLvg/maxresdefault.jpg</a></figcaption></figure><h3><strong>What is Transfer Learning?</strong></h3><p>A model created for one task is used as the basis for another using the machine learning technique known as transfer learning.</p><p>Pre-trained models are frequently used as the foundation for deep learning tasks in computer vision and natural language processing because they save both time and money compared to developing neural network models from scratch and because they perform vastly better on related tasks.</p><p><strong>How to use Transfer Learning?</strong></p><p>Two common approaches are as follows:</p><ol><li>Develop Model Approach</li><li>Pre-trained Model Approach</li></ol><p><strong>Develop Model Approach</strong></p><ol><li>Select Source Task: You must choose an issue involving predictive modelling that is related, has a large amount of data, and where the input, output, and/or concepts discovered while mapping input to output data are all related in some way.</li><li>Develop Source Model: The next step is to create a proficient model for this initial assignment. To confirm that some feature learning has taken place, the model must be superior to a naive model.</li><li>Reuse Model: Then, a model on the second task of interest can be built from the model fit on the source task as a starting point. Depending on the modelling technique employed, this can include using the entire model or just a portion of it.</li><li>Tune Model: The model might need to be modified or improved based on the input-output pair data provided for the relevant task.</li></ol><p><strong>Pre-trained Model Approach:</strong></p><ol><li>Select Source Model: One of the accessible models is a source model that has already been trained. Many research organisations publish models on sizable and difficult datasets, which may be part of the selection of potential models.</li><li>Reuse Model: The model that has already been trained can then serve as the foundation for a model on the second task of interest. Depending on the modelling technique employed, this can include using the entire model or just a portion of it.</li><li>Tune Model: The model might need to be modified or improved based on the input-output pair data provided for the relevant task.</li></ol><h3><strong>Transfer Learning with Image Data:</strong></h3><p>Transfer learning is frequently used to solve challenges in predictive modelling that take input from images.</p><p>This could be a prediction challenge that requires the input of images or video.</p><p>A deep learning model that has been pre-trained for a difficult picture classification job like the ImageNet 1000-class photograph classification competition is frequently used for these kinds of tasks.</p><p>The research organisations who create models for this competition and place well frequently make their final models available for reuse under a permissive licence. On contemporary technology, these models may require days or weeks to train.</p><p>These models are available for download and can be immediately incorporated into new models that require image data as input.</p><p>Three examples of models of this type include:</p><ul><li><a href="http://www.robots.ox.ac.uk/~vgg/research/very_deep/">Oxford VGG Model</a></li><li><a href="https://github.com/tensorflow/models/tree/master/research/inception">Google Inception Model</a></li><li><a href="https://github.com/KaimingHe/deep-residual-networks">Microsoft ResNet Model</a></li></ul><p>The reason this approach works so well is that the images were trained on a large corpus of photographs and demand the model to make predictions on a variety of classes, necessitating the model to effectively learn to extract features from photographs in order to succeed on the problem.</p><h3>Transfer Learning with Language Data</h3><p>Transfer learning is frequently used to solve natural language processing issues where the input or output is text.</p><p>Word embedding, which maps words to a high-dimensional continuous vector space with similar vector representations for words with similar meanings, is used to solve these kinds of challenges.</p><p>It is typical for research organisations to release pre-trained models based on very large corpora of text texts under a permissive licence, and efficient techniques exist to learn these distributed word representations.</p><p>Two examples of models of this type include:</p><ul><li><a href="https://code.google.com/archive/p/word2vec/">Google’s word2vec Model</a></li><li><a href="https://nlp.stanford.edu/projects/glove/">Stanford’s GloVe Model</a></li></ul><p>These distributed word representation models are available for download, and they may be integrated into deep learning language models to either understand words as input or produce words as output.</p><h3>How Transfer Learning Works?</h3><p>Neural networks, for instance, frequently attempt to detect edges in the earlier layers, forms in the middle layer, and some task-specific properties in the latter layers in computer vision. The early and intermediate layers are utilised in transfer learning, and the latter layers are only retrained. It aids in utilising the labelled data from the initial task it was trained on.</p><p>Let’s return to the example of the model that will be used to recognise sunglasses and has been trained to recognise a bag on an image. We will merely retrain the later layers so that they may learn what distinguishes sunglasses from other things because the model has already learned to recognise objects in the earlier layers.</p><p>Transfer learning is the process of transferring as much information as feasible from the task the model was trained on to the current task. Depending on the issue and the information, this knowledge might take many different forms. For instance, it might be the way models are put together, which makes it simpler for humans to recognise fresh items.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*wNzvofCGJrnlAYdl.jpeg" /><figcaption>src: <a href="https://builtin.com/data-science/transfer-learning">https://builtin.com/data-science/transfer-learning</a></figcaption></figure><h3>Why to Use Transfer Learning?</h3><p>Transfer learning has a number of advantages, but its key advantages are reducing training time, improving neural network performance (in most circumstances), and not requiring a lot of data.</p><p>Transfer learning is useful in situations where access to the large amounts of data required to train a neural network from scratch isn’t always possible.</p><p>Transfer learning allows for the pre-training of the model, which allows for the construction of a robust machine learning model with relatively minimal training data. Given that big labelled data sets are typically created using specialised knowledge, this is particularly helpful in natural language processing.</p><p>Additionally, training time is shortened because it can occasionally take days or even weeks to completely train a deep neural network on a challenging job.</p><h3>Steps to Use Transfer Learning:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*En9ee0Fc-Jvad6vX3JQZsg.png" /><figcaption>src:-<a href="https://editor.analyticsvidhya.com/uploads/499849315476_1592890541_transfer.jpg">https://editor.analyticsvidhya.com/uploads/499849315476_1592890541_transfer.jpg</a></figcaption></figure><p>When a pre-trained model that has been trained on comparable data and tasks already exists and you don’t have enough annotated data to use to train model. If the original model was trained using TensorFlow, you could just recover it and retrain a few layers to suit your needs. Transfer learning, on the other hand, is only effective if the skills acquired during the initial task are generic, or usable in a variety of situations. The input of the model must also be the same size as when it was originally trained.</p><ol><li><strong>Training a Model to Reuse it:</strong></li></ol><p>Consider the scenario where you want to complete Task A but lack the data to train a deep neural network. In this case, you can reuse the model by training it. One way around this is to locate a task B that is related and has a lot of data.</p><p>Utilize task B as training data for the deep neural network, and then utilize the model to resolve task A. Whether you need to use the complete model or just a few levels will depend on the issue you’re trying to address.</p><p>It is possible to reapply the model and produce predictions for your fresh input if the input for both tasks is the same. On the other hand, one method to look at is changing and retraining various task-specific layers and the output layer.</p><p><strong>2. Using a Pre Trained Model:</strong></p><p>Utilizing an existing trained model is the second choice. Research these models in advance because there are many of them available. The job determines how many layers to reuse and retrain.</p><p>Nine pre-trained models make up Keras, which is used for transfer learning, prediction, and fine-tuning. You can find these models here, along with a few basic tutorials on how to use them. Access to trained models is also widely available from research institutions.</p><p>Deep learning is the most widely used use of this type of transfer learning.</p><p><strong>3. Extraction of Features:</strong></p><p>Another choice is to use deep learning to find the best way to express your issue, which entails figuring out its important components. Representation learning is a technique that frequently yields results that are notably better than those obtained by manually creating representations.</p><p>Machine learning feature generation is primarily done manually by researchers and subject matter experts. Fortunately, deep learning can do feature extraction automatically. This does not negate the value of feature engineering and domain expertise, though; you still need to decide which features to include in your network.</p><p><strong>4. Extraction of Features in Neural Networks:</strong></p><p>On the other hand, neural networks have the capacity to learn which traits are important and which aren’t. A representation learning algorithm can quickly determine a good set of characteristics, even for complex jobs that would otherwise require a lot of human work.</p><p>The representation may then be used to tackle several additional problems. To determine the proper feature representation, just utilize the first few layers; don’t use the network’s output because it is too task-specific. Instead, output data through one of the intermediary levels and transmit it into your network.</p><p><strong>Conclusion:</strong></p><p>In conclusion, transfer learning is a key component of machine learning and provides a powerful remedy for problems caused by a lack of available data. Transfer learning allows for quick adaptation to new tasks by utilizing information from pre-trained models, which greatly improves model performance. This approach has seen significant success, especially in the field of deep neural networks, where architectures that have been pre-trained on big datasets provide strong foundations for a diverse range of applications, demonstrating the adaptability and effectiveness of transfer learning.</p><p>Extensive research on creative methodologies in transfer learning shows promise for enhancing flexibility and expanding transfer learning’s application to a wider range of problem domains. Because the paradigm leverages existing knowledge, it not only increases model efficiency but also helps democratize machine learning by lowering the need for large-scale labeled datasets for each new job. All things considered, transfer learning is a key tactic that gets beyond data constraints and advances machine learning for useful real-world applications.</p><p><strong>References:</strong></p><ol><li><a href="https://builtin.com/data-science/transfer-learning">https://builtin.com/data-science/transfer-learning</a></li><li><a href="https://en.wikipedia.org/wiki/Transfer_learning">https://en.wikipedia.org/wiki/Transfer_learning</a></li><li><a href="https://www.geeksforgeeks.org/ml-introduction-to-transfer-learning/">https://www.geeksforgeeks.org/ml-introduction-to-transfer-learning/</a></li><li><a href="https://www.javatpoint.com/transfer-learning-in-machine-learning">https://www.javatpoint.com/transfer-learning-in-machine-learning</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b464f6ed360" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Greedy Algorithms]]></title>
            <link>https://medium.com/@shravan.raina20/greedy-algorithms-16545cbab4b4?source=rss-2123d08b01fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/16545cbab4b4</guid>
            <category><![CDATA[greedy-algorithms]]></category>
            <category><![CDATA[dijkstras-algorithm]]></category>
            <category><![CDATA[shortest-path]]></category>
            <category><![CDATA[huffman-encoding]]></category>
            <dc:creator><![CDATA[Shravan Raina]]></dc:creator>
            <pubDate>Wed, 05 Apr 2023 16:12:06 GMT</pubDate>
            <atom:updated>2023-05-01T07:57:47.269Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Authors: </strong>Shravan Raina, Sanjyot Kotgire, Somanshu Bhat, Saksham Sharma</blockquote><p>A Greedy algorithm is a technique for solving problems that selects the optimal option based on the current situation. This approach ignores the notion that the best solution could not ultimately be what is best outcome. An incorrect judgement is never corrected by the algorithm.</p><h3>Steps for Creating a Greedy Algorithm</h3><ul><li>Step 1: Find the ideal subproblem or substructure inside the given problem.</li><li>Step 2: Decide what the solution will contain (for example, largest sum, shortest path).</li><li>Step 3: Establish an iterative procedure for reviewing each subproblem and coming up with the best solution.</li></ul><h3><strong>Example of Greedy Algorithm</strong></h3><p><strong>Problem Statement:</strong> Use a greedy approach to determine the optimum path from the provided starting location to the target city.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qOPUPzKynUdbI0R-.png" /><figcaption>src: <a href="https://www.simplilearn.com/tutorials/data-structure-tutorial/greedy-algorithm">https://www.simplilearn.com/tutorials/data-structure-tutorial/greedy-algorithm</a></figcaption></figure><p>Greedy Solution:</p><ul><li>Commence at the source vertex.</li><li>Choose one vertex at a time with a minimum edge weight (distance) from the source vertex..</li><li>If the connecting edge does not form a cycle, add the chosen vertex to the tree structure.</li><li>Up to the target vertex, keep adding nearby fringe vertices to the tree.</li></ul><h3><strong>Characteristics of Greedy Algorithm</strong></h3><p>The greedy technique is a simple and direct way for addressing optimisation problems. At each level, the choice that is locally optimal must be chosen in order to reach the global optimum. The main advantage of the greedy technique is that it is easy to use and understand. The ideal solution may not always be found, and it may take some time.</p><p>The greedy technique selects the locally optimal choice at each stage in search of the global optimum. You may accomplish this at each step by either maximising or reducing the target function. The main advantage of the greedy technique is that it is relatively easy to use and understand. However, using this method has a number of disadvantages.The greedy strategy might not always produce the best solution at first. Also, it has the potential to move very slowly. Last but not least, it might be difficult to show that the greedy strategy will truly find the global optimum.</p><p>One of the most well-known uses of the greedy strategy is the knapsack problem. A bunch of items with a weight and a value are given in this issue. Our objective is to identify the subset of items that maximises value while minimising weight. The greedy method would just take what had the highest value at each stage. But maybe this isn’t the best move to make.. Consider the following group of things, for instance:</p><p>Item 1: Weight = 2, Value = 6</p><p>Item 2: Weight = 2, Value = 3</p><p>Item 3: Weight = 4, Value = 5</p><p>The greedy strategy would take Items 1 and 3, giving us a value of 11. However, combining Items 2 and 3 would be the best course of action, giving a final value of 8. Consequently, the greedy strategy does not always result in the best result.</p><p>There are many examples of the greedy strategy. The most well-known data compression method is probably the Huffman coding one. In this method, we are given a set of symbols with varying weights. We are searching for the subset of symbols with the smallest average code length. The greedy method would only choose the symbol with the lowest weight at each phase. But maybe this isn’t the best move after all. Take the following set of symbols, for instance:</p><p>Symbol 1: Weight = 2, Code = 00</p><p>Symbol 2: Weight = 3, Code = 010</p><p>Symbol 3: Weight = 4, Code =011</p><p>The greedy method would take the symbols 1 and 3, adding up to a total weight of 6. However, the best course of action would be to take Symbols 2 and 3 for a total weight of 7. Consequently, the greedy strategy does not always result in the best result.</p><p>The greedy technique is a simple and straightforward way for handling optimisation problems. The ideal solution may not always be found, and it may take some time. When using the greedy strategy, it is essential to keep in mind these disadvantages.</p><h3><strong>Components of Greedy Algorithm</strong></h3><p>Any greedy algorithm needs to have the following four elements:</p><p>1. A group of potential answers (usually shown as a graph)<br>2. A method of ordering the candidates based on specific criteria<br>3. A ranking-based selection algorithm that selects the top candidate from the group<br>4. A technique for “pruning” the list of potential candidates to exclude any options that might be worse than the one that was ultimately selected.</p><p>The first two parts allow any object to be used as a candidate solution and any object to be used as a ranking criterion. Typically, the candidate with the highest rating is chosen to complete the selection process.</p><p>The pruning stage is essential since it ensures that the algorithm doesn’t spend time considering candidates who are already known to be less desirable than the top candidate as far discovered. Without it, the algorithm would essentially conduct a very inefficient brute-force search of the whole solution space.</p><h3><strong>Pseudo Code of Greedy Algorithms</strong></h3><p>One example of pseudo code for a greedy algorithm is given below:</p><pre>function GreedyAlgorithm(problem) {<br>  // currentState = initial state of problem <br>  while (currentState != goalState){<br>    nextState = chooseNextState(currentState); <br>    currentState = nextState; <br>  } <br>  return currentState; <br>}</pre><p>The aforementioned pseudocode illustrates the fundamental structure of a greedy algorithm. Restoring the current status of the issue to its initial state is the first step. Once the objective state and the current state are equal, the loop is repeated once more. After the loop, we choose which state we want to enter. This is performed by using the method chooseNextState.(). By setting the current state to be equal to the recently chosen next state, we finally return to the goal state.</p><p>The pseudo code for the chooseNextState() function is given below:</p><pre>function chooseNextState(currentState) { <br>  // find all possible next states <br>  nextStates = findAllPossibleNextStates(currentState); <br>  // choose the next state that is closest to the goal state <br>  bestState = null; <br>  for (state in nextStates) { <br>    if (isCloserToGoal(state, bestState)){ <br>    bestState = state; <br>    } <br>  } <br>  return bestState; <br>}</pre><p>The pseudo code for the chooseNextState() method illustrates how to pick the next state that is closest to the target state. We begin by listing every scenario that might happen after the current condition. Then, we determine if the potential next state is closer to the goal state than the previous one by comparing it to the best state we have so far. If so, we change the best state to make it equal in value to the new state. We leave you with the best state we could discover.</p><p>The aforementioned pseudocode illustrates how a greedy algorithm works in general. But it’s important to keep in mind that not all problems can be solved by a greedy algorithm.</p><h3><strong>Limitations of Using Greedy Algorithms</strong></h3><p>Using a greedy algorithm has the largest disadvantage of maybe failing to find the optimal response to a question. In other words, it might not produce the best outcome. Additionally, greedy algorithms can be very sensitive to changes in input data, even a small change can have a completely different effect.</p><p><strong>Example 1:</strong></p><p>The number of nodes within each node adds to the overall length of the graph in the graph below, where a greedy algorithm is attempting to discover the longest path across the network. At each algorithmic step, it chooses the greatest integer to do this. It is immediately obvious from a glance at the graph that this method will not yield the right answer. What is the ideal response? Why might this problem not be a good fit for a greedy algorithm?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*xpQ_iVR5zwOAIE0w.gif" /><figcaption>src: <a href="https://brilliant.org/wiki/greedy-algorithm/">https://brilliant.org/wiki/greedy-algorithm/</a></figcaption></figure><p>The correct solution for the longest path through the graph is 7,3,1,997,3,1,99. This is clear to us because we can see that no other combination of nodes will come close to a sum of 9999, so whatever path we choose, we know it should have 9999 in the path. There is only one option that includes 9999: 7,3,1,997,3,1,99.</p><p>Because it only considers the best solution at any given time — choosing the greatest integer at each step — the greedy algorithm is unable to solve this problem. However, the algorithm might choose a path that avoids the huge number since there might be one that it hasn’t encountered yet. Sometimes the solution to the primary problem does not contain the solutions to the subproblems for finding the largest sum or longest path. Neither the greedy choice nor the ideal substructure attributes apply to this type of problem.</p><p><strong>Example 2:</strong></p><p>We’ll examine one variation of the knapsack issue in this article. The knapsack problem asks you to select a subset of items from a set of objects in order to maximise a certain value, such as the items’ worth, size, or the ratio of worth to size.</p><p>We will assume for the purposes of this problem that we can only take an object in its entirety and cannot take any percentage of it. We’ll also suppose that each item is the only one there is. We must carefully select the products we bring because our backpack has a certain size and we want to maximise their value.[3]</p><p>Our knapsack can hold at most 25 units of space.</p><p>Here is the list of items and their worths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*Msj-MYaeOXcgkVYjARQkFg.png" /></figure><p>Which items do we choose to optimize for price?</p><p>There are two greedy algorithms we could propose to solve this. One has a rule that selects the item with the largest price at each step, and the other has a rule that selects the smallest sized item at each step.</p><ul><li>Largest-price Algorithm: At the first step, we take the laptop. We gain 1212 units of worth, but can now only carry 25−22=325−22=3 units of additional space in the knapsack. Since no items that remain will fit into the bag, we can only take the laptop and have a total of 1212 units of worth.</li><li>Smallest-sized-item Algorithm: We will start by using the basketball, which is the smallest object. We now have 66 units of value and 257=1825–7=18 units of storage space in our bag. The textbook is the next smallest object we choose. This leaves us with 18–9=918–9=9 units of space and a total of 6+9=156+9=15 units of value. We can accept no more goods since none of the remaining items take up 99 units of space or less.</li></ul><p>The answers produced by the greedy algorithms provide us 1212 and 1515 units of value. However, neither of these represents the best option. Check the table out for yourself to see if you can find a better assortment of products.</p><p>A textbook and a PlayStation cost 9+9=189+9=18 units of value and 10+9=1910+9=19 units of space, respectively. Since the greedy choice and optimal substructure properties do not hold, it is clear that a greedy algorithm will not be able to resolve the knapsack problem.</p><blockquote><strong>In problems where greedy algorithms fail, dynamic programming might be a better approach.</strong></blockquote><h3>Applications of Greedy Algorithm</h3><ul><li><strong>Dijkstra’s Algorithm:</strong></li></ul><p>To determine the shortest route between two nodes in a network, use Dijkstra’s method. The program calculates an estimated distance between two nodes and maintains a list of undiscovered nodes. If the algorithm finds a faster way to get to a specific node, the path is updated to reflect the shorter distance. If A is connected to B and B is connected to C, and if the path must travel via A and B to get to the destination C, then the shortest path from A to B and the shortest path from B to C must be a component of the shortest path from A to C. The optimization substructure for this issue is adequate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/0*zWfuLN7aPMuXywgw.gif" /><figcaption>src: <a href="https://brilliant.org/wiki/greedy-algorithm/">https://brilliant.org/wiki/greedy-algorithm/</a></figcaption></figure><ul><li><strong>Used for Constructing Minimum Spanning Trees:</strong></li></ul><p>The greedy algorithms Prim’s and Kruskal’s are used to build minimal spanning trees.</p><ul><li><strong>Used to Solve Optimization Problems:</strong></li></ul><p>Classic optimisation issues that may be addressed using a greedy algorithmic paradigm include the Graph — Map Colouring, Graph — Vertex Cover, Knapsack Problem, Job Scheduling Problem, and Activity Selection Problem.</p><ul><li><strong>Used to Implement Huffman Encoding:</strong></li></ul><p>Another method where a greedy strategy works well is Huffman encoding. The Huffman algorithm analyses a message and, depending on the frequency of the characters used in the message, assigns a variable-length encoding for each symbol. A symbol that is used more frequently will have a shorter encoding than one that is used less frequently, and vice versa.</p><p>The Huffman coding algorithm collects information on the likelihood or frequency of a certain symbol occurring. It constructs the prefix tree from the bottom up, starting with the two least probable symbols in the list. It takes those symbols, uses them to form a subtree, and then independently executes each symbol on the list.After adding the probabilities of each subtree member, the process adds the subtree and its probability to the list. The method selects the two symbols or subtrees with the lowest probability after scanning the list. These are employed to construct a fresh subtree, which is then included in the list along with its probability. The list is then updated by removing the preceding subtrees and symbols. Up till all the elements have been added, this cycle is repeated. The best encoding for each symbol is constructed at each subtree and combined with other optimal encodings to form the overall optimal encoding.</p><h3>References:</h3><ol><li><a href="https://www.geeksforgeeks.org/greedy-algorithms/">https://www.geeksforgeeks.org/greedy-algorithms/</a></li><li><a href="https://www.simplilearn.com/tutorials/data-structure-tutorial/greedy-algorithm">https://www.simplilearn.com/tutorials/data-structure-tutorial/greedy-algorithm</a></li><li><a href="https://brilliant.org/wiki/greedy-algorithm/">https://brilliant.org/wiki/greedy-algorithm/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16545cbab4b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS EKS and Google Cloud Functions]]></title>
            <link>https://medium.com/@shravan.raina20/aws-eks-and-google-cloud-functions-631821a47b8f?source=rss-2123d08b01fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/631821a47b8f</guid>
            <category><![CDATA[eks-cluster]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[google-cloud-functions]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Shravan Raina]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 18:45:22 GMT</pubDate>
            <atom:updated>2023-05-05T04:37:34.500Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Authors: </strong>Shravan Raina, Sanjyot Kotgire, Somanshu Bhat, Saksham Sharma</blockquote><h3><strong>1. Elastic Kubernetes Service (EKS)</strong></h3><p>Amazon EKS is a managed service that makes it easier to run Kubernetes on AWS. With EKS, businesses may operate Kubernetes without setting up and maintaining a control plane or worker nodes. In essence, EKS is a managed containers-as-a-service (CaaS) that makes deploying Kubernetes on AWS quite simple. The simplest approach to understand EKS is to see it as an AWS Kubernetes-as-a-Service offering. EKS greatly simplifies the administration and maintenance of highly available Kubernetes clusters in AWS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*joc0MWitonlbXZs0fYVSQQ.png" /><figcaption>src: <a href="https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html">https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html</a></figcaption></figure><p><strong>What is Kubernetes?</strong></p><p>Kubernetes is an open-source system that lets organizations deploy and manage applications like batch processing workers, platforms as a service (PaaS), and microservices in the cloud.</p><p>Development teams can let Kubernetes manage a variety of tasks, such as load balancing, monitoring and controlling resource consumption by team or application, limiting resource consumption and utilizing additional resources from new hosts added to a cluster, as well as other workflows, through an abstraction layer created on top of a group of hosts.</p><p>Without needing to install or administer Kubernetes itself, organizations using Amazon EKS can use all of its features.</p><h3><strong>Amazon EKS Features</strong></h3><p><strong>Managed Kubernetes Clusters</strong></p><p>Amazon Elastic Kubernetes Service (EKS) is a managed Kubernetes service that does not require you to install, and maintain your own Kubernetes control plane. Amazon EKS is compatible with current apps that are already running on upstream Kubernetes.</p><p>The Kubernetes control plane nodes, which are in charge of starting and stopping containers, planning container schedules on virtual machines, storing cluster data, and other duties, are managed by Amazon EKS for availability and scalability. Each cluster’s unhealthy control plane nodes are immediately found and replaced by Amazon EKS.</p><p>You can use Amazon EKS to benefit from all the performance, scale, reliability, and availability of the AWS platform as well as integrations with AWS networking and security services, such as Application Load Balancers for load balancing, Identity Access Manager (IAM) for role-based access control, and Virtual Private Cloud (VPC) for pod networking.</p><p><strong>Managed Control Plane</strong></p><p>The Control Plane can not be directly managed by organizations and can be fully managed by AWS.</p><p>The control plane has three Kubernetes master nodes that are deployed across three distinct availability zones (AZs). All incoming traffic to the Kubernetes API passes through the network load balancer (NLB), which is hosted on an Amazon-managed virtual private cloud.</p><p>Across numerous AWS availability zones, Amazon EKS offers a highly accessible control plane. The etcd persistence layer and the Kubernetes API servers’ scaling and availability are automatically managed for each cluster by the Amazon EKS service. Amazon EKS automatically detects and replaces unhealthy masters while running the Kubernetes control plane across three Availability Zones to achieve high availability.</p><p><strong>Managed worker nodes</strong></p><p>You may build, update, or terminate worker nodes for your cluster with only one command. In order to maintain the availability of your applications, the nodes are managed by node groups running the most recent EKS-optimized AMIs in your Amazon account.</p><p><strong>Launching using eksctl</strong></p><p>An open source command-line utility called eksctl aids in using Amazon EKS. Simply use the eksctl create cluster command to set up an Amazon EKS cluster, and your application will be ready to start.</p><p><strong>Networking and Security</strong></p><p>With cutting-edge capabilities and connectors to AWS services and tech partner solutions, Amazon EKS has made it simple to secure your Kubernetes clusters. For instance, Amazon VPC hides your Kubernetes clusters from other customers and IAM offers access control.</p><h3><strong>AWS IAM Authenticator</strong></h3><p>The native role-based access control system for Kubernetes, Kubernetes RBAC, and AWS IAM Authenticator are combined with the aid of Amazon EKS. You may manage access rights to your Kubernetes masters by explicitly assigning RBAC roles to each IAM object.</p><p>Your Kubernetes service accounts can have IAM permissions granted using Amazon EKS. The IAM role can manage access to other services, external cluster-facing Amazon resources like databases and secrets, as well as third-party services and AWS-non-hosted apps. When hosting clusters with several co-located services, this allows you a tight access control and makes it simple to optimize costs and availability for the cluster.</p><h3><strong>Load Balancing</strong></h3><p>Elastic Load Balancing, Application Load Balancing, Network Load Balancing, and Traditional Load Balancing are all supported by Amazon EKS.<br>Companies can use any Kubernetes supported ingress controller or the basic Kubernetes cluster load balancing with an Amazon EKS cluster.</p><h3><strong>Logging</strong></h3><p>The user and cluster activity is generally visible and recorded by Amazon CloudTrail. The CloudTrail additionally provides documentation for API calls to the EKS API.</p><h3><strong>Managed Cluster Updates</strong></h3><p>Running clusters may be easily updated to the most recent Kubernetes version using Amazon EKS without the need to handle the update procedure. There is no need to construct new clusters or move apps to a new cluster because Kubernetes version changes are performed on-the-fly.<br>AWS supports three stable Kubernetes versions as part of the update process at any given moment, with additional versions being issued when they are certified for usage with Amazon EKS. With the SDK, CLI, or Amazon Console, you may start the installation of new versions and learn more about the status of in-flight upgrades.</p><h3><strong>2. Google Cloud Functions</strong></h3><p><strong>What are Cloud Functions?</strong></p><p>The cloud functions platform is incredibly useful for a certain set of issues. Google Cloud Functions is an environment without servers where cloud services can be built and connected.<br>With the help of Google’s Functions-as-a-Service (FaaS) cloud platform, developers may create serverless solutions that interface with other services and APIs, IoT back ends, and other services. Using Cloud Functions, a user can create straightforward, one-purpose functions that can be linked to events sent by cloud infrastructure and services. When a watched event fires, the user’s cloud function is activated. The user’s code runs in a completely controlled environment. No infrastructure to be set up, and server management is not necessary.</p><h3><strong>Types of Google Cloud Functions</strong></h3><p>Triggers are a type of external event that call cloud functions into action. The platform will use the function when the event takes place. Depending on the kind of trigger used to initiate them, functions can be divided into two groups:</p><p><strong>HTTP functions (Synchronous)</strong></p><p>These functions are directly invoked via a HTTP endpoint that is provided for user’s function.</p><p><strong>Background functions (Asynchronous)</strong></p><p>These are indirectly invoked via an event that triggers user’s function. These functions can be triggered based on Pub/Sub messages.</p><h3><strong>Why Google Cloud Functions?</strong></h3><p>Running code on the cloud is simple with cloud functions. No servers need to be installed, maintained, patched, or updated while using Cloud Functions. Also, there is no need to install new operating systems or provision virtual machines. Functions scale automatically and are fault-tolerant and highly available. For developing serverless backends, doing real-time data processing, and developing intelligent apps, cloud functions are fantastic. The developer interface for Cloud Functions is straightforward and easy to use. The operational infrastructure for the code is handled by Google Cloud. To simplify complex orchestration issues, these functions can be linked to Google Cloud or other third-party cloud services using triggers.</p><h3><strong>Cold Start</strong></h3><p>The drawback of using Google cloud Functions is that. A cold start occurs because the user does not always rent out a fully loaded server. It is necessary for the Google infrastructure to load the Google Cloud function because it is not currently stored in memory. A cold start is what’s happening here. As a result, the server experiences some strain and must briefly delay the request. This wait could last between 400 and 500 milliseconds, depending on the architecture and the function’s function.</p><h3><strong>Using Google Cloud Functions:</strong></h3><p><strong>Step 1: Writing Cloud Functions</strong></p><p>Node.js, Python, Go, Java, and.NET are just a few of the programming languages that can be used to create and execute Cloud Functions. Depending on the user’s preferred runtime, the Cloud Functions execution environment differs. The runtime overview pages provide further details about each runtime environment:</p><p><strong>HTTP functions</strong></p><p>Standard HTTP requests call HTTP functions. These HTTP queries enable basic Hyper Text Transfer Protocol request methods like GET, PUT, POST, DELETE, and OPTIONS while they wait for a response. When using Cloud Functions, a TLS certificate is immediately provisioned so that all HTTP functions can be called via a secure connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*lkYbj-krIGm_5yJcXatb4g.png" /><figcaption>src: <a href="https://cloud.google.com/functions/docs/writing/write-http-functions">https://cloud.google.com/functions/docs/writing/write-http-functions</a></figcaption></figure><p><strong>Event Driven Functions</strong></p><p>Cloud Functions uses event-driven functions to handle events from the Cloud infrastructure, such as messages on a Pub/Sub topic, or changes in a Cloud Storage bucket.</p><p>There are 2 types of event driven functions:</p><ul><li><strong>Cloud event functions: </strong>CloudEvent functions are event-driven functions created for the.NET Cloud Functions runtime.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*mrlyX4OiopXX7cqgynjfiw.png" /><figcaption>src: <a href="https://cloud.google.com/functions/docs/writing/write-event-driven-functions">https://cloud.google.com/functions/docs/writing/write-event-driven-functions</a></figcaption></figure><ul><li><strong>Background functions: </strong>Background functions are event-driven functions created for the Node.js, Python, Go, and Java Cloud Functions runtimes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*AD3vT-31kSb8UHtwBBygVA.png" /><figcaption>src: <a href="https://cloud.google.com/functions/docs/writing/write-event-driven-functions">https://cloud.google.com/functions/docs/writing/write-event-driven-functions</a></figcaption></figure><p><strong>Step 2: Deploying Cloud Functions</strong></p><p>An archive containing the source code for a user’s function is uploaded to a Google Cloud Storage bucket during a deployment. After the source code has been uploaded, Cloud Build instantly creates a container image from the user’s code and sends it to the Container Registry. That image is used by Cloud Functions to build the container that runs the user’s function.</p><p>User can deploy Cloud Functions from its local machine, from GitHub or Bitbucket source repository (via Cloud Source Repositories), or from the Cloud Functions API directly.</p><ol><li>Deploying from Local Machine</li><li>Deploying from Source Control</li><li>Deploying from Cloud Console</li><li>Deploying from the Cloud functions API</li></ol><p>Depending on the user’s runtime, Cloud Functions looks for explicit files while deploying. Before the user’s function deployment is complete, Cloud Functions will send the user’s function a test request to confirm that it was deployed successfully.</p><p>When the user deploys function, it is displayed with in the Cloud Console, as shown below. In particular, note the Name and Executed Function fields:</p><ul><li>The Name field is the registered name the user assigns to its function.</li><li>The Executed Function field is the name of the actual function in user’s source code that is executed when the deployed function is called.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fBeWeXa9LCh_aC-GGjyIUw.png" /><figcaption>src: <a href="https://cloud.google.com/functions/docs/deploy">https://cloud.google.com/functions/docs/deploy</a></figcaption></figure><h3><strong>References:</strong></h3><ol><li><a href="https://cloud.google.com/">https://cloud.google.com/</a></li><li><a href="https://en.wikipedia.org/wiki/Google_Cloud_Platform">https://en.wikipedia.org/wiki/Google_Cloud_Platform</a></li><li><a href="https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html">https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html</a></li><li><a href="https://kubernetes.io/docs/concepts/overview/what-is-kubernetes">https://kubernetes.io/docs/concepts/overview/what-is-kubernetes</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=631821a47b8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Garbage Collection in Java]]></title>
            <link>https://medium.com/@shravan.raina20/garbage-collection-in-java-cb39d80bc5a0?source=rss-2123d08b01fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb39d80bc5a0</guid>
            <category><![CDATA[garbage-collection]]></category>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Shravan Raina]]></dc:creator>
            <pubDate>Tue, 24 May 2022 13:30:12 GMT</pubDate>
            <atom:updated>2022-06-12T13:48:33.427Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Authors: </strong>Shravan Raina, Aditya Sabde, Sanjyot Kotgire, Rutuja Shinde, Saksham Sharma</blockquote><p><strong>What is Garbage Collection?</strong></p><p>Java Garbage Collection is an automatic process during which the JVM or the Java Virtual Machine inspects the object on the heap and checks if the object is still referenced and if the object is no longer needed, it releases the memory used by that object. The main objective of the Garbage Collector is to free the heap memory by destroying the objects that are no longer used.</p><p><strong>How does Java Garbage Collection Work?</strong></p><p>The garbage collector makes a short pause in the application in order to clean the memory. The first step is when the JVM threads are started and the application code is running. At a certain time, an event happens that triggers garbage collection. Now, it needs to clean up the memory and for that the application threads need to be stopped. The garbage collection then marks the objects which are no longer in use and destroys those objects and reclaims the memory. Heap resizing can also happen if possible. Then, the process starts again and the application threads are started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jbH3TKaj2zzeuM_IjmpbPQ.jpeg" /><figcaption>Source: <a href="https://sematext.com/blog/java-garbage-collection/">https://sematext.com/blog/java-garbage-collection/</a></figcaption></figure><p><strong>How to request JVM to run Garbage Collection?</strong></p><p>The best thing about Java garbage collection is that it is automatic. When the Java Virtual Machine decides that it’s time to start reclaiming the space on the heap and throwing away unused objects, it will just start the garbage collection process.</p><p><strong>There are 4 basic operations of any Garbage Collector:</strong></p><ol><li>Object Memory Allocation</li><li>Find the objects that are still in use</li><li>Free the objects which are not in use</li><li>Compact the memory to prevent memory fragmentation</li></ol><p><strong>The JVM heap memory is divided into generations:</strong></p><ol><li><strong>Young Generation</strong> which contains Eden space and Survivor space</li><li><strong>Old generation</strong> (or Tenured space)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*etMFV7s7mX4zgco4d7plJQ.jpeg" /><figcaption>Source: <a href="https://sematext.com/blog/java-garbage-collection/">https://sematext.com/blog/java-garbage-collection/</a></figcaption></figure><p><strong>Heap Memory Model:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*Jnky481XU-DdNyiHGNLDlQ.png" /><figcaption>Source: <a href="https://medium.com/javarevisited/jvm-garbage-collection-basics-edce6791ae98">https://medium.com/javarevisited/jvm-garbage-collection-basics-edce6791ae98</a></figcaption></figure><p><strong>Young Generation:</strong></p><p><strong>Eden:</strong></p><ul><li>All the objects are allocated in the eden space which represents the vast majority of the young generation.</li><li>All the objects present in the Eden space are either moved or discarded when the young generation is cleared during a collection. The objects which are not in use are discarded and the objects which are still in use are moved either to one of the survivor spaces or to the old generation.</li><li>After all the surviving objects are moved, the young generation is automatically compacted when it is collected. At the end of the collection, Eden and one of the survivor spaces are empty and also the objects that remain in the young generation are compacted within the other survivor space.</li></ul><p><strong>Survivor Spaces:</strong></p><ul><li>Survivor spaces are used to allow objects to remain in the young generation for a few garbage collection cycles. This increases the probability that the object will be free before it is moved to the old generation.</li><li>Objects are directly promoted into the old generation if the survivor spaces are too small and this in turn causes more garbage collection cycles.</li><li>To handle this situation, we can increase the size of the heap or at least we can increase the size of the young generation and allow the Java Virtual Machine to handle the survivor spaces.</li><li>In rare cases, adjusting the tenuring threshold or survivor space sizes can prevent promotion of objects into the old generation.</li></ul><p><strong>Old (or Tenured) Generation:</strong></p><ul><li>As objects are moved into the old generation, soon it will also fill up and the JVM will need to find the objects which are no longer in use and discard them.</li></ul><p><strong>MetaSpace:</strong></p><ul><li>Metaspace is a separate heap space which is used to keep a track of the metadata about the classes which are loaded by the Java Virtual Machine.</li><li>The information in the metaspace is used only the the compiler and the JVM runtime. The data it holds is known as class metadata.</li><li>Metaspace does not hold the actual instance of the class, or reflection objects (e.g., Method objects), those are held in the regular heap.</li></ul><p><strong>Types of Garbage Collectors:</strong></p><p>The JVM provides 4 different garbage collectors. Each one of them has its own advantages as well as limitations.</p><p><strong>The four types of Garbage Collectors are:</strong></p><ol><li><strong>Serial Garbage Collector (GC):</strong> The serial garbage collector is used for single threaded environments. It freezes all the application threads before doing garbage collection and because of that it is not suited for multi-threaded environments like server side applications, etc. But, it can be used for single-threaded applications that don’t require low pause time like batch jobs, etc.</li><li><strong>Parallel/Throughput GC:</strong> The parallel garbage collector (Throughput collector) is very similar to the serial garbage collector. It also freezes the application threads when doing garbage collection. It works on multiprocessor environments and multi-threaded applications with medium and large-sized data. Multiple threads are used to make garbage collection faster for such use cases.</li><li><strong>CMS Collector:</strong> The Concurrent Mark Sweep(CMS) garbage collector performs expensive operations using multiple threads. They also share the threads used for GC with the application. The CMS GC is designed for the applications which prefer short pauses. It is slower as compared to Serial or Parallel garbage collector but it doesn’t have to stop the application threads to perform garbage collection.</li><li><strong>G1 Collector: </strong>The G1 garbage collector was introduced with the 4th update of the 7th version of Java. It was designed to be low latency i.e. it has to do more work i.e. it spends more CPU cycles in garbage collection. G1 collector partitions the heap into smaller fragments for easier garbage collection. The objects are moved out of the cleared region and copied to another region. Most of the garbage collection by the G1 collector is done in the young generation.</li><li><strong>Z Garbage Collector: </strong>The Z garbage collector is an experimetal garbage collection technique which is still not available on all platforms like Windows and MacOS. It is designed to be a very scalable low latency implementation and performs expensive garbage collection concurrently without stopping the application threads.</li></ol><p><strong>Advantages of Garbage Collection:</strong></p><ul><li>The first advantage of Java garbage collection is that it automatically<strong> </strong>deletes the unused objects that are inaccessible to free up the memory resources.</li><li>It makes Java memory-efficient. It is because the garbage collector automatically removes the unreferenced objects from the heap memory.</li><li>Garbage collection is automatically done by the garbage collector which is a part of the Java Virtual Machine.</li></ul><p><strong>References:</strong></p><ol><li><a href="https://medium.com/javarevisited/jvm-garbage-collection-basics-edce6791ae98">https://medium.com/javarevisited/jvm-garbage-collection-basics-edce6791ae98</a></li><li><a href="https://sematext.com/blog/java-garbage-collection/">https://sematext.com/blog/java-garbage-collection/</a></li><li><a href="https://www.edureka.co/blog/garbage-collection-in-java/">https://www.edureka.co/blog/garbage-collection-in-java/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb39d80bc5a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>