Tyshawn  Braun

Tyshawn Braun

1603126800

Beer Here or There?

In this project, we aimed to identify one or more optimal locations to open a new brewery in the twin cities, Minneapolis and St. Paul, Minnesota. As there already exists a vibrant community of small, independent breweries in the area, we looked for locations that do not already have breweries nearby. Additionally, we thought it to be advantageous for breweries to be in close proximity to restaurants, as a possible destination for diners to meet before or after a meal. Hence we also analyzed restaurant density in proximity to the brewery locations and attempted to identify areas with few breweries but high restaurant density. Our conclusions will be based primarily on proximity to restaurants and existing breweries. We sought to identify areas distant from the nearest breweries, with many restaurants nearby. Our approach and results were data driven, and we concluded with suggestions for the best possible areas to open a new brewery or taproom in the twin cities.

We gathered json files with neighborhood boundary data for the twin cities, and we called the Foursquare API to gather data about restaurant and brewery venues in the twin cities. The data was cleaned and formatted into a dataframe, and several new features were introduced, such as the number of restaurants/breweries in a fixed radius from each venue and the distance to the nearest brewery. With this information, we created choropleth maps of the restaurant and brewery densities by neighborhood, and we applied machine learning to cluster the data.

We used two unsupervised clustering algorithms to group the restaurants and breweries, **k-means **and DBSCAN. Each method has advantages and disadvantages. K-means is an iterative algorithm that puts each venue (observation) into a cluster. In this algorithm, each observation is a part of a cluster; there are no outliers. The number of clusters is determined before running the algorithm. On the other hand, DBSCAN (density-based spatial clustering of applications with noise) looks for density-based clusters; i.e. clusters where observations within the cluster are ‘close’ to one another with regards to some metric. This algorithm does not cluster all observations; some are left as outliers. Additionally, the number of clusters is an output of the algorithm. Two key parameters are specified before running the algorithm, eps and min_samples. The eps parameter represents a radius centered about each venue, and min_samples represents the minimum number of observations that must be contained within the epsilon ball in order for that observation to be considered a core point. Neighboring core points and their neighbors are then grouped as clusters.

#minneapolis #restaurant #clustering #data-science #beer

What is GEEK

Buddha Community

Beer Here or There?
Tyshawn  Braun

Tyshawn Braun

1603126800

Beer Here or There?

In this project, we aimed to identify one or more optimal locations to open a new brewery in the twin cities, Minneapolis and St. Paul, Minnesota. As there already exists a vibrant community of small, independent breweries in the area, we looked for locations that do not already have breweries nearby. Additionally, we thought it to be advantageous for breweries to be in close proximity to restaurants, as a possible destination for diners to meet before or after a meal. Hence we also analyzed restaurant density in proximity to the brewery locations and attempted to identify areas with few breweries but high restaurant density. Our conclusions will be based primarily on proximity to restaurants and existing breweries. We sought to identify areas distant from the nearest breweries, with many restaurants nearby. Our approach and results were data driven, and we concluded with suggestions for the best possible areas to open a new brewery or taproom in the twin cities.

We gathered json files with neighborhood boundary data for the twin cities, and we called the Foursquare API to gather data about restaurant and brewery venues in the twin cities. The data was cleaned and formatted into a dataframe, and several new features were introduced, such as the number of restaurants/breweries in a fixed radius from each venue and the distance to the nearest brewery. With this information, we created choropleth maps of the restaurant and brewery densities by neighborhood, and we applied machine learning to cluster the data.

We used two unsupervised clustering algorithms to group the restaurants and breweries, **k-means **and DBSCAN. Each method has advantages and disadvantages. K-means is an iterative algorithm that puts each venue (observation) into a cluster. In this algorithm, each observation is a part of a cluster; there are no outliers. The number of clusters is determined before running the algorithm. On the other hand, DBSCAN (density-based spatial clustering of applications with noise) looks for density-based clusters; i.e. clusters where observations within the cluster are ‘close’ to one another with regards to some metric. This algorithm does not cluster all observations; some are left as outliers. Additionally, the number of clusters is an output of the algorithm. Two key parameters are specified before running the algorithm, eps and min_samples. The eps parameter represents a radius centered about each venue, and min_samples represents the minimum number of observations that must be contained within the epsilon ball in order for that observation to be considered a core point. Neighboring core points and their neighbors are then grouped as clusters.

#minneapolis #restaurant #clustering #data-science #beer

Tia  Gottlieb

Tia Gottlieb

1599214680

Neural Network on Beer Dataset

Artificial neural networks (ANNs), usually simply called neural networks (NNs), are computing systems vaguely inspired by the biological neural networks that constitute animal brains.

