Skip to content

Commit 1dc4e0c

Browse files
authored
Merge pull request udacity#55 from udacity/hotfix/project-files
Hotfix project questions
2 parents b3544c6 + 4eafc0f commit 1dc4e0c

File tree

4 files changed

+44
-24
lines changed

4 files changed

+44
-24
lines changed

projects/boston_housing/boston_housing.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"### Question 1 - Feature Observation\n",
119119
"As a reminder, we are using three features from the Boston housing dataset: `'RM'`, `'LSTAT'`, and `'PTRATIO'`. For each data point (neighborhood):\n",
120120
"- `'RM'` is the average number of rooms among homes in the neighborhood.\n",
121-
"- `'LSTAT'` is the percentage of all Boston homeowners who have a greater net worth than homeowners in the neighborhood.\n",
121+
"- `'LSTAT'` is the percentage of homeowners in the neighborhood considered \"lower class\" (working poor).\n",
122122
"- `'PTRATIO'` is the ratio of students to teachers in primary and secondary schools in the neighborhood.\n",
123123
"\n",
124124
"_Using your intuition, for each of the three features above, do you think that an increase in the value of that feature would lead to an **increase** in the value of `'MDEV'` or a **decrease** in the value of `'MDEV'`? Justify your answer for each._ \n",
@@ -511,7 +511,7 @@
511511
"| Feature | Client 1 | Client 2 | Client 3 |\n",
512512
"| :---: | :---: | :---: | :---: |\n",
513513
"| Total number of rooms in home | 5 rooms | 4 rooms | 8 rooms |\n",
514-
"| Household net worth (income) | Top 34th percent | Bottom 45th percent | Top 7th percent |\n",
514+
"| Neighborhood poverty level (as %) | 17% | 32% | 3% |\n",
515515
"| Student-teacher ratio of nearby schools | 15-to-1 | 22-to-1 | 12-to-1 |\n",
516516
"*What price would you recommend each client sell his/her home at? Do these prices seem reasonable given the values for the respective features?* \n",
517517
"**Hint:** Use the statistics you calculated in the **Data Exploration** section to help justify your response. \n",
@@ -528,9 +528,9 @@
528528
"outputs": [],
529529
"source": [
530530
"# Produce a matrix for client data\n",
531-
"client_data = [[5, 34, 15], # Client 1\n",
532-
" [4, 55, 22], # Client 2\n",
533-
" [8, 7, 12]] # Client 3\n",
531+
"client_data = [[5, 17, 15], # Client 1\n",
532+
" [4, 32, 22], # Client 2\n",
533+
" [8, 3, 12]] # Client 3\n",
534534
"\n",
535535
"# Show predictions\n",
536536
"for i, price in enumerate(reg.predict(client_data)):\n",

projects/creating_customer_segments/customer_segments.ipynb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,14 +660,21 @@
660660
"## Conclusion"
661661
]
662662
},
663+
{
664+
"cell_type": "markdown",
665+
"metadata": {},
666+
"source": [
667+
"In this final section, you will investigate ways that you can make use of the clustered data. First, you will consider how the different groups of customers, the ***customer segments***, may be affected differently by a specific delivery scheme. Next, you will consider how giving a label to each customer (which *segment* that customer belongs to) can provide for additional features about the customer data. Finally, you will compare the ***customer segments*** to a hidden variable present in the data, to see whether the clustering identified certain relationships."
668+
]
669+
},
663670
{
664671
"cell_type": "markdown",
665672
"metadata": {
666673
"collapsed": true
667674
},
668675
"source": [
669676
"### Question 10\n",
670-
"Companies often run [A/B tests](https://en.wikipedia.org/wiki/A/B_testing) when making small changes to their products or services to determine whether that change affects its customers positively or negatively. The wholesale distributor wants to consider changing its delivery service from 5 days a week to 3 days a week, but will only do so if it affects their customers positively. *How would you use the customer segments you found above to perform an A/B test for this change?* \n",
677+
"Companies will often run [A/B tests](https://en.wikipedia.org/wiki/A/B_testing) when making small changes to their products or services to determine whether making that change will affect its customers positively or negatively. The wholesale distributor is considering changing its delivery service from currently 5 days a week to 3 days a week. However, the distributor will only make this change in delivery service for customers that react positively. *How can the wholesale distributor use the customer segments to determine which customers, if any, would reach positively to the change in delivery service?* \n",
671678
"**Hint:** Can we assume the change affects all customers equally? How can we determine which group of customers it affects the most?"
672679
]
673680
},
@@ -683,9 +690,9 @@
683690
"metadata": {},
684691
"source": [
685692
"### Question 11\n",
686-
"Additional structure is derived from originally unlabeled data when using clustering techniques. Since each customer has a segment it best identifies with (depending on the clustering algorithm applied), we can consider *'customer segment'* as an **engineered feature** for the data. Assume the wholesale distributor recently acquired ten new customers and has made estimates for each customer's annual spending of the six product categories. Knowing these estimates, the wholesale distributor wants to classify each new customer to one of the customer segments to determine the most appropriate delivery service. \n",
687-
"*Describe a supervised learning strategy you could use to make classification predictions for the ten new customers.* \n",
688-
"**Hint:** What other input feature could the supervised learner use besides the six product features to help make a prediction?"
693+
"Additional structure is derived from originally unlabeled data when using clustering techniques. Since each customer has a ***customer segment*** it best identifies with (depending on the clustering algorithm applied), we can consider *'customer segment'* as an **engineered feature** for the data. Assume the wholesale distributor recently acquired ten new customers and each provided estimates for anticipated annual spending of each product category. Knowing these estimates, the wholesale distributor wants to classify each new customer to a ***customer segment*** to determine the most appropriate delivery service. \n",
694+
"*How can the wholesale distributor label the new customers using only their estimated product spending and the* ***customer segment*** *data?* \n",
695+
"**Hint:** A supervised learner could be used to train on the original customers. What would be the target variable?"
689696
]
690697
},
691698
{

projects/student_intervention/student_intervention.ipynb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,28 @@
239239
"metadata": {},
240240
"source": [
241241
"## Training and Evaluating Models\n",
242-
"In this section, you will choose 3 supervised learning models that are appropriate for this problem and available in `scikit-learn`. You will first discuss the reasoning behind choosing these three models by considering what you know about the data and each model's strengths and weaknesses. You will then fit the model to varying sizes of training data (100 data points, 200 data points, and 300 data points) and measure the F<sub>1</sub> score. You will need to produce three tables (one for each model) that shows the training set size, training time, prediction time, F<sub>1</sub> score on the training set, and F<sub>1</sub> score on the testing set."
242+
"In this section, you will choose 3 supervised learning models that are appropriate for this problem and available in `scikit-learn`. You will first discuss the reasoning behind choosing these three models by considering what you know about the data and each model's strengths and weaknesses. You will then fit the model to varying sizes of training data (100 data points, 200 data points, and 300 data points) and measure the F<sub>1</sub> score. You will need to produce three tables (one for each model) that shows the training set size, training time, prediction time, F<sub>1</sub> score on the training set, and F<sub>1</sub> score on the testing set.\n",
243+
"\n",
244+
"**The following supervised learning models are currently available in** [`scikit-learn`](http://scikit-learn.org/stable/supervised_learning.html) **that you may choose from:**\n",
245+
"- Gaussian Naive Bayes (GaussianNB)\n",
246+
"- Decision Trees\n",
247+
"- Ensemble Methods (Bagging, AdaBoost, Random Forest, Gradient Boosting)\n",
248+
"- K-Nearest Neighbors (KNeighbors)\n",
249+
"- Stochastic Gradient Descent (SGDC)\n",
250+
"- Support Vector Machines (SVM)\n",
251+
"- Logistic Regression"
243252
]
244253
},
245254
{
246255
"cell_type": "markdown",
247256
"metadata": {},
248257
"source": [
249258
"### Question 2 - Model Application\n",
250-
"*List three supervised learning models that are appropriate for this problem. What are the general applications of each model? What are their strengths and weaknesses? Given what you know about the data, why did you choose these models to be applied?*"
259+
"*List three supervised learning models that are appropriate for this problem. For each model chosen*\n",
260+
"- Describe one real-world application in industry where the model can be applied. *(You may need to do a small bit of research for this — give references!)* \n",
261+
"- What are the strengths of the model; when does it perform well? \n",
262+
"- What are the weaknesses of the model; when does it perform poorly?\n",
263+
"- What makes this model a good candidate for the problem, given what you know about the data?"
251264
]
252265
},
253266
{
@@ -413,7 +426,7 @@
413426
"cell_type": "markdown",
414427
"metadata": {},
415428
"source": [
416-
"### Question 3 - Chosing the Best Model\n",
429+
"### Question 3 - Choosing the Best Model\n",
417430
"*Based on the experiments you performed earlier, in one to two paragraphs, explain to the board of supervisors what single model you chose as the best model. Which model is generally the most appropriate based on the available data, limited resources, cost, and performance?*"
418431
]
419432
},
@@ -429,7 +442,7 @@
429442
"metadata": {},
430443
"source": [
431444
"### Question 4 - Model in Layman's Terms\n",
432-
"*In one to two paragraphs, explain to the board of directors in layman's terms how the final model chosen is supposed to work. For example if you've chosen to use a decision tree or a support vector machine, how does the model go about making a prediction?*"
445+
"*In one to two paragraphs, explain to the board of directors in layman's terms how the final model chosen is supposed to work. Be sure that you are describing the major qualities of the model, such as how the model is trained and how the model makes a prediction. Avoid using advanced mathematical or technical jargon, such as describing equations or discussing the algorithm implementation.*"
433446
]
434447
},
435448
{

projects/titanic_survival_exploration/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ This will open the iPython Notebook software and project file in your web browse
3636

3737
The dataset used in this project is included as `titanic_data.csv`. This dataset is provided by Udacity and contains the following attributes:
3838

39-
- `survival` ? Survival (0 = No; 1 = Yes)
40-
- `pclass` ? Passenger Class (1 = 1st; 2 = 2nd; 3 = 3rd)
41-
- `name` ? Name
42-
- `sex` ? Sex
43-
- `age` ? Age
44-
- `sibsp` ? Number of Siblings/Spouses Aboard
45-
- `parch` ? Number of Parents/Children Aboard
46-
- `ticket` ? Ticket Number
47-
- `fare` ? Passenger Fare
48-
- `cabin` ? Cabin
49-
- `embarked` ? Port of Embarkation (C = Cherbourg; Q = Queenstown; S = Southampton)
39+
- `survival` : Survival (0 = No; 1 = Yes)
40+
- `pclass` : Passenger Class (1 = 1st; 2 = 2nd; 3 = 3rd)
41+
- `name` : Name
42+
- `sex` : Sex
43+
- `age` : Age
44+
- `sibsp` : Number of Siblings/Spouses Aboard
45+
- `parch` : Number of Parents/Children Aboard
46+
- `ticket` : Ticket Number
47+
- `fare` : Passenger Fare
48+
- `cabin` : Cabin
49+
- `embarked` : Port of Embarkation (C = Cherbourg; Q = Queenstown; S = Southampton)

0 commit comments

Comments
 (0)