Skip to content

Commit cadbcc5

Browse files
committed
Adding to iris machine learning
1 parent ea51940 commit cadbcc5

File tree

2 files changed

+63
-4
lines changed

2 files changed

+63
-4
lines changed

machine_learning/iris.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Iris Classification Model: Machine learning model that will
2+
# allow us to classify species of iris flowers. This application
3+
# will introduce many rudimentary features and concepts of machine
4+
# learning and is a good use case for these types of models.
5+
6+
# Use case: Botanist wants to determine the species of an
7+
# iris flower based on characteristics of that flower. For
8+
# instance attributes including petal length, width, etc.
9+
# are the "features" that determine the classification
10+
# of a given iris flower.
11+
12+
# Import the iris dataset as provided by the sklearn
13+
# Python module:
14+
from sklearn.datasets import load_iris
15+
iris = load_iris()
16+
17+
# Iris object returned is a 'Bunch' object. This is similar to a
18+
# Python dictionary as it cntains keys and values:
19+
# print(iris.keys())
20+
21+
# Value of DESCR is a description of the dataset.
22+
# Here are the first few values of the description
23+
print(iris['DESCR'][:200] + "\n...")
24+
25+
# The value with key "target_names" consists of an
26+
# array of strings with species that we intent to predict.
27+
iris['target_names']
28+

system_design/system_design_photo_sharing.md

+35-4
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,47 @@ title: "System Design: Photo Sharing Application"
5858
- Capacity figures obtained from: Educative.
5959
. . .
6060

61-
1.
61+
1. 500 million total users. 1 million active users daily.
62+
. . .
6263

63-
2.
64+
2. 2 million photos each day with roughly ~23 photos uploaded each second.
65+
. . .
66+
67+
3. Average photo size will be around ~200KB:
68+
2 million * 200 KB = 400 GB
69+
. . .
70+
71+
4. Total space required (assuming we store photos for 10 years):
72+
400 GB * 365 (days) * 10 (years) ~= 1425 TB
73+
74+
# High-level Requirements
75+
76+
- Users should be able to:
77+
78+
1. Upload image.
79+
. . .
80+
81+
2. Search for image.
82+
. . .
6483

65-
3.
6684

67-
4.
85+
- This will involve some storage solution for:
86+
87+
1. Storing the images that are uploaded.
88+
. . .
89+
90+
2. Storing metadata about the images (caption, location, etc.)
91+
92+
# Database Design
93+
94+
-
95+
6896

6997
# Test
98+
7099
-
71100

72101
# Further Resources
73102

103+
- Content based on:
104+
[Designing Instagram by Educative](https://www.educative.io/collection/page/5668639101419520/5649050225344512/5673385510043648)

0 commit comments

Comments
 (0)