Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Austin Wood – Challenge Week 11 #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
yelp_dataset_challenge_academic_dataset
tist
ebird
node_modules
180 changes: 88 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Name

write-your-name
Austin Wood

# How many points have you earned?

0/100

(Make your own calculation and replace the number 0 with the points you think you've earned.)
100/100

# How many hours have you spent on this?

fill-in-your-answer
9 hours.

# When did you first start working on this week's learning challenges?

fill-in-your-answer
Saturday November 8, 2014, 11:50pm

# What is the most difficult part about this week's challenge?

fill-in-your-answer
The mongo files were huge, and some took forever to get into mongo. I don't really
understand what we even learned in doing this mongo challenge; it just felt like
repetitive exercises...

# Graph Database I

## Checkpoints (5 points x 3 = 15 points)

### 1. (5 point)

![screenshot](screenshot.png)
![checkpoint 1](img/neo4j_cp1.png?raw=true)

### 2. (5 point)

![screenshot](screenshot.png)
![chekcpoint 2](img/neo4j_cp2.png?raw=true)

### 3. (5 point)

![screenshot](screenshot.png)
![checkpoint 3](img/neo4j_cp3.png?raw=true)

# MongoDB IV

Expand All @@ -44,66 +44,62 @@ fill-in-your-answer

Count

![screenshot](screenshot.png)
![challenge 1a](img/mongo_ch1-count.png?raw=true)

FindOne

![screenshot](screenshot.png)

![challenge 1b](img/mongo_ch1-findOne.png?raw=true)

Query

![screenshot](screenshot.png)

![challenge 1c](img/mongo_ch1-query.png?raw=true)

### 2. (5 point)

Count

![screenshot](screenshot.png)
![challenge 2a](img/mongo_ch2-count.png?raw=true)

FindOne

![screenshot](screenshot.png)

![challenge 2b](img/mongo_ch2-findOne.png?raw=true)

Query

![screenshot](screenshot.png)
![challenge 2c](img/mongo_ch2-query.png?raw=true)

### 3. (5 point)

Count

![screenshot](screenshot.png)
![challenge 3a](img/mongo_ch3-count.png?raw=true)

FindOne

![screenshot](screenshot.png)

![challenge 3b](img/mongo_ch3-findOne.png?raw=true)

Query

![screenshot](screenshot.png)
![challenge 3c](img/mongo_ch3-query.png?raw=true)


### 4. (5 point)

Count

![screenshot](screenshot.png)
![challenge 4a](img/mongo_ch4-count.png?raw=true)

FindOne

![screenshot](screenshot.png)
![challenge 4b](img/mongo_ch4-findOne.png?raw=true)

Query 1

![screenshot](screenshot.png)
![challenge 4c](img/mongo_ch4-query1.png?raw=true)

Query 2

![screenshot](screenshot.png)
![challenge 4d](img/mongo_ch4-query2.png?raw=true)


# Machine Learning III
Expand All @@ -112,141 +108,141 @@ Query 2

### 1. (5 point)

![screenshot](screenshot.png)
![checkpoint 1](img/machine_cp1.png?raw=true)

### 2. (5 point)

![screenshot](screenshot.png)
![screenshot](img/machine_cp2.png?raw=true)

## Challenges (5 points x 4 = 20 points)

### 1. (5 point)

Accuracy = {fill-in-your-best-number}
Accuracy = 75.0241

Features/Parameters

%%%%%%%%% Choose feature source %%%%%%%%%%%
add_accelerometer = {TODO}; % Adds accelerometer features
add_gyroscope = {TODO}; % Adds gyroscope features
add_magneticField = {TODO}; % Adds magnetic field features
add_gravity = {TODO}; % Adds gravity features
add_linearAcceleration = {TODO}; % Adds linear acceleration features
add_orientation = {TODO}; % Adds azimuth, pich and roll features
add_light = {TODO}; % Adds light value
add_proximity = {TODO}; % Adds proximity value
add_studentID = {TODO}; % Adds student ID
add_accelerometer = false; % Adds accelerometer features
add_gyroscope = true; % Adds gyroscope features
add_magneticField = true; % Adds magnetic field features
add_gravity = true; % Adds gravity features
add_linearAcceleration = false; % Adds linear acceleration features
add_orientation = true; % Adds azimuth, pich and roll features
add_light = true; % Adds light value
add_proximity = true; % Adds proximity value
add_studentID = false; % Adds student ID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%% Choose machine learning classifier parameters %%%%%%%%%%%%%%%
numTrees = {TODO}; % Try different number of trees for the Random Forest classifier
sigma = {TODO}; % Try different values of sigma for the Support Vector Machine classifier
dist = {TODO}; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = {TODO}; % Try different values of K for the K-nearest Neighbor classifier
numTrees = 2; % Try different number of trees for the Random Forest classifier
sigma = 10; % Try different values of sigma for the Support Vector Machine classifier
dist = 'kernel'; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = 10; % Try different values of K for the K-nearest Neighbor classifier
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

### 2. (5 point)

Accuracy = {fill-in-your-best-number}
Accuracy = 70.2025

Features/Parameters

%%%%%%%%% Choose feature source %%%%%%%%%%%
add_accelerometer = {TODO}; % Adds accelerometer features
add_gyroscope = {TODO}; % Adds gyroscope features
add_magneticField = {TODO}; % Adds magnetic field features
add_gravity = {TODO}; % Adds gravity features
add_linearAcceleration = {TODO}; % Adds linear acceleration features
add_orientation = {TODO}; % Adds azimuth, pich and roll features
add_light = {TODO}; % Adds light value
add_proximity = {TODO}; % Adds proximity value
add_studentID = {TODO}; % Adds student ID
add_accelerometer = false; % Adds accelerometer features
add_gyroscope = true; % Adds gyroscope features
add_magneticField = true; % Adds magnetic field features
add_gravity = false; % Adds gravity features
add_linearAcceleration = false; % Adds linear acceleration features
add_orientation = true; % Adds azimuth, pich and roll features
add_light = true; % Adds light value
add_proximity = true; % Adds proximity value
add_studentID = false; % Adds student ID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%% Choose machine learning classifier parameters %%%%%%%%%%%%%%%
numTrees = {TODO}; % Try different number of trees for the Random Forest classifier
sigma = {TODO}; % Try different values of sigma for the Support Vector Machine classifier
dist = {TODO}; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = {TODO}; % Try different values of K for the K-nearest Neighbor classifier
numTrees = 2; % Try different number of trees for the Random Forest classifier
sigma = 1; % Try different values of sigma for the Support Vector Machine classifier
dist = 'kernel'; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = 10; % Try different values of K for the K-nearest Neighbor classifier
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

### 3. (5 point)

Accuracy = {fill-in-your-best-number}
Accuracy = 80.6172

Features/Parameters

%%%%%%%%% Choose feature source %%%%%%%%%%%
add_accelerometer = {TODO}; % Adds accelerometer features
add_gyroscope = {TODO}; % Adds gyroscope features
add_magneticField = {TODO}; % Adds magnetic field features
add_gravity = {TODO}; % Adds gravity features
add_linearAcceleration = {TODO}; % Adds linear acceleration features
add_orientation = {TODO}; % Adds azimuth, pich and roll features
add_light = {TODO}; % Adds light value
add_proximity = {TODO}; % Adds proximity value
add_studentID = {TODO}; % Adds student ID
add_accelerometer = false; % Adds accelerometer features
add_gyroscope = true; % Adds gyroscope features
add_magneticField = true; % Adds magnetic field features
add_gravity = true; % Adds gravity features
add_linearAcceleration = false; % Adds linear acceleration features
add_orientation = true; % Adds azimuth, pich and roll features
add_light = true; % Adds light value
add_proximity = true; % Adds proximity value
add_studentID = false; % Adds student ID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%% Choose machine learning classifier parameters %%%%%%%%%%%%%%%
numTrees = {TODO}; % Try different number of trees for the Random Forest classifier
sigma = {TODO}; % Try different values of sigma for the Support Vector Machine classifier
dist = {TODO}; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = {TODO}; % Try different values of K for the K-nearest Neighbor classifier
numTrees = 2; % Try different number of trees for the Random Forest classifier
sigma = 10; % Try different values of sigma for the Support Vector Machine classifier
dist = 'kernel'; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = 10; % Try different values of K for the K-nearest Neighbor classifier
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

### 4. (5 point)

Accuracy = {fill-in-your-best-number}
Accuracy = 76.5670

Features/Parameters

%%%%%%%%% Choose feature source %%%%%%%%%%%
add_accelerometer = {TODO}; % Adds accelerometer features
add_gyroscope = {TODO}; % Adds gyroscope features
add_magneticField = {TODO}; % Adds magnetic field features
add_gravity = {TODO}; % Adds gravity features
add_linearAcceleration = {TODO}; % Adds linear acceleration features
add_orientation = {TODO}; % Adds azimuth, pich and roll features
add_light = {TODO}; % Adds light value
add_proximity = {TODO}; % Adds proximity value
add_studentID = {TODO}; % Adds student ID
add_accelerometer = false; % Adds accelerometer features
add_gyroscope = true; % Adds gyroscope features
add_magneticField = true; % Adds magnetic field features
add_gravity = true; % Adds gravity features
add_linearAcceleration = false; % Adds linear acceleration features
add_orientation = true; % Adds azimuth, pich and roll features
add_light = true; % Adds light value
add_proximity = true; % Adds proximity value
add_studentID = false; % Adds student ID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%% Choose machine learning classifier parameters %%%%%%%%%%%%%%%
numTrees = {TODO}; % Try different number of trees for the Random Forest classifier
sigma = {TODO}; % Try different values of sigma for the Support Vector Machine classifier
dist = {TODO}; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = {TODO}; % Try different values of K for the K-nearest Neighbor classifier
numTrees = 2; % Try different number of trees for the Random Forest classifier
sigma = 10; % Try different values of sigma for the Support Vector Machine classifier
dist = 'kernel'; % Try different distributions = {'normal', 'kernel', 'mvmn' , 'mn'} for Naive Bayes classifier
K = 10; % Try different values of K for the K-nearest Neighbor classifier
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


# D3 (VI) (5 points x 7 = 35 points)

### 1. (5 point)

![screenshot](screenshot.png)
![challenge 1](img/d3_ch1.png?raw=true)

### 2. (5 point)

![screenshot](screenshot.png)
![challenge 2](img/d3_ch2.png?raw=true)

### 3. (5 point)

![screenshot](screenshot.png)
![challenge 2](img/d3_ch2.png?raw=true)

### 4. (5 point)

![screenshot](screenshot.png)
![challenge 2](img/d3_ch2.png?raw=true)

### 5. (5 point)

![screenshot](screenshot.png)
![challenge 2](img/d3_ch2.png?raw=true)

### 6. (5 point)

![screenshot](screenshot.png)
![challenge 2](img/d3_ch2.png?raw=true)

### 7. (5 point)

![screenshot](screenshot.png)
![challenge 2](img/d3_ch2.png?raw=true)
17 changes: 8 additions & 9 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ var express = require('express');
var app = express();

var mongo = require('mongoskin');
var db = mongo.db("mongodb://{USERNAME}:{PASSWORD}@{SEVERURL}", {native_parser:true});
var db = mongo.db("mongodb://127.0.0.1:27017/yelp", {native_parser:true});

app.engine('.html', require('ejs').__express);
app.set('views', __dirname);
app.set('view engine', 'html');

app.get('/state/:state', function(req, res) {
var query = {"state" : req.params.state};
var projection = {};
db.collection('business')
.find(query,projection)
.limit(20)
.toArray(function (err, items) {
res.render("business_map", {data: items});
});
var query = {"state" : req.params.state};
var projection = {};
db.collection('businesses')
.find(query, projection)
.toArray(function (err, items) {
res.render("business_map", {data: items});
});
});

app.listen(3000);
Expand Down
Loading