Skip to content

Instantly share code, notes, and snippets.

@ImadDabbura
Created September 17, 2018 16:48
Show Gist options
  • Select an option

  • Save ImadDabbura/abe3f7a8148d6d792bb7d8e66b6e5430 to your computer and use it in GitHub Desktop.

Select an option

Save ImadDabbura/abe3f7a8148d6d792bb7d8e66b6e5430 to your computer and use it in GitHub Desktop.
# Modules
import matplotlib.pyplot as plt
from matplotlib.image import imread
import pandas as pd
import seaborn as sns
from sklearn.datasets.samples_generator import (make_blobs,
make_circles,
make_moons)
from sklearn.cluster import KMeans, SpectralClustering
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import silhouette_samples, silhouette_score
%matplotlib inline
sns.set_context('notebook')
plt.style.use('fivethirtyeight')
from warnings import filterwarnings
filterwarnings('ignore')
# Import the data
df = pd.read_csv('../data/old_faithful.csv')
# Plot the data
plt.figure(figsize=(6, 6))
plt.scatter(df.iloc[:, 0], df.iloc[:, 1])
plt.xlabel('Eruption time in mins')
plt.ylabel('Waiting time to next eruption')
plt.title('Visualization of raw data');
@devinovski

Copy link
Copy Markdown

Where could i get the datasets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment