We will extract tweets from trending topic in Kenya and then cluster it to give a meaning to it. We are using python to do this
Import necessary libraries
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from sklearn.cluster import KMeans
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.decomposition import PCA
from sklearn.preprocessing import normalize
from sklearn.metrics import pairwise_distances
from mpl_toolkits.mplot3d import axes3d
import nltk
import string
import matplotlib.pyplot as plt
One Reply on “K-means clustering!”
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.