Last active
September 9, 2020 16:36
-
-
Save StephenFordham/e7e8a1fe1a301c8f762f9427b353052f to your computer and use it in GitHub Desktop.
creating_a_datapoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
features = pd.DataFrame(data=data[0], columns=['feature_' + str(i) for i in range(1, 6)]) | |
lables = pd.DataFrame(data[1], columns=['labels']) | |
dataset = pd.concat([features, lables], axis=1) | |
data_point_1 = scaler.transform(np.array(dataset.iloc[0][:-1]).reshape(-1, 5)) | |
knn.predict(data_point_1)[0] | |
# Output | |
# 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment