Skip to content

Commit fc04625

Browse files
update toc
1 parent 26ca447 commit fc04625

File tree

79 files changed

+179467
-179485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+179467
-179485
lines changed
Lines changed: 819 additions & 819 deletions
Large diffs are not rendered by default.
Lines changed: 357 additions & 357 deletions
Large diffs are not rendered by default.
Lines changed: 1008 additions & 1008 deletions
Large diffs are not rendered by default.
Lines changed: 1800 additions & 1800 deletions
Large diffs are not rendered by default.
Lines changed: 2332 additions & 2332 deletions
Large diffs are not rendered by default.
Lines changed: 1470 additions & 1470 deletions
Large diffs are not rendered by default.
Lines changed: 732 additions & 732 deletions
Large diffs are not rendered by default.
Lines changed: 725 additions & 725 deletions
Large diffs are not rendered by default.
Lines changed: 1111 additions & 1111 deletions
Large diffs are not rendered by default.
Lines changed: 841 additions & 841 deletions
Large diffs are not rendered by default.
Lines changed: 574 additions & 574 deletions
Large diffs are not rendered by default.
Lines changed: 1146 additions & 1146 deletions
Large diffs are not rendered by default.
Lines changed: 515 additions & 515 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,155 @@
1-
{
2-
"cells": [
3-
{
4-
"cell_type": "code",
5-
"execution_count": 1,
6-
"metadata": {},
7-
"outputs": [],
8-
"source": [
9-
"import numpy as np"
10-
]
11-
},
12-
{
13-
"cell_type": "code",
14-
"execution_count": 2,
15-
"metadata": {},
16-
"outputs": [],
17-
"source": [
18-
"X = np.zeros((100, 5), dtype='bool')\n",
19-
"features = [\"bread\", \"milk\", \"cheese\", \"apples\", \"bananas\"]"
20-
]
21-
},
22-
{
23-
"cell_type": "code",
24-
"execution_count": 3,
25-
"metadata": {},
26-
"outputs": [],
27-
"source": [
28-
"for i in range(X.shape[0]):\n",
29-
" if np.random.random() < 0.3:\n",
30-
" # A bread winner\n",
31-
" X[i][0] = 1\n",
32-
" if np.random.random() < 0.5:\n",
33-
" # Who likes milk\n",
34-
" X[i][1] = 1\n",
35-
" if np.random.random() < 0.2:\n",
36-
" # Who likes cheese\n",
37-
" X[i][2] = 1\n",
38-
" if np.random.random() < 0.25:\n",
39-
" # Who likes apples\n",
40-
" X[i][3] = 1\n",
41-
" if np.random.random() < 0.5:\n",
42-
" # Who likes bananas\n",
43-
" X[i][4] = 1\n",
44-
" else:\n",
45-
" # Not a bread winner\n",
46-
" if np.random.random() < 0.5:\n",
47-
" # Who likes milk\n",
48-
" X[i][1] = 1\n",
49-
" if np.random.random() < 0.2:\n",
50-
" # Who likes cheese\n",
51-
" X[i][2] = 1\n",
52-
" if np.random.random() < 0.25:\n",
53-
" # Who likes apples\n",
54-
" X[i][3] = 1\n",
55-
" if np.random.random() < 0.5:\n",
56-
" # Who likes bananas\n",
57-
" X[i][4] = 1\n",
58-
" else:\n",
59-
" if np.random.random() < 0.8:\n",
60-
" # Who likes cheese\n",
61-
" X[i][2] = 1\n",
62-
" if np.random.random() < 0.6:\n",
63-
" # Who likes apples\n",
64-
" X[i][3] = 1\n",
65-
" if np.random.random() < 0.7:\n",
66-
" # Who likes bananas\n",
67-
" X[i][4] = 1\n",
68-
" if X[i].sum() == 0:\n",
69-
" X[i][4] = 1 # Must buy something, so gets bananas\n"
70-
]
71-
},
72-
{
73-
"cell_type": "code",
74-
"execution_count": 5,
75-
"metadata": {},
76-
"outputs": [
77-
{
78-
"name": "stdout",
79-
"output_type": "stream",
80-
"text": [
81-
"[[False False True True True]\n",
82-
" [ True True False True False]\n",
83-
" [ True False True True False]\n",
84-
" [False False True True True]\n",
85-
" [False True False False True]]\n"
86-
]
87-
}
88-
],
89-
"source": [
90-
"print(X[:5])"
91-
]
92-
},
93-
{
94-
"cell_type": "code",
95-
"execution_count": 7,
96-
"metadata": {},
97-
"outputs": [],
98-
"source": [
99-
"np.savetxt(\"affinity_dataset.txt\", X, fmt='%d')"
100-
]
101-
},
102-
{
103-
"cell_type": "code",
104-
"execution_count": null,
105-
"metadata": {},
106-
"outputs": [],
107-
"source": []
108-
}
109-
],
110-
"metadata": {
111-
"kernelspec": {
112-
"display_name": "Python 3",
113-
"language": "python",
114-
"name": "python3"
115-
},
116-
"language_info": {
117-
"codemirror_mode": {
118-
"name": "ipython",
119-
"version": 3
120-
},
121-
"file_extension": ".py",
122-
"mimetype": "text/x-python",
123-
"name": "python",
124-
"nbconvert_exporter": "python",
125-
"pygments_lexer": "ipython3",
126-
"version": "3.5.2"
127-
},
128-
"toc": {
129-
"colors": {
130-
"hover_highlight": "#DAA520",
131-
"navigate_num": "#000000",
132-
"navigate_text": "#333333",
133-
"running_highlight": "#FF0000",
134-
"selected_highlight": "#FFD700",
135-
"sidebar_border": "#EEEEEE",
136-
"wrapper_background": "#FFFFFF"
137-
},
138-
"moveMenuLeft": true,
139-
"nav_menu": {
140-
"height": "12px",
141-
"width": "252px"
142-
},
143-
"navigate_menu": true,
144-
"number_sections": true,
145-
"sideBar": true,
146-
"threshold": 4,
147-
"toc_cell": false,
148-
"toc_section_display": "block",
149-
"toc_window_display": false,
150-
"widenNotebook": false
151-
}
152-
},
153-
"nbformat": 4,
154-
"nbformat_minor": 1
155-
}
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"import numpy as np"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": 2,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"X = np.zeros((100, 5), dtype='bool')\n",
19+
"features = [\"bread\", \"milk\", \"cheese\", \"apples\", \"bananas\"]"
20+
]
21+
},
22+
{
23+
"cell_type": "code",
24+
"execution_count": 3,
25+
"metadata": {},
26+
"outputs": [],
27+
"source": [
28+
"for i in range(X.shape[0]):\n",
29+
" if np.random.random() < 0.3:\n",
30+
" # A bread winner\n",
31+
" X[i][0] = 1\n",
32+
" if np.random.random() < 0.5:\n",
33+
" # Who likes milk\n",
34+
" X[i][1] = 1\n",
35+
" if np.random.random() < 0.2:\n",
36+
" # Who likes cheese\n",
37+
" X[i][2] = 1\n",
38+
" if np.random.random() < 0.25:\n",
39+
" # Who likes apples\n",
40+
" X[i][3] = 1\n",
41+
" if np.random.random() < 0.5:\n",
42+
" # Who likes bananas\n",
43+
" X[i][4] = 1\n",
44+
" else:\n",
45+
" # Not a bread winner\n",
46+
" if np.random.random() < 0.5:\n",
47+
" # Who likes milk\n",
48+
" X[i][1] = 1\n",
49+
" if np.random.random() < 0.2:\n",
50+
" # Who likes cheese\n",
51+
" X[i][2] = 1\n",
52+
" if np.random.random() < 0.25:\n",
53+
" # Who likes apples\n",
54+
" X[i][3] = 1\n",
55+
" if np.random.random() < 0.5:\n",
56+
" # Who likes bananas\n",
57+
" X[i][4] = 1\n",
58+
" else:\n",
59+
" if np.random.random() < 0.8:\n",
60+
" # Who likes cheese\n",
61+
" X[i][2] = 1\n",
62+
" if np.random.random() < 0.6:\n",
63+
" # Who likes apples\n",
64+
" X[i][3] = 1\n",
65+
" if np.random.random() < 0.7:\n",
66+
" # Who likes bananas\n",
67+
" X[i][4] = 1\n",
68+
" if X[i].sum() == 0:\n",
69+
" X[i][4] = 1 # Must buy something, so gets bananas\n"
70+
]
71+
},
72+
{
73+
"cell_type": "code",
74+
"execution_count": 5,
75+
"metadata": {},
76+
"outputs": [
77+
{
78+
"name": "stdout",
79+
"output_type": "stream",
80+
"text": [
81+
"[[False False True True True]\n",
82+
" [ True True False True False]\n",
83+
" [ True False True True False]\n",
84+
" [False False True True True]\n",
85+
" [False True False False True]]\n"
86+
]
87+
}
88+
],
89+
"source": [
90+
"print(X[:5])"
91+
]
92+
},
93+
{
94+
"cell_type": "code",
95+
"execution_count": 7,
96+
"metadata": {},
97+
"outputs": [],
98+
"source": [
99+
"np.savetxt(\"affinity_dataset.txt\", X, fmt='%d')"
100+
]
101+
},
102+
{
103+
"cell_type": "code",
104+
"execution_count": null,
105+
"metadata": {},
106+
"outputs": [],
107+
"source": []
108+
}
109+
],
110+
"metadata": {
111+
"kernelspec": {
112+
"display_name": "Python 3",
113+
"language": "python",
114+
"name": "python3"
115+
},
116+
"language_info": {
117+
"codemirror_mode": {
118+
"name": "ipython",
119+
"version": 3
120+
},
121+
"file_extension": ".py",
122+
"mimetype": "text/x-python",
123+
"name": "python",
124+
"nbconvert_exporter": "python",
125+
"pygments_lexer": "ipython3",
126+
"version": "3.5.2"
127+
},
128+
"toc": {
129+
"colors": {
130+
"hover_highlight": "#DAA520",
131+
"navigate_num": "#000000",
132+
"navigate_text": "#333333",
133+
"running_highlight": "#FF0000",
134+
"selected_highlight": "#FFD700",
135+
"sidebar_border": "#EEEEEE",
136+
"wrapper_background": "#FFFFFF"
137+
},
138+
"moveMenuLeft": true,
139+
"nav_menu": {
140+
"height": "12px",
141+
"width": "252px"
142+
},
143+
"navigate_menu": true,
144+
"number_sections": true,
145+
"sideBar": true,
146+
"threshold": 4,
147+
"toc_cell": false,
148+
"toc_section_display": "block",
149+
"toc_window_display": false,
150+
"widenNotebook": false
151+
}
152+
},
153+
"nbformat": 4,
154+
"nbformat_minor": 1
155+
}

0 commit comments

Comments
 (0)