Modelling and Simmulation Assignment - Ipynb - Colab
Modelling and Simmulation Assignment - Ipynb - Colab
Let's begin by examining the dataset to understand its structure and the relationships between features and the target variable
(Dropout/Graduate).
path= '/content/drive/MyDrive/dataset.csv'
import pandas as pd
data= pd.read_csv(path)
data
0 1 8 5 2 1 1
1 1 6 1 11 1 1
2 1 1 5 5 1 1
3 1 8 2 15 1 1
4 2 12 1 3 0 1
4419 1 1 6 15 1 1
4420 1 1 2 15 1 1
4421 1 1 1 12 1 1
4422 1 1 1 9 1 1
4423 1 5 1 15 1 1
8 rows × 34 columns
Course int64
Nacionality int64
Displaced int64
Debtor int64
Gender int64
International int64
Application order 0
Course 0
Daytime/evening attendance 0
Previous qualification 0
Nacionality 0
Mother's qualification 0
Father's qualification 0
Mother's occupation 0
Father's occupation 0
Displaced 0
Debtor 0
Gender 0
Scholarship holder 0
Age at enrollment 0
International 0
Unemployment rate 0
Inflation rate 0
Scatter Plot
Let's create a scatter plot to see the relationship between the " Curricular units 2nd sem (grade) " and the " Target ".
Bar Chart
Let's create a bar chart for the " Marital status " feature.
data['Marital status'].value_counts().plot(kind='bar')
plt.xlabel('Marital Status')
plt.ylabel('Count')
plt.title('Bar Chart of Marital Status')
plt.show()
Box Plot
Let's create a box plot for the " Curricular units 2nd sem (grade) " feature.
data.boxplot(column='Curricular units 2nd sem (grade)')
plt.title('Box Plot of Curricular units 2nd sem (grade)')
plt.show()
Histogram
Let's create a histogram for the " Curricular units 2nd sem (grade) " feature.
# Make predictions
y_pred = model.predict(X_test)
print(f'Accuracy: {accuracy}')
print(f'Classification Report:\n{report}')
Accuracy: 0.6813559322033899
Classification Report:
precision recall f1-score support
return decoded_prediction[0]
pred= model.predict(X_test)
original=target_mapping[y_pred[0]]
Comparing Values
feature_columns = X.columns