October 2018
Intermediate to advanced
172 pages
4h 6m
English
There are three main metrics that you can use to evaluate the performance of the regression algorithm that you built, as follows:
In this section, you will learn what the three metrics are, how they work, and how you can implement them using scikit-learn. The first step is to build the linear regression algorithm. We can do this by using the following code:
## Building a simple linear regression model#Reading in the datasetdf = pd.read_csv('fraud_prediction.csv')#Define the feature and target arraysfeature = df['oldbalanceOrg'].valuestarget = df['amount'].values#Initializing a linear regression model linear_reg ...Read now
Unlock full access