Views
No views yet
1import pickle
2import numpy as np
3
4# Load the model
5with open('kmeans_cluster_model.pkl', 'rb') as file:
6 model = pickle.load(file)
7
8# Example data (normalized)
9data = np.array([[0.1, 0.2, 0.1, -0.1, 0.0, 0.1, -0.2]])
10cluster_label = model.predict(data)
11print(f'Assigned Cluster: {cluster_label[0]}')kmeans_cluster_model.pkl: The trained KMeans model.README.md: This file.requirements.txt: List of libraries required to run the model.