Found 10784 Articles for Python

Finding All Occurrences of a substring in a Python string

Pranavnath
Updated on 25-Aug-2023 13:34:30

3K+ Views

The strings are composed of characters and initialized in the code using simple or double quotes and substring is also a character present inside a string. Python is a versatile and high-level language that can be understood easily by the user. In this article, all the occurrences of the substring are found in a string using Python language can be done with various methods. Some common methods are index() method, in the operator, find() method, and use a regular expression method. Finding All Occurrences of a substring in a Python string The substrings are the characters of a string and ... Read More

Python3 Program for Longest subsequence of a number having same left and right rotation

Shubham Vora
Updated on 25-Aug-2023 17:02:30

59 Views

In this problem, we will find the length of the longest subsequence of the given string such that it has the same left and right rotation. We can solve the problem by finding all subsequences of the given string and checking whether particular subsequences have the same left and right rotation. The other approach uses the observation that string can have only the same left and right rotation if it contains a single character or alternate character and the left is even. Problem statement – We have given an alpha string containing only numeric digits. We need to find ... Read More

Python3 Program to Find Maximum number of 0s placed consecutively at the start and end in any rotation of a Binary String

Shubham Vora
Updated on 25-Aug-2023 16:04:27

70 Views

In this problem, we will write the Python code to count the maximum sum of consecutive zeros at the start and end of the string. The problem solution can be divided into two parts. The first part is finding all rotations of the string. The second part is finding the starting and ending consecutive zeros in all rotations of the binary string. Another way to solve the problem is that counting the maximum consecutive zeros can answer the problem. Problem statement – We need to find the total number of maximum consecutive zeros at the start and end ... Read More

Python3 Program for Queries for Rotation and Kth Character of the given String in Constant Time

Shubham Vora
Updated on 25-Aug-2023 15:57:46

50 Views

In this problem, we need to perform the queries according to the given rules and print the characters from the updated string. We will solve the problem using two different approach. In the first approach, we will use the string rotation concept, and in the second approach, we will use the index customization approach. Problem statement – The task given to us is that perform given queries on the string. We have given the array of queries, and each query contains two integers. Follow the below statements to perform the given queries on the string. (1, l) – ... Read More

Robotics Process Automation - An Introduction

Mithilesh Pradhan
Updated on 27-Aug-2023 13:05:28

222 Views

Introduction Robotic Process Automation (RPA) is a technology that can mimic the actions of human beings regarding their interaction with software systems and digital systems. With Robotic Process automation building, managing, and deploying such tools and software becomes extremely easy. Such technology is primarily used by business processes. Robotic Process Automation − A wider picture Different types of Robotic Process Automation There are three types of RPA software. Attended Robotic Process Automation − It requires very less human intervention Unattended Robotic Process Automation − It required no human intervention Hybrid Robotic Process Automation − It combines both ... Read More

Cost function in Logistic Regression in Machine Learning

Mithilesh Pradhan
Updated on 27-Aug-2023 12:49:31

768 Views

Introduction Logistic Regression is the simplest of all classification algorithms in Machine Learning. Logistic Regression uses log loss or cross−entropy loss instead of mean squared error for loss function. Since we already have linear regression why do we need Logistic Regression for classification and why can't use Linear Regression for classification? Let us understand this fact through this article and explore the cost function used in Logistic Regression in detail. Why do we need Logistic Regression and can't use Linear Regression? In Linear Regression, we predict a continuous value. If we fit Linear Regression to the classification task, the line ... Read More

Combining IoT and Machine Learning makes our future smarter

Mithilesh Pradhan
Updated on 27-Aug-2023 12:42:15

61 Views

Introduction The Internet of Things (IoT) is the network of embedded devices, smart devices, and computers infused with sensors that can communicate with each other as well as send and receive packets of data through the network. These devices can communicate with the real world through sensors and can control or move a system using actuators that are the heart of an IoT system. Machine learning and IoT have a very association in the sense that many organizations using machine learning and Ai based applications rely on terabytes of data captured through IoT and embedded devices. This da can be ... Read More

Boosting in Machine Learning | Boosting and AdaBoost

Mithilesh Pradhan
Updated on 27-Aug-2023 12:40:24

308 Views

Introduction Boosting is a class of ensemble modeling algorithms where we build a strong model from several weak models. In boosting all the classifiers are present in series. First, a single model is trained on the actual training data. Then the second classifier is built which is trained on the errors produced by the first model and it tries to correct the errors produced by the previous model. This process is repeated continuously and new models are added till there are non−errors and the prediction on training data is accurate or we have reached the maximum threshold of models to ... Read More

Gradient Descent in Linear Regression

Jay Singh
Updated on 24-Aug-2023 12:36:24

296 Views

The use of linear regression is a useful technique for figuring out and examining the relationship between variables. Predictive modeling relies on it and uses it as the cornerstone for many machine learning techniques. Machine learning requires a lot of optimization. It is comparable to improving a model to provide it with the best performance. Gradient descent, a key technique in optimization, enters the picture at this point. Consider it as a trustworthy ally that will help us navigate the vast array of potential model parameters to find the optimal ones. Gradient descent allows us to iteratively change these ... Read More

Training of ANN in Data Mining

Jay Singh
Updated on 24-Aug-2023 12:32:07

187 Views

In the field of data mining, training artificial neural networks (ANNs) is extremely important. ANNs are potent computer models that draw inspiration from the complex operations of the human brain. ANNs have revolutionized data science, machine learning, and artificial intelligence through their capacity to spot patterns, learn from data, and predict the future. Extraction of insightful information from sizable and complicated datasets is what data mining, a crucial aspect of these disciplines, entails. By training ANNs, data scientists and practitioners can make use of the network's ability to unearth obscure patterns, spot trends, and create prediction models that might radically ... Read More

Advertisements