Gaurav Leekha has Published 131 Articles

How to implement Random Projection using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:29:24

579 Views

Random projection is a dimensionality reduction and data visualization method to simplify the complexity of highly dimensional data. It is basically applied to the data where other dimensionality reduction techniques such as Principal Component Analysis (PCA) can not do the justice to data. Python Scikit-learn provides a module named sklearn.random_projection ... Read More

How to build Naive Bayes classifiers using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:25:42

2K+ Views

Naïve Bayes classification, based on the Bayes theorem of probability, is the process of predicting the category from unknown data sets. Scikit-learn has three Naïve Bayes models namely, Gaussian Naïve Bayes Bernoulli Naïve Bayes Multinomial Naïve Bayes In this tutorial, we will learn Gaussian Naïve Bayes and Bernoulli ... Read More

How to create a random forest classifier using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:22:46

1K+ Views

Random forest is a supervised machine learning algorithm that is used for classification, regression, and other tasks by creating decision trees on data samples. After creating the decision trees, a random forest classifier collects the prediction from each of them and selects the best solution by means of voting. One ... Read More

How to get dictionary-like objects from dataset using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:19:08

218 Views

With the help of the Scikit-learn python library, we can get the dictionary-like objects of a dataset. Some of the interesting attributes of dictionary-like objects are as follows − data − It represents the data to learn. target − It represents the regression target. DESCR − The description of ... Read More

How to binarize the data using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:16:38

3K+ Views

Binarization is a preprocessing technique which is used when we need to convert the data into binary numbers i.e., when we need to binarize the data. The scikit-learn function named Sklearn.preprocessing.binarize() is used to binarize the data. This binarize function is having threshold parameter, the feature values below or equal ... Read More

How to generate a symmetric positive-definite matrix using Python Scikit-Learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:12:58

2K+ Views

Python Scikit-learn provides us make_spd_matrix() function with the help of which we can generate a random symmetric positive-definite matrix. In this tutorial, we will generate symmetric positive-definite and sparse spd matrices using Scikit-learn (Sklearn) in Python. To do so, we can follow the below given steps − Step 1 − ... Read More

How to generate random regression problems using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:09:59

846 Views

Python Scikit-learn provides us make_regression() function with the help of which we can generate a random regression problem. In this tutorial, we will learn to generate random regression problems and random regression problems with sparse uncorrelated design. Random Regression Problem To generate a random regression problem using Python Scikit-learn, we ... Read More

How to generate and plot classification dataset using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:06:35

3K+ Views

Scikit-learn provides us make_classification() function with the help of which we can plot randomly generated classification datasets with different numbers of informative features, clusters per class and classes. In this tutorial, we will learn how to generate and plot classification dataset using Python Scikit-learn. Dataset with One Informative Feature and ... Read More

How to generate an array for bi-clustering using Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 08:03:14

318 Views

In this tutorial, we will learn how to generate an array with a constant block diagonal structure and with a block checkerboard structure for bi-clustering using Python Scikit-learn (Sklearn). Generating an Array with a Constant Block Diagonal Structure To generate an array with constant block diagonal structure for biclustering, we ... Read More

How to create a sample dataset using Python Scikit-learn?

Gaurav Leekha

Gaurav Leekha

Updated on 04-Oct-2022 07:59:33

628 Views

In this tutorial, we will learn how to create a sample dataset using Python Scikit-learn. There are various built-in scikit-learn datasets which we can use easily for our ML model but sometimes we need some toy dataset. For this purpose, scikit-learn python library provides us a great sample dataset generator. ... Read More

Advertisements