This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
x = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'] | |
y = np.random.random(1, (np.log(0.2 * np.pi)), 10) | |
plt.stem(x, y, use_line_collection = True) | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
data = np.random.randint(20, 100, 6) | |
plt.pie(data) | |
circle = plt.Circle( (0,0), 0.7, color='white') | |
p=plt.gcf() | |
p.gca().add_artist(circle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !pip install mplcyberpunk | |
import matplotlib.pyplot as plt | |
import mplcyberpunk | |
plt.style.use('cyberpunk') | |
plt.figure(figsize = (20,8)) | |
plt.plot([1,4,6,7,4,1], marker = 'o') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
df = sns.load_dataset('mpg') | |
# df.head() | |
sns.catplot(data=df, x="cylinders", y="displacement", col = 'origin', hue = 'model_year'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
df = sns.load_dataset('penguins') | |
# df.head() | |
sns.pairplot(df, dropna = True, hue = 'island'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from sklearn import metrics | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import Ridge | |
df = pd.read_csv('data.csv') | |
x = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from sklearn import metrics | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import Lasso | |
df = pd.read_csv('data.csv') | |
x = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from sklearn import metrics | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import ElasticNet | |
df = pd.read_csv('data.csv') | |
x = |