Python Learning Week 9

KNN Classifier In Artificial Learning

BvRVLTlq4PEAAAAASUVORK5CYII= - Python Learning Week 9


txXym7ZjYAAAAAElFTkSuQmCC - Python Learning Week 9


Import data set:

OCIf+D8TnOVqq0+iIwAAAABJRU5ErkJggg== - Python Learning Week 9

H0CK5Pahj8AuAAAAAElFTkSuQmCC - Python Learning Week 9


Creating Dependent and independent variables:

wAAcAAfumgMPDv+AABAAAhtA4P8K3aGERBPMkgAAAABJRU5ErkJggg== - Python Learning Week 9

x+4DIfVAyAa1JkHlzGbNv7fiIQ3b9r4H4RBI7uU5Xf0hhuMT8M8RMX0idxAg7FBjTcYGzwzAZrBAmOIn2BlOjgPgjpY0NFrmB54eILzJZnhCysPkGk0fxNqwAEAIKYI96bA8IwAAAAASUVORK5CYII= - Python Learning Week 9

8BInsFVpv+R28AAAAASUVORK5CYII= - Python Learning Week 9


Initialize the algorithm:

wEDt5ocS4+KUAAAAABJRU5ErkJggg== - Python Learning Week 9


Training and testing:


Fit
does training on Training Data (X_train, Y_Train)

Predict
does testing on Test data (X_test) and predicts outputs 


ATB5PoUuh0EVAAAAAElFTkSuQmCC - Python Learning Week 9


Combining with predicted values with y values: