filmov
tv
Python Bytes - Machine Learning Birch Part 4 Subcluster Prediction Value Counts Code in Description

Показать описание
#Coded by Andrew C
import pandas as pd
from sklearn import datasets
import numpy as numpy
X = wine[['alcohol', 'total_phenols']]
scale = StandardScaler()
BRC = Birch(branching_factor=50, n_clusters=None, threshold=.5)
BRC.fit(X_scaled)
y_pred = BRC.predict(X_scaled)
print("Values in each cluster:")
print(dict(zip(unique_values,counter)))
#coding #datascience #python
import pandas as pd
from sklearn import datasets
import numpy as numpy
X = wine[['alcohol', 'total_phenols']]
scale = StandardScaler()
BRC = Birch(branching_factor=50, n_clusters=None, threshold=.5)
BRC.fit(X_scaled)
y_pred = BRC.predict(X_scaled)
print("Values in each cluster:")
print(dict(zip(unique_values,counter)))
#coding #datascience #python