1598523180

Scikit-learn is the most useful library for machine learning in Python programming language. It has a lot of tools to build a machine learning model and is quite easy to use too. Yet, we struggle at times to understand some of the very simple methods which we generally always use while building our machine learning model.

One such method is **fit_transform()** and another one is **transform()**. Both are the methods of class **sklearn.preprocessing.StandardScaler() **andused almost together while scaling or standardizing our training and test data.

Photo by Tekton from Unspalsh

The motivation to write this blog came from multiple questions posted on these methods in an online course on Machine Learning.

The question is:

Why we use fit_transform() on training data but transform() on the test data?

We all know that we call fit_transform() method on our training data and transform() method on our test data. But the actual question is why do we do this? My motive is to explain this simple yet confusing point in the simplest possible manner. So let’s get started!

Suppose we are building a k-Nearest Neighbor model and we have to scale our features. The most common way to scale the features is through scikit-learn’s StandardScaler class.

*Note:*

*Data standardization is the process of rescaling the attributes so that they have mean as 0 and variance as 1.**The ultimate goal to perform standardization is to bring down all the features to a common scale without distorting the differences in the range of the values.**In sklearn.preprocessing.StandardScaler(), centering and scaling happens independently on each feature.*

**The magical formula which performs standardization:**

Let’s now deep dive into the concept.

**fit_transform()**

fit_transform() is used on the training data so that we can scale the training data and also learn the scaling parameters of that data. Here, the model built by us will learn the mean and variance of the features of the training set. These learned parameters are then used to scale our test data.

So what actually is happening here! 🤔

#python #scikit-learn #data-science #machine-lear

1618278600

Amilestone for open source projects — French President Emmanuel Macron has recently been introduced to Scikit-learn. In fact, in a recent tweet, Scikit-learn creator and Inria tenured research director, Gael Varoquaux announced the presentation of Scikit-Learn, with applications of machine learning in digital health, to the president of France.

He stated the advancement of this free software machine learning library — “started from the grassroots, built by a community, we are powering digital revolutions, adding transparency and independence.”

#news #application of scikit learn for machine learning #applications of scikit learn for digital health #scikit learn #scikit learn introduced to french president

1622792520

Scikit-Learn is one of the popular software machine learning libraries. The library is built on top of NumPy, SciPy, and Matplotlib and supports supervised and unsupervised learning as well as provides various tools for model fitting, data preprocessing, model selection and evaluation.

**About:** From the developers of Scikit-Learn, this tutorial provides an introduction to machine learning with Scikit-Learn. It includes topics such as problem setting, loading an example dataset, learning and predicting. The tutorial is suitable for both beginners and advanced students.

**About: **In this project-based course, you will learn the fundamentals of sentiment analysis, and build a logistic regression model to classify movie reviews as either positive or negative. You will learn how to develop and employ a logistic regression classifier using Scikit-Learn, perform feature extraction with The Natural Language Toolkit (NLTK), tune model hyperparameters and evaluate model accuracy etc.

**About: **Python Machine Learning: Scikit-Learn tutorial will help you learn the basics of Python machine learning. You will learn how to use Python and its libraries to explore your data with the help of Matplotlib and Principal Component Analysis (PCA). You will also learn how to work with the KMeans algorithm to construct an unsupervised model, fit this model to your data, predict values, and validate the model.

**About: **Edureka’s video tutorial introduces machine learning in Python. It will take you through regression and clustering techniques along with a demo of SVM classification on the famous iris dataset. This video helps you to learn the introduction to Scikit-learn and how to install it, understand how machine learning works, among other things.

**About:** In this Coursera offering, you will learn about Linear Regression, Regression using Random Forest Algorithm, Regression using Support Vector Machine Algorithm. Scikit-Learn provides a comprehensive array of tools for building regression models.

