AmitDiwan has Published 10740 Articles

Delete an element from array using two traversals and one traversal in C++?

AmitDiwan

AmitDiwan

Updated on 16-Jan-2021 06:48:41

140 Views

Two Traversals Let us first define the original array and the element to be searched and deleted from the array −int ele = 5; int arr = [1,2,3,4];Now we loop in the array to find the given element −for (i=0; i

Set user-defined variable with table name in MySQL prepare statement?

AmitDiwan

AmitDiwan

Updated on 05-Jan-2021 06:41:34

3K+ Views

Let us first create a table −mysql> create table DemoTable (    StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    StudentName varchar(20) ); Query OK, 0 rows affected (0.71 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(StudentName) values('Chris'); Query OK, 1 row affected (0.21 sec) ... Read More

Discuss broadcasting in Numpy in Python?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 11:34:09

202 Views

NumPy refers to ‘Numerical’ ‘Python’. It is a library that contains multidimensional array objects and multiple methods that help in processing the arrays.NumPy can be used to perform a wide variety of operations on arrays. It is used in conjunction with packages like SciPy, Matplotlib and so on. NumPy+Matplotlib can ... Read More

How can a specific tint be added to grayscale images in scikit-learn in Python?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 11:33:00

385 Views

The values of ‘R’, ‘G’, and ‘B’ are changed and applied to the original image to get the required tint.Below is a Python program that uses scikit-learn to implement the same. Scikit-learn, commonly known as sklearn is a library in Python that is used for the purpose of implementing machine ... Read More

What is hysteresis thresholding? How can it be achieved using scikit-learn in Python?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 11:31:58

2K+ Views

Hysteresis refers to the lagging effect of a result. With respect to threshold, hysteresis refers to the areas that are above a specific low threshold value or above high threshold values. It refers to areas that are highly-confident in nature.With the help of hysteresis, the noise outside the edges of ... Read More

How can scikit learn library be used to upload and view an image in Python?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 11:30:33

411 Views

Pre-processing data refers to cleaning of data, removing invalid data, noise, replacing data with relevant values and so on. This doesn’t always mean text data; it could also be images or video processing as well.Data pre-processing basically refers to the task of gathering all the data (which is collected from ... Read More

What are the different kinds of gradient descent algorithms in Machine Learning?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 11:29:06

830 Views

The idea behind using gradient descent is to minimize the loss when in various machine learning algorithms. Mathematically speaking, the local minimum of a function is obtained.To implement this, a set of parameters are defined, and they need to be minimized. Once the parameters are assigned coefficients, the error or ... Read More

How can a polynomial regression model be fit to understand non-linear trends in data in Python?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 11:01:35

199 Views

When regression models are being built, multicollinearity is checked for. This is because we need to understand the correlation present between all different combinations of continuous variables. If multicollinearity exists between the variables, we have to make sure that it is removed from the data.The data in real world is ... Read More

How can SciPy be used to calculate the permutations and combination values in Python?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 11:00:27

707 Views

SciPy can be used to determine the permutation and combination with respect to two values.A function named ‘perm’ present in the class ‘special’ in ‘SciPy’ is used.Syntax of ‘perm’ functionscipy.special.perm(N, k)Performing permutation on a set of values has been shown belowExample Live Demofrom scipy.special import perm my_permute = perm(6, 2, exact ... Read More

How can ‘implot’ function be used to fit values to data if one of the variables is a discrete value in Python?

AmitDiwan

AmitDiwan

Updated on 11-Dec-2020 10:59:15

247 Views

When regression models are being built, multicollinearity is checked for. This is because we need to understand the correlation present between all different combinations of continuous variables. If multicollinearity exists between the variables, we have to make sure that it is removed from the data.This is where functions ‘regpot’ and ... Read More

Advertisements