Found 10784 Articles for Python

Find S Algorithm in Machine Learning

Priya Mishra
Updated on 11-Jul-2023 11:33:35

9K+ Views

Machine learning algorithms have revolutionized the way we extract valuable insights and make informed decisions from vast amounts of data, among the multitude of algorithms, the Find-S algorithm stands out as a fundamental tool in the field. Developed by Tom Mitchell, this pioneering algorithm holds great significance in hypothesis space representation and concept learning. With its simplicity and efficiency, the Find-S algorithm has garnered attention for its ability to discover and generalize patterns from labeled training data. In this article, we delve into the inner workings of the Find-S algorithm, exploring its capabilities and potential applications in modern machine ... Read More

Python Program to Splitting String into a Number of Sub-strings

Rohan Singh
Updated on 11-Jul-2023 14:38:21

108 Views

In Python, we can split a string into substrings using the split() method. The split() method is one of the built-in Python string methods that splits a string into a list of substrings based on a specified delimiter. In this article, we will learn how to split strings into substrings with the help of Examples. Splitting String into Substring Method 1: Using the split() method The split() method is a built-in method of strings in Python that splits a string into a list of sub-strings based on a specified delimiter. The delimiter can be any character or string that ... Read More

Python Program to Replace a Character at a Specific Index

Rohan Singh
Updated on 11-Jul-2023 14:31:19

19K+ Views

In Python, we can easily replace a character at a specific index by converting the string into a list of characters using the list() method. Then, we modify the character at the desired index and convert the list back to the string using the join() method. We can also replace a character at a specific index using the slicing and replace method. In this article, we will see examples of replacing a character at a specific index in Python using list and join method, the slicing method and replace method. Method 1: Using list() and join() method Syntax The list() ... Read More

Feature Selection Techniques in Machine Learning

Priya Mishra
Updated on 11-Jul-2023 11:32:28

293 Views

Techniques for feature selection play a vital role in the field of machine learning as they are responsible for identifying the most pertinent and informative features that contribute to model training. In this article, we will delve into a variety of methods employed to select a subset of features from a vast pool of variables. These techniques not only enhance model performance and reduce computational complexity but also improve interpretability. Beginning with traditional approaches like a filter, wrapper, and embedded methods, we will explore advanced algorithms such as genetic algorithms and deep learning-based techniques. What is Feature Selection? Feature ... Read More

Python Program to Print the first letter of each word using regex

Rohan Singh
Updated on 11-Jul-2023 14:28:13

2K+ Views

Regex library in Python is used for pattern matching and manipulation of text data. We can print the first letter of each word using regex by identifying a new word after spaces using its pattern-matching functionality. In this article, we will implement a program to print the first letter of each word using regex. Regular Expressions Regular expression or regex is a tool for pattern matching in text. They are a sequence of characters that define a search pattern. They are widely used in programming, particularly in text processing, and are supported by most programming languages, including Python. Printing ... Read More

Python Program to Determine the Unicode Code Point at a given index

Rohan Singh
Updated on 11-Jul-2023 14:21:54

3K+ Views

A Unicode code point is a unique number that represents a number in the Unicode character set. Unicode is a character encoding standard that is used to assign unique codes to every character in the world. Unicode supports around 130, 000 characters including letters, symbols, and emojis.We can determine the Unicode Code point at a specific index using the ord() function, codecs module in Python, unicodedata module, and array module in Python. In this article, we will discuss how we can determine the Unicode code point at a given index using all these methods. Unicode Code Point According to ... Read More

Python Program to Compare two strings lexicographically

Rohan Singh
Updated on 11-Jul-2023 14:19:53

2K+ Views

We can compare two strings lexicographically in Python using comparison operators like '', '==', ' string2[i]: print(string2, "comes before", string1) break i += 1 else: if len(string1) < len(string2): print(string1, "comes before", string2) elif len(string1) > len(string2): print(string2, "comes before", string1) else: print("The two strings are equal") Output apple comes before banana Example In the below ... Read More

How to Save Pandas Dataframe as gzip/zip File?

Rohan Singh
Updated on 11-Jul-2023 14:16:35

5K+ Views

Pandas dataframe can be saved in gzip/zip format using the gzip and zipfile module in Python. Pandas is a Python library that is used for data manipulation and analysis. It provides a two-dimensional labeled data structure with columns of potentially different data types. To reduce the size of the data frame we need to store it in gzip/zip format. In this article, we will understand how we can save Pandas Dataframe as gzip/zip file. Algorithm A generalized algorithm to save a Pandas DataFrame as a compressed gzip/zip file is written below. However, the exact implementation of this algorithm may vary ... Read More

How to Run Python Flask App Online using Ngrok?

Rohan Singh
Updated on 11-Jul-2023 13:54:17

4K+ Views

Ngrok is a tool that is used to create a secure tunnel between your local machine and the internet. It is used to test the web application and allows developers to expose their local web server to the internet without having to deploy it to a remote server. Python Flask allows you to create web applications locally but we might want to showcase it to the world by running it online. In this article, we will use the Ngrok tool to run the web application online without hosting it on any server. The Steps to Run Python Flask App Online ... Read More

How to run multiple Python files in a folder one after another?

Rohan Singh
Updated on 11-Jul-2023 13:52:19

8K+ Views

The subprocess module can be used to run multiple Python files in a folder one after another. Running multiple files one after another is required in various situations like when processing large data sets or performing complex analysis. In this article, we will discuss the steps involved in running multiple Python files in a folder sequentially with examples. Method 1: Using the subprocess() method Steps for creating and running multiple Python files sequentially Step 1: Create multiple Python files to run We need to have three Python files in a folder to run them sequentially. So the first step ... Read More

Advertisements