**About:** In this course, you will learn about machine learning, algorithms, and how Scikit-Learn makes it all so easy. You will get to know the machine learning approach, jargons to understand a dataset, features of supervised and unsupervised learning models, algorithms such as regression, classification, clustering, and dimensionality reduction.

**About:** In this two-hour long project-based course, you will build and evaluate a simple linear regression model using Python. You will employ the Scikit-Learn module for calculating the linear regression while using pandas for data management and seaborn for plotting. By the end of this course, you will be able to build a simple linear regression model in Python with Scikit-Learn, employ Exploratory Data Analysis (EDA) to small data sets with seaborn and pandas.

**About: **This tutorial is available on GitHub. It includes an introduction to machine learning with sample applications, data formats, preparation and representation, supervised learning: training and test data, the Scikit-Learn estimator interface and more.

**About:** This is a two-hour long project-based course, where you will understand the business problem and the dataset and learn how to generate a hypothesis to create new features based on existing data. You will learn to perform text pre-processing and create custom transformers to generate new features. You will also learn to implement an NLP pipeline, create custom transformers and build a text classification model.

#developers corner #learn scikit-learn #machine learning library #scikit learn

1591799400

This article will cover:

Why another tutorial on Pipelines?

Creating a Custom Transformer from scratch, to include in the Pipeline.

Modifying and parameterizing Transformers.

Custom target transformation via TransformedTargetRegressor.

Chaining everything together in a single Pipeline.

Link to download the complete code from GitHub.

There’s a video walkthrough of the code at the end for those who prefer the format. I personally like written tutorials, but I’ve had requests for video versions too in the past, so there it is.

#machine-learning #transformers #pipeline #scikit-learn #python

1620778500

Machine learning and Deep learning both are the buzzwords in the tech industry. Machine learning and deep learning both are the subdivision of artificial intelligence technology. If we further breakdown, deep learning is a subdivision of machine learning technology.

If you are familiar with the basics of machine learning and deep learning, it is excellent news!

However, if you are new to the AI field, then you must be confused. What is the difference between machine learning and deep learning?

There is nothing to worry about. This article will explain the differences in easy to understand language.

Machine learning is a branch of technology that studies computer algorithms. These algorithms allow the system to learn from data or improve by itself through experience. Machine learning algorithms make predictions or decisions without being explicitly programmed.

#artificial intelligence #comparison #deep learning #machine learning #machine learning vs deep learning

1598523180

Scikit-learn is the most useful library for machine learning in Python programming language. It has a lot of tools to build a machine learning model and is quite easy to use too. Yet, we struggle at times to understand some of the very simple methods which we generally always use while building our machine learning model.

One such method is **fit_transform()** and another one is **transform()**. Both are the methods of class **sklearn.preprocessing.StandardScaler() **andused almost together while scaling or standardizing our training and test data.

Photo by Tekton from Unspalsh

The motivation to write this blog came from multiple questions posted on these methods in an online course on Machine Learning.

The question is:

Why we use fit_transform() on training data but transform() on the test data?

We all know that we call fit_transform() method on our training data and transform() method on our test data. But the actual question is why do we do this? My motive is to explain this simple yet confusing point in the simplest possible manner. So let’s get started!

Suppose we are building a k-Nearest Neighbor model and we have to scale our features. The most common way to scale the features is through scikit-learn’s StandardScaler class.

*Note:*

*Data standardization is the process of rescaling the attributes so that they have mean as 0 and variance as 1.**The ultimate goal to perform standardization is to bring down all the features to a common scale without distorting the differences in the range of the values.**In sklearn.preprocessing.StandardScaler(), centering and scaling happens independently on each feature.*

**The magical formula which performs standardization:**

Let’s now deep dive into the concept.

**fit_transform()**

fit_transform() is used on the training data so that we can scale the training data and also learn the scaling parameters of that data. Here, the model built by us will learn the mean and variance of the features of the training set. These learned parameters are then used to scale our test data.

So what actually is happening here! 🤔

#python #scikit-learn #data-science #machine-lear