Skip to content

Instantly share code, notes, and snippets.

View vivekpadia70's full-sized avatar
🏠
Working from home

vivekpadia70 vivekpadia70

🏠
Working from home
View GitHub Profile
sns.distplot(full_df['Price'])
plt.figure(figsize=(10,7), facecolor='w', edgecolor='k')
sns.violinplot(full_df['Regionname'], full_df['Price'])
plt.title("Violin plot for Regionname to Price")
plt.xticks(rotation=45)
plt.figure(figsize=(10,7), facecolor='w', edgecolor='k')
sns.violinplot(full_df['Type'], full_df['Price'])
plt.title("Violin plot for Type to Price")
plt.figure(figsize=(10,7), facecolor='w', edgecolor='k')
sns.scatterplot(full_df["Longtitude"], full_df["Lattitude"], hue=full_df["Price"], size=full_df["Landsize"])
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.2)
plt.title("Lattitude to Longitude with Price and Landsize")
plt.figure(figsize=(10,7), facecolor='w', edgecolor='k')
sns.scatterplot(full_df["Longtitude"], full_df["Lattitude"], hue=full_df["Type"])
plt.title("Lattitude to Longitude for Type of room")
plt.figure(figsize=(10,7), facecolor='w', edgecolor='k')
sns.scatterplot(full_df["Longtitude"], full_df["Lattitude"], hue=full_df["Regionname"])
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.2)
plt.title("Lattitude to Longitude for Regionname")
sns.heatmap(df.corr())
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import cross_val_score, train_test_split, GridSearchCV
from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error, mean_absolute_error
from sklearn.decomposition import PCA
from sklearn.neighbors import KNeighborsRegressor
import numpy as np
import gym
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten
from keras.optimizers import Adam
from rl.agents.dqn import DQNAgent
from rl.policy import EpsGreedyQPolicy
from rl.memory import SequentialMemory
ENV_NAME = 'Breakout-ram-v0'
# Get the environment
env = gym.make(ENV_NAME)
np.random.seed(33)
env.seed(33)
# Extract the number of actions available in Breakout, i.e. left and right
nb_actions = env.action_space.n