1597378680

This Article is in the continuation of my **Previous Article** in which I have shown you How Multiple Linear Regression is prepared and using the information obtained from its diagnostic plot, how we proceed towards Orthogonal Polynomial Regression and obtain a better model for the given data set (I have used Advertising Data Set).

In the previous article, I have created Orthogonal Polynomial model to avoid the problem of multicollinearity. But now, In this article **I will first create problem of multicollinearity by introducing polynomial features of predictors TV and Radio and then show you how to tackle this multicollinearity problem using Ridge, Lasso and Elastic-Net Regression techniques**.

This Article consists of the following sections -

- Loading Required Libraries
- Loading Outlier Free Data set
- Recap (of Previous Article)
- Creating Multicollinearity Problem
- Fitting Polynomial Regression (Note : Not Orthogonal Polynomial)
- Checking Assumptions
- Making Predictions Using Polynomial Regression Model
- Average Performance of Polynomial Regression Model
- Comparison Between Polynomial and Orthogonal Polynomial Model
- Data Preparation for further analysis
- Tackling Multicollinearity by Ridge/Lasso/Elastic-Net Regression
- Comparison of Different Models (Polynomial, Orthogonal Polynomial, Ridge, Lasso, Elastic-Net)
- Obtaining Best Model
- Conclusion

I am going to use kaggle online platform for analysis work. You may use any software like R-studio or R-cran version.

It is not necessary to load all libraries in the beginning but I am doing it for simplicity. I am loading one more library **glmnet** for Ridge/Lasso/Elastic-Net Regression.

```
## Loading Libraries
library(tidyverse)
library(caret)
library(car)
library(lmtest)
library(olsrr)
library(glmnet) ## For Ridge/Lasso/Elastic-Net Regression
```

Link to download Outlier free data set already stored in R-objects-

in my previous notebook.

Don’t know how to load data in online kaggle R-session, Read from.here

```
## Loading Outlier free data set
data = read.csv("../input/outlier-free-advertising-data-set/outlier free advertising data.csv" , header = T)
## Loading outlier free train and test data already splitted in previous notebook
train.data1 <- read.csv("../input/traindata1-and-testdata-for-further-analysis/train.data1.csv", header = T)
test.data <- read.csv("../input/traindata1-and-testdata-for-further-analysis/test.data.csv", header = T)
```

#data-science #data-analysis #machine-learning #regression #statistics #data analysis

1593294180

Overview of the differences in 3 common regularization techniques — Ridge, Lasso, and Elastic Net.

#regression #regularization #ridge #lasso #elastic net regressions #.net

1602560783

In this article, we’ll discuss how to use **jQuery Ajax for ASP.NET Core MVC CRUD Operations** using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

To demonstrate CRUD operations – insert, update, delete and retrieve, the project will be dealing with details of a normal bank transaction. GitHub repository for this demo project : https://bit.ly/33KTJAu.

Sub-topics discussed :

- Form design for insert and update operation.
- Display forms in modal popup dialog.
- Form post using jQuery Ajax.
- Implement MVC CRUD operations with jQuery Ajax.
- Loading spinner in .NET Core MVC.
- Prevent direct access to MVC action method.

In Visual Studio 2019, Go to *File > New > Project (Ctrl + Shift + N)*.

From new project window, Select Asp.Net Core Web Application_._

Once you provide the project name and location. Select Web Application(Model-View-Controller) and uncheck *HTTPS Configuration*. Above steps will create a brand new ASP.NET Core MVC project.

Let’s create a database for this application using Entity Framework Core. For that we’ve to install corresponding NuGet Packages. Right click on project from solution explorer, select Manage NuGet Packages_,_ From browse tab, install following 3 packages.

Now let’s define DB model class file – */Models/TransactionModel.cs*.

```
public class TransactionModel
{
[Key]
public int TransactionId { get; set; }
[Column(TypeName ="nvarchar(12)")]
[DisplayName("Account Number")]
[Required(ErrorMessage ="This Field is required.")]
[MaxLength(12,ErrorMessage ="Maximum 12 characters only")]
public string AccountNumber { get; set; }
[Column(TypeName ="nvarchar(100)")]
[DisplayName("Beneficiary Name")]
[Required(ErrorMessage = "This Field is required.")]
public string BeneficiaryName { get; set; }
[Column(TypeName ="nvarchar(100)")]
[DisplayName("Bank Name")]
[Required(ErrorMessage = "This Field is required.")]
public string BankName { get; set; }
[Column(TypeName ="nvarchar(11)")]
[DisplayName("SWIFT Code")]
[Required(ErrorMessage = "This Field is required.")]
[MaxLength(11)]
public string SWIFTCode { get; set; }
[DisplayName("Amount")]
[Required(ErrorMessage = "This Field is required.")]
public int Amount { get; set; }
[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
public DateTime Date { get; set; }
}
```