An ANN is based on a collection of connected units or nodes called artificial neurons, which loosely model the neurons in a biological brain. Each connection, like the synapses in a biological brain, can transmit a signal to other neurons. An artificial neuron that receives a signal then processes it and can signal neurons connected to it. The “signal” at a connection is a real number, and the output of each neuron is computed by some non-linear function of the sum of its inputs. The connections are called edges. Neurons and edges typically have a weight that adjusts as learning proceeds. The weight increases or decreases the strength of the signal at a connection. Neurons may have a threshold such that a signal is sent only if the aggregate signal crosses that threshold. Typically, neurons are aggregated into layers. Different layers may perform different transformations on their inputs. Signals travel from the first layer (the input layer), to the last layer (the output layer), possibly after traversing the layers multiple times.

Image for post

Neural networks learn (or are trained) by processing examples, each of which contains a known “input” and “result,” forming probability-weighted associations between the two, which are stored within the data structure of the net itself. The training of a neural network from a given example is usually conducted by determining the difference between the processed output of the network (often a prediction) and a target output. This is the error. The network then adjusts it’s weighted associations according to a learning rule and using this error value. Successive adjustments will cause the neural network to produce output which is increasingly similar to the target output. After a sufficient number of these adjustments the training can be terminated based upon certain criteria. This is known as [[supervised learning]].

#r #ann #beer #neural-networks #nn #neural networks

Zakary  Goyette

Zakary Goyette

1601064000

Discovering beer type from ingredients using Classification

In this article, I will analyze the data of beer recipes in a dataset of almost 80,000 samples. With the use of Supervised Learning, I will attempt to estimate the Beer Typology from the Recipe process. The dataset has been downloaded from Kaggle from this link .

#machine-learning #classifier #artificial-intelligence #beer

Noah  Rowe

Noah Rowe

1596247200

My First Work With PyTorch

Facebook launched PyTorch 1.0 early this year with integrations for Google Cloud, AWS, and Azure Machine Learning. In this example, I assume that you’re already familiar with Scikit-learn, Pandas, NumPy, and SciPy. These packages are important prerequisites for this tutorial.

Image for post

What is PyTorch?

It’s a Python-based scientific computing package targeted at two sets of audiences:

A replacement for NumPy to use the power of GPUs
a deep learning research platform that provides maximum flexibility and speed

First, we need to cover a few basic concepts that may throw you off-balance if you don’t grasp them well enough before going full-force on modeling.

In Deep Learning, we see tensors everywhere. Well, Google’s framework is called TensorFlow for a reason! What is a tensor, anyway?

Tensor

In Numpy, you may have an array that has three dimensions, right? That is, technically speaking, a tensor.

A scalar (a single number) has zero dimensions, a vector has one dimension, a matrix has two dimensions and a tensor has three or more dimensions. That’s it!

But, to keep things simple, it is commonplace to call vectors and matrices tensors as well — so, from now on, everything is either a scalar or a tensor.

Imports and Dataset

For this simple example we’ll use only a couple of libraries:

  • Pandas: for data loading and manipulation
  • Scikit-learn: for train-test split
  • Matplotlib: for data visualization
  • PyTorch: for model training Here are the imports if you just want to copy/paste:
import torch
import torch.nn as nn
import torch.nn.functional as F
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split

As for the dataset, the Beer dataset, it can be found on this URL. https://www.kaggle.com/jtrofe/beer-recipes

Prepare folder, files and download dataset form Kaggle:

This is a dataset of 75,000 homebrewed beers with over 176 different styles. Beer records are user-reported and are classified according to one of the 176 different styles. These recipes go into as much or as little detail as the user provided, but there’s are least 5 useful columns where data was entered for each: Original Gravity, Final Gravity, ABV, IBU, and Color.

We’ll use the linux terminal:

Remove directorys and files

! rm -r input/ ! mkdir input/ ! cd input/

Show directory

! ls

Download Dataset

! kaggle datasets download -d jtrofe/beer-recipes

Unzip Dataset

! unzip beer-recipes.zip

Move zip file

!mv beer-recipes.zip input/beer.zip

Move csv file

!mv recipeData.csv input/recipeDate.csv !mv styleData.csv

Show folder

! ls input/

Post- ETL

We are going to use a clean dataset.

#pytorch #beer #deep-learning #python #neural-networks #deep learning

Lara Baldwin

Lara Baldwin

1591670880

Build a Random BEER Generator thanks to BrewDog Beer and Punk API

In this video walkthrough we will be focusing on the fetch() JavaScript method, as well as handling JSON files in API get requests.

We will learn how to get data from an object, as well as from more complex objects within objects.

Things we will cover:

  • fetch()
  • JSON
  • Objects within objects
  • e.preventDefault()

#javascript #web-development #programming #developer