filmov
tv
Python Bytes - Machine Learning Birch Part 7 Subclusters Prediction Code in Description

Показать описание
#Coded by Andrew C
import pandas as pd
from sklearn import datasets
import numpy
X = wine[['alcohol', 'total_phenols']]
scale = StandardScaler()
BRC = Birch(branching_factor=50, n_clusters=None, threshold=.5)
BRC.fit(X_scaled)
print("Coordinates of the new data:")
print(X_new_scaled)
print()
print("Predicted cluster of new data:")
print(BRC.predict(X_new_scaled))
#coding #datascience #python
import pandas as pd
from sklearn import datasets
import numpy
X = wine[['alcohol', 'total_phenols']]
scale = StandardScaler()
BRC = Birch(branching_factor=50, n_clusters=None, threshold=.5)
BRC.fit(X_scaled)
print("Coordinates of the new data:")
print(X_new_scaled)
print()
print("Predicted cluster of new data:")
print(BRC.predict(X_new_scaled))
#coding #datascience #python