<jupyter_start><jupyter_text>看一下数据的情况<jupyter_code>X
y
fig1 = plt.figure(1, figsize=(8,8), dpi=100)
plt.scatter(X_length, X_width)
plt.xlabel('length')
plt.ylabel('width')
plt.show()<jupyter_output><empty_output><jupyter_text>用聚类试一下<jupyter_code>estimator = KMeans(n_clusters=3)
estimator.fit(X)
labels = estimator.labels_

fig2 = plt.figure(2, figsize=(8,8), dpi=100)
plt.scatter(X_length, X_width, c=labels)
plt.xlabel('length')
plt.ylabel('width')
plt.show()<jupyter_output><empty_output><jupyter_text>参照答案，看看机器分得准不准<jupyter_code>fig3 = plt.figure(3, figsize=(8,4), dpi=100)

plt.subplot(121)
plt.scatter(X_length, X_width, c=y)
plt.xlabel('length')
plt.ylabel('width')
plt.title('ground truth')

plt.subplot(122)
plt.scatter(X_length, X_width, c=labels)
plt.xlabel('length')
plt.ylabel('width')
plt.title('machine did this')

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1793103448275862, 'fraction_numerical': 0.03218390804597701, 'mean_word_length': 10.025316455696203, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '309498', 'license': 'MIT', 'n_tokens_mistral': 430, 'n_tokens_neox': 412, 'n_words': 46, 'path': 'examples/iris.ipynb', 'repo_name': 'LuXuanqing/design-fixation-ppt', 'size': '870'}