Assignment 3
Assignment 3
ipynb - Colab
import pandas as pd
column_names = ['Sex', 'Length', 'Diameter', 'Height', 'Whole weight',
'Shucked weight', 'Viscera weight', 'Shell weight', 'Rings']
abalone_df.head()
Length Diameter Height Whole_weight Shucked_weight Viscera_weight Shell_weight Rings Sex_I Sex_M
Next steps: Generate code with abalone_df toggle_off View recommended plots New interactive sheet
X = abalone_data.drop('Rings', axis=1)
y = abalone_data['Rings']
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_absolute_error
model = LinearRegression()
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
https://colab.research.google.com/drive/1nh7hMv1ZEkFQq5zUPF3QDxF2JT-o-i3K#scrollTo=GMVt6fEUcp79&printMode=true 1/1