filmov
tv
Python Bytes - Machine Learning K Means Part 6 New Data Prediction Cluster Code in Description
Показать описание
#Coded by Andrew C
import pandas as pd
from sklearn import datasets
X = wine[['alcohol', 'total_phenols']]
scale = StandardScaler()
import numpy as numpy
kmeans = KMeans(n_clusters=3)
print("Coordinates of the new data:")
print(X_new_scaled)
print()
print("Predicted cluster of new data:")
print()
#datascience #python #coding
import pandas as pd
from sklearn import datasets
X = wine[['alcohol', 'total_phenols']]
scale = StandardScaler()
import numpy as numpy
kmeans = KMeans(n_clusters=3)
print("Coordinates of the new data:")
print(X_new_scaled)
print()
print("Predicted cluster of new data:")
print()
#datascience #python #coding