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 json | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from sklearn.neighbors.kde import KernelDensity | |
file_name_business = 'yelp_academic_dataset_business.json' | |
file_name_checkin = 'yelp_academic_dataset_checkin.json' | |
file_name_review = 'yelp_academic_dataset_review.json' | |
file_name_user = 'yelp_academic_dataset_user.json' | |
def read_data(file_name): |
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
review = pickle.load(open('pickles/review.pkl')) | |
review['date'] = pd.to_datetime(review['date']) |
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb |
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb |
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
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 pickle | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import pymc as pm | |
import math | |
import pdb | |
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
collect=[] | |
def fib(length): | |
first = 1 | |
second = 1 | |
if length < 2: | |
return length | |
else: | |
collect = [0,1,1] | |
length = length-2 | |
for i in range(length): |
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
class montymc(object): | |
""" | |
### VARIABLES ### | |
samples = how many trials to run | |
simulations = number of simulations of X samples | |
doors = number of doors for the game (default: 3) | |
switch dictates what the user does after monty opens the door: | |
switch = 0, no switching | |
switch = 1, always switch | |
switch = 2, random |
OlderNewer