Solution 9.1
Perform the following steps to complete the activity:
- For this activity, all you will need is the
pandas
library, some modules fromsklearn
, andnumpy
. Load them in the first cell of the notebook:import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.linear_model import LinearRegression as OLS from sklearn.metrics import mean_squared_error
- Use the
power_plant.csv
dataset:'Datasets\\power_plant.csv'
. Read the data into a pandas DataFrame, print out the shape, and list the first five rows.
The independent variables are as follows:
- AT – ambient temperature
- V – exhaust vacuum level
- AP – ambient pressure
- RH – relative humidity
The dependent variable is the following:
- EP – electrical power produced
power_data = pd.read_csv('Datasets\\power_plant.csv') print(power_data.shape...