C#Copy

Here we’ve defined model properties for the transaction with proper validation. Now let’s define DbContextclass for EF Core.

#asp.net core article #asp.net core #add loading spinner in asp.net core #asp.net core crud without reloading #asp.net core jquery ajax form #asp.net core modal dialog #asp.net core mvc crud using jquery ajax #asp.net core mvc with jquery and ajax #asp.net core popup window #bootstrap modal popup in asp.net core mvc. bootstrap modal popup in asp.net core #delete and viewall in asp.net core #jquery ajax - insert #jquery ajax form post #modal popup dialog in asp.net core #no direct access action method #update #validation in modal popup

1603022085

In Supervised Learning, we mostly deal with two types of variables i.e **numerical **variables and **categorical** variables. Wherein **regression** deals with numerical variables and **classification **deals with categorical variables. Where,

Regressionis one of the most popular statistical techniques used for Predictive Modelling and Data Mining in the world of Data Science. Basically,

Regression Analysis is a technique used for determining the relationship between two or more variables of interest.

However, Generally only 2–3 types of total 10+ types of regressions are used in practice. Linear Regression and Logistic Regression being widely used in general. So, Today we’re going to explore following 4 types of Regression Analysis techniques:

**Simple Linear Regression****Ridge Regression****Lasso Regression****ElasticNet Regression**

We will be observing their applications as well as the difference among them on the go while working on Student’s Score Prediction dataset. Let’s get started.

It is the simplest form of regression. As the name suggests, if the variables of interest share a linear relationship, then Linear Regression algorithm is applicable to them. If there is a single independent variable(here, Hours), then it is a **Simple Linear Regression**. If there are more than 1 independent variables, then it is a **Multiple Linear Regression**. The mathematical equation that approximates linear relationship between independent (criterion ) variable X and dependent(predictor) variable Y is:

where, β0 and β1 are intercept and slope respectively which are also known as parameters or model co-efficients.

#data-science #regression-analysis #elastic-net #ridge-regression #lasso-regression

1597378680

This Article is in the continuation of my **Previous Article** in which I have shown you How Multiple Linear Regression is prepared and using the information obtained from its diagnostic plot, how we proceed towards Orthogonal Polynomial Regression and obtain a better model for the given data set (I have used Advertising Data Set).

In the previous article, I have created Orthogonal Polynomial model to avoid the problem of multicollinearity. But now, In this article **I will first create problem of multicollinearity by introducing polynomial features of predictors TV and Radio and then show you how to tackle this multicollinearity problem using Ridge, Lasso and Elastic-Net Regression techniques**.

This Article consists of the following sections -

- Loading Required Libraries
- Loading Outlier Free Data set
- Recap (of Previous Article)
- Creating Multicollinearity Problem
- Fitting Polynomial Regression (Note : Not Orthogonal Polynomial)
- Checking Assumptions
- Making Predictions Using Polynomial Regression Model
- Average Performance of Polynomial Regression Model
- Comparison Between Polynomial and Orthogonal Polynomial Model
- Data Preparation for further analysis
- Tackling Multicollinearity by Ridge/Lasso/Elastic-Net Regression
- Comparison of Different Models (Polynomial, Orthogonal Polynomial, Ridge, Lasso, Elastic-Net)
- Obtaining Best Model
- Conclusion

I am going to use kaggle online platform for analysis work. You may use any software like R-studio or R-cran version.

It is not necessary to load all libraries in the beginning but I am doing it for simplicity. I am loading one more library **glmnet** for Ridge/Lasso/Elastic-Net Regression.

```
## Loading Libraries
library(tidyverse)
library(caret)
library(car)
library(lmtest)
library(olsrr)
library(glmnet) ## For Ridge/Lasso/Elastic-Net Regression
```

Link to download Outlier free data set already stored in R-objects-

in my previous notebook.

Don’t know how to load data in online kaggle R-session, Read from.here

```
## Loading Outlier free data set
data = read.csv("../input/outlier-free-advertising-data-set/outlier free advertising data.csv" , header = T)
## Loading outlier free train and test data already splitted in previous notebook
train.data1 <- read.csv("../input/traindata1-and-testdata-for-further-analysis/train.data1.csv", header = T)
test.data <- read.csv("../input/traindata1-and-testdata-for-further-analysis/test.data.csv", header = T)
```

#data-science #data-analysis #machine-learning #regression #statistics #data analysis

1593001493

Overview of the differences in 3 common regularization techniques — Ridge, Lasso, and Elastic Net.

#regularization #regression #machine-learning #data-science #lasso #programming