Spaces:
Runtime error
Runtime error
Upload 21 files
Browse files- duplicate prediction.ipynb +300 -0
- duplicate training and prediction.py +541 -0
- mlutil.py +1282 -0
- pers.txt +500 -0
- pers1.txt +10 -0
- pers_exist.txt +20 -0
- pers_new.txt +10 -0
- pers_new_dup.txt +10 -0
- ppers.txt +100 -0
- ppers1.txt +100 -0
- prediction.py +210 -0
- sampler.py +1339 -0
- spers_tr.txt +100 -0
- spers_va.txt +100 -0
- stats.py +482 -0
- test.py +18 -0
- tnn.py +775 -0
- tnn_disamb.properties +37 -0
- txproc.py +973 -0
- us-500.csv +501 -0
- util.py +2114 -0
duplicate prediction.ipynb
ADDED
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
+
"id": "1e3fc800",
|
7 |
+
"metadata": {},
|
8 |
+
"outputs": [],
|
9 |
+
"source": [
|
10 |
+
"import os\n",
|
11 |
+
"import sys\n",
|
12 |
+
"import random\n",
|
13 |
+
"import statistics \n",
|
14 |
+
"import numpy as np\n",
|
15 |
+
"import matplotlib.pyplot as plt \n",
|
16 |
+
"import threading\n",
|
17 |
+
"import time\n",
|
18 |
+
"import queue\n",
|
19 |
+
"sys.path.append(os.path.abspath(\"../lib\"))\n",
|
20 |
+
"sys.path.append(os.path.abspath(\"../supv\"))\n",
|
21 |
+
"sys.path.append(os.path.abspath(\"../text\"))\n",
|
22 |
+
"from util import *\n",
|
23 |
+
"from sampler import *\n",
|
24 |
+
"from tnn import *\n",
|
25 |
+
"from txproc import *\n",
|
26 |
+
"\n",
|
27 |
+
"emailDoms = [\"yahoo.com\", \"gmail.com\", \"hotmail.com\", \"aol.com\"]"
|
28 |
+
]
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"cell_type": "code",
|
32 |
+
"execution_count": 2,
|
33 |
+
"id": "e9195f68",
|
34 |
+
"metadata": {},
|
35 |
+
"outputs": [],
|
36 |
+
"source": [
|
37 |
+
"def printNgramVec(ngv):\n",
|
38 |
+
" \"\"\"\n",
|
39 |
+
" print ngram vector\n",
|
40 |
+
" \"\"\"\n",
|
41 |
+
" print(\"ngram vector\")\n",
|
42 |
+
" for i in range(len(ngv)):\n",
|
43 |
+
" if ngv[i] > 0:\n",
|
44 |
+
" print(\"{} {}\".format(i, ngv[i]))"
|
45 |
+
]
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"cell_type": "code",
|
49 |
+
"execution_count": 3,
|
50 |
+
"id": "a78fc5c8",
|
51 |
+
"metadata": {},
|
52 |
+
"outputs": [],
|
53 |
+
"source": [
|
54 |
+
"def createNegMatch(tdata, ri):\n",
|
55 |
+
" \"\"\"\n",
|
56 |
+
" create negative match by randomly selecting another record\n",
|
57 |
+
" \"\"\"\n",
|
58 |
+
" nri = randomInt(0, len(tdata)-1)\n",
|
59 |
+
" while nri == ri:\n",
|
60 |
+
" nri = randomInt(0, len(tdata)-1)\n",
|
61 |
+
" return tdata[nri]"
|
62 |
+
]
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"cell_type": "code",
|
66 |
+
"execution_count": 4,
|
67 |
+
"id": "3645fe7c",
|
68 |
+
"metadata": {},
|
69 |
+
"outputs": [],
|
70 |
+
"source": [
|
71 |
+
"def createNgramCreator():\n",
|
72 |
+
" \"\"\" create ngram creator \"\"\"\n",
|
73 |
+
" cng = CharNGram([\"lcc\", \"ucc\", \"dig\"], 3, True)\n",
|
74 |
+
" spc = [\"@\", \"#\", \"_\", \"-\", \".\"]\n",
|
75 |
+
" cng.addSpChar(spc)\n",
|
76 |
+
" cng.setWsRepl(\"$\")\n",
|
77 |
+
" cng.finalize()\n",
|
78 |
+
" return cng"
|
79 |
+
]
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"cell_type": "code",
|
83 |
+
"execution_count": 5,
|
84 |
+
"id": "f153bac5",
|
85 |
+
"metadata": {},
|
86 |
+
"outputs": [],
|
87 |
+
"source": [
|
88 |
+
"def getSim(rec, incOutput=True):\n",
|
89 |
+
" \"\"\" get rec pair similarity \"\"\"\n",
|
90 |
+
" #print(rec)\n",
|
91 |
+
" sim = list()\n",
|
92 |
+
" for i in range(6):\n",
|
93 |
+
" #print(\"field \" + str(i))\n",
|
94 |
+
" if i == 3:\n",
|
95 |
+
" s = levenshteinSimilarity(rec[i],rec[i+6])\n",
|
96 |
+
" else:\n",
|
97 |
+
" ngv1 = cng.toMgramCount(rec[i])\n",
|
98 |
+
" ngv2 = cng.toMgramCount(rec[i+6])\n",
|
99 |
+
" #printNgramVec(ngv1)\n",
|
100 |
+
" #printNgramVec(ngv2)\n",
|
101 |
+
" s = cosineSimilarity(ngv1, ngv2)\n",
|
102 |
+
" sim.append(s)\n",
|
103 |
+
" ss = toStrFromList(sim, 6)\n",
|
104 |
+
" srec = ss + \",\" + rec[-1] if incOutput else ss\n",
|
105 |
+
" return srec"
|
106 |
+
]
|
107 |
+
},
|
108 |
+
{
|
109 |
+
"cell_type": "code",
|
110 |
+
"execution_count": 6,
|
111 |
+
"id": "9e9ef369",
|
112 |
+
"metadata": {},
|
113 |
+
"outputs": [],
|
114 |
+
"source": [
|
115 |
+
"class SimThread (threading.Thread):\n",
|
116 |
+
" \"\"\" multi threaded similarity calculation \"\"\"\n",
|
117 |
+
"\n",
|
118 |
+
" def __init__(self, tName, cng, qu, incOutput, outQu, outQuSize):\n",
|
119 |
+
" \"\"\" initialize \"\"\"\n",
|
120 |
+
" threading.Thread.__init__(self)\n",
|
121 |
+
" self.tName = tName\n",
|
122 |
+
" self.cng = cng\n",
|
123 |
+
" self.qu = qu\n",
|
124 |
+
" self.incOutput = incOutput\n",
|
125 |
+
" self.outQu = outQu\n",
|
126 |
+
" self.outQuSize = outQuSize\n",
|
127 |
+
"\n",
|
128 |
+
" def run(self):\n",
|
129 |
+
" \"\"\" exeution \"\"\"\n",
|
130 |
+
" while not exitFlag:\n",
|
131 |
+
" rec = dequeue(self.qu, workQuLock)\n",
|
132 |
+
" if rec is not None:\n",
|
133 |
+
" srec = getSim(rec, self.incOutput)\n",
|
134 |
+
" if outQu is None:\n",
|
135 |
+
" print(srec)\n",
|
136 |
+
" else:\n",
|
137 |
+
" enqueue(srec, self.outQu, outQuLock, self.outQuSize)\n",
|
138 |
+
"\n",
|
139 |
+
"def createThreads(nworker, cng, workQu, incOutput, outQu, outQuSize):\n",
|
140 |
+
" \"\"\"create worker threads \"\"\"\n",
|
141 |
+
" threadList = list(map(lambda i : \"Thread-\" + str(i+1), range(nworker)))\n",
|
142 |
+
" threads = list()\n",
|
143 |
+
" for tName in threadList:\n",
|
144 |
+
" thread = SimThread(tName, cng, workQu, incOutput, outQu, outQuSize)\n",
|
145 |
+
" thread.start()\n",
|
146 |
+
" threads.append(thread)\n",
|
147 |
+
" return threads\n",
|
148 |
+
"\n",
|
149 |
+
"\n",
|
150 |
+
"def enqueue(rec, qu, quLock, qSize): \n",
|
151 |
+
" \"\"\" enqueue record \"\"\"\n",
|
152 |
+
" queued = False\n",
|
153 |
+
" while not queued:\n",
|
154 |
+
" quLock.acquire()\n",
|
155 |
+
" if qu.qsize() < qSize - 1:\n",
|
156 |
+
" qu.put(rec)\n",
|
157 |
+
" queued = True\n",
|
158 |
+
" quLock.release()\n",
|
159 |
+
" time.sleep(1)\n",
|
160 |
+
"\n",
|
161 |
+
"def dequeue(qu, quLock): \n",
|
162 |
+
" \"\"\" dequeue record \"\"\"\n",
|
163 |
+
" rec = None\n",
|
164 |
+
" quLock.acquire()\n",
|
165 |
+
" if not qu.empty():\n",
|
166 |
+
" rec = qu.get()\n",
|
167 |
+
" quLock.release()\n",
|
168 |
+
"\n",
|
169 |
+
" return rec"
|
170 |
+
]
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"cell_type": "code",
|
174 |
+
"execution_count": 33,
|
175 |
+
"id": "8248426b",
|
176 |
+
"metadata": {},
|
177 |
+
"outputs": [],
|
178 |
+
"source": [
|
179 |
+
"if __name__ == \"__main__\":\n",
|
180 |
+
" #multi threading related\n",
|
181 |
+
" workQuLock = threading.Lock()\n",
|
182 |
+
" outQuLock = threading.Lock()\n",
|
183 |
+
" exitFlag = False\n",
|
184 |
+
"\n",
|
185 |
+
" \"\"\" predict with neural network model \"\"\"\n",
|
186 |
+
" newFilePath = sys.argv[1]\n",
|
187 |
+
" existFilePath = sys.argv[2]\n",
|
188 |
+
" nworker = int(sys.argv[3])\n",
|
189 |
+
" prFile = sys.argv[4]\n",
|
190 |
+
" \n",
|
191 |
+
" regr = FeedForwardNetwork(prFile)\n",
|
192 |
+
" regr.buildModel()\n",
|
193 |
+
" cng = createNgramCreator()\n",
|
194 |
+
" \n",
|
195 |
+
" #create threads\n",
|
196 |
+
" qSize = 100\n",
|
197 |
+
" workQu = queue.Queue(qSize)\n",
|
198 |
+
" outQu = queue.Queue(qSize)\n",
|
199 |
+
" threads = createThreads(nworker, cng, workQu, False, outQu, qSize)\n",
|
200 |
+
" \n",
|
201 |
+
" for nrec in fileRecGen(newFilePath):\n",
|
202 |
+
" srecs = list()\n",
|
203 |
+
" ecount = 0\n",
|
204 |
+
" y_pred = []\n",
|
205 |
+
" #print(\"processing \", nrec)\n",
|
206 |
+
" for erec in fileRecGen(existFilePath):\n",
|
207 |
+
" rec = nrec.copy()\n",
|
208 |
+
" rec.extend(erec)\n",
|
209 |
+
" #print(rec)\n",
|
210 |
+
" \n",
|
211 |
+
" enqueue(rec, workQu, workQuLock, qSize)\n",
|
212 |
+
" srec = dequeue(outQu, outQuLock)\n",
|
213 |
+
" if srec is not None:\n",
|
214 |
+
" srecs.append(strToFloatArray(srec))\n",
|
215 |
+
" ecount += 1\n",
|
216 |
+
"\n",
|
217 |
+
" #wait til workq queue is drained\n",
|
218 |
+
" while not workQu.empty():\n",
|
219 |
+
" pass\n",
|
220 |
+
"\n",
|
221 |
+
" #drain out queue\n",
|
222 |
+
" while len(srecs) < ecount:\n",
|
223 |
+
" srec = dequeue(outQu, outQuLock)\n",
|
224 |
+
" if srec is not None:\n",
|
225 |
+
" srecs.append(strToFloatArray(srec))\n",
|
226 |
+
" #predict \n",
|
227 |
+
" simMax = 0\n",
|
228 |
+
" sims = FeedForwardNetwork.predict(regr, srecs)\n",
|
229 |
+
" sims = sims.reshape(sims.shape[0])\n",
|
230 |
+
" y_pred.append(max(sims))\n",
|
231 |
+
" #print(\"{} {:.3f}\".format(nrec, y_pred))\n",
|
232 |
+
" print(nrec, max(y_pred))\n",
|
233 |
+
"\n",
|
234 |
+
"# exitFlag = True"
|
235 |
+
]
|
236 |
+
},
|
237 |
+
{
|
238 |
+
"cell_type": "code",
|
239 |
+
"execution_count": 34,
|
240 |
+
"id": "62187449",
|
241 |
+
"metadata": {},
|
242 |
+
"outputs": [
|
243 |
+
{
|
244 |
+
"name": "stdout",
|
245 |
+
"output_type": "stream",
|
246 |
+
"text": [
|
247 |
+
"self.config <mlutil.Configuration object at 0x00000205D0157F10>\n",
|
248 |
+
"..restoring model checkpoint\n",
|
249 |
+
"['Lawrence Lorens', '9 Hpy', 'Providence', 'RI', '2906', 'lawrence.lorens@hotmail.com'] 0.9111754\n"
|
250 |
+
]
|
251 |
+
},
|
252 |
+
{
|
253 |
+
"ename": "KeyboardInterrupt",
|
254 |
+
"evalue": "",
|
255 |
+
"output_type": "error",
|
256 |
+
"traceback": [
|
257 |
+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
258 |
+
"\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
|
259 |
+
"Input \u001b[1;32mIn [34]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mpredict_main\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n",
|
260 |
+
"Input \u001b[1;32mIn [33]\u001b[0m, in \u001b[0;36mpredict_main\u001b[1;34m()\u001b[0m\n\u001b[0;32m 48\u001b[0m \u001b[38;5;66;03m#drain out queue\u001b[39;00m\n\u001b[0;32m 49\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(srecs) \u001b[38;5;241m<\u001b[39m ecount:\n\u001b[1;32m---> 50\u001b[0m srec \u001b[38;5;241m=\u001b[39m \u001b[43mdequeue\u001b[49m\u001b[43m(\u001b[49m\u001b[43moutQu\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moutQuLock\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 51\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m srec \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m 52\u001b[0m srecs\u001b[38;5;241m.\u001b[39mappend(strToFloatArray(srec))\n",
|
261 |
+
"Input \u001b[1;32mIn [8]\u001b[0m, in \u001b[0;36mdequeue\u001b[1;34m(qu, quLock)\u001b[0m\n\u001b[0;32m 49\u001b[0m rec \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 50\u001b[0m quLock\u001b[38;5;241m.\u001b[39macquire()\n\u001b[1;32m---> 51\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[43mqu\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mempty\u001b[49m():\n\u001b[0;32m 52\u001b[0m rec \u001b[38;5;241m=\u001b[39m qu\u001b[38;5;241m.\u001b[39mget()\n\u001b[0;32m 53\u001b[0m quLock\u001b[38;5;241m.\u001b[39mrelease()\n",
|
262 |
+
"\u001b[1;31mKeyboardInterrupt\u001b[0m: "
|
263 |
+
]
|
264 |
+
}
|
265 |
+
],
|
266 |
+
"source": [
|
267 |
+
"predict_main()"
|
268 |
+
]
|
269 |
+
},
|
270 |
+
{
|
271 |
+
"cell_type": "code",
|
272 |
+
"execution_count": null,
|
273 |
+
"id": "8fa85a13",
|
274 |
+
"metadata": {},
|
275 |
+
"outputs": [],
|
276 |
+
"source": []
|
277 |
+
}
|
278 |
+
],
|
279 |
+
"metadata": {
|
280 |
+
"kernelspec": {
|
281 |
+
"display_name": "Python 3 (ipykernel)",
|
282 |
+
"language": "python",
|
283 |
+
"name": "python3"
|
284 |
+
},
|
285 |
+
"language_info": {
|
286 |
+
"codemirror_mode": {
|
287 |
+
"name": "ipython",
|
288 |
+
"version": 3
|
289 |
+
},
|
290 |
+
"file_extension": ".py",
|
291 |
+
"mimetype": "text/x-python",
|
292 |
+
"name": "python",
|
293 |
+
"nbconvert_exporter": "python",
|
294 |
+
"pygments_lexer": "ipython3",
|
295 |
+
"version": "3.9.12"
|
296 |
+
}
|
297 |
+
},
|
298 |
+
"nbformat": 4,
|
299 |
+
"nbformat_minor": 5
|
300 |
+
}
|
duplicate training and prediction.py
ADDED
@@ -0,0 +1,541 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[20]:
|
5 |
+
|
6 |
+
|
7 |
+
import os
|
8 |
+
import sys
|
9 |
+
import random
|
10 |
+
import statistics
|
11 |
+
import numpy as np
|
12 |
+
import matplotlib.pyplot as plt
|
13 |
+
import threading
|
14 |
+
import time
|
15 |
+
import queue
|
16 |
+
sys.path.append(os.path.abspath("../lib"))
|
17 |
+
sys.path.append(os.path.abspath("../supv"))
|
18 |
+
sys.path.append(os.path.abspath("../text"))
|
19 |
+
from util import *
|
20 |
+
from sampler import *
|
21 |
+
from tnn import *
|
22 |
+
from txproc import *
|
23 |
+
|
24 |
+
emailDoms = ["yahoo.com", "gmail.com", "hotmail.com", "aol.com"]
|
25 |
+
|
26 |
+
|
27 |
+
# In[21]:
|
28 |
+
|
29 |
+
|
30 |
+
def mutStr(st):
|
31 |
+
"""mutate a char in string"""
|
32 |
+
l = len(st)
|
33 |
+
ci = randomInt(0, l - 1)
|
34 |
+
cv = st[ci]
|
35 |
+
if cv.isdigit():
|
36 |
+
r = selectRandomFromList(dig)
|
37 |
+
elif cv.isupper():
|
38 |
+
r = selectRandomFromList(ucc)
|
39 |
+
else:
|
40 |
+
r = selectRandomFromList(lcc)
|
41 |
+
|
42 |
+
nst = st[:ci] + r + st[ci+1:] if l > 1 else r
|
43 |
+
return nst
|
44 |
+
|
45 |
+
|
46 |
+
# In[23]:
|
47 |
+
|
48 |
+
|
49 |
+
def createPosMatch(rec, fi):
|
50 |
+
"""
|
51 |
+
create positive match by mutating a field
|
52 |
+
"""
|
53 |
+
mrec = rec.copy()
|
54 |
+
fv = mrec[fi]
|
55 |
+
nc = fv.split()
|
56 |
+
le = len(nc)
|
57 |
+
if fi == 0:
|
58 |
+
#name
|
59 |
+
if isEventSampled(50):
|
60 |
+
nfv = nc[0] + " " + selectRandomFromList(ucc) + " " + nc[1]
|
61 |
+
else:
|
62 |
+
nc[1] = mutStr(nc[1])
|
63 |
+
nfv = nc[0] + " " + nc[1]
|
64 |
+
elif fi == 1:
|
65 |
+
#address
|
66 |
+
mutated = False
|
67 |
+
if isEventSampled(50):
|
68 |
+
mutated = True
|
69 |
+
s = nc[-1]
|
70 |
+
if s == "Rd":
|
71 |
+
nc[-1] = "Road"
|
72 |
+
elif s == "Ave":
|
73 |
+
nc[-1] = "Avenue"
|
74 |
+
elif s == "St":
|
75 |
+
nc[-1] = "Street"
|
76 |
+
elif s == "Dr":
|
77 |
+
nc[-1] = "Drive"
|
78 |
+
else:
|
79 |
+
mutated = False
|
80 |
+
|
81 |
+
if not mutated:
|
82 |
+
si = randomInt(0, 1)
|
83 |
+
nc[si] = mutStr(nc[si])
|
84 |
+
nfv = " ".join(nc)
|
85 |
+
|
86 |
+
elif fi == 2:
|
87 |
+
#city
|
88 |
+
si = randomInt(0, le - 1) if le > 1 else 0
|
89 |
+
nc[si] = mutStr(nc[si])
|
90 |
+
nfv = " ".join(nc) if le > 1 else nc[0]
|
91 |
+
|
92 |
+
elif fi == 3:
|
93 |
+
#state
|
94 |
+
nc[0] = mutStr(nc[0])
|
95 |
+
nfv = nc[0]
|
96 |
+
|
97 |
+
elif fi == 4:
|
98 |
+
#zip
|
99 |
+
nc[0] = mutStr(nc[0])
|
100 |
+
nfv = nc[0]
|
101 |
+
|
102 |
+
elif fi == 5:
|
103 |
+
#email
|
104 |
+
if isEventSampled(60):
|
105 |
+
nc[0] = mutStr(nc[0])
|
106 |
+
nfv = nc[0]
|
107 |
+
else:
|
108 |
+
nfv = genLowCaseID(randomInt(4, 10)) + "@" + selectRandomFromList(emailDoms)
|
109 |
+
|
110 |
+
mrec[fi] = nfv
|
111 |
+
return mrec
|
112 |
+
|
113 |
+
|
114 |
+
# In[24]:
|
115 |
+
|
116 |
+
|
117 |
+
def printNgramVec(ngv):
|
118 |
+
"""
|
119 |
+
print ngram vector
|
120 |
+
"""
|
121 |
+
print("ngram vector")
|
122 |
+
for i in range(len(ngv)):
|
123 |
+
if ngv[i] > 0:
|
124 |
+
print("{} {}".format(i, ngv[i]))
|
125 |
+
|
126 |
+
|
127 |
+
# In[25]:
|
128 |
+
|
129 |
+
|
130 |
+
def createNegMatch(tdata, ri):
|
131 |
+
"""
|
132 |
+
create negative match by randomly selecting another record
|
133 |
+
"""
|
134 |
+
nri = randomInt(0, len(tdata)-1)
|
135 |
+
while nri == ri:
|
136 |
+
nri = randomInt(0, len(tdata)-1)
|
137 |
+
return tdata[nri]
|
138 |
+
|
139 |
+
|
140 |
+
# In[26]:
|
141 |
+
|
142 |
+
|
143 |
+
def createNgramCreator():
|
144 |
+
""" create ngram creator """
|
145 |
+
cng = CharNGram(["lcc", "ucc", "dig"], 3, True)
|
146 |
+
spc = ["@", "#", "_", "-", "."]
|
147 |
+
cng.addSpChar(spc)
|
148 |
+
cng.setWsRepl("$")
|
149 |
+
cng.finalize()
|
150 |
+
return cng
|
151 |
+
|
152 |
+
|
153 |
+
# In[27]:
|
154 |
+
|
155 |
+
|
156 |
+
def getSim(rec, incOutput=True):
|
157 |
+
""" get rec pair similarity """
|
158 |
+
#print(rec)
|
159 |
+
sim = list()
|
160 |
+
for i in range(6):
|
161 |
+
#print("field " + str(i))
|
162 |
+
if i == 3:
|
163 |
+
s = levenshteinSimilarity(rec[i],rec[i+6])
|
164 |
+
else:
|
165 |
+
ngv1 = cng.toMgramCount(rec[i])
|
166 |
+
ngv2 = cng.toMgramCount(rec[i+6])
|
167 |
+
#printNgramVec(ngv1)
|
168 |
+
#printNgramVec(ngv2)
|
169 |
+
s = cosineSimilarity(ngv1, ngv2)
|
170 |
+
sim.append(s)
|
171 |
+
ss = toStrFromList(sim, 6)
|
172 |
+
srec = ss + "," + rec[-1] if incOutput else ss
|
173 |
+
return srec
|
174 |
+
|
175 |
+
|
176 |
+
# In[28]:
|
177 |
+
|
178 |
+
|
179 |
+
class SimThread (threading.Thread):
|
180 |
+
""" multi threaded similarity calculation """
|
181 |
+
|
182 |
+
def __init__(self, tName, cng, qu, incOutput, outQu, outQuSize):
|
183 |
+
""" initialize """
|
184 |
+
threading.Thread.__init__(self)
|
185 |
+
self.tName = tName
|
186 |
+
self.cng = cng
|
187 |
+
self.qu = qu
|
188 |
+
self.incOutput = incOutput
|
189 |
+
self.outQu = outQu
|
190 |
+
self.outQuSize = outQuSize
|
191 |
+
|
192 |
+
def run(self):
|
193 |
+
""" exeution """
|
194 |
+
while not exitFlag:
|
195 |
+
rec = dequeue(self.qu, workQuLock)
|
196 |
+
if rec is not None:
|
197 |
+
srec = getSim(rec, self.incOutput)
|
198 |
+
if outQu is None:
|
199 |
+
print(srec)
|
200 |
+
else:
|
201 |
+
enqueue(srec, self.outQu, outQuLock, self.outQuSize)
|
202 |
+
|
203 |
+
def createThreads(nworker, cng, workQu, incOutput, outQu, outQuSize):
|
204 |
+
"""create worker threads """
|
205 |
+
threadList = list(map(lambda i : "Thread-" + str(i+1), range(nworker)))
|
206 |
+
threads = list()
|
207 |
+
if(outQu is None):
|
208 |
+
outQu = queue.Queue(outQuSize)
|
209 |
+
for tName in threadList:
|
210 |
+
thread = SimThread(tName, cng, workQu, incOutput, outQu, outQuSize)
|
211 |
+
thread.start()
|
212 |
+
threads.append(thread)
|
213 |
+
return threads
|
214 |
+
|
215 |
+
|
216 |
+
def enqueue(rec, qu, quLock, qSize):
|
217 |
+
""" enqueue record """
|
218 |
+
queued = False
|
219 |
+
while not queued:
|
220 |
+
quLock.acquire()
|
221 |
+
if qu.qsize() < qSize - 1:
|
222 |
+
qu.put(rec)
|
223 |
+
queued = True
|
224 |
+
quLock.release()
|
225 |
+
time.sleep(1)
|
226 |
+
|
227 |
+
def dequeue(qu, quLock):
|
228 |
+
""" dequeue record """
|
229 |
+
rec = None
|
230 |
+
quLock.acquire()
|
231 |
+
if not qu.empty():
|
232 |
+
rec = qu.get()
|
233 |
+
quLock.release()
|
234 |
+
|
235 |
+
return rec
|
236 |
+
|
237 |
+
|
238 |
+
# In[30]:
|
239 |
+
|
240 |
+
|
241 |
+
if __name__ == "__main__":
|
242 |
+
op = sys.argv[1]
|
243 |
+
|
244 |
+
#multi threading related
|
245 |
+
workQuLock = threading.Lock()
|
246 |
+
outQuLock = threading.Lock()
|
247 |
+
exitFlag = False
|
248 |
+
|
249 |
+
|
250 |
+
if op == "gen":
|
251 |
+
fp= open(r'pers.txt', 'w', encoding='utf-8')
|
252 |
+
""" generate data from from source file"""
|
253 |
+
srcFilePath = sys.argv[2]
|
254 |
+
i = 0
|
255 |
+
x=""
|
256 |
+
for rec in fileRecGen(srcFilePath, ","):
|
257 |
+
if i > 0:
|
258 |
+
nrec = list()
|
259 |
+
fname = rec[0]
|
260 |
+
lname = rec[1]
|
261 |
+
nrec.append(fname + " " + lname)
|
262 |
+
'''
|
263 |
+
nrec.append(rec[-9][1:-1])
|
264 |
+
nrec.append(rec[-8][1:-1])
|
265 |
+
nrec.append(rec[-6][1:-1])
|
266 |
+
'''
|
267 |
+
nrec.append(rec[-9])
|
268 |
+
nrec.append(rec[-8])
|
269 |
+
nrec.append(rec[-6])
|
270 |
+
|
271 |
+
z = rec[-5]
|
272 |
+
nrec.append(z)
|
273 |
+
nrec.append(rec[-2])
|
274 |
+
print(",".join(nrec))
|
275 |
+
x= ",".join(nrec)
|
276 |
+
print(x)
|
277 |
+
fp.write(x)
|
278 |
+
fp.write("\n")
|
279 |
+
|
280 |
+
i += 1
|
281 |
+
fp.close()
|
282 |
+
|
283 |
+
if op == "genad":
|
284 |
+
""" generate additional data by swapping name and address with another random record"""
|
285 |
+
srcFilePath = sys.argv[2]
|
286 |
+
nrec = int(sys.argv[3])
|
287 |
+
tdata = getFileLines(srcFilePath)
|
288 |
+
x=""
|
289 |
+
fp= open(r'pers_new.txt', 'w', encoding='utf-8')
|
290 |
+
for _ in range(nrec):
|
291 |
+
r1 = selectRandomFromList(tdata)
|
292 |
+
#print(",".join(r1))
|
293 |
+
r2 = selectRandomFromList(tdata)
|
294 |
+
while r1[0] == r2[0]:
|
295 |
+
r1 = selectRandomFromList(tdata)
|
296 |
+
r2 = selectRandomFromList(tdata)
|
297 |
+
|
298 |
+
nm = r2[0]
|
299 |
+
r1[0] = nm
|
300 |
+
r1[1] = r2[1]
|
301 |
+
email = nm.split()[0].lower() + "@" + r1[5].split("@")[1]
|
302 |
+
r1[5] = email
|
303 |
+
print(",".join(r1))
|
304 |
+
x= ",".join(r1)
|
305 |
+
print(x)
|
306 |
+
fp.write(x)
|
307 |
+
fp.write("\n")
|
308 |
+
|
309 |
+
fp.close()
|
310 |
+
|
311 |
+
if op == "gendup":
|
312 |
+
fp= open(r'pers_new_dup.txt', 'w', encoding='utf-8')
|
313 |
+
""" replace some records in first file with records from another file"""
|
314 |
+
srcFilePath = sys.argv[2]
|
315 |
+
dupFilePath = sys.argv[3]
|
316 |
+
ndup = int(sys.argv[4])
|
317 |
+
|
318 |
+
tdata = getFileLines(srcFilePath, None)
|
319 |
+
|
320 |
+
percen = 10
|
321 |
+
tdataSec = list()
|
322 |
+
while len(tdataSec) < ndup:
|
323 |
+
tdataSec = getFileSampleLines(dupFilePath, percen)
|
324 |
+
print("----------", tdataSec)
|
325 |
+
percen = int(percen * ndup / len(tdataSec) + 2)
|
326 |
+
|
327 |
+
tdataSec = selectRandomSubListFromList(tdataSec, ndup)
|
328 |
+
drecs = list()
|
329 |
+
for rec in tdataSec:
|
330 |
+
fi = randomInt(0, 5)
|
331 |
+
mrec = createPosMatch(rec, fi)
|
332 |
+
if isEventSampled(30):
|
333 |
+
fi = randomInt(0, 5)
|
334 |
+
mrec = createPosMatch(mrec, fi)
|
335 |
+
drecs.append(",".join(mrec))
|
336 |
+
|
337 |
+
setListRandomFromList(tdata, drecs)
|
338 |
+
for r in tdata:
|
339 |
+
print(r)
|
340 |
+
#x= ",".join(nrec)
|
341 |
+
fp.write(r)
|
342 |
+
fp.write("\n")
|
343 |
+
fp.close()
|
344 |
+
|
345 |
+
elif op == "genpn":
|
346 |
+
fp= open(r'ppers1.txt', 'w', encoding='utf-8')
|
347 |
+
""" generate pos pos and pos neg paire """
|
348 |
+
srcFilePath = sys.argv[2]
|
349 |
+
tdata = getFileLines(srcFilePath, None) if len(sys.argv) == 3 else getFileLines(sys.argv[3], None)
|
350 |
+
ri = 0
|
351 |
+
for rec in fileRecGen(srcFilePath, "\n"):
|
352 |
+
for _ in range(2):
|
353 |
+
fi = randomInt(0, 5)
|
354 |
+
rec_copy = rec[0].split(",")
|
355 |
+
mrec = createPosMatch(rec_copy, fi)
|
356 |
+
if isEventSampled(30):
|
357 |
+
fi = randomInt(0, 5)
|
358 |
+
mrec = createPosMatch(mrec, fi)
|
359 |
+
#print(",".join(rec) + "," + ",".join(mrec) + "," + "1")
|
360 |
+
x= ",".join(rec)+ "," + ",".join(mrec) + "," + "1"
|
361 |
+
print(x)
|
362 |
+
fp.write(x)
|
363 |
+
fp.write("\n")
|
364 |
+
|
365 |
+
for _ in range(2):
|
366 |
+
mrec = createNegMatch(tdata, ri)
|
367 |
+
#print(",".join(rec) + "," + mrec + "," + "0")
|
368 |
+
x= ",".join(rec)+ "," + mrec + "," + "0"
|
369 |
+
fp.write(x)
|
370 |
+
fp.write("\n")
|
371 |
+
|
372 |
+
ri += 1
|
373 |
+
fp.close()
|
374 |
+
elif op == "sim":
|
375 |
+
fp= open(r'spers_tr.txt', 'w', encoding='utf-8')
|
376 |
+
""" create field pair similarity """
|
377 |
+
srcFilePath = sys.argv[2]
|
378 |
+
cng = CharNGram(["lcc", "ucc", "dig"], 3, True)
|
379 |
+
spc = ["@", "#", "_", "-", "."]
|
380 |
+
cng.addSpChar(spc)
|
381 |
+
cng.setWsRepl("$")
|
382 |
+
cng.finalize()
|
383 |
+
c = 0
|
384 |
+
x = ""
|
385 |
+
for rec in fileRecGen(srcFilePath, ","):
|
386 |
+
#print(",".join(rec))
|
387 |
+
srec = getSim(rec)
|
388 |
+
#print(srec)
|
389 |
+
c += 1
|
390 |
+
|
391 |
+
x= ",".join(srec)
|
392 |
+
print(x)
|
393 |
+
fp.write(srec)
|
394 |
+
fp.write("\n")
|
395 |
+
fp.close()
|
396 |
+
|
397 |
+
elif op == "msim":
|
398 |
+
""" create field pair similarity in parallel"""
|
399 |
+
srcFilePath = sys.argv[2]
|
400 |
+
nworker = int(sys.argv[3])
|
401 |
+
|
402 |
+
cng = createNgramCreator()
|
403 |
+
c = 0
|
404 |
+
#create threads
|
405 |
+
qSize = 100
|
406 |
+
outQu = queue.Queue(qSize)
|
407 |
+
workQu = queue.Queue(qSize)
|
408 |
+
#threads = createThreads(nworker, cng, workQu, True, None, None)
|
409 |
+
threads = createThreads(nworker, cng, workQu, True, outQu, qSize)
|
410 |
+
# print(rec, workQu, qSize)
|
411 |
+
for rec in fileRecGen(srcFilePath, ","):
|
412 |
+
enqueue(rec, workQu, workQuLock, qSize)
|
413 |
+
|
414 |
+
#wrqp up
|
415 |
+
while not workQu.empty():
|
416 |
+
pass
|
417 |
+
exitFlag = True
|
418 |
+
for t in threads:
|
419 |
+
t.join()
|
420 |
+
|
421 |
+
elif op == "nnTrain":
|
422 |
+
""" train neural network model """
|
423 |
+
prFile = sys.argv[2]
|
424 |
+
regr = FeedForwardNetwork(prFile)
|
425 |
+
regr.buildModel()
|
426 |
+
FeedForwardNetwork.batchTrain(regr)
|
427 |
+
|
428 |
+
elif op == "nnPred":
|
429 |
+
""" predict with neural network model """
|
430 |
+
newFilePath = sys.argv[2]
|
431 |
+
existFilePath = sys.argv[3]
|
432 |
+
nworker = int(sys.argv[4])
|
433 |
+
prFile = sys.argv[5]
|
434 |
+
|
435 |
+
regr = FeedForwardNetwork(prFile)
|
436 |
+
regr.buildModel()
|
437 |
+
cng = createNgramCreator()
|
438 |
+
|
439 |
+
#create threads
|
440 |
+
qSize = 100
|
441 |
+
workQu = queue.Queue(qSize)
|
442 |
+
outQu = queue.Queue(qSize)
|
443 |
+
threads = createThreads(nworker, cng, workQu, False, outQu, qSize)
|
444 |
+
|
445 |
+
for nrec in fileRecGen(newFilePath):
|
446 |
+
srecs = list()
|
447 |
+
ecount = 0
|
448 |
+
y_pred = []
|
449 |
+
# print("processing ", nrec)
|
450 |
+
for erec in fileRecGen(existFilePath):
|
451 |
+
rec = nrec.copy()
|
452 |
+
rec.extend(erec)
|
453 |
+
# print(rec)
|
454 |
+
enqueue(rec, workQu, workQuLock, qSize)
|
455 |
+
srec = dequeue(outQu, outQuLock)
|
456 |
+
if srec is not None:
|
457 |
+
srecs.append(strToFloatArray(srec))
|
458 |
+
ecount += 1
|
459 |
+
# print("srecs1", srecs)
|
460 |
+
#wait til workq queue is drained
|
461 |
+
while not workQu.empty():
|
462 |
+
pass
|
463 |
+
|
464 |
+
#drain out queue
|
465 |
+
while len(srecs) < ecount:
|
466 |
+
srec = dequeue(outQu, outQuLock)
|
467 |
+
if srec is not None:
|
468 |
+
srecs.append(strToFloatArray(srec))
|
469 |
+
time.sleep(1)
|
470 |
+
# print("srecs--------------", srecs)
|
471 |
+
#predict
|
472 |
+
simMax = 0
|
473 |
+
sims = FeedForwardNetwork.predict(regr, srecs)
|
474 |
+
#sims = FeedForwardNetwork.predict(nrec, srecs)
|
475 |
+
sims = sims.reshape(sims.shape[0])
|
476 |
+
y_pred.append(max(sims))
|
477 |
+
#print("{} {:.3f}".format(nrec, y_pred))
|
478 |
+
print(nrec, max(y_pred))
|
479 |
+
|
480 |
+
#exitFlag = True
|
481 |
+
#for t in threads:
|
482 |
+
# t.join()
|
483 |
+
|
484 |
+
elif op == "nnPred_withthread":
|
485 |
+
""" predict with neural network model """
|
486 |
+
newFilePath = sys.argv[2]
|
487 |
+
existFilePath = sys.argv[3]
|
488 |
+
nworker = int(sys.argv[4])
|
489 |
+
prFile = sys.argv[5]
|
490 |
+
|
491 |
+
regr = FeedForwardNetwork(prFile)
|
492 |
+
regr.buildModel()
|
493 |
+
cng = createNgramCreator()
|
494 |
+
|
495 |
+
#create threads
|
496 |
+
|
497 |
+
qSize = 100
|
498 |
+
workQu = queue.Queue(qSize)
|
499 |
+
outQu = queue.Queue(qSize)
|
500 |
+
threads = createThreads(nworker, cng, workQu, False, outQu, qSize)
|
501 |
+
for nrec in fileRecGen(newFilePath):
|
502 |
+
srecs = list()
|
503 |
+
ecount = 0
|
504 |
+
print("processing ", nrec)
|
505 |
+
for erec in fileRecGen(existFilePath):
|
506 |
+
rec = nrec.copy()
|
507 |
+
rec.extend(erec)
|
508 |
+
print(rec)
|
509 |
+
enqueue(rec, workQu, workQuLock, qSize)
|
510 |
+
srec = dequeue(outQu, outQuLock)
|
511 |
+
if srec is not None:
|
512 |
+
srecs.append(strToFloatArray(srec))
|
513 |
+
ecount += 1
|
514 |
+
|
515 |
+
#wait til workq queue is drained
|
516 |
+
while not workQu.empty():
|
517 |
+
pass
|
518 |
+
|
519 |
+
#drain out queue
|
520 |
+
while len(srecs) < ecount:
|
521 |
+
srec = dequeue(outQu, outQuLock)
|
522 |
+
if srec is not None:
|
523 |
+
srecs.append(strToFloatArray(srec))
|
524 |
+
time.sleep(1)
|
525 |
+
|
526 |
+
#predict
|
527 |
+
simMax = 0
|
528 |
+
sims = FeedForwardNetwork.predict(regr, srecs)
|
529 |
+
sims = sims.reshape(sims.shape[0])
|
530 |
+
print("{} {:.3f}".format(nrec, max(sims)))
|
531 |
+
|
532 |
+
exitFlag = True
|
533 |
+
for t in threads:
|
534 |
+
t.join()
|
535 |
+
|
536 |
+
|
537 |
+
# In[ ]:
|
538 |
+
|
539 |
+
|
540 |
+
|
541 |
+
|
mlutil.py
ADDED
@@ -0,0 +1,1282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[ ]:
|
5 |
+
|
6 |
+
|
7 |
+
import os
|
8 |
+
import sys
|
9 |
+
import numpy as np
|
10 |
+
from sklearn import preprocessing
|
11 |
+
from sklearn import metrics
|
12 |
+
from sklearn.datasets import make_blobs
|
13 |
+
from sklearn.datasets import make_classification
|
14 |
+
import random
|
15 |
+
from math import *
|
16 |
+
from decimal import Decimal
|
17 |
+
import statistics
|
18 |
+
import jprops
|
19 |
+
from Levenshtein import distance as ld
|
20 |
+
from util import *
|
21 |
+
from sampler import *
|
22 |
+
|
23 |
+
class Configuration:
|
24 |
+
"""
|
25 |
+
Configuration management. Supports default value, mandatory value and typed value.
|
26 |
+
"""
|
27 |
+
def __init__(self, configFile, defValues, verbose=False):
|
28 |
+
"""
|
29 |
+
initializer
|
30 |
+
|
31 |
+
Parameters
|
32 |
+
configFile : config file path
|
33 |
+
defValues : dictionary of default values
|
34 |
+
verbose : verbosity flag
|
35 |
+
"""
|
36 |
+
configs = {}
|
37 |
+
with open(configFile) as fp:
|
38 |
+
for key, value in jprops.iter_properties(fp):
|
39 |
+
configs[key] = value
|
40 |
+
self.configs = configs
|
41 |
+
self.defValues = defValues
|
42 |
+
self.verbose = verbose
|
43 |
+
|
44 |
+
def override(self, configFile):
|
45 |
+
"""
|
46 |
+
over ride configuration from file
|
47 |
+
|
48 |
+
Parameters
|
49 |
+
configFile : override config file path
|
50 |
+
"""
|
51 |
+
with open(configFile) as fp:
|
52 |
+
for key, value in jprops.iter_properties(fp):
|
53 |
+
self.configs[key] = value
|
54 |
+
|
55 |
+
|
56 |
+
def setParam(self, name, value):
|
57 |
+
"""
|
58 |
+
override individual configuration
|
59 |
+
Parameters
|
60 |
+
name : config param name
|
61 |
+
value : config param value
|
62 |
+
"""
|
63 |
+
self.configs[name] = value
|
64 |
+
|
65 |
+
|
66 |
+
def getStringConfig(self, name):
|
67 |
+
"""
|
68 |
+
get string param
|
69 |
+
Parameters
|
70 |
+
name : config param name
|
71 |
+
"""
|
72 |
+
if self.isNone(name):
|
73 |
+
val = (None, False)
|
74 |
+
elif self.isDefault(name):
|
75 |
+
val = (self.handleDefault(name), True)
|
76 |
+
else:
|
77 |
+
val = (self.configs[name], False)
|
78 |
+
if self.verbose:
|
79 |
+
print( "{} {} {}".format(name, self.configs[name], val[0]))
|
80 |
+
return val
|
81 |
+
|
82 |
+
|
83 |
+
def getIntConfig(self, name):
|
84 |
+
"""
|
85 |
+
get int param
|
86 |
+
Parameters
|
87 |
+
name : config param name
|
88 |
+
"""
|
89 |
+
#print "%s %s" %(name,self.configs[name])
|
90 |
+
|
91 |
+
if self.isNone(name):
|
92 |
+
val = (None, False)
|
93 |
+
|
94 |
+
elif self.isDefault(name):
|
95 |
+
val = (self.handleDefault(name), True)
|
96 |
+
else:
|
97 |
+
val = (int(self.configs[name]), False)
|
98 |
+
if self.verbose:
|
99 |
+
print( "{} {} {}".format(name, self.configs[name], val[0]))
|
100 |
+
return val
|
101 |
+
|
102 |
+
|
103 |
+
def getFloatConfig(self, name):
|
104 |
+
"""
|
105 |
+
get float param
|
106 |
+
Parameters
|
107 |
+
name : config param name
|
108 |
+
"""
|
109 |
+
#print "%s %s" %(name,self.configs[name])
|
110 |
+
if self.isNone(name):
|
111 |
+
val = (None, False)
|
112 |
+
elif self.isDefault(name):
|
113 |
+
val = (self.handleDefault(name), True)
|
114 |
+
else:
|
115 |
+
val = (float(self.configs[name]), False)
|
116 |
+
if self.verbose:
|
117 |
+
print( "{} {} {:06.3f}".format(name, self.configs[name], val[0]))
|
118 |
+
return val
|
119 |
+
|
120 |
+
|
121 |
+
def getBooleanConfig(self, name):
|
122 |
+
"""
|
123 |
+
#get boolean param
|
124 |
+
Parameters
|
125 |
+
name : config param name
|
126 |
+
"""
|
127 |
+
if self.isNone(name):
|
128 |
+
val = (None, False)
|
129 |
+
elif self.isDefault(name):
|
130 |
+
val = (self.handleDefault(name), True)
|
131 |
+
else:
|
132 |
+
bVal = self.configs[name].lower() == "true"
|
133 |
+
val = (bVal, False)
|
134 |
+
if self.verbose:
|
135 |
+
print( "{} {} {}".format(name, self.configs[name], val[0]))
|
136 |
+
return val
|
137 |
+
|
138 |
+
|
139 |
+
def getIntListConfig(self, name, delim=","):
|
140 |
+
"""
|
141 |
+
get int list param
|
142 |
+
Parameters
|
143 |
+
name : config param name
|
144 |
+
delim : delemeter
|
145 |
+
"""
|
146 |
+
if self.isNone(name):
|
147 |
+
val = (None, False)
|
148 |
+
elif self.isDefault(name):
|
149 |
+
val = (self.handleDefault(name), True)
|
150 |
+
else:
|
151 |
+
delSepStr = self.getStringConfig(name)
|
152 |
+
|
153 |
+
#specified as range
|
154 |
+
intList = strListOrRangeToIntArray(delSepStr[0])
|
155 |
+
val =(intList, delSepStr[1])
|
156 |
+
return val
|
157 |
+
|
158 |
+
def getFloatListConfig(self, name, delim=","):
|
159 |
+
"""
|
160 |
+
get float list param
|
161 |
+
Parameters
|
162 |
+
name : config param name
|
163 |
+
delim : delemeter
|
164 |
+
"""
|
165 |
+
delSepStr = self.getStringConfig(name)
|
166 |
+
if self.isNone(name):
|
167 |
+
val = (None, False)
|
168 |
+
elif self.isDefault(name):
|
169 |
+
val = (self.handleDefault(name), True)
|
170 |
+
if(name=='train.input.size'):
|
171 |
+
print("val",val)
|
172 |
+
else:
|
173 |
+
flList = strToFloatArray(delSepStr[0], delim)
|
174 |
+
val =(flList, delSepStr[1])
|
175 |
+
return val
|
176 |
+
|
177 |
+
|
178 |
+
def getStringListConfig(self, name, delim=","):
|
179 |
+
"""
|
180 |
+
get string list param
|
181 |
+
Parameters
|
182 |
+
name : config param name
|
183 |
+
delim : delemeter
|
184 |
+
"""
|
185 |
+
delSepStr = self.getStringConfig(name)
|
186 |
+
if self.isNone(name):
|
187 |
+
val = (None, False)
|
188 |
+
elif self.isDefault(name):
|
189 |
+
val = (self.handleDefault(name), True)
|
190 |
+
else:
|
191 |
+
strList = delSepStr[0].split(delim)
|
192 |
+
val = (strList, delSepStr[1])
|
193 |
+
return val
|
194 |
+
|
195 |
+
def handleDefault(self, name):
|
196 |
+
"""
|
197 |
+
handles default
|
198 |
+
Parameters
|
199 |
+
name : config param name
|
200 |
+
"""
|
201 |
+
dVal = self.defValues[name]
|
202 |
+
if (dVal[1] is None):
|
203 |
+
val = dVal[0]
|
204 |
+
else:
|
205 |
+
raise ValueError(dVal[1])
|
206 |
+
return val
|
207 |
+
|
208 |
+
|
209 |
+
def isNone(self, name):
|
210 |
+
"""
|
211 |
+
true is value is None
|
212 |
+
Parameters
|
213 |
+
name : config param name
|
214 |
+
"""
|
215 |
+
|
216 |
+
return (name in self.configs.keys()) and (self.configs[name].lower() == "none")
|
217 |
+
|
218 |
+
|
219 |
+
def isDefault(self, name):
|
220 |
+
"""
|
221 |
+
true if the value is default
|
222 |
+
Parameters
|
223 |
+
name : config param name
|
224 |
+
"""
|
225 |
+
if(not(name in self.configs.keys())):
|
226 |
+
return True
|
227 |
+
de = self.configs[name] == "_"
|
228 |
+
#print de
|
229 |
+
return de
|
230 |
+
|
231 |
+
|
232 |
+
def eitherOrStringConfig(self, firstName, secondName):
|
233 |
+
"""
|
234 |
+
returns one of two string parameters
|
235 |
+
Parameters
|
236 |
+
firstName : first parameter name
|
237 |
+
secondName : second parameter name
|
238 |
+
"""
|
239 |
+
if not self.isNone(firstName):
|
240 |
+
first = self.getStringConfig(firstName)[0]
|
241 |
+
second = None
|
242 |
+
if not self.isNone(secondName):
|
243 |
+
raise ValueError("only one of the two parameters should be set and not both " + firstName + " " + secondName)
|
244 |
+
else:
|
245 |
+
if not self.isNone(secondName):
|
246 |
+
second = self.getStringConfig(secondtName)[0]
|
247 |
+
first = None
|
248 |
+
else:
|
249 |
+
raise ValueError("at least one of the two parameters should be set " + firstName + " " + secondName)
|
250 |
+
return (first, second)
|
251 |
+
|
252 |
+
|
253 |
+
def eitherOrIntConfig(self, firstName, secondName):
|
254 |
+
"""
|
255 |
+
returns one of two int parameters
|
256 |
+
Parameters
|
257 |
+
firstName : first parameter name
|
258 |
+
secondName : second parameter name
|
259 |
+
"""
|
260 |
+
if not self.isNone(firstName):
|
261 |
+
first = self.getIntConfig(firstName)[0]
|
262 |
+
second = None
|
263 |
+
if not self.isNone(secondName):
|
264 |
+
raise ValueError("only one of the two parameters should be set and not both " + firstName + " " + secondName)
|
265 |
+
else:
|
266 |
+
if not self.isNone(secondName):
|
267 |
+
second = self.getIntConfig(secondsName)[0]
|
268 |
+
first = None
|
269 |
+
else:
|
270 |
+
raise ValueError("at least one of the two parameters should be set " + firstName + " " + secondName)
|
271 |
+
return (first, second)
|
272 |
+
|
273 |
+
|
274 |
+
class CatLabelGenerator:
|
275 |
+
"""
|
276 |
+
label generator for categorical variables
|
277 |
+
"""
|
278 |
+
def __init__(self, catValues, delim):
|
279 |
+
"""
|
280 |
+
initilizers
|
281 |
+
|
282 |
+
Parameters
|
283 |
+
catValues : dictionary of categorical values
|
284 |
+
delim : delemeter
|
285 |
+
"""
|
286 |
+
self.encoders = {}
|
287 |
+
self.catValues = catValues
|
288 |
+
self.delim = delim
|
289 |
+
for k in self.catValues.keys():
|
290 |
+
le = preprocessing.LabelEncoder()
|
291 |
+
le.fit(self.catValues[k])
|
292 |
+
self.encoders[k] = le
|
293 |
+
|
294 |
+
def processRow(self, row):
|
295 |
+
"""
|
296 |
+
encode row categorical values
|
297 |
+
|
298 |
+
Parameters:
|
299 |
+
row : data row
|
300 |
+
"""
|
301 |
+
#print row
|
302 |
+
rowArr = row.split(self.delim)
|
303 |
+
for i in range(len(rowArr)):
|
304 |
+
if (i in self.catValues):
|
305 |
+
curVal = rowArr[i]
|
306 |
+
assert curVal in self.catValues[i], "categorival value invalid"
|
307 |
+
encVal = self.encoders[i].transform([curVal])
|
308 |
+
rowArr[i] = str(encVal[0])
|
309 |
+
return self.delim.join(rowArr)
|
310 |
+
|
311 |
+
def getOrigLabels(self, indx):
|
312 |
+
"""
|
313 |
+
get original labels
|
314 |
+
|
315 |
+
Parameters:
|
316 |
+
indx : column index
|
317 |
+
"""
|
318 |
+
return self.encoders[indx].classes_
|
319 |
+
|
320 |
+
|
321 |
+
class SupvLearningDataGenerator:
|
322 |
+
"""
|
323 |
+
data generator for supervised learning
|
324 |
+
"""
|
325 |
+
def __init__(self, configFile):
|
326 |
+
"""
|
327 |
+
initilizers
|
328 |
+
|
329 |
+
Parameters
|
330 |
+
configFile : config file path
|
331 |
+
"""
|
332 |
+
defValues = dict()
|
333 |
+
defValues["common.num.samp"] = (100, None)
|
334 |
+
defValues["common.num.feat"] = (5, None)
|
335 |
+
defValues["common.feat.trans"] = (None, None)
|
336 |
+
defValues["common.feat.types"] = (None, "missing feature types")
|
337 |
+
defValues["common.cat.feat.distr"] = (None, None)
|
338 |
+
defValues["common.output.precision"] = (3, None)
|
339 |
+
defValues["common.error"] = (0.01, None)
|
340 |
+
defValues["class.gen.technique"] = ("blob", None)
|
341 |
+
defValues["class.num.feat.informative"] = (2, None)
|
342 |
+
defValues["class.num.feat.redundant"] = (2, None)
|
343 |
+
defValues["class.num.feat.repeated"] = (0, None)
|
344 |
+
defValues["class.num.feat.cat"] = (0, None)
|
345 |
+
defValues["class.num.class"] = (2, None)
|
346 |
+
|
347 |
+
self.config = Configuration(configFile, defValues)
|
348 |
+
|
349 |
+
def genClassifierData(self):
|
350 |
+
"""
|
351 |
+
generates classifier data
|
352 |
+
"""
|
353 |
+
nsamp = self.config.getIntConfig("common.num.samp")[0]
|
354 |
+
nfeat = self.config.getIntConfig("common.num.feat")[0]
|
355 |
+
nclass = self.config.getIntConfig("class.num.class")[0]
|
356 |
+
#transform with shift and scale
|
357 |
+
ftrans = self.config.getFloatListConfig("common.feat.trans")[0]
|
358 |
+
feTrans = dict()
|
359 |
+
for i in range(0, len(ftrans), 2):
|
360 |
+
tr = (ftrans[i], ftrans[i+1])
|
361 |
+
indx = int(i/2)
|
362 |
+
feTrans[indx] = tr
|
363 |
+
|
364 |
+
ftypes = self.config.getStringListConfig("common.feat.types")[0]
|
365 |
+
|
366 |
+
# categorical feature distribution
|
367 |
+
feCatDist = dict()
|
368 |
+
fcatdl = self.config.getStringListConfig("common.cat.feat.distr")[0]
|
369 |
+
for fcatds in fcatdl:
|
370 |
+
fcatd = fcatds.split(":")
|
371 |
+
feInd = int(fcatd[0])
|
372 |
+
clVal = int(fcatd[1])
|
373 |
+
key = (feInd, clVal) #feature index and class value
|
374 |
+
dist = list(map(lambda i : (fcatd[i], float(fcatd[i+1])), range(2, len(fcatd), 2)))
|
375 |
+
feCatDist[key] = CategoricalRejectSampler(*dist)
|
376 |
+
|
377 |
+
#shift and scale
|
378 |
+
genTechnique = self.config.getStringConfig("class.gen.technique")[0]
|
379 |
+
error = self.config.getFloatConfig("common.error")[0]
|
380 |
+
if genTechnique == "blob":
|
381 |
+
features, claz = make_blobs(n_samples=nsamp, centers=nclass, n_features=nfeat)
|
382 |
+
for i in range(nsamp): #shift and scale
|
383 |
+
for j in range(nfeat):
|
384 |
+
tr = feTrans[j]
|
385 |
+
features[i,j] = (features[i,j] + tr[0]) * tr[1]
|
386 |
+
claz = np.array(list(map(lambda c : random.randint(0, nclass-1) if random.random() < error else c, claz)))
|
387 |
+
elif genTechnique == "classify":
|
388 |
+
nfeatInfo = self.config.getIntConfig("class.num.feat.informative")[0]
|
389 |
+
nfeatRed = self.config.getIntConfig("class.num.feat.redundant")[0]
|
390 |
+
nfeatRep = self.config.getIntConfig("class.num.feat.repeated")[0]
|
391 |
+
shifts = list(map(lambda i : feTrans[i][0], range(nfeat)))
|
392 |
+
scales = list(map(lambda i : feTrans[i][1], range(nfeat)))
|
393 |
+
features, claz = make_classification(n_samples=nsamp, n_features=nfeat, n_informative=nfeatInfo, n_redundant=nfeatRed,
|
394 |
+
n_repeated=nfeatRep, n_classes=nclass, flip_y=error, shift=shifts, scale=scales)
|
395 |
+
else:
|
396 |
+
raise "invalid genaration technique"
|
397 |
+
|
398 |
+
# add categorical features and format
|
399 |
+
nCatFeat = self.config.getIntConfig("class.num.feat.cat")[0]
|
400 |
+
prec = self.config.getIntConfig("common.output.precision")[0]
|
401 |
+
for f , c in zip(features, claz):
|
402 |
+
nfs = list(map(lambda i : self.numFeToStr(i, f[i], c, ftypes[i], prec), range(nfeat)))
|
403 |
+
if nCatFeat > 0:
|
404 |
+
cfs = list(map(lambda i : self.catFe(i, c, ftypes[i], feCatDist), range(nfeat, nfeat + nCatFeat, 1)))
|
405 |
+
rec = ",".join(nfs) + "," + ",".join(cfs) + "," + str(c)
|
406 |
+
else:
|
407 |
+
rec = ",".join(nfs) + "," + str(c)
|
408 |
+
yield rec
|
409 |
+
|
410 |
+
def numFeToStr(self, fv, ft, prec):
|
411 |
+
"""
|
412 |
+
nummeric feature value to string
|
413 |
+
|
414 |
+
Parameters
|
415 |
+
fv : field value
|
416 |
+
ft : field data type
|
417 |
+
prec : precision
|
418 |
+
"""
|
419 |
+
if ft == "float":
|
420 |
+
s = formatFloat(prec, fv)
|
421 |
+
elif ft =="int":
|
422 |
+
s = str(int(fv))
|
423 |
+
else:
|
424 |
+
raise "invalid type expecting float or int"
|
425 |
+
return s
|
426 |
+
|
427 |
+
def catFe(self, i, cv, ft, feCatDist):
|
428 |
+
"""
|
429 |
+
generate categorical feature
|
430 |
+
|
431 |
+
Parameters
|
432 |
+
i : col index
|
433 |
+
cv : class value
|
434 |
+
ft : field data type
|
435 |
+
feCatDist : cat value distribution
|
436 |
+
"""
|
437 |
+
if ft == "cat":
|
438 |
+
key = (i, cv)
|
439 |
+
s = feCatDist[key].sample()
|
440 |
+
else:
|
441 |
+
raise "invalid type expecting categorical"
|
442 |
+
return s
|
443 |
+
|
444 |
+
|
445 |
+
|
446 |
+
def loadDataFile(file, delim, cols, colIndices):
|
447 |
+
"""
|
448 |
+
loads delim separated file and extracts columns
|
449 |
+
Parameters
|
450 |
+
file : file path
|
451 |
+
delim : delemeter
|
452 |
+
cols : columns to use from file
|
453 |
+
colIndices ; columns to extract
|
454 |
+
"""
|
455 |
+
# data = np.loadtxt(file, delimiter=delim, usecols=cols)
|
456 |
+
# print("filename", file)
|
457 |
+
#data = np.loadtxt(file, delimiter="\n")
|
458 |
+
#print(type(data))
|
459 |
+
# print(type(cols), cols)
|
460 |
+
data = np.loadtxt(file, delimiter=",", usecols=cols)
|
461 |
+
extrData = data[:,colIndices]
|
462 |
+
return (data, extrData)
|
463 |
+
|
464 |
+
def loadFeatDataFile(file, delim, cols):
|
465 |
+
"""
|
466 |
+
loads delim separated file and extracts columns
|
467 |
+
|
468 |
+
Parameters
|
469 |
+
file : file path
|
470 |
+
delim : delemeter
|
471 |
+
cols : columns to use from file
|
472 |
+
"""
|
473 |
+
data = np.loadtxt(file, delimiter=delim, usecols=cols)
|
474 |
+
return data
|
475 |
+
|
476 |
+
def extrColumns(arr, columns):
|
477 |
+
"""
|
478 |
+
extracts columns
|
479 |
+
|
480 |
+
Parameters
|
481 |
+
arr : 2D array
|
482 |
+
columns : columns
|
483 |
+
"""
|
484 |
+
return arr[:, columns]
|
485 |
+
|
486 |
+
def subSample(featData, clsData, subSampleRate, withReplacement):
|
487 |
+
"""
|
488 |
+
subsample feature and class label data
|
489 |
+
Parameters
|
490 |
+
featData : 2D array of feature data
|
491 |
+
clsData : arrray of class labels
|
492 |
+
subSampleRate : fraction to be sampled
|
493 |
+
withReplacement : true if sampling with replacement
|
494 |
+
"""
|
495 |
+
sampSize = int(featData.shape[0] * subSampleRate)
|
496 |
+
sampledIndx = np.random.choice(featData.shape[0],sampSize, replace=withReplacement)
|
497 |
+
sampFeat = featData[sampledIndx]
|
498 |
+
sampCls = clsData[sampledIndx]
|
499 |
+
return(sampFeat, sampCls)
|
500 |
+
|
501 |
+
def euclideanDistance(x,y):
|
502 |
+
"""
|
503 |
+
euclidean distance
|
504 |
+
Parameters
|
505 |
+
x : first vector
|
506 |
+
y : second fvector
|
507 |
+
"""
|
508 |
+
return sqrt(sum(pow(a-b, 2) for a, b in zip(x, y)))
|
509 |
+
|
510 |
+
def squareRooted(x):
|
511 |
+
"""
|
512 |
+
square root of sum square
|
513 |
+
Parameters
|
514 |
+
x : data vector
|
515 |
+
"""
|
516 |
+
return round(sqrt(sum([a*a for a in x])),3)
|
517 |
+
|
518 |
+
def cosineSimilarity(x,y):
|
519 |
+
"""
|
520 |
+
cosine similarity
|
521 |
+
|
522 |
+
Parameters
|
523 |
+
x : first vector
|
524 |
+
y : second fvector
|
525 |
+
"""
|
526 |
+
numerator = sum(a*b for a,b in zip(x,y))
|
527 |
+
denominator = squareRooted(x) * squareRooted(y)
|
528 |
+
return round(numerator / float(denominator), 3)
|
529 |
+
|
530 |
+
def cosineDistance(x,y):
|
531 |
+
"""
|
532 |
+
cosine distance
|
533 |
+
Parameters
|
534 |
+
x : first vector
|
535 |
+
y : second fvector
|
536 |
+
"""
|
537 |
+
return 1.0 - cosineSimilarity(x,y)
|
538 |
+
|
539 |
+
def manhattanDistance(x,y):
|
540 |
+
"""
|
541 |
+
manhattan distance
|
542 |
+
Parameters
|
543 |
+
x : first vector
|
544 |
+
y : second fvector
|
545 |
+
"""
|
546 |
+
return sum(abs(a-b) for a,b in zip(x,y))
|
547 |
+
|
548 |
+
def nthRoot(value, nRoot):
|
549 |
+
"""
|
550 |
+
nth root
|
551 |
+
Parameters
|
552 |
+
value : data value
|
553 |
+
nRoot : root
|
554 |
+
"""
|
555 |
+
rootValue = 1/float(nRoot)
|
556 |
+
return round (Decimal(value) ** Decimal(rootValue),3)
|
557 |
+
|
558 |
+
def minkowskiDistance(x,y,pValue):
|
559 |
+
"""
|
560 |
+
minkowski distance
|
561 |
+
Parameters
|
562 |
+
x : first vector
|
563 |
+
y : second fvector
|
564 |
+
pValue : power factor
|
565 |
+
"""
|
566 |
+
return nthRoot(sum(pow(abs(a-b),pValue) for a,b in zip(x, y)), pValue)
|
567 |
+
|
568 |
+
def jaccardSimilarityX(x,y):
|
569 |
+
"""
|
570 |
+
jaccard similarity
|
571 |
+
Parameters
|
572 |
+
x : first vector
|
573 |
+
y : second fvector
|
574 |
+
"""
|
575 |
+
intersectionCardinality = len(set.intersection(*[set(x), set(y)]))
|
576 |
+
unionCardinality = len(set.union(*[set(x), set(y)]))
|
577 |
+
return intersectionCardinality/float(unionCardinality)
|
578 |
+
|
579 |
+
def jaccardSimilarity(x,y,wx=1.0,wy=1.0):
|
580 |
+
"""
|
581 |
+
jaccard similarity
|
582 |
+
|
583 |
+
Parameters
|
584 |
+
x : first vector
|
585 |
+
y : second fvector
|
586 |
+
wx : weight for x
|
587 |
+
wy : weight for y
|
588 |
+
"""
|
589 |
+
sx = set(x)
|
590 |
+
sy = set(y)
|
591 |
+
sxyInt = sx.intersection(sy)
|
592 |
+
intCardinality = len(sxyInt)
|
593 |
+
sxIntDiff = sx.difference(sxyInt)
|
594 |
+
syIntDiff = sy.difference(sxyInt)
|
595 |
+
unionCardinality = len(sx.union(sy))
|
596 |
+
return intCardinality/float(intCardinality + wx * len(sxIntDiff) + wy * len(syIntDiff))
|
597 |
+
|
598 |
+
def levenshteinSimilarity(s1, s2):
|
599 |
+
"""
|
600 |
+
Levenshtein similarity for strings
|
601 |
+
|
602 |
+
Parameters
|
603 |
+
sx : first string
|
604 |
+
sy : second string
|
605 |
+
"""
|
606 |
+
assert type(s1) == str and type(s2) == str, "Levenshtein similarity is for string only"
|
607 |
+
d = ld(s1,s2)
|
608 |
+
#print(d)
|
609 |
+
l = max(len(s1),len(s2))
|
610 |
+
d = 1.0 - min(d/l, 1.0)
|
611 |
+
return d
|
612 |
+
|
613 |
+
def norm(values, po=2):
|
614 |
+
"""
|
615 |
+
norm
|
616 |
+
Parameters
|
617 |
+
values : list of values
|
618 |
+
po : power
|
619 |
+
"""
|
620 |
+
no = sum(list(map(lambda v: pow(v,po), values)))
|
621 |
+
no = pow(no,1.0/po)
|
622 |
+
return list(map(lambda v: v/no, values))
|
623 |
+
|
624 |
+
def createOneHotVec(size, indx = -1):
|
625 |
+
"""
|
626 |
+
random one hot vector
|
627 |
+
|
628 |
+
Parameters
|
629 |
+
size : vector size
|
630 |
+
indx : one hot position
|
631 |
+
"""
|
632 |
+
vec = [0] * size
|
633 |
+
s = random.randint(0, size - 1) if indx < 0 else indx
|
634 |
+
vec[s] = 1
|
635 |
+
return vec
|
636 |
+
|
637 |
+
def createAllOneHotVec(size):
|
638 |
+
"""
|
639 |
+
create all one hot vectors
|
640 |
+
|
641 |
+
Parameters
|
642 |
+
size : vector size and no of vectors
|
643 |
+
"""
|
644 |
+
vecs = list()
|
645 |
+
for i in range(size):
|
646 |
+
vec = [0] * size
|
647 |
+
vec[i] = 1
|
648 |
+
vecs.append(vec)
|
649 |
+
return vecs
|
650 |
+
|
651 |
+
def blockShuffle(data, blockSize):
|
652 |
+
"""
|
653 |
+
block shuffle
|
654 |
+
|
655 |
+
Parameters
|
656 |
+
data : list data
|
657 |
+
blockSize : block size
|
658 |
+
"""
|
659 |
+
numBlock = int(len(data) / blockSize)
|
660 |
+
remain = len(data) % blockSize
|
661 |
+
numBlock += (1 if remain > 0 else 0)
|
662 |
+
shuffled = list()
|
663 |
+
for i in range(numBlock):
|
664 |
+
b = random.randint(0, numBlock-1)
|
665 |
+
beg = b * blockSize
|
666 |
+
if (b < numBlock-1):
|
667 |
+
end = beg + blockSize
|
668 |
+
shuffled.extend(data[beg:end])
|
669 |
+
else:
|
670 |
+
shuffled.extend(data[beg:])
|
671 |
+
return shuffled
|
672 |
+
|
673 |
+
def shuffle(data, numShuffle):
|
674 |
+
"""
|
675 |
+
shuffle data by randonm swapping
|
676 |
+
|
677 |
+
Parameters
|
678 |
+
data : list data
|
679 |
+
numShuffle : no of pairwise swaps
|
680 |
+
"""
|
681 |
+
sz = len(data)
|
682 |
+
if numShuffle is None:
|
683 |
+
numShuffle = int(sz / 2)
|
684 |
+
for i in range(numShuffle):
|
685 |
+
fi = random.randint(0, sz -1)
|
686 |
+
se = random.randint(0, sz -1)
|
687 |
+
tmp = data[fi]
|
688 |
+
data[fi] = data[se]
|
689 |
+
data[se] = tmp
|
690 |
+
|
691 |
+
def randomWalk(size, start, lowStep, highStep):
|
692 |
+
"""
|
693 |
+
random walk
|
694 |
+
|
695 |
+
Parameters
|
696 |
+
size : list data
|
697 |
+
start : initial position
|
698 |
+
lowStep : step min
|
699 |
+
highStep : step max
|
700 |
+
"""
|
701 |
+
cur = start
|
702 |
+
for i in range(size):
|
703 |
+
yield cur
|
704 |
+
cur += randomFloat(lowStep, highStep)
|
705 |
+
|
706 |
+
def binaryEcodeCategorical(values, value):
|
707 |
+
"""
|
708 |
+
one hot binary encoding
|
709 |
+
|
710 |
+
Parameters
|
711 |
+
values : list of values
|
712 |
+
value : value to be replaced with 1
|
713 |
+
"""
|
714 |
+
size = len(values)
|
715 |
+
vec = [0] * size
|
716 |
+
for i in range(size):
|
717 |
+
if (values[i] == value):
|
718 |
+
vec[i] = 1
|
719 |
+
return vec
|
720 |
+
|
721 |
+
def createLabeledSeq(inputData, tw):
|
722 |
+
"""
|
723 |
+
Creates feature, label pair from sequence data, where we have tw number of features followed by output
|
724 |
+
|
725 |
+
Parameters
|
726 |
+
values : list containing feature and label
|
727 |
+
tw : no of features
|
728 |
+
"""
|
729 |
+
features = list()
|
730 |
+
labels = list()
|
731 |
+
l = len(inputDta)
|
732 |
+
for i in range(l - tw):
|
733 |
+
trainSeq = inputData[i:i+tw]
|
734 |
+
trainLabel = inputData[i+tw]
|
735 |
+
features.append(trainSeq)
|
736 |
+
labels.append(trainLabel)
|
737 |
+
return (features, labels)
|
738 |
+
|
739 |
+
def createLabeledSeq(filePath, delim, index, tw):
|
740 |
+
"""
|
741 |
+
Creates feature, label pair from 1D sequence data in file
|
742 |
+
|
743 |
+
Parameters
|
744 |
+
filePath : file path
|
745 |
+
delim : delemeter
|
746 |
+
index : column index
|
747 |
+
tw : no of features
|
748 |
+
"""
|
749 |
+
seqData = getFileColumnAsFloat(filePath, delim, index)
|
750 |
+
return createLabeledSeq(seqData, tw)
|
751 |
+
|
752 |
+
def fromMultDimSeqToTabular(data, inpSize, seqLen):
|
753 |
+
"""
|
754 |
+
Input shape (nrow, inpSize * seqLen) output shape(nrow * seqLen, inpSize)
|
755 |
+
|
756 |
+
Parameters
|
757 |
+
data : 2D array
|
758 |
+
inpSize : each input size in sequence
|
759 |
+
seqLen : sequence length
|
760 |
+
"""
|
761 |
+
nrow = data.shape[0]
|
762 |
+
assert data.shape[1] == inpSize * seqLen, "invalid input size or sequence length"
|
763 |
+
return data.reshape(nrow * seqLen, inpSize)
|
764 |
+
|
765 |
+
def fromTabularToMultDimSeq(data, inpSize, seqLen):
|
766 |
+
"""
|
767 |
+
Input shape (nrow * seqLen, inpSize) output shape (nrow, inpSize * seqLen)
|
768 |
+
Parameters
|
769 |
+
data : 2D array
|
770 |
+
inpSize : each input size in sequence
|
771 |
+
seqLen : sequence length
|
772 |
+
"""
|
773 |
+
nrow = int(data.shape[0] / seqLen)
|
774 |
+
assert data.shape[1] == inpSize, "invalid input size"
|
775 |
+
return data.reshape(nrow, seqLen * inpSize)
|
776 |
+
|
777 |
+
def difference(data, interval=1):
|
778 |
+
"""
|
779 |
+
takes difference in time series data
|
780 |
+
Parameters
|
781 |
+
data :list data
|
782 |
+
interval : interval for difference
|
783 |
+
"""
|
784 |
+
diff = list()
|
785 |
+
for i in range(interval, len(data)):
|
786 |
+
value = data[i] - data[i - interval]
|
787 |
+
diff.append(value)
|
788 |
+
return diff
|
789 |
+
|
790 |
+
def normalizeMatrix(data, norm, axis=1):
|
791 |
+
"""
|
792 |
+
normalized each row of the matrix
|
793 |
+
|
794 |
+
Parameters
|
795 |
+
data : 2D data
|
796 |
+
nporm : normalization method
|
797 |
+
axis : row or column
|
798 |
+
"""
|
799 |
+
normalized = preprocessing.normalize(data,norm=norm, axis=axis)
|
800 |
+
return normalized
|
801 |
+
|
802 |
+
def standardizeMatrix(data, axis=0):
|
803 |
+
"""
|
804 |
+
standardizes each column of the matrix with mean and std deviation
|
805 |
+
Parameters
|
806 |
+
data : 2D data
|
807 |
+
axis : row or column
|
808 |
+
"""
|
809 |
+
standardized = preprocessing.scale(data, axis=axis)
|
810 |
+
return standardized
|
811 |
+
|
812 |
+
def asNumpyArray(data):
|
813 |
+
"""
|
814 |
+
converts to numpy array
|
815 |
+
Parameters
|
816 |
+
data : array
|
817 |
+
"""
|
818 |
+
return np.array(data)
|
819 |
+
|
820 |
+
def perfMetric(metric, yActual, yPred, clabels=None):
|
821 |
+
"""
|
822 |
+
predictive model accuracy metric
|
823 |
+
Parameters
|
824 |
+
metric : accuracy metric
|
825 |
+
yActual : actual values array
|
826 |
+
yPred : predicted values array
|
827 |
+
clabels : class labels
|
828 |
+
"""
|
829 |
+
if metric == "rsquare":
|
830 |
+
score = metrics.r2_score(yActual, yPred)
|
831 |
+
elif metric == "mae":
|
832 |
+
score = metrics.mean_absolute_error(yActual, yPred)
|
833 |
+
elif metric == "mse":
|
834 |
+
score = metrics.mean_squared_error(yActual, yPred)
|
835 |
+
elif metric == "acc":
|
836 |
+
yPred = np.rint(yPred)
|
837 |
+
score = metrics.accuracy_score(yActual, yPred)
|
838 |
+
elif metric == "mlAcc":
|
839 |
+
yPred = np.argmax(yPred, axis=1)
|
840 |
+
score = metrics.accuracy_score(yActual, yPred)
|
841 |
+
elif metric == "prec":
|
842 |
+
yPred = np.argmax(yPred, axis=1)
|
843 |
+
score = metrics.precision_score(yActual, yPred)
|
844 |
+
elif metric == "rec":
|
845 |
+
yPred = np.argmax(yPred, axis=1)
|
846 |
+
score = metrics.recall_score(yActual, yPred)
|
847 |
+
elif metric == "fone":
|
848 |
+
yPred = np.argmax(yPred, axis=1)
|
849 |
+
score = metrics.f1_score(yActual, yPred)
|
850 |
+
elif metric == "confm":
|
851 |
+
yPred = np.argmax(yPred, axis=1)
|
852 |
+
score = metrics.confusion_matrix(yActual, yPred)
|
853 |
+
elif metric == "clarep":
|
854 |
+
yPred = np.argmax(yPred, axis=1)
|
855 |
+
score = metrics.classification_report(yActual, yPred)
|
856 |
+
elif metric == "bce":
|
857 |
+
if clabels is None:
|
858 |
+
clabels = [0, 1]
|
859 |
+
score = metrics.log_loss(yActual, yPred, labels=clabels)
|
860 |
+
elif metric == "ce":
|
861 |
+
assert clabels is not None, "labels must be provided"
|
862 |
+
score = metrics.log_loss(yActual, yPred, labels=clabels)
|
863 |
+
else:
|
864 |
+
exitWithMsg("invalid prediction performance metric " + metric)
|
865 |
+
return score
|
866 |
+
|
867 |
+
def scaleData(data, method):
|
868 |
+
"""
|
869 |
+
scales feature data column wise
|
870 |
+
Parameters
|
871 |
+
data : 2D array
|
872 |
+
method : scaling method
|
873 |
+
"""
|
874 |
+
if method == "minmax":
|
875 |
+
scaler = preprocessing.MinMaxScaler()
|
876 |
+
data = scaler.fit_transform(data)
|
877 |
+
elif method == "zscale":
|
878 |
+
data = preprocessing.scale(data)
|
879 |
+
else:
|
880 |
+
raise ValueError("invalid scaling method")
|
881 |
+
return data
|
882 |
+
|
883 |
+
def scaleDataWithParams(data, method, scParams):
|
884 |
+
"""
|
885 |
+
scales feature data column wise
|
886 |
+
Parameters
|
887 |
+
data : 2D array
|
888 |
+
method : scaling method
|
889 |
+
scParams : scaling parameters
|
890 |
+
"""
|
891 |
+
if method == "minmax":
|
892 |
+
data = scaleMinMaxTabData(data, scParams)
|
893 |
+
elif method == "zscale":
|
894 |
+
raise ValueError("invalid scaling method")
|
895 |
+
else:
|
896 |
+
raise ValueError("invalid scaling method")
|
897 |
+
return data
|
898 |
+
|
899 |
+
|
900 |
+
def scaleMinMaxTabData(tdata, minMax):
|
901 |
+
"""
|
902 |
+
for tabular scales feature data column wise using min max values for each field
|
903 |
+
Parameters
|
904 |
+
tdata : 2D array
|
905 |
+
minMax : ni, max and range for each column
|
906 |
+
"""
|
907 |
+
stdata = list()
|
908 |
+
for r in tdata:
|
909 |
+
srdata = list()
|
910 |
+
for i, c in enumerate(r):
|
911 |
+
sd = (c - minMax[i][0]) / minMax[i][2]
|
912 |
+
srdata.append(sd)
|
913 |
+
stdata.append(srdata)
|
914 |
+
return stdata
|
915 |
+
|
916 |
+
def scaleMinMax(rdata, minMax):
|
917 |
+
"""
|
918 |
+
scales feature data column wise using min max values for each field
|
919 |
+
Parameters
|
920 |
+
rdata : data array
|
921 |
+
minMax : ni, max and range for each column
|
922 |
+
"""
|
923 |
+
srdata = list()
|
924 |
+
for i in range(len(rdata)):
|
925 |
+
d = rdata[i]
|
926 |
+
sd = (d - minMax[i][0]) / minMax[i][2]
|
927 |
+
srdata.append(sd)
|
928 |
+
return srdata
|
929 |
+
|
930 |
+
def harmonicNum(n):
|
931 |
+
"""
|
932 |
+
harmonic number
|
933 |
+
Parameters
|
934 |
+
n : number
|
935 |
+
"""
|
936 |
+
h = 0
|
937 |
+
for i in range(1, n+1, 1):
|
938 |
+
h += 1.0 / i
|
939 |
+
return h
|
940 |
+
|
941 |
+
def digammaFun(n):
|
942 |
+
"""
|
943 |
+
figamma function
|
944 |
+
Parameters
|
945 |
+
n : number
|
946 |
+
"""
|
947 |
+
#Euler Mascheroni constant
|
948 |
+
ec = 0.577216
|
949 |
+
return harmonicNum(n - 1) - ec
|
950 |
+
|
951 |
+
def getDataPartitions(tdata, types, columns = None):
|
952 |
+
"""
|
953 |
+
partitions data with the given columns and random split point defined with predicates
|
954 |
+
Parameters
|
955 |
+
tdata : 2D array
|
956 |
+
types : data typers
|
957 |
+
columns : column indexes
|
958 |
+
"""
|
959 |
+
(dtypes, cvalues) = extractTypesFromString(types)
|
960 |
+
if columns is None:
|
961 |
+
ncol = len(data[0])
|
962 |
+
columns = list(range(ncol))
|
963 |
+
ncol = len(columns)
|
964 |
+
#print(columns)
|
965 |
+
|
966 |
+
# partition predicates
|
967 |
+
partitions = None
|
968 |
+
for c in columns:
|
969 |
+
#print(c)
|
970 |
+
dtype = dtypes[c]
|
971 |
+
pred = list()
|
972 |
+
if dtype == "int" or dtype == "float":
|
973 |
+
(vmin, vmax) = getColMinMax(tdata, c)
|
974 |
+
r = vmax - vmin
|
975 |
+
rmin = vmin + .2 * r
|
976 |
+
rmax = vmax - .2 * r
|
977 |
+
sp = randomFloat(rmin, rmax)
|
978 |
+
if dtype == "int":
|
979 |
+
sp = int(sp)
|
980 |
+
else:
|
981 |
+
sp = "{:.3f}".format(sp)
|
982 |
+
sp = float(sp)
|
983 |
+
pred.append([c, "LT", sp])
|
984 |
+
pred.append([c, "GE", sp])
|
985 |
+
elif dtype == "cat":
|
986 |
+
cv = cvalues[c]
|
987 |
+
card = len(cv)
|
988 |
+
if card < 3:
|
989 |
+
num = 1
|
990 |
+
else:
|
991 |
+
num = randomInt(1, card - 1)
|
992 |
+
sp = selectRandomSubListFromList(cv, num)
|
993 |
+
sp = " ".join(sp)
|
994 |
+
pred.append([c, "IN", sp])
|
995 |
+
pred.append([c, "NOTIN", sp])
|
996 |
+
|
997 |
+
#print(pred)
|
998 |
+
if partitions is None:
|
999 |
+
partitions = pred.copy()
|
1000 |
+
#print("initial")
|
1001 |
+
#print(partitions)
|
1002 |
+
else:
|
1003 |
+
#print("extension")
|
1004 |
+
tparts = list()
|
1005 |
+
for p in partitions:
|
1006 |
+
#print(p)
|
1007 |
+
l1 = p.copy()
|
1008 |
+
l1.extend(pred[0])
|
1009 |
+
l2 = p.copy()
|
1010 |
+
l2.extend(pred[1])
|
1011 |
+
#print("after extension")
|
1012 |
+
#print(l1)
|
1013 |
+
#print(l2)
|
1014 |
+
tparts.append(l1)
|
1015 |
+
tparts.append(l2)
|
1016 |
+
partitions = tparts
|
1017 |
+
#print("extending")
|
1018 |
+
#print(partitions)
|
1019 |
+
|
1020 |
+
#for p in partitions:
|
1021 |
+
#print(p)
|
1022 |
+
return partitions
|
1023 |
+
|
1024 |
+
def genAlmostUniformDistr(size, nswap=50):
|
1025 |
+
"""
|
1026 |
+
generate probability distribution
|
1027 |
+
|
1028 |
+
Parameters
|
1029 |
+
size : distr size
|
1030 |
+
nswap : no of mass swaps
|
1031 |
+
"""
|
1032 |
+
un = 1.0 / size
|
1033 |
+
distr = [un] * size
|
1034 |
+
distr = mutDistr(distr, 0.1 * un, nswap)
|
1035 |
+
return distr
|
1036 |
+
|
1037 |
+
def mutDistr(distr, shift, nswap=50):
|
1038 |
+
"""
|
1039 |
+
mutates a probability distribution
|
1040 |
+
|
1041 |
+
Parameters
|
1042 |
+
distr distribution
|
1043 |
+
shift : amount of shift for swap
|
1044 |
+
nswap : no of mass swaps
|
1045 |
+
"""
|
1046 |
+
size = len(distr)
|
1047 |
+
for _ in range(nswap):
|
1048 |
+
fi = randomInt(0, size -1)
|
1049 |
+
si = randomInt(0, size -1)
|
1050 |
+
while fi == si:
|
1051 |
+
fi = randomInt(0, size -1)
|
1052 |
+
si = randomInt(0, size -1)
|
1053 |
+
|
1054 |
+
shift = randomFloat(0, shift)
|
1055 |
+
t = distr[fi]
|
1056 |
+
distr[fi] -= shift
|
1057 |
+
if (distr[fi] < 0):
|
1058 |
+
distr[fi] = 0.0
|
1059 |
+
shift = t
|
1060 |
+
distr[si] += shift
|
1061 |
+
return distr
|
1062 |
+
|
1063 |
+
def generateBinDistribution(size, ntrue):
|
1064 |
+
"""
|
1065 |
+
generate binary array with some elements set to 1
|
1066 |
+
|
1067 |
+
Parameters
|
1068 |
+
size : distr size
|
1069 |
+
ntrue : no of true values
|
1070 |
+
"""
|
1071 |
+
distr = [0] * size
|
1072 |
+
idxs = selectRandomSubListFromList(list(range(size)), ntrue)
|
1073 |
+
for i in idxs:
|
1074 |
+
distr[i] = 1
|
1075 |
+
return distr
|
1076 |
+
|
1077 |
+
def mutBinaryDistr(distr, nmut):
|
1078 |
+
"""
|
1079 |
+
mutate binary distribution
|
1080 |
+
|
1081 |
+
Parameters
|
1082 |
+
distr : distr
|
1083 |
+
nmut : no of mutations
|
1084 |
+
"""
|
1085 |
+
idxs = selectRandomSubListFromList(list(range(len(distr))), nmut)
|
1086 |
+
for i in idxs:
|
1087 |
+
distr[i] = distr[i] ^ 1
|
1088 |
+
|
1089 |
+
|
1090 |
+
def fileSelFieldSubSeqModifierGen(filePath, column, offset, seqLen, modifier, precision, delim=","):
|
1091 |
+
"""
|
1092 |
+
file record generator that superimposes given data in the specified segment of a column
|
1093 |
+
Parameters
|
1094 |
+
filePath ; file path
|
1095 |
+
column : column index
|
1096 |
+
offset : offset into column values
|
1097 |
+
seqLen : length of subseq
|
1098 |
+
modifier : data to be superimposed either list or a sampler object
|
1099 |
+
precision : floating point precision
|
1100 |
+
delim : delemeter
|
1101 |
+
"""
|
1102 |
+
beg = offset
|
1103 |
+
end = beg + seqLen
|
1104 |
+
isList = type(modifier) == list
|
1105 |
+
i = 0
|
1106 |
+
for rec in fileRecGen(filePath, delim):
|
1107 |
+
if i >= beg and i < end:
|
1108 |
+
va = float(rec[column])
|
1109 |
+
if isList:
|
1110 |
+
va += modifier[i - beg]
|
1111 |
+
else:
|
1112 |
+
va += modifier.sample()
|
1113 |
+
rec[column] = formatFloat(precision, va)
|
1114 |
+
yield delim.join(rec)
|
1115 |
+
i += 1
|
1116 |
+
|
1117 |
+
class ShiftedDataGenerator:
|
1118 |
+
"""
|
1119 |
+
transforms data for distribution shift
|
1120 |
+
"""
|
1121 |
+
def __init__(self, types, tdata, addFact, multFact):
|
1122 |
+
"""
|
1123 |
+
initializer
|
1124 |
+
|
1125 |
+
Parameters
|
1126 |
+
types data types
|
1127 |
+
tdata : 2D array
|
1128 |
+
addFact ; factor for data shift
|
1129 |
+
multFact ; factor for data scaling
|
1130 |
+
"""
|
1131 |
+
(self.dtypes, self.cvalues) = extractTypesFromString(types)
|
1132 |
+
|
1133 |
+
self.limits = dict()
|
1134 |
+
for k,v in self.dtypes.items():
|
1135 |
+
if v == "int" or v == "false":
|
1136 |
+
(vmax, vmin) = getColMinMax(tdata, k)
|
1137 |
+
self.limits[k] = vmax - vmin
|
1138 |
+
self.addMin = - addFact / 2
|
1139 |
+
self.addMax = addFact / 2
|
1140 |
+
self.multMin = 1.0 - multFact / 2
|
1141 |
+
self.multMax = 1.0 + multFact / 2
|
1142 |
+
|
1143 |
+
|
1144 |
+
|
1145 |
+
|
1146 |
+
def transform(self, tdata):
|
1147 |
+
"""
|
1148 |
+
linear transforms data to create distribution shift with random shift and scale
|
1149 |
+
Parameters
|
1150 |
+
types : data types
|
1151 |
+
"""
|
1152 |
+
transforms = dict()
|
1153 |
+
for k,v in self.dtypes.items():
|
1154 |
+
if v == "int" or v == "false":
|
1155 |
+
shift = randomFloat(self.addMin, self.addMax) * self.limits[k]
|
1156 |
+
scale = randomFloat(self.multMin, self.multMax)
|
1157 |
+
trns = (shift, scale)
|
1158 |
+
transforms[k] = trns
|
1159 |
+
elif v == "cat":
|
1160 |
+
transforms[k] = isEventSampled(50)
|
1161 |
+
|
1162 |
+
ttdata = list()
|
1163 |
+
for rec in tdata:
|
1164 |
+
nrec = rec.copy()
|
1165 |
+
for c in range(len(rec)):
|
1166 |
+
if c in self.dtypes:
|
1167 |
+
dtype = self.dtypes[c]
|
1168 |
+
if dtype == "int" or dtype == "float":
|
1169 |
+
(shift, scale) = transforms[c]
|
1170 |
+
nval = shift + rec[c] * scale
|
1171 |
+
if dtype == "int":
|
1172 |
+
nrec[c] = int(nval)
|
1173 |
+
else:
|
1174 |
+
nrec[c] = nval
|
1175 |
+
elif dtype == "cat":
|
1176 |
+
cv = self.cvalues[c]
|
1177 |
+
if transforms[c]:
|
1178 |
+
nval = selectOtherRandomFromList(cv, rec[c])
|
1179 |
+
nrec[c] = nval
|
1180 |
+
|
1181 |
+
ttdata.append(nrec)
|
1182 |
+
|
1183 |
+
return ttdata
|
1184 |
+
|
1185 |
+
def transformSpecified(self, tdata, sshift, scale):
|
1186 |
+
"""
|
1187 |
+
linear transforms data to create distribution shift shift specified shift and scale
|
1188 |
+
Parameters
|
1189 |
+
types : data types
|
1190 |
+
sshift : shift factor
|
1191 |
+
scale : scale factor
|
1192 |
+
"""
|
1193 |
+
transforms = dict()
|
1194 |
+
for k,v in self.dtypes.items():
|
1195 |
+
if v == "int" or v == "false":
|
1196 |
+
shift = sshift * self.limits[k]
|
1197 |
+
trns = (shift, scale)
|
1198 |
+
transforms[k] = trns
|
1199 |
+
elif v == "cat":
|
1200 |
+
transforms[k] = isEventSampled(50)
|
1201 |
+
|
1202 |
+
ttdata = self.__scaleShift(tdata, transforms)
|
1203 |
+
return ttdata
|
1204 |
+
|
1205 |
+
def __scaleShift(self, tdata, transforms):
|
1206 |
+
"""
|
1207 |
+
shifts and scales tabular data
|
1208 |
+
|
1209 |
+
Parameters
|
1210 |
+
tdata : 2D array
|
1211 |
+
transforms : transforms to apply
|
1212 |
+
"""
|
1213 |
+
ttdata = list()
|
1214 |
+
for rec in tdata:
|
1215 |
+
nrec = rec.copy()
|
1216 |
+
for c in range(len(rec)):
|
1217 |
+
if c in self.dtypes:
|
1218 |
+
dtype = self.dtypes[c]
|
1219 |
+
if dtype == "int" or dtype == "float":
|
1220 |
+
(shift, scale) = transforms[c]
|
1221 |
+
nval = shift + rec[c] * scale
|
1222 |
+
if dtype == "int":
|
1223 |
+
nrec[c] = int(nval)
|
1224 |
+
else:
|
1225 |
+
nrec[c] = nval
|
1226 |
+
elif dtype == "cat":
|
1227 |
+
cv = self.cvalues[c]
|
1228 |
+
if transforms[c]:
|
1229 |
+
#nval = selectOtherRandomFromList(cv, rec[c])
|
1230 |
+
#nrec[c] = nval
|
1231 |
+
pass
|
1232 |
+
|
1233 |
+
ttdata.append(nrec)
|
1234 |
+
return ttdata
|
1235 |
+
|
1236 |
+
class RollingStat(object):
|
1237 |
+
"""
|
1238 |
+
stats for rolling windowt
|
1239 |
+
"""
|
1240 |
+
def __init__(self, wsize):
|
1241 |
+
"""
|
1242 |
+
initializer
|
1243 |
+
|
1244 |
+
Parameters
|
1245 |
+
wsize : window size
|
1246 |
+
"""
|
1247 |
+
self.window = list()
|
1248 |
+
self.wsize = wsize
|
1249 |
+
self.mean = None
|
1250 |
+
self.sd = None
|
1251 |
+
|
1252 |
+
def add(self, value):
|
1253 |
+
"""
|
1254 |
+
add a value
|
1255 |
+
|
1256 |
+
Parameters
|
1257 |
+
value : value to add
|
1258 |
+
"""
|
1259 |
+
self.window.append(value)
|
1260 |
+
if len(self.window) > self.wsize:
|
1261 |
+
self.window = self.window[1:]
|
1262 |
+
|
1263 |
+
def getStat(self):
|
1264 |
+
"""
|
1265 |
+
get rolling window mean and std deviation
|
1266 |
+
"""
|
1267 |
+
assertGreater(len(self.window), 0, "window is empty")
|
1268 |
+
if len(self.window) == 1:
|
1269 |
+
self.mean = self.window[0]
|
1270 |
+
self.sd = 0
|
1271 |
+
else:
|
1272 |
+
self.mean = statistics.mean(self.window)
|
1273 |
+
self.sd = statistics.stdev(self.window, xbar=self.mean)
|
1274 |
+
re = (self.mean, self.sd)
|
1275 |
+
return re
|
1276 |
+
|
1277 |
+
def getSize(self):
|
1278 |
+
"""
|
1279 |
+
return window size
|
1280 |
+
"""
|
1281 |
+
return len(self.window)
|
1282 |
+
|
pers.txt
ADDED
@@ -0,0 +1,500 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
James Butt,6649 N Blue Gum St,New Orleans,LA,70116,jbutt@gmail.com
|
2 |
+
Josephine Darakjy,4 B Blue Ridge Blvd,Brighton,MI,48116,josephine_darakjy@darakjy.org
|
3 |
+
Art Venere,8 W Cerritos Ave #54,Bridgeport,NJ,8014,art@venere.org
|
4 |
+
Lenna Paprocki,639 Main St,Anchorage,AK,99501,lpaprocki@hotmail.com
|
5 |
+
Donette Foller,34 Center St,Hamilton,OH,45011,donette.foller@cox.net
|
6 |
+
Simona Morasca,3 Mcauley Dr,Ashland,OH,44805,simona@morasca.com
|
7 |
+
Mitsue Tollner,7 Eads St,Chicago,IL,60632,mitsue_tollner@yahoo.com
|
8 |
+
Leota Dilliard,7 W Jackson Blvd,San Jose,CA,95111,leota@hotmail.com
|
9 |
+
Sage Wieser,5 Boston Ave #88,Sioux Falls,SD,57105,sage_wieser@cox.net
|
10 |
+
Kris Marrier,228 Runamuck Pl #2808,Baltimore,MD,21224,kris@gmail.com
|
11 |
+
Minna Amigon,2371 Jerrold Ave,Kulpsville,PA,19443,minna_amigon@yahoo.com
|
12 |
+
Abel Maclead,37275 St Rt 17m M,Middle Island,NY,11953,amaclead@gmail.com
|
13 |
+
Kiley Caldarera,25 E 75th St #69,Los Angeles,CA,90034,kiley.caldarera@aol.com
|
14 |
+
Graciela Ruta,98 Connecticut Ave Nw,Chagrin Falls,OH,44023,gruta@cox.net
|
15 |
+
Cammy Albares,56 E Morehead St,Laredo,TX,78045,calbares@gmail.com
|
16 |
+
Mattie Poquette,73 State Road 434 E,Phoenix,AZ,85013,mattie@aol.com
|
17 |
+
Meaghan Garufi,69734 E Carrillo St,Mc Minnville,TN,37110,meaghan@hotmail.com
|
18 |
+
Gladys Rim,322 New Horizon Blvd,Milwaukee,WI,53207,gladys.rim@rim.org
|
19 |
+
Yuki Whobrey,1 State Route 27,Taylor,MI,48180,yuki_whobrey@aol.com
|
20 |
+
Fletcher Flosi,394 Manchester Blvd,Rockford,IL,61109,fletcher.flosi@yahoo.com
|
21 |
+
Bette Nicka,6 S 33rd St,Aston,PA,19014,bette_nicka@cox.net
|
22 |
+
Veronika Inouye,6 Greenleaf Ave,San Jose,CA,95111,vinouye@aol.com
|
23 |
+
Willard Kolmetz,618 W Yakima Ave,Irving,TX,75062,willard@hotmail.com
|
24 |
+
Maryann Royster,74 S Westgate St,Albany,NY,12204,mroyster@royster.com
|
25 |
+
Alisha Slusarski,3273 State St,Middlesex,NJ,8846,alisha@slusarski.com
|
26 |
+
Allene Iturbide,1 Central Ave,Stevens Point,WI,54481,allene_iturbide@cox.net
|
27 |
+
Chanel Caudy,86 Nw 66th St #8673,Shawnee,KS,66218,chanel.caudy@caudy.org
|
28 |
+
Ezekiel Chui,2 Cedar Ave #84,Easton,MD,21601,ezekiel@chui.com
|
29 |
+
Willow Kusko,90991 Thorburn Ave,New York,NY,10011,wkusko@yahoo.com
|
30 |
+
Bernardo Figeroa,386 9th Ave N,Conroe,TX,77301,bfigeroa@aol.com
|
31 |
+
Ammie Corrio,74874 Atlantic Ave,Columbus,OH,43215,ammie@corrio.com
|
32 |
+
Francine Vocelka,366 South Dr,Las Cruces,NM,88011,francine_vocelka@vocelka.com
|
33 |
+
Ernie Stenseth,45 E Liberty St,Ridgefield Park,NJ,7660,ernie_stenseth@aol.com
|
34 |
+
Albina Glick,4 Ralph Ct,Dunellen,NJ,8812,albina@glick.com
|
35 |
+
Alishia Sergi,2742 Distribution Way,New York,NY,10025,asergi@gmail.com
|
36 |
+
Solange Shinko,426 Wolf St,Metairie,LA,70002,solange@shinko.com
|
37 |
+
Jose Stockham,128 Bransten Rd,New York,NY,10011,jose@yahoo.com
|
38 |
+
Rozella Ostrosky,17 Morena Blvd,Camarillo,CA,93012,rozella.ostrosky@ostrosky.com
|
39 |
+
Valentine Gillian,775 W 17th St,San Antonio,TX,78204,valentine_gillian@gmail.com
|
40 |
+
Kati Rulapaugh,6980 Dorsett Rd,Abilene,KS,67410,kati.rulapaugh@hotmail.com
|
41 |
+
Youlanda Schemmer,2881 Lewis Rd,Prineville,OR,97754,youlanda@aol.com
|
42 |
+
Dyan Oldroyd,7219 Woodfield Rd,Overland Park,KS,66204,doldroyd@aol.com
|
43 |
+
Roxane Campain,1048 Main St,Fairbanks,AK,99708,roxane@hotmail.com
|
44 |
+
Lavera Perin,678 3rd Ave,Miami,FL,33196,lperin@perin.org
|
45 |
+
Erick Ferencz,20 S Babcock St,Fairbanks,AK,99712,erick.ferencz@aol.com
|
46 |
+
Fatima Saylors,2 Lighthouse Ave,Hopkins,MN,55343,fsaylors@saylors.org
|
47 |
+
Jina Briddick,38938 Park Blvd,Boston,MA,2128,jina_briddick@briddick.com
|
48 |
+
Kanisha Waycott,5 Tomahawk Dr,Los Angeles,CA,90006,kanisha_waycott@yahoo.com
|
49 |
+
Emerson Bowley,762 S Main St,Madison,WI,53711,emerson.bowley@bowley.org
|
50 |
+
Blair Malet,209 Decker Dr,Philadelphia,PA,19132,bmalet@yahoo.com
|
51 |
+
Brock Bolognia,4486 W O St #1,New York,NY,10003,bbolognia@yahoo.com
|
52 |
+
Lorrie Nestle,39 S 7th St,Tullahoma,TN,37388,lnestle@hotmail.com
|
53 |
+
Sabra Uyetake,98839 Hawthorne Blvd #6101,Columbia,SC,29201,sabra@uyetake.org
|
54 |
+
Marjory Mastella,71 San Mateo Ave,Wayne,PA,19087,mmastella@mastella.com
|
55 |
+
Karl Klonowski,76 Brooks St #9,Flemington,NJ,8822,karl_klonowski@yahoo.com
|
56 |
+
Tonette Wenner,4545 Courthouse Rd,Westbury,NY,11590,twenner@aol.com
|
57 |
+
Amber Monarrez,14288 Foster Ave #4121,Jenkintown,PA,19046,amber_monarrez@monarrez.org
|
58 |
+
Shenika Seewald,4 Otis St,Van Nuys,CA,91405,shenika@gmail.com
|
59 |
+
Delmy Ahle,65895 S 16th St,Providence,RI,2909,delmy.ahle@hotmail.com
|
60 |
+
Deeanna Juhas,14302 Pennsylvania Ave,Huntingdon Valley,PA,19006,deeanna_juhas@gmail.com
|
61 |
+
Blondell Pugh,201 Hawk Ct,Providence,RI,2904,bpugh@aol.com
|
62 |
+
Jamal Vanausdal,53075 Sw 152nd Ter #615,Monroe Township,NJ,8831,jamal@vanausdal.org
|
63 |
+
Cecily Hollack,59 N Groesbeck Hwy,Austin,TX,78731,cecily@hollack.org
|
64 |
+
Carmelina Lindall,2664 Lewis Rd,Littleton,CO,80126,carmelina_lindall@lindall.com
|
65 |
+
Maurine Yglesias,59 Shady Ln #53,Milwaukee,WI,53214,maurine_yglesias@yglesias.com
|
66 |
+
Tawna Buvens,3305 Nabell Ave #679,New York,NY,10009,tawna@gmail.com
|
67 |
+
Penney Weight,18 Fountain St,Anchorage,AK,99515,penney_weight@aol.com
|
68 |
+
Elly Morocco,7 W 32nd St,Erie,PA,16502,elly_morocco@gmail.com
|
69 |
+
Ilene Eroman,2853 S Central Expy,Glen Burnie,MD,21061,ilene.eroman@hotmail.com
|
70 |
+
Vallie Mondella,74 W College St,Boise,ID,83707,vmondella@mondella.com
|
71 |
+
Kallie Blackwood,701 S Harrison Rd,San Francisco,CA,94104,kallie.blackwood@gmail.com
|
72 |
+
Johnetta Abdallah,1088 Pinehurst St,Chapel Hill,NC,27514,johnetta_abdallah@aol.com
|
73 |
+
Bobbye Rhym,30 W 80th St #1995,San Carlos,CA,94070,brhym@rhym.com
|
74 |
+
Micaela Rhymes,20932 Hedley St,Concord,CA,94520,micaela_rhymes@gmail.com
|
75 |
+
Tamar Hoogland,2737 Pistorio Rd #9230,London,OH,43140,tamar@hotmail.com
|
76 |
+
Moon Parlato,74989 Brandon St,Wellsville,NY,14895,moon@yahoo.com
|
77 |
+
Laurel Reitler,6 Kains Ave,Baltimore,MD,21215,laurel_reitler@reitler.com
|
78 |
+
Delisa Crupi,47565 W Grand Ave,Newark,NJ,7105,delisa.crupi@crupi.com
|
79 |
+
Viva Toelkes,4284 Dorigo Ln,Chicago,IL,60647,viva.toelkes@gmail.com
|
80 |
+
Elza Lipke,6794 Lake Dr E,Newark,NJ,7104,elza@yahoo.com
|
81 |
+
Devorah Chickering,31 Douglas Blvd #950,Clovis,NM,88101,devorah@hotmail.com
|
82 |
+
Timothy Mulqueen,44 W 4th St,Staten Island,NY,10309,timothy_mulqueen@mulqueen.org
|
83 |
+
Arlette Honeywell,11279 Loytan St,Jacksonville,FL,32254,ahoneywell@honeywell.com
|
84 |
+
Dominque Dickerson,69 Marquette Ave,Hayward,CA,94545,dominque.dickerson@dickerson.org
|
85 |
+
Lettie Isenhower,70 W Main St,Beachwood,OH,44122,lettie_isenhower@yahoo.com
|
86 |
+
Myra Munns,461 Prospect Pl #316,Euless,TX,76040,mmunns@cox.net
|
87 |
+
Stephaine Barfield,47154 Whipple Ave Nw,Gardena,CA,90247,stephaine@barfield.com
|
88 |
+
Lai Gato,37 Alabama Ave,Evanston,IL,60201,lai.gato@gato.org
|
89 |
+
Stephen Emigh,3777 E Richmond St #900,Akron,OH,44302,stephen_emigh@hotmail.com
|
90 |
+
Tyra Shields,3 Fort Worth Ave,Philadelphia,PA,19106,tshields@gmail.com
|
91 |
+
Tammara Wardrip,4800 Black Horse Pike,Burlingame,CA,94010,twardrip@cox.net
|
92 |
+
Cory Gibes,83649 W Belmont Ave,San Gabriel,CA,91776,cory.gibes@gmail.com
|
93 |
+
Danica Bruschke,840 15th Ave,Waco,TX,76708,danica_bruschke@gmail.com
|
94 |
+
Wilda Giguere,1747 Calle Amanecer #2,Anchorage,AK,99501,wilda@cox.net
|
95 |
+
Elvera Benimadho,99385 Charity St #840,San Jose,CA,95110,elvera.benimadho@cox.net
|
96 |
+
Carma Vanheusen,68556 Central Hwy,San Leandro,CA,94577,carma@cox.net
|
97 |
+
Malinda Hochard,55 Riverside Ave,Indianapolis,IN,46202,malinda.hochard@yahoo.com
|
98 |
+
Natalie Fern,7140 University Ave,Rock Springs,WY,82901,natalie.fern@hotmail.com
|
99 |
+
Lisha Centini,64 5th Ave #1153,Mc Lean,VA,22102,lisha@centini.org
|
100 |
+
Arlene Klusman,3 Secor Rd,New Orleans,LA,70112,arlene_klusman@gmail.com
|
101 |
+
Alease Buemi,4 Webbs Chapel Rd,Boulder,CO,80303,alease@buemi.com
|
102 |
+
Louisa Cronauer,524 Louisiana Ave Nw,San Leandro,CA,94577,louisa@cronauer.com
|
103 |
+
Angella Cetta,185 Blackstone Bldge,Honolulu,HI,96817,angella.cetta@hotmail.com
|
104 |
+
Cyndy Goldammer,170 Wyoming Ave,Burnsville,MN,55337,cgoldammer@cox.net
|
105 |
+
Rosio Cork,4 10th St W,High Point,NC,27263,rosio.cork@gmail.com
|
106 |
+
Celeste Korando,7 W Pinhook Rd,Lynbrook,NY,11563,ckorando@hotmail.com
|
107 |
+
Twana Felger,1 Commerce Way,Portland,OR,97224,twana.felger@felger.org
|
108 |
+
Estrella Samu,64 Lakeview Ave,Beloit,WI,53511,estrella@aol.com
|
109 |
+
Donte Kines,3 Aspen St,Worcester,MA,1602,dkines@hotmail.com
|
110 |
+
Tiffiny Steffensmeier,32860 Sierra Rd,Miami,FL,33133,tiffiny_steffensmeier@cox.net
|
111 |
+
Edna Miceli,555 Main St,Erie,PA,16502,emiceli@miceli.org
|
112 |
+
Sue Kownacki,2 Se 3rd Ave,Mesquite,TX,75149,sue@aol.com
|
113 |
+
Jesusa Shin,2239 Shawnee Mission Pky,Tullahoma,TN,37388,jshin@shin.com
|
114 |
+
Rolland Francescon,2726 Charcot Ave,Paterson,NJ,7501,rolland@cox.net
|
115 |
+
Pamella Schmierer,5161 Dorsett Rd,Homestead,FL,33030,pamella.schmierer@schmierer.org
|
116 |
+
Glory Kulzer,55892 Jacksonville Rd,Owings Mills,MD,21117,gkulzer@kulzer.org
|
117 |
+
Shawna Palaspas,5 N Cleveland Massillon Rd,Thousand Oaks,CA,91362,shawna_palaspas@palaspas.org
|
118 |
+
Brandon Callaro,7 Benton Dr,Honolulu,HI,96819,brandon_callaro@hotmail.com
|
119 |
+
Scarlet Cartan,9390 S Howell Ave,Albany,GA,31701,scarlet.cartan@yahoo.com
|
120 |
+
Oretha Menter,8 County Center Dr #647,Boston,MA,2210,oretha_menter@yahoo.com
|
121 |
+
Ty Smith,4646 Kaahumanu St,Hackensack,NJ,7601,tsmith@aol.com
|
122 |
+
Xuan Rochin,2 Monroe St,San Mateo,CA,94403,xuan@gmail.com
|
123 |
+
Lindsey Dilello,52777 Leaders Heights Rd,Ontario,CA,91761,lindsey.dilello@hotmail.com
|
124 |
+
Devora Perez,72868 Blackington Ave,Oakland,CA,94606,devora_perez@perez.org
|
125 |
+
Herman Demesa,9 Norristown Rd,Troy,NY,12180,hdemesa@cox.net
|
126 |
+
Rory Papasergi,83 County Road 437 #8581,Clarks Summit,PA,18411,rpapasergi@cox.net
|
127 |
+
Talia Riopelle,1 N Harlem Ave #9,Orange,NJ,7050,talia_riopelle@aol.com
|
128 |
+
Van Shire,90131 J St,Pittstown,NJ,8867,van.shire@shire.com
|
129 |
+
Lucina Lary,8597 W National Ave,Cocoa,FL,32922,lucina_lary@cox.net
|
130 |
+
Bok Isaacs,6 Gilson St,Bronx,NY,10468,bok.isaacs@aol.com
|
131 |
+
Rolande Spickerman,65 W Maple Ave,Pearl City,HI,96782,rolande.spickerman@spickerman.com
|
132 |
+
Howard Paulas,866 34th Ave,Denver,CO,80231,hpaulas@gmail.com
|
133 |
+
Kimbery Madarang,798 Lund Farm Way,Rockaway,NJ,7866,kimbery_madarang@cox.net
|
134 |
+
Thurman Manno,9387 Charcot Ave,Absecon,NJ,8201,thurman.manno@yahoo.com
|
135 |
+
Becky Mirafuentes,30553 Washington Rd,Plainfield,NJ,7062,becky.mirafuentes@mirafuentes.com
|
136 |
+
Beatriz Corrington,481 W Lemon St,Middleboro,MA,2346,beatriz@yahoo.com
|
137 |
+
Marti Maybury,4 Warehouse Point Rd #7,Chicago,IL,60638,marti.maybury@yahoo.com
|
138 |
+
Nieves Gotter,4940 Pulaski Park Dr,Portland,OR,97202,nieves_gotter@gmail.com
|
139 |
+
Leatha Hagele,627 Walford Ave,Dallas,TX,75227,lhagele@cox.net
|
140 |
+
Valentin Klimek,137 Pioneer Way,Chicago,IL,60604,vklimek@klimek.org
|
141 |
+
Melissa Wiklund,61 13 Stoneridge #835,Findlay,OH,45840,melissa@cox.net
|
142 |
+
Sheridan Zane,2409 Alabama Rd,Riverside,CA,92501,sheridan.zane@zane.com
|
143 |
+
Bulah Padilla,8927 Vandever Ave,Waco,TX,76707,bulah_padilla@hotmail.com
|
144 |
+
Audra Kohnert,134 Lewis Rd,Nashville,TN,37211,audra@kohnert.com
|
145 |
+
Daren Weirather,9 N College Ave #3,Milwaukee,WI,53216,dweirather@aol.com
|
146 |
+
Fernanda Jillson,60480 Old Us Highway 51,Preston,MD,21655,fjillson@aol.com
|
147 |
+
Gearldine Gellinger,4 Bloomfield Ave,Irving,TX,75061,gearldine_gellinger@gellinger.com
|
148 |
+
Chau Kitzman,429 Tiger Ln,Beverly Hills,CA,90212,chau@gmail.com
|
149 |
+
Theola Frey,54169 N Main St,Massapequa,NY,11758,theola_frey@frey.com
|
150 |
+
Cheryl Haroldson,92 Main St,Atlantic City,NJ,8401,cheryl@haroldson.org
|
151 |
+
Laticia Merced,72 Mannix Dr,Cincinnati,OH,45203,lmerced@gmail.com
|
152 |
+
Carissa Batman,12270 Caton Center Dr,Eugene,OR,97401,carissa.batman@yahoo.com
|
153 |
+
Lezlie Craghead,749 W 18th St #45,Smithfield,NC,27577,lezlie.craghead@craghead.org
|
154 |
+
Ozell Shealy,8 Industry Ln,New York,NY,10002,oshealy@hotmail.com
|
155 |
+
Arminda Parvis,1 Huntwood Ave,Phoenix,AZ,85017,arminda@parvis.com
|
156 |
+
Reita Leto,55262 N French Rd,Indianapolis,IN,46240,reita.leto@gmail.com
|
157 |
+
Yolando Luczki,422 E 21st St,Syracuse,NY,13214,yolando@cox.net
|
158 |
+
Lizette Stem,501 N 19th Ave,Cherry Hill,NJ,8002,lizette.stem@aol.com
|
159 |
+
Gregoria Pawlowicz,455 N Main Ave,Garden City,NY,11530,gpawlowicz@yahoo.com
|
160 |
+
Carin Deleo,1844 Southern Blvd,Little Rock,AR,72202,cdeleo@deleo.com
|
161 |
+
Chantell Maynerich,2023 Greg St,Saint Paul,MN,55101,chantell@yahoo.com
|
162 |
+
Dierdre Yum,63381 Jenks Ave,Philadelphia,PA,19134,dyum@yahoo.com
|
163 |
+
Larae Gudroe,6651 Municipal Rd,Houma,LA,70360,larae_gudroe@gmail.com
|
164 |
+
Latrice Tolfree,81 Norris Ave #525,Ronkonkoma,NY,11779,latrice.tolfree@hotmail.com
|
165 |
+
Kerry Theodorov,6916 W Main St,Sacramento,CA,95827,kerry.theodorov@gmail.com
|
166 |
+
Dorthy Hidvegi,9635 S Main St,Boise,ID,83704,dhidvegi@yahoo.com
|
167 |
+
Fannie Lungren,17 Us Highway 111,Round Rock,TX,78664,fannie.lungren@yahoo.com
|
168 |
+
Evangelina Radde,992 Civic Center Dr,Philadelphia,PA,19123,evangelina@aol.com
|
169 |
+
Novella Degroot,303 N Radcliffe St,Hilo,HI,96720,novella_degroot@degroot.org
|
170 |
+
Clay Hoa,73 Saint Ann St #86,Reno,NV,89502,choa@hoa.org
|
171 |
+
Jennifer Fallick,44 58th St,Wheeling,IL,60090,jfallick@yahoo.com
|
172 |
+
Irma Wolfgramm,9745 W Main St,Randolph,NJ,7869,irma.wolfgramm@hotmail.com
|
173 |
+
Eun Coody,84 Bloomfield Ave,Spartanburg,SC,29301,eun@yahoo.com
|
174 |
+
Sylvia Cousey,287 Youngstown Warren Rd,Hampstead,MD,21074,sylvia_cousey@cousey.org
|
175 |
+
Nana Wrinkles,6 Van Buren St,Mount Vernon,NY,10553,nana@aol.com
|
176 |
+
Layla Springe,229 N Forty Driv,New York,NY,10011,layla.springe@cox.net
|
177 |
+
Joesph Degonia,2887 Knowlton St #5435,Berkeley,CA,94710,joesph_degonia@degonia.org
|
178 |
+
Annabelle Boord,523 Marquette Ave,Concord,MA,1742,annabelle.boord@cox.net
|
179 |
+
Stephaine Vinning,3717 Hamann Industrial Pky,San Francisco,CA,94104,stephaine@cox.net
|
180 |
+
Nelida Sawchuk,3 State Route 35 S,Paramus,NJ,7652,nelida@gmail.com
|
181 |
+
Marguerita Hiatt,82 N Highway 67,Oakley,CA,94561,marguerita.hiatt@gmail.com
|
182 |
+
Carmela Cookey,9 Murfreesboro Rd,Chicago,IL,60623,ccookey@cookey.org
|
183 |
+
Junita Brideau,6 S Broadway St,Cedar Grove,NJ,7009,jbrideau@aol.com
|
184 |
+
Claribel Varriano,6 Harry L Dr #6327,Perrysburg,OH,43551,claribel_varriano@cox.net
|
185 |
+
Benton Skursky,47939 Porter Ave,Gardena,CA,90248,benton.skursky@aol.com
|
186 |
+
Hillary Skulski,9 Wales Rd Ne #914,Homosassa,FL,34448,hillary.skulski@aol.com
|
187 |
+
Merilyn Bayless,195 13n N,Santa Clara,CA,95054,merilyn_bayless@cox.net
|
188 |
+
Teri Ennaco,99 Tank Farm Rd,Hazleton,PA,18201,tennaco@gmail.com
|
189 |
+
Merlyn Lawler,4671 Alemany Blvd,Jersey City,NJ,7304,merlyn_lawler@hotmail.com
|
190 |
+
Georgene Montezuma,98 University Dr,San Ramon,CA,94583,gmontezuma@cox.net
|
191 |
+
Jettie Mconnell,50 E Wacker Dr,Bridgewater,NJ,8807,jmconnell@hotmail.com
|
192 |
+
Lemuel Latzke,70 Euclid Ave #722,Bohemia,NY,11716,lemuel.latzke@gmail.com
|
193 |
+
Melodie Knipp,326 E Main St #6496,Thousand Oaks,CA,91362,mknipp@gmail.com
|
194 |
+
Candida Corbley,406 Main St,Somerville,NJ,8876,candida_corbley@hotmail.com
|
195 |
+
Karan Karpin,3 Elmwood Dr,Beaverton,OR,97005,karan_karpin@gmail.com
|
196 |
+
Andra Scheyer,9 Church St,Salem,OR,97302,andra@gmail.com
|
197 |
+
Felicidad Poullion,9939 N 14th St,Riverton,NJ,8077,fpoullion@poullion.com
|
198 |
+
Belen Strassner,5384 Southwyck Blvd,Douglasville,GA,30135,belen_strassner@aol.com
|
199 |
+
Gracia Melnyk,97 Airport Loop Dr,Jacksonville,FL,32216,gracia@melnyk.com
|
200 |
+
Jolanda Hanafan,37855 Nolan Rd,Bangor,ME,4401,jhanafan@gmail.com
|
201 |
+
Barrett Toyama,4252 N Washington Ave #9,Kennedale,TX,76060,barrett.toyama@toyama.org
|
202 |
+
Helga Fredicks,42754 S Ash Ave,Buffalo,NY,14228,helga_fredicks@yahoo.com
|
203 |
+
Ashlyn Pinilla,703 Beville Rd,Opa Locka,FL,33054,apinilla@cox.net
|
204 |
+
Fausto Agramonte,5 Harrison Rd,New York,NY,10038,fausto_agramonte@yahoo.com
|
205 |
+
Ronny Caiafa,73 Southern Blvd,Philadelphia,PA,19103,ronny.caiafa@caiafa.org
|
206 |
+
Marge Limmel,189 Village Park Rd,Crestview,FL,32536,marge@gmail.com
|
207 |
+
Norah Waymire,6 Middlegate Rd #106,San Francisco,CA,94107,norah.waymire@gmail.com
|
208 |
+
Aliza Baltimore,1128 Delaware St,San Jose,CA,95132,aliza@aol.com
|
209 |
+
Mozell Pelkowski,577 Parade St,South San Francisco,CA,94080,mpelkowski@pelkowski.org
|
210 |
+
Viola Bitsuie,70 Mechanic St,Northridge,CA,91325,viola@gmail.com
|
211 |
+
Franklyn Emard,4379 Highway 116,Philadelphia,PA,19103,femard@emard.com
|
212 |
+
Willodean Konopacki,55 Hawthorne Blvd,Lafayette,LA,70506,willodean_konopacki@konopacki.org
|
213 |
+
Beckie Silvestrini,7116 Western Ave,Dearborn,MI,48126,beckie.silvestrini@silvestrini.com
|
214 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Austin,TX,78754,rgesick@gesick.org
|
215 |
+
Frederica Blunk,99586 Main St,Dallas,TX,75207,frederica_blunk@gmail.com
|
216 |
+
Glen Bartolet,8739 Hudson St,Vashon,WA,98070,glen_bartolet@hotmail.com
|
217 |
+
Freeman Gochal,383 Gunderman Rd #197,Coatesville,PA,19320,freeman_gochal@aol.com
|
218 |
+
Vincent Meinerding,4441 Point Term Mkt,Philadelphia,PA,19143,vincent.meinerding@hotmail.com
|
219 |
+
Rima Bevelacqua,2972 Lafayette Ave,Gardena,CA,90248,rima@cox.net
|
220 |
+
Glendora Sarbacher,2140 Diamond Blvd,Rohnert Park,CA,94928,gsarbacher@gmail.com
|
221 |
+
Avery Steier,93 Redmond Rd #492,Orlando,FL,32803,avery@cox.net
|
222 |
+
Cristy Lother,3989 Portage Tr,Escondido,CA,92025,cristy@lother.com
|
223 |
+
Nicolette Brossart,1 Midway Rd,Westborough,MA,1581,nicolette_brossart@brossart.com
|
224 |
+
Tracey Modzelewski,77132 Coon Rapids Blvd Nw,Conroe,TX,77301,tracey@hotmail.com
|
225 |
+
Virgina Tegarden,755 Harbor Way,Milwaukee,WI,53226,virgina_tegarden@tegarden.com
|
226 |
+
Tiera Frankel,87 Sierra Rd,El Monte,CA,91731,tfrankel@aol.com
|
227 |
+
Alaine Bergesen,7667 S Hulen St #42,Yonkers,NY,10701,alaine_bergesen@cox.net
|
228 |
+
Earleen Mai,75684 S Withlapopka Dr #32,Dallas,TX,75227,earleen_mai@cox.net
|
229 |
+
Leonida Gobern,5 Elmwood Park Blvd,Biloxi,MS,39530,leonida@gobern.org
|
230 |
+
Ressie Auffrey,23 Palo Alto Sq,Miami,FL,33134,ressie.auffrey@yahoo.com
|
231 |
+
Justine Mugnolo,38062 E Main St,New York,NY,10048,jmugnolo@yahoo.com
|
232 |
+
Eladia Saulter,3958 S Dupont Hwy #7,Ramsey,NJ,7446,eladia@saulter.com
|
233 |
+
Chaya Malvin,560 Civic Center Dr,Ann Arbor,MI,48103,chaya@malvin.com
|
234 |
+
Gwenn Suffield,3270 Dequindre Rd,Deer Park,NY,11729,gwenn_suffield@suffield.org
|
235 |
+
Salena Karpel,1 Garfield Ave #7,Canton,OH,44707,skarpel@cox.net
|
236 |
+
Yoko Fishburne,9122 Carpenter Ave,New Haven,CT,6511,yoko@fishburne.com
|
237 |
+
Taryn Moyd,48 Lenox St,Fairfax,VA,22030,taryn.moyd@hotmail.com
|
238 |
+
Katina Polidori,5 Little River Tpke,Wilmington,MA,1887,katina_polidori@aol.com
|
239 |
+
Rickie Plumer,3 N Groesbeck Hwy,Toledo,OH,43613,rickie.plumer@aol.com
|
240 |
+
Alex Loader,37 N Elm St #916,Tacoma,WA,98409,alex@loader.com
|
241 |
+
Lashon Vizarro,433 Westminster Blvd #590,Roseville,CA,95661,lashon@aol.com
|
242 |
+
Lauran Burnard,66697 Park Pl #3224,Riverton,WY,82501,lburnard@burnard.com
|
243 |
+
Ceola Setter,96263 Greenwood Pl,Warren,ME,4864,ceola.setter@setter.org
|
244 |
+
My Rantanen,8 Mcarthur Ln,Richboro,PA,18954,my@hotmail.com
|
245 |
+
Lorrine Worlds,8 Fair Lawn Ave,Tampa,FL,33614,lorrine.worlds@worlds.com
|
246 |
+
Peggie Sturiale,9 N 14th St,El Cajon,CA,92020,peggie@cox.net
|
247 |
+
Marvel Raymo,9 Vanowen St,College Station,TX,77840,mraymo@yahoo.com
|
248 |
+
Daron Dinos,18 Waterloo Geneva Rd,Highland Park,IL,60035,daron_dinos@cox.net
|
249 |
+
An Fritz,506 S Hacienda Dr,Atlantic City,NJ,8401,an_fritz@hotmail.com
|
250 |
+
Portia Stimmel,3732 Sherman Ave,Bridgewater,NJ,8807,portia.stimmel@aol.com
|
251 |
+
Rhea Aredondo,25657 Live Oak St,Brooklyn,NY,11226,rhea_aredondo@cox.net
|
252 |
+
Benedict Sama,4923 Carey Ave,Saint Louis,MO,63104,bsama@cox.net
|
253 |
+
Alyce Arias,3196 S Rider Trl,Stockton,CA,95207,alyce@arias.org
|
254 |
+
Heike Berganza,3 Railway Ave #75,Little Falls,NJ,7424,heike@gmail.com
|
255 |
+
Carey Dopico,87393 E Highland Rd,Indianapolis,IN,46220,carey_dopico@dopico.org
|
256 |
+
Dottie Hellickson,67 E Chestnut Hill Rd,Seattle,WA,98133,dottie@hellickson.org
|
257 |
+
Deandrea Hughey,33 Lewis Rd #46,Burlington,NC,27215,deandrea@yahoo.com
|
258 |
+
Kimberlie Duenas,8100 Jacksonville Rd #7,Hays,KS,67601,kimberlie_duenas@yahoo.com
|
259 |
+
Martina Staback,7 W Wabansia Ave #227,Orlando,FL,32822,martina_staback@staback.com
|
260 |
+
Skye Fillingim,25 Minters Chapel Rd #9,Minneapolis,MN,55401,skye_fillingim@yahoo.com
|
261 |
+
Jade Farrar,6882 Torresdale Ave,Columbia,SC,29201,jade.farrar@yahoo.com
|
262 |
+
Charlene Hamilton,985 E 6th Ave,Santa Rosa,CA,95407,charlene.hamilton@hotmail.com
|
263 |
+
Geoffrey Acey,7 West Ave #1,Palatine,IL,60067,geoffrey@gmail.com
|
264 |
+
Stevie Westerbeck,26659 N 13th St,Costa Mesa,CA,92626,stevie.westerbeck@yahoo.com
|
265 |
+
Pamella Fortino,669 Packerland Dr #1438,Denver,CO,80212,pamella@fortino.com
|
266 |
+
Harrison Haufler,759 Eldora St,New Haven,CT,6515,hhaufler@hotmail.com
|
267 |
+
Johnna Engelberg,5 S Colorado Blvd #449,Bothell,WA,98021,jengelberg@engelberg.org
|
268 |
+
Buddy Cloney,944 Gaither Dr,Strongsville,OH,44136,buddy.cloney@yahoo.com
|
269 |
+
Dalene Riden,66552 Malone Rd,Plaistow,NH,3865,dalene.riden@aol.com
|
270 |
+
Jerry Zurcher,77 Massillon Rd #822,Satellite Beach,FL,32937,jzurcher@zurcher.org
|
271 |
+
Haydee Denooyer,25346 New Rd,New York,NY,10016,hdenooyer@denooyer.org
|
272 |
+
Joseph Cryer,60 Fillmore Ave,Huntington Beach,CA,92647,joseph_cryer@cox.net
|
273 |
+
Deonna Kippley,57 Haven Ave #90,Southfield,MI,48075,deonna_kippley@hotmail.com
|
274 |
+
Raymon Calvaresi,6538 E Pomona St #60,Indianapolis,IN,46222,raymon.calvaresi@gmail.com
|
275 |
+
Alecia Bubash,6535 Joyce St,Wichita Falls,TX,76301,alecia@aol.com
|
276 |
+
Ma Layous,78112 Morris Ave,North Haven,CT,6473,mlayous@hotmail.com
|
277 |
+
Detra Coyier,96950 Hidden Ln,Aberdeen,MD,21001,detra@aol.com
|
278 |
+
Terrilyn Rodeigues,3718 S Main St,New Orleans,LA,70130,terrilyn.rodeigues@cox.net
|
279 |
+
Salome Lacovara,9677 Commerce Dr,Richmond,VA,23219,slacovara@gmail.com
|
280 |
+
Garry Keetch,5 Green Pond Rd #4,Southampton,PA,18966,garry_keetch@hotmail.com
|
281 |
+
Matthew Neither,636 Commerce Dr #42,Shakopee,MN,55379,mneither@yahoo.com
|
282 |
+
Theodora Restrepo,42744 Hamann Industrial Pky #82,Miami,FL,33136,theodora.restrepo@restrepo.com
|
283 |
+
Noah Kalafatis,1950 5th Ave,Milwaukee,WI,53209,noah.kalafatis@aol.com
|
284 |
+
Carmen Sweigard,61304 N French Rd,Somerset,NJ,8873,csweigard@sweigard.com
|
285 |
+
Lavonda Hengel,87 Imperial Ct #79,Fargo,ND,58102,lavonda@cox.net
|
286 |
+
Junita Stoltzman,94 W Dodge Rd,Carson City,NV,89701,junita@aol.com
|
287 |
+
Herminia Nicolozakes,4 58th St #3519,Scottsdale,AZ,85254,herminia@nicolozakes.org
|
288 |
+
Casie Good,5221 Bear Valley Rd,Nashville,TN,37211,casie.good@aol.com
|
289 |
+
Reena Maisto,9648 S Main,Salisbury,MD,21801,reena@hotmail.com
|
290 |
+
Mirta Mallett,7 S San Marcos Rd,New York,NY,10004,mirta_mallett@gmail.com
|
291 |
+
Cathrine Pontoriero,812 S Haven St,Amarillo,TX,79109,cathrine.pontoriero@pontoriero.com
|
292 |
+
Filiberto Tawil,3882 W Congress St #799,Los Angeles,CA,90016,ftawil@hotmail.com
|
293 |
+
Raul Upthegrove,4 E Colonial Dr,La Mesa,CA,91942,rupthegrove@yahoo.com
|
294 |
+
Sarah Candlish,45 2nd Ave #9759,Atlanta,GA,30328,sarah.candlish@gmail.com
|
295 |
+
Lucy Treston,57254 Brickell Ave #372,Worcester,MA,1602,lucy@cox.net
|
296 |
+
Judy Aquas,8977 Connecticut Ave Nw #3,Niles,MI,49120,jaquas@aquas.com
|
297 |
+
Yvonne Tjepkema,9 Waydell St,Fairfield,NJ,7004,yvonne.tjepkema@hotmail.com
|
298 |
+
Kayleigh Lace,43 Huey P Long Ave,Lafayette,LA,70508,kayleigh.lace@yahoo.com
|
299 |
+
Felix Hirpara,7563 Cornwall Rd #4462,Denver,PA,17517,felix_hirpara@cox.net
|
300 |
+
Tresa Sweely,22 Bridle Ln,Valley Park,MO,63088,tresa_sweely@hotmail.com
|
301 |
+
Kristeen Turinetti,70099 E North Ave,Arlington,TX,76013,kristeen@gmail.com
|
302 |
+
Jenelle Regusters,3211 E Northeast Loop,Tampa,FL,33619,jregusters@regusters.com
|
303 |
+
Renea Monterrubio,26 Montgomery St,Atlanta,GA,30328,renea@hotmail.com
|
304 |
+
Olive Matuszak,13252 Lighthouse Ave,Cathedral City,CA,92234,olive@aol.com
|
305 |
+
Ligia Reiber,206 Main St #2804,Lansing,MI,48933,lreiber@cox.net
|
306 |
+
Christiane Eschberger,96541 W Central Blvd,Phoenix,AZ,85034,christiane.eschberger@yahoo.com
|
307 |
+
Goldie Schirpke,34 Saint George Ave #2,Bangor,ME,4401,goldie.schirpke@yahoo.com
|
308 |
+
Loreta Timenez,47857 Coney Island Ave,Clinton,MD,20735,loreta.timenez@hotmail.com
|
309 |
+
Fabiola Hauenstein,8573 Lincoln Blvd,York,PA,17404,fabiola.hauenstein@hauenstein.org
|
310 |
+
Amie Perigo,596 Santa Maria Ave #7913,Mesquite,TX,75150,amie.perigo@yahoo.com
|
311 |
+
Raina Brachle,3829 Ventura Blvd,Butte,MT,59701,raina.brachle@brachle.org
|
312 |
+
Erinn Canlas,13 S Hacienda Dr,Livingston,NJ,7039,erinn.canlas@canlas.com
|
313 |
+
Cherry Lietz,40 9th Ave Sw #91,Waterford,MI,48329,cherry@lietz.com
|
314 |
+
Kattie Vonasek,2845 Boulder Crescent St,Cleveland,OH,44103,kattie@vonasek.org
|
315 |
+
Lilli Scriven,33 State St,Abilene,TX,79601,lilli@aol.com
|
316 |
+
Whitley Tomasulo,2 S 15th St,Fort Worth,TX,76107,whitley.tomasulo@aol.com
|
317 |
+
Barbra Adkin,4 Kohler Memorial Dr,Brooklyn,NY,11230,badkin@hotmail.com
|
318 |
+
Hermila Thyberg,1 Rancho Del Mar Shopping C,Providence,RI,2903,hermila_thyberg@hotmail.com
|
319 |
+
Jesusita Flister,3943 N Highland Ave,Lancaster,PA,17601,jesusita.flister@hotmail.com
|
320 |
+
Caitlin Julia,5 Williams St,Johnston,RI,2919,caitlin.julia@julia.org
|
321 |
+
Roosevelt Hoffis,60 Old Dover Rd,Hialeah,FL,33014,roosevelt.hoffis@aol.com
|
322 |
+
Helaine Halter,8 Sheridan Rd,Jersey City,NJ,7304,hhalter@yahoo.com
|
323 |
+
Lorean Martabano,85092 Southern Blvd,San Antonio,TX,78204,lorean.martabano@hotmail.com
|
324 |
+
France Buzick,64 Newman Springs Rd E,Brooklyn,NY,11219,france.buzick@yahoo.com
|
325 |
+
Justine Ferrario,48 Stratford Ave,Pomona,CA,91768,jferrario@hotmail.com
|
326 |
+
Adelina Nabours,80 Pittsford Victor Rd #9,Cleveland,OH,44103,adelina_nabours@gmail.com
|
327 |
+
Derick Dhamer,87163 N Main Ave,New York,NY,10013,ddhamer@cox.net
|
328 |
+
Jerry Dallen,393 Lafayette Ave,Richmond,VA,23219,jerry.dallen@yahoo.com
|
329 |
+
Leota Ragel,99 5th Ave #33,Trion,GA,30753,leota.ragel@gmail.com
|
330 |
+
Jutta Amyot,49 N Mays St,Broussard,LA,70518,jamyot@hotmail.com
|
331 |
+
Aja Gehrett,993 Washington Ave,Nutley,NJ,7110,aja_gehrett@hotmail.com
|
332 |
+
Kirk Herritt,88 15th Ave Ne,Vestal,NY,13850,kirk.herritt@aol.com
|
333 |
+
Leonora Mauson,3381 E 40th Ave,Passaic,NJ,7055,leonora@yahoo.com
|
334 |
+
Winfred Brucato,201 Ridgewood Rd,Moscow,ID,83843,winfred_brucato@hotmail.com
|
335 |
+
Tarra Nachor,39 Moccasin Dr,San Francisco,CA,94104,tarra.nachor@cox.net
|
336 |
+
Corinne Loder,4 Carroll St,North Attleboro,MA,2760,corinne@loder.org
|
337 |
+
Dulce Labreche,9581 E Arapahoe Rd,Rochester,MI,48307,dulce_labreche@yahoo.com
|
338 |
+
Kate Keneipp,33 N Michigan Ave,Green Bay,WI,54301,kate_keneipp@yahoo.com
|
339 |
+
Kaitlyn Ogg,2 S Biscayne Blvd,Baltimore,MD,21230,kaitlyn.ogg@gmail.com
|
340 |
+
Sherita Saras,8 Us Highway 22,Colorado Springs,CO,80937,sherita.saras@cox.net
|
341 |
+
Lashawnda Stuer,7422 Martin Ave #8,Toledo,OH,43607,lstuer@cox.net
|
342 |
+
Ernest Syrop,94 Chase Rd,Hyattsville,MD,20785,ernest@cox.net
|
343 |
+
Nobuko Halsey,8139 I Hwy 10 #92,New Bedford,MA,2745,nobuko.halsey@yahoo.com
|
344 |
+
Lavonna Wolny,5 Cabot Rd,Mc Lean,VA,22102,lavonna.wolny@hotmail.com
|
345 |
+
Lashaunda Lizama,3387 Ryan Dr,Hanover,MD,21076,llizama@cox.net
|
346 |
+
Mariann Bilden,3125 Packer Ave #9851,Austin,TX,78753,mariann.bilden@aol.com
|
347 |
+
Helene Rodenberger,347 Chestnut St,Peoria,AZ,85381,helene@aol.com
|
348 |
+
Roselle Estell,8116 Mount Vernon Ave,Bucyrus,OH,44820,roselle.estell@hotmail.com
|
349 |
+
Samira Heintzman,8772 Old County Rd #5410,Kent,WA,98032,sheintzman@hotmail.com
|
350 |
+
Margart Meisel,868 State St #38,Cincinnati,OH,45251,margart_meisel@yahoo.com
|
351 |
+
Kristofer Bennick,772 W River Dr,Bloomington,IN,47404,kristofer.bennick@yahoo.com
|
352 |
+
Weldon Acuff,73 W Barstow Ave,Arlington Heights,IL,60004,wacuff@gmail.com
|
353 |
+
Shalon Shadrick,61047 Mayfield Ave,Brooklyn,NY,11223,shalon@cox.net
|
354 |
+
Denise Patak,2139 Santa Rosa Ave,Orlando,FL,32801,denise@patak.org
|
355 |
+
Louvenia Beech,598 43rd St,Beverly Hills,CA,90210,louvenia.beech@beech.com
|
356 |
+
Audry Yaw,70295 Pioneer Ct,Brandon,FL,33511,audry.yaw@yaw.org
|
357 |
+
Kristel Ehmann,92899 Kalakaua Ave,El Paso,TX,79925,kristel.ehmann@aol.com
|
358 |
+
Vincenza Zepp,395 S 6th St #2,El Cajon,CA,92020,vzepp@gmail.com
|
359 |
+
Elouise Gwalthney,9506 Edgemore Ave,Bladensburg,MD,20710,egwalthney@yahoo.com
|
360 |
+
Venita Maillard,72119 S Walker Ave #63,Anaheim,CA,92801,venita_maillard@gmail.com
|
361 |
+
Kasandra Semidey,369 Latham St #500,Saint Louis,MO,63102,kasandra_semidey@semidey.com
|
362 |
+
Xochitl Discipio,3158 Runamuck Pl,Round Rock,TX,78664,xdiscipio@gmail.com
|
363 |
+
Maile Linahan,9 Plainsboro Rd #598,Greensboro,NC,27409,mlinahan@yahoo.com
|
364 |
+
Krissy Rauser,8728 S Broad St,Coram,NY,11727,krauser@cox.net
|
365 |
+
Pete Dubaldi,2215 Prosperity Dr,Lyndhurst,NJ,7071,pdubaldi@hotmail.com
|
366 |
+
Linn Paa,1 S Pine St,Memphis,TN,38112,linn_paa@paa.com
|
367 |
+
Paris Wide,187 Market St,Atlanta,GA,30342,paris@hotmail.com
|
368 |
+
Wynell Dorshorst,94290 S Buchanan St,Pacifica,CA,94044,wynell_dorshorst@dorshorst.org
|
369 |
+
Quentin Birkner,7061 N 2nd St,Burnsville,MN,55337,qbirkner@aol.com
|
370 |
+
Regenia Kannady,10759 Main St,Scottsdale,AZ,85260,regenia.kannady@cox.net
|
371 |
+
Sheron Louissant,97 E 3rd St #9,Long Island City,NY,11101,sheron@aol.com
|
372 |
+
Izetta Funnell,82 Winsor St #54,Atlanta,GA,30340,izetta.funnell@hotmail.com
|
373 |
+
Rodolfo Butzen,41 Steel Ct,Northfield,MN,55057,rodolfo@hotmail.com
|
374 |
+
Zona Colla,49440 Dearborn St,Norwalk,CT,6854,zona@hotmail.com
|
375 |
+
Serina Zagen,7 S Beverly Dr,Fort Wayne,IN,46802,szagen@aol.com
|
376 |
+
Paz Sahagun,919 Wall Blvd,Meridian,MS,39307,paz_sahagun@cox.net
|
377 |
+
Markus Lukasik,89 20th St E #779,Sterling Heights,MI,48310,markus@yahoo.com
|
378 |
+
Jaclyn Bachman,721 Interstate 45 S,Colorado Springs,CO,80919,jaclyn@aol.com
|
379 |
+
Cyril Daufeldt,3 Lawton St,New York,NY,10013,cyril_daufeldt@daufeldt.com
|
380 |
+
Gayla Schnitzler,38 Pleasant Hill Rd,Hayward,CA,94545,gschnitzler@gmail.com
|
381 |
+
Erick Nievas,45 E Acacia Ct,Chicago,IL,60624,erick_nievas@aol.com
|
382 |
+
Jennie Drymon,63728 Poway Rd #1,Scranton,PA,18509,jennie@cox.net
|
383 |
+
Mitsue Scipione,77 222 Dr,Oroville,CA,95965,mscipione@scipione.com
|
384 |
+
Ciara Ventura,53 W Carey St,Port Jervis,NY,12771,cventura@yahoo.com
|
385 |
+
Galen Cantres,617 Nw 36th Ave,Brook Park,OH,44142,galen@yahoo.com
|
386 |
+
Truman Feichtner,539 Coldwater Canyon Ave,Bloomfield,NJ,7003,tfeichtner@yahoo.com
|
387 |
+
Gail Kitty,735 Crawford Dr,Anchorage,AK,99501,gail@kitty.com
|
388 |
+
Dalene Schoeneck,910 Rahway Ave,Philadelphia,PA,19102,dalene@schoeneck.org
|
389 |
+
Gertude Witten,7 Tarrytown Rd,Cincinnati,OH,45217,gertude.witten@gmail.com
|
390 |
+
Lizbeth Kohl,35433 Blake St #588,Gardena,CA,90248,lizbeth@yahoo.com
|
391 |
+
Glenn Berray,29 Cherry St #7073,Des Moines,IA,50315,gberray@gmail.com
|
392 |
+
Lashandra Klang,810 N La Brea Ave,King of Prussia,PA,19406,lashandra@yahoo.com
|
393 |
+
Lenna Newville,987 Main St,Raleigh,NC,27601,lnewville@newville.com
|
394 |
+
Laurel Pagliuca,36 Enterprise St Se,Richland,WA,99352,laurel@yahoo.com
|
395 |
+
Mireya Frerking,8429 Miller Rd,Pelham,NY,10803,mireya.frerking@hotmail.com
|
396 |
+
Annelle Tagala,5 W 7th St,Parkville,MD,21234,annelle@yahoo.com
|
397 |
+
Dean Ketelsen,2 Flynn Rd,Hicksville,NY,11801,dean_ketelsen@gmail.com
|
398 |
+
Levi Munis,2094 Ne 36th Ave,Worcester,MA,1603,levi.munis@gmail.com
|
399 |
+
Sylvie Ryser,649 Tulane Ave,Tulsa,OK,74105,sylvie@aol.com
|
400 |
+
Sharee Maile,2094 Montour Blvd,Muskegon,MI,49442,sharee_maile@aol.com
|
401 |
+
Cordelia Storment,393 Hammond Dr,Lafayette,LA,70506,cordelia_storment@aol.com
|
402 |
+
Mollie Mcdoniel,8590 Lake Lizzie Dr,Bowling Green,OH,43402,mollie_mcdoniel@yahoo.com
|
403 |
+
Brett Mccullan,87895 Concord Rd,La Mesa,CA,91942,brett.mccullan@mccullan.com
|
404 |
+
Teddy Pedrozo,46314 Route 130,Bridgeport,CT,6610,teddy_pedrozo@aol.com
|
405 |
+
Tasia Andreason,4 Cowesett Ave,Kearny,NJ,7032,tasia_andreason@yahoo.com
|
406 |
+
Hubert Walthall,95 Main Ave #2,Barberton,OH,44203,hubert@walthall.org
|
407 |
+
Arthur Farrow,28 S 7th St #2824,Englewood,NJ,7631,arthur.farrow@yahoo.com
|
408 |
+
Vilma Berlanga,79 S Howell Ave,Grand Rapids,MI,49546,vberlanga@berlanga.com
|
409 |
+
Billye Miro,36 Lancaster Dr Se,Pearl,MS,39208,billye_miro@cox.net
|
410 |
+
Glenna Slayton,2759 Livingston Ave,Memphis,TN,38118,glenna_slayton@cox.net
|
411 |
+
Mitzie Hudnall,17 Jersey Ave,Englewood,CO,80110,mitzie_hudnall@yahoo.com
|
412 |
+
Bernardine Rodefer,2 W Grand Ave,Memphis,TN,38112,bernardine_rodefer@yahoo.com
|
413 |
+
Staci Schmaltz,18 Coronado Ave #563,Pasadena,CA,91106,staci_schmaltz@aol.com
|
414 |
+
Nichelle Meteer,72 Beechwood Ter,Chicago,IL,60657,nichelle_meteer@meteer.com
|
415 |
+
Janine Rhoden,92 Broadway,Astoria,NY,11103,jrhoden@yahoo.com
|
416 |
+
Ettie Hoopengardner,39 Franklin Ave,Richland,WA,99352,ettie.hoopengardner@hotmail.com
|
417 |
+
Eden Jayson,4 Iwaena St,Baltimore,MD,21202,eden_jayson@yahoo.com
|
418 |
+
Lynelle Auber,32820 Corkwood Rd,Newark,NJ,7104,lynelle_auber@gmail.com
|
419 |
+
Merissa Tomblin,34 Raritan Center Pky,Bellflower,CA,90706,merissa.tomblin@gmail.com
|
420 |
+
Golda Kaniecki,6201 S Nevada Ave,Toms River,NJ,8755,golda_kaniecki@yahoo.com
|
421 |
+
Catarina Gleich,78 Maryland Dr #146,Denville,NJ,7834,catarina_gleich@hotmail.com
|
422 |
+
Virgie Kiel,76598 Rd I 95 #1,Denver,CO,80216,vkiel@hotmail.com
|
423 |
+
Jolene Ostolaza,1610 14th St Nw,Newport News,VA,23608,jolene@yahoo.com
|
424 |
+
Keneth Borgman,86350 Roszel Rd,Phoenix,AZ,85012,keneth@yahoo.com
|
425 |
+
Rikki Nayar,1644 Clove Rd,Miami,FL,33155,rikki@nayar.com
|
426 |
+
Elke Sengbusch,9 W Central Ave,Phoenix,AZ,85013,elke_sengbusch@yahoo.com
|
427 |
+
Hoa Sarao,27846 Lafayette Ave,Oak Hill,FL,32759,hoa@sarao.org
|
428 |
+
Trinidad Mcrae,10276 Brooks St,San Francisco,CA,94105,trinidad_mcrae@yahoo.com
|
429 |
+
Mari Lueckenbach,1 Century Park E,San Diego,CA,92110,mari_lueckenbach@yahoo.com
|
430 |
+
Selma Husser,9 State Highway 57 #22,Jersey City,NJ,7306,selma.husser@cox.net
|
431 |
+
Antione Onofrio,4 S Washington Ave,San Bernardino,CA,92410,aonofrio@onofrio.com
|
432 |
+
Luisa Jurney,25 Se 176th Pl,Cambridge,MA,2138,ljurney@hotmail.com
|
433 |
+
Clorinda Heimann,105 Richmond Valley Rd,Escondido,CA,92025,clorinda.heimann@hotmail.com
|
434 |
+
Dick Wenzinger,22 Spruce St #595,Gardena,CA,90248,dick@yahoo.com
|
435 |
+
Ahmed Angalich,2 W Beverly Blvd,Harrisburg,PA,17110,ahmed.angalich@angalich.com
|
436 |
+
Iluminada Ohms,72 Southern Blvd,Mesa,AZ,85204,iluminada.ohms@yahoo.com
|
437 |
+
Joanna Leinenbach,1 Washington St,Lake Worth,FL,33461,joanna_leinenbach@hotmail.com
|
438 |
+
Caprice Suell,90177 N 55th Ave,Nashville,TN,37211,caprice@aol.com
|
439 |
+
Stephane Myricks,9 Tower Ave,Burlington,KY,41005,stephane_myricks@cox.net
|
440 |
+
Quentin Swayze,278 Bayview Ave,Milan,MI,48160,quentin_swayze@yahoo.com
|
441 |
+
Annmarie Castros,80312 W 32nd St,Conroe,TX,77301,annmarie_castros@gmail.com
|
442 |
+
Shonda Greenbush,82 Us Highway 46,Clifton,NJ,7011,shonda_greenbush@cox.net
|
443 |
+
Cecil Lapage,4 Stovall St #72,Union City,NJ,7087,clapage@lapage.com
|
444 |
+
Jeanice Claucherty,19 Amboy Ave,Miami,FL,33142,jeanice.claucherty@yahoo.com
|
445 |
+
Josphine Villanueva,63 Smith Ln #8343,Moss,TN,38575,josphine_villanueva@villanueva.com
|
446 |
+
Daniel Perruzza,11360 S Halsted St,Santa Ana,CA,92705,dperruzza@perruzza.com
|
447 |
+
Cassi Wildfong,26849 Jefferson Hwy,Rolling Meadows,IL,60008,cassi.wildfong@aol.com
|
448 |
+
Britt Galam,2500 Pringle Rd Se #508,Hatfield,PA,19440,britt@galam.org
|
449 |
+
Adell Lipkin,65 Mountain View Dr,Whippany,NJ,7981,adell.lipkin@lipkin.com
|
450 |
+
Jacqueline Rowling,1 N San Saba,Erie,PA,16501,jacqueline.rowling@yahoo.com
|
451 |
+
Lonny Weglarz,51120 State Route 18,Salt Lake City,UT,84115,lonny_weglarz@gmail.com
|
452 |
+
Lonna Diestel,1482 College Ave,Fayetteville,NC,28301,lonna_diestel@gmail.com
|
453 |
+
Cristal Samara,4119 Metropolitan Dr,Los Angeles,CA,90021,cristal@cox.net
|
454 |
+
Kenneth Grenet,2167 Sierra Rd,East Lansing,MI,48823,kenneth.grenet@grenet.org
|
455 |
+
Elli Mclaird,6 Sunrise Ave,Utica,NY,13501,emclaird@mclaird.com
|
456 |
+
Alline Jeanty,55713 Lake City Hwy,South Bend,IN,46601,ajeanty@gmail.com
|
457 |
+
Sharika Eanes,75698 N Fiesta Blvd,Orlando,FL,32806,sharika.eanes@aol.com
|
458 |
+
Nu Mcnease,88 Sw 28th Ter,Harrison,NJ,7029,nu@gmail.com
|
459 |
+
Daniela Comnick,7 Flowers Rd #403,Trenton,NJ,8611,dcomnick@cox.net
|
460 |
+
Cecilia Colaizzo,4 Nw 12th St #3849,Madison,WI,53717,cecilia_colaizzo@colaizzo.com
|
461 |
+
Leslie Threets,2 A Kelley Dr,Katonah,NY,10536,leslie@cox.net
|
462 |
+
Nan Koppinger,88827 Frankford Ave,Greensboro,NC,27401,nan@koppinger.com
|
463 |
+
Izetta Dewar,2 W Scyene Rd #3,Baltimore,MD,21217,idewar@dewar.com
|
464 |
+
Tegan Arceo,62260 Park Stre,Monroe Township,NJ,8831,tegan.arceo@arceo.org
|
465 |
+
Ruthann Keener,3424 29th St Se,Kerrville,TX,78028,ruthann@hotmail.com
|
466 |
+
Joni Breland,35 E Main St #43,Elk Grove Village,IL,60007,joni_breland@cox.net
|
467 |
+
Vi Rentfro,7163 W Clark Rd,Freehold,NJ,7728,vrentfro@cox.net
|
468 |
+
Colette Kardas,21575 S Apple Creek Rd,Omaha,NE,68124,colette.kardas@yahoo.com
|
469 |
+
Malcolm Tromblay,747 Leonis Blvd,Annandale,VA,22003,malcolm_tromblay@cox.net
|
470 |
+
Ryan Harnos,13 Gunnison St,Plano,TX,75075,ryan@cox.net
|
471 |
+
Jess Chaffins,18 3rd Ave,New York,NY,10016,jess.chaffins@chaffins.org
|
472 |
+
Sharen Bourbon,62 W Austin St,Syosset,NY,11791,sbourbon@yahoo.com
|
473 |
+
Nickolas Juvera,177 S Rider Trl #52,Crystal River,FL,34429,nickolas_juvera@cox.net
|
474 |
+
Gary Nunlee,2 W Mount Royal Ave,Fortville,IN,46040,gary_nunlee@nunlee.org
|
475 |
+
Diane Devreese,1953 Telegraph Rd,Saint Joseph,MO,64504,diane@cox.net
|
476 |
+
Roslyn Chavous,63517 Dupont St,Jackson,MS,39211,roslyn.chavous@chavous.org
|
477 |
+
Glory Schieler,5 E Truman Rd,Abilene,TX,79602,glory@yahoo.com
|
478 |
+
Rasheeda Sayaphon,251 Park Ave #979,Saratoga,CA,95070,rasheeda@aol.com
|
479 |
+
Alpha Palaia,43496 Commercial Dr #29,Cherry Hill,NJ,8003,alpha@yahoo.com
|
480 |
+
Refugia Jacobos,2184 Worth St,Hayward,CA,94545,refugia.jacobos@jacobos.com
|
481 |
+
Shawnda Yori,50126 N Plankinton Ave,Longwood,FL,32750,shawnda.yori@yahoo.com
|
482 |
+
Mona Delasancha,38773 Gravois Ave,Cheyenne,WY,82001,mdelasancha@hotmail.com
|
483 |
+
Gilma Liukko,16452 Greenwich St,Garden City,NY,11530,gilma_liukko@gmail.com
|
484 |
+
Janey Gabisi,40 Cambridge Ave,Madison,WI,53715,jgabisi@hotmail.com
|
485 |
+
Lili Paskin,20113 4th Ave E,Kearny,NJ,7032,lili.paskin@cox.net
|
486 |
+
Loren Asar,6 Ridgewood Center Dr,Old Forge,PA,18518,loren.asar@aol.com
|
487 |
+
Dorothy Chesterfield,469 Outwater Ln,San Diego,CA,92126,dorothy@cox.net
|
488 |
+
Gail Similton,62 Monroe St,Thousand Palms,CA,92276,gail_similton@similton.com
|
489 |
+
Catalina Tillotson,3338 A Lockport Pl #6,Margate City,NJ,8402,catalina@hotmail.com
|
490 |
+
Lawrence Lorens,9 Hwy,Providence,RI,2906,lawrence.lorens@hotmail.com
|
491 |
+
Carlee Boulter,8284 Hart St,Abilene,KS,67410,carlee.boulter@hotmail.com
|
492 |
+
Thaddeus Ankeny,5 Washington St #1,Roseville,CA,95678,tankeny@ankeny.org
|
493 |
+
Jovita Oles,8 S Haven St,Daytona Beach,FL,32114,joles@gmail.com
|
494 |
+
Alesia Hixenbaugh,9 Front St,Washington,DC,20001,alesia_hixenbaugh@hixenbaugh.org
|
495 |
+
Lai Harabedian,1933 Packer Ave #2,Novato,CA,94945,lai@gmail.com
|
496 |
+
Brittni Gillaspie,67 Rv Cent,Boise,ID,83709,bgillaspie@gillaspie.com
|
497 |
+
Raylene Kampa,2 Sw Nyberg Rd,Elkhart,IN,46514,rkampa@kampa.org
|
498 |
+
Flo Bookamer,89992 E 15th St,Alliance,NE,69301,flo.bookamer@cox.net
|
499 |
+
Jani Biddy,61556 W 20th Ave,Seattle,WA,98104,jbiddy@yahoo.com
|
500 |
+
Chauncey Motley,63 E Aurora Dr,Orlando,FL,32804,chauncey_motley@aol.com
|
pers1.txt
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Luisa Jurney,25 Se 176th Pl,Providence,RI,2903,luisa@hotmail.com
|
2 |
+
Shalon Shadrick,61047 Mayfield Ave,New York,NY,10011,shalon@cox.net
|
3 |
+
Joesph Degonia,2887 Knowlton St #5435,Aberdeen,MD,21001,joesph@aol.com
|
4 |
+
Regenia Kannady,10759 Main St,San Francisco,CA,94104,regenia@gmail.com
|
5 |
+
Sage Wieser,5 Boston Ave #88,Hampstead,MD,21074,sage@cousey.org
|
6 |
+
Colette Kardas,21575 S Apple Creek Rd,Denville,NJ,7834,colette@hotmail.com
|
7 |
+
Louvenia Beech,598 43rd St,Anchorage,AK,99501,louvenia@hotmail.com
|
8 |
+
Xuan Rochin,2 Monroe St,Santa Rosa,CA,95407,xuan@hotmail.com
|
9 |
+
Antione Onofrio,4 S Washington Ave,Boise,ID,83704,antione@yahoo.com
|
10 |
+
Jamal Vanausdal,53075 Sw 152nd Ter #615,Vestal,NY,13850,jamal@aol.com
|
pers_exist.txt
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Shawnda Yori,50126 N Plankinton Ave,Longwood,FL,32750,shawnda.yori@yahoo.com
|
2 |
+
Mona Delasancha,38773 Gravois Ave,Cheyenne,WY,82001,mdelasancha@hotmail.com
|
3 |
+
Gilma Liukko,16452 Greenwich St,Garden City,NY,11530,gilma_liukko@gmail.com
|
4 |
+
Janey Gabisi,40 Cambridge Ave,Madison,WI,53715,jgabisi@hotmail.com
|
5 |
+
Lili Paskin,20113 4th Ave E,Kearny,NJ,7032,lili.paskin@cox.net
|
6 |
+
Loren Asar,6 Ridgewood Center Dr,Old Forge,PA,18518,loren.asar@aol.com
|
7 |
+
Dorothy Chesterfield,469 Outwater Ln,San Diego,CA,92126,dorothy@cox.net
|
8 |
+
Gail Similton,62 Monroe St,Thousand Palms,CA,92276,gail_similton@similton.com
|
9 |
+
Catalina Tillotson,3338 A Lockport Pl #6,Margate City,NJ,8402,catalina@hotmail.com
|
10 |
+
Lawrence Lorens,9 Hwy,Providence,RI,2906,lawrence.lorens@hotmail.com
|
11 |
+
Carlee Boulter,8284 Hart St,Abilene,KS,67410,carlee.boulter@hotmail.com
|
12 |
+
Thaddeus Ankeny,5 Washington St #1,Roseville,CA,95678,tankeny@ankeny.org
|
13 |
+
Jovita Oles,8 S Haven St,Daytona Beach,FL,32114,joles@gmail.com
|
14 |
+
Alesia Hixenbaugh,9 Front St,Washington,DC,20001,alesia_hixenbaugh@hixenbaugh.org
|
15 |
+
Lai Harabedian,1933 Packer Ave #2,Novato,CA,94945,lai@gmail.com
|
16 |
+
Brittni Gillaspie,67 Rv Cent,Boise,ID,83709,bgillaspie@gillaspie.com
|
17 |
+
Raylene Kampa,2 Sw Nyberg Rd,Elkhart,IN,46514,rkampa@kampa.org
|
18 |
+
Flo Bookamer,89992 E 15th St,Alliance,NE,69301,flo.bookamer@cox.net
|
19 |
+
Jani Biddy,61556 W 20th Ave,Seattle,WA,98104,jbiddy@yahoo.com
|
20 |
+
Chauncey Motley,63 E Aurora Dr,Orlando,FL,32804,chauncey_motley@aol.com
|
pers_new.txt
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Izetta Funnell,82 Winsor St #54,Philadelphia,PA,19132,izetta@yahoo.com
|
2 |
+
Eladia Saulter,3958 S Dupont Hwy #7,Cincinnati,OH,45217,eladia@gmail.com
|
3 |
+
Willard Kolmetz,618 W Yakima Ave,Shawnee,KS,66218,willard@caudy.org
|
4 |
+
Marti Maybury,4 Warehouse Point Rd #7,San Diego,CA,92126,marti@cox.net
|
5 |
+
Shalon Shadrick,61047 Mayfield Ave,Huntington Beach,CA,92647,shalon@cox.net
|
6 |
+
Sue Kownacki,2 Se 3rd Ave,San Francisco,CA,94105,sue@yahoo.com
|
7 |
+
Samira Heintzman,8772 Old County Rd #5410,Milwaukee,WI,53216,samira@aol.com
|
8 |
+
Jovita Oles,8 S Haven St,Anchorage,AK,99501,jovita@kitty.com
|
9 |
+
Ernie Stenseth,45 E Liberty St,Hialeah,FL,33014,ernie@aol.com
|
10 |
+
Tegan Arceo,62260 Park Stre,Los Angeles,CA,90034,tegan@aol.com
|
pers_new_dup.txt
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Lawrence Lorens,9 Hpy,Providence,RI,2906,lawrence.lorens@hotmail.com
|
2 |
+
Eladia Saulter,3958 S Dupont Hwy #7,Cincinnati,OH,45217,eladia@gmail.com
|
3 |
+
Willard Kolmetz,618 W Yakima Ave,Shawnee,KS,66218,willard@caudy.org
|
4 |
+
Marti Maybury,4 Warehouse Point Rd #7,San Diego,CA,92126,marti@cox.net
|
5 |
+
Shalon Shadrick,61047 Mayfield Ave,Huntington Beach,CA,92647,shalon@cox.net
|
6 |
+
Sue Kownacki,2 Se 3rd Ave,San Francisco,CA,94105,sue@yahoo.com
|
7 |
+
Catalina Tillotson,3338 A Lockport Pl #6,Margate City,NJ,8902,catalina@hotmail.com
|
8 |
+
Jovita Oles,8 S Haven St,Anchorage,AK,99501,jovita@kitty.com
|
9 |
+
Ernie Stenseth,45 E Liberty St,Hialeah,FL,33014,ernie@aol.com
|
10 |
+
Tegan Arceo,62260 Park Stre,Los Angeles,CA,90034,tegan@aol.com
|
ppers.txt
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,99070,goldanaol.com,1
|
2 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95770,golda@aol.com,1
|
3 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,0
|
4 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,0
|
5 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Cory Y Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,1
|
6 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Cory Gibes,83649 W Belmont Ave,Gardena,CA,90268,cory@cox.net,1
|
7 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,0
|
8 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,0
|
9 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Lashon Vizarro,433 Westmidster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,1
|
10 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Lashon Vizarro,433 Westminster Blvd #590,Cdiqago,IL,60632,lashon@yahoo.com,1
|
11 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,0
|
12 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,0
|
13 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Eden I Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,1
|
14 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Eden Mayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,1
|
15 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,0
|
16 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,0
|
17 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Dick Wenzinger,22 Spfuce St #595,Lafayette,SA,70506,dick@konopacki.org,1
|
18 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Dick Wenzitger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,1
|
19 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,0
|
20 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,0
|
21 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,wnsubjajeq@gmail.com,1
|
22 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,Elvera Benikadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,1
|
23 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,0
|
24 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,0
|
25 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Danica Bruschke,840 15th Avenue,Bowling Green,OH,43402,danica@yahoo.com,1
|
26 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,xpuwbmj@hotmail.com,1
|
27 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,0
|
28 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,0
|
29 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Sue Kownacki,2 Sy 3rd Ave,San Antonio,TX,78204,sue@gmail.com,1
|
30 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@cmail.com,1
|
31 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,0
|
32 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,0
|
33 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Talia W Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,1
|
34 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Talia Ryopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,1
|
35 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,0
|
36 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,0
|
37 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aolgcom,1
|
38 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Alex Joadei,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,1
|
39 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,0
|
40 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,0
|
41 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Ruthann Keener,3424 29th St Se,Middle Island,PY,11953,ruthann@gmail.com,1
|
42 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Ruthann Keener,3424 29th St Se,Middle Island,NY,91953,ruthann@gmail.com,1
|
43 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,0
|
44 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,0
|
45 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Lenna Vewville,987 Main St,Jackson,MS,39211,lenna@chavous.org,1
|
46 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Lenna Newville,987 Main St,Jacksqn,MS,39211,lenna@chavous.org,1
|
47 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,0
|
48 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,0
|
49 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Rebecka Gesick,2026 N Plankinton Ave #3,Tilwaukee,WI,53297,rebecka@rim.org,1
|
50 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,lsjbltvyf@yahoo.com,1
|
51 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,0
|
52 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,0
|
53 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Stephane Myricks,9 Tower Ave,Bridgewater,IJ,8807,stephane@hotmail.com,1
|
54 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Stephane Myricks,9 Toner Ave,Bridgewater,NJ,8807,stephane@hotmail.com,1
|
55 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,0
|
56 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,0
|
57 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,1
|
58 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@tol.com,1
|
59 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,0
|
60 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,0
|
61 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Fatima Saylors,2 Lighthouse Ave,Tampa,JL,30619,fatima@regusters.com,1
|
62 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Fatima Saylorb,2 Lighthouse Ave,Tampa,SL,33619,fatima@regusters.com,1
|
63 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,0
|
64 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,0
|
65 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Gail Similton,62 Monroe St,Keyrny,NJ,7032,dhurnlegn@hotmail.com,1
|
66 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Gail Similkon,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,1
|
67 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,0
|
68 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,0
|
69 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Dominque Dickerson,69 Marquette Ave,Fairbanos,CK,99712,dominque@aol.com,1
|
70 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Dominque Dickerson,69 Marquette Ave,Zairbanks,AK,97712,dominque@aol.com,1
|
71 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,0
|
72 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,0
|
73 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Jennie Drymon,63728 Poway Rd #1,Saint Paum,MN,55101,jennie@yahoo.com,1
|
74 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55131,jennie@yahoo.com,1
|
75 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,0
|
76 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,0
|
77 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Gail Similton,62 Monroe St,Opa Locka,HL,33054,gail@cox.net,1
|
78 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Gail Sizilton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,1
|
79 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,0
|
80 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,0
|
81 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Jade Farrar,6882 Torresdale Ave,Greensboro,NO,27401,jade@koppinger.com,1
|
82 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.zom,1
|
83 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,0
|
84 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,0
|
85 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Meaghan Garufi,69734 E Carrillo St,Westboroxgh,MA,1581,meaghan@brossart.com,1
|
86 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Meaghan Z Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,1
|
87 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,0
|
88 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,0
|
89 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Whitley Tomasulo,2 S 15th St,El Monte,HA,91731,whitley@aol.com,1
|
90 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Whitley P Tomasulo,2 S 15th St,El Monte,CU,91731,whitley@aol.com,1
|
91 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,0
|
92 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,0
|
93 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Timothy Mulqueen,44 W 4th St,Saratoga,CA,95075,timothy@aol.com,1
|
94 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Timothy Molqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,1
|
95 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,0
|
96 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,0
|
97 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Olive Matuszak,13252 Lighthouse Ave,San Mateo,CR,94403,olive@gmail.com,1
|
98 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Olive Matuszak,13252 Lighthouse Ave,San Matee,CA,94403,olive@gmail.com,1
|
99 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,0
|
100 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,0
|
ppers1.txt
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Golda Kaniecki,6201 S Nevada Avenue,Saratoga,CA,95070,golda@aol.com,1
|
2 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Golda Kaniecki,6201 S Nevada Ave,Saratiga,CA,95070,golda@aol.com,1
|
3 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Lavera Perin,678 3rd Ave,Miami,FL,33196,lperin@perin.org,0
|
4 |
+
Golda Kaniecki,6201 S Nevada Ave,Saratoga,CA,95070,golda@aol.com,Eden Jayson,4 Iwaena St,Baltimore,MD,21202,eden_jayson@yahoo.com,0
|
5 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Cory Gibes,83649 W Belmont Ave,Gardera,CA,90248,cory@cox.net,1
|
6 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Cory Gibes,83649 W Belmont Ave,Gardena,CA,90348,cory@cox.net,1
|
7 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Rickie Plumer,3 N Groesbeck Hwy,Toledo,OH,43613,rickie.plumer@aol.com,0
|
8 |
+
Cory Gibes,83649 W Belmont Ave,Gardena,CA,90248,cory@cox.net,Teddy Pedrozo,46314 Route 130,Bridgeport,CT,6610,teddy_pedrozo@aol.com,0
|
9 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Lashon Vizarro,433 Westminster Blvd #590,Czicago,IL,60632,lashon@yahoo.com,1
|
10 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Lashon Vizabro,433 Westminster Blvd #590,Chicawo,IL,60632,lashon@yahoo.com,1
|
11 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Lizbeth Kohl,35433 Blake St #588,Gardena,CA,90248,lizbeth@yahoo.com,0
|
12 |
+
Lashon Vizarro,433 Westminster Blvd #590,Chicago,IL,60632,lashon@yahoo.com,Fernanda Jillson,60480 Old Us Highway 51,Preston,MD,21655,fjillson@aol.com,0
|
13 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Eden Jayson,4 Iwaena St,Fargo,TD,58102,eden@cox.net,1
|
14 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Eden Jayson,4 Iwaena St,Fargo,ID,58102,eden@cos.net,1
|
15 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Kattie Vonasek,2845 Boulder Crescent St,Cleveland,OH,44103,kattie@vonasek.org,0
|
16 |
+
Eden Jayson,4 Iwaena St,Fargo,ND,58102,eden@cox.net,Lorean Martabano,85092 Southern Blvd,San Antonio,TX,78204,lorean.martabano@hotmail.com,0
|
17 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Dick Wenzinger,22 Spruce St #595,Lafayette,LZ,70506,dick@konopacki.org,1
|
18 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Dick Wenzinger,22 Spruce St #595,Lafayetmt,LA,70506,dick@konopacki.org,1
|
19 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Hubert Walthall,95 Main Ave #2,Barberton,OH,44203,hubert@walthall.org,0
|
20 |
+
Dick Wenzinger,22 Spruce St #595,Lafayette,LA,70506,dick@konopacki.org,Linn Paa,1 S Pine St,Memphis,TN,38112,linn_paa@paa.com,0
|
21 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,Elvera Benimadho,99385 Charuty St #840,Wichita Falls,TX,76301,elvera@aol.com,1
|
22 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,Elvera G Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,1
|
23 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,Glendora Sarbacher,2140 Diamond Blvd,Rohnert Park,CA,94928,gsarbacher@gmail.com,0
|
24 |
+
Elvera Benimadho,99385 Charity St #840,Wichita Falls,TX,76301,elvera@aol.com,James Butt,6649 N Blue Gum St,New Orleans,LA,70116,jbutt@gmail.com,0
|
25 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.eom,1
|
26 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Danica Bruschke,800 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,1
|
27 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Hubert Walthall,95 Main Ave #2,Barberton,OH,44203,hubert@walthall.org,0
|
28 |
+
Danica Bruschke,840 15th Ave,Bowling Green,OH,43402,danica@yahoo.com,Dean Ketelsen,2 Flynn Rd,Hicksville,NY,11801,dean_ketelsen@gmail.com,0
|
29 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78504,sue@gmail.com,1
|
30 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Sue Q Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,1
|
31 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Leonora Mauson,3381 E 40th Ave,Passaic,NJ,7055,leonora@yahoo.com,0
|
32 |
+
Sue Kownacki,2 Se 3rd Ave,San Antonio,TX,78204,sue@gmail.com,Noah Kalafatis,1950 5th Ave,Milwaukee,WI,53209,noah.kalafatis@aol.com,0
|
33 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,16037,talia@mastella.com,1
|
34 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Talia Riopelle,1 N Harlem Ave #9,Wayne,PQ,19087,talia@mastehla.com,1
|
35 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Joesph Degonia,2887 Knowlton St #5435,Berkeley,CA,94710,joesph_degonia@degonia.org,0
|
36 |
+
Talia Riopelle,1 N Harlem Ave #9,Wayne,PA,19087,talia@mastella.com,Samira Heintzman,8772 Old County Rd #5410,Kent,WA,98032,sheintzman@hotmail.com,0
|
37 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Alex Loader,37 N Elm St #916,Burnsville,MN,55337,slex@aol.com,1
|
38 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Alex Loader,97 N Elm St #916,Burnsville,MN,55337,alex@aol.com,1
|
39 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Lisha Centini,64 5th Ave #1153,Mc Lean,VA,22102,lisha@centini.org,0
|
40 |
+
Alex Loader,37 N Elm St #916,Burnsville,MN,55337,alex@aol.com,Brock Bolognia,4486 W O St #1,New York,NY,10003,bbolognia@yahoo.com,0
|
41 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Ruthann Keener,3424 29th St Se,Middle Island,OY,11953,ruthann@gmail.com,1
|
42 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Ruthann Keener,3424 29th St Se,Middle Islavd,NY,11953,ruthann@gmail.com,1
|
43 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Lonna Diestel,1482 College Ave,Fayetteville,NC,28301,lonna_diestel@gmail.com,0
|
44 |
+
Ruthann Keener,3424 29th St Se,Middle Island,NY,11953,ruthann@gmail.com,Whitley Tomasulo,2 S 15th St,Fort Worth,TX,76107,whitley.tomasulo@aol.com,0
|
45 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Lenna Negville,987 Main St,Jackson,MS,09211,lenna@chavous.org,1
|
46 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Lenna Newville,987 Main St,Tackson,MS,39211,lenna@chavous.org,1
|
47 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Jeanice Claucherty,19 Amboy Ave,Miami,FL,33142,jeanice.claucherty@yahoo.com,0
|
48 |
+
Lenna Newville,987 Main St,Jackson,MS,39211,lenna@chavous.org,Pamella Fortino,669 Packerland Dr #1438,Denver,CO,80212,pamella@fortino.com,0
|
49 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Rebecka Gesick,2026 N Plankinton Ave #3,Milwaskee,WI,53207,rebecka@rim.org,1
|
50 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WB,53207,rebecka@rim.org,1
|
51 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Denise Patak,2139 Santa Rosa Ave,Orlando,FL,32801,denise@patak.org,0
|
52 |
+
Rebecka Gesick,2026 N Plankinton Ave #3,Milwaukee,WI,53207,rebecka@rim.org,Irma Wolfgramm,9745 W Main St,Randolph,NJ,7869,irma.wolfgramm@hotmail.com,0
|
53 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,1
|
54 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Stephane Myricks,5 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,1
|
55 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Catarina Gleich,78 Maryland Dr #146,Denville,NJ,7834,catarina_gleich@hotmail.com,0
|
56 |
+
Stephane Myricks,9 Tower Ave,Bridgewater,NJ,8807,stephane@hotmail.com,Olive Matuszak,13252 Lighthouse Ave,Cathedral City,CA,92234,olive@aol.com,0
|
57 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,1
|
58 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Jerry Dallen,393 Lafayette Ave,Tulsa,QK,74105,jerry@aol.com,1
|
59 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Deandrea Hughey,33 Lewis Rd #46,Burlington,NC,27215,deandrea@yahoo.com,0
|
60 |
+
Jerry Dallen,393 Lafayette Ave,Tulsa,OK,74105,jerry@aol.com,Merilyn Bayless,195 13n N,Santa Clara,CA,95054,merilyn_bayless@cox.net,0
|
61 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusterl.com,1
|
62 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33610,fatima@regusters.com,1
|
63 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Oretha Menter,8 County Center Dr #647,Boston,MA,2210,oretha_menter@yahoo.com,0
|
64 |
+
Fatima Saylors,2 Lighthouse Ave,Tampa,FL,33619,fatima@regusters.com,Elli Mclaird,6 Sunrise Ave,Utica,NY,13501,emclaird@mclaird.com,0
|
65 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Gail Similton,62 Monroe St,Klarny,NJ,7032,gail@yahoo.com,1
|
66 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Gail Similton,63 Monroe St,Kearny,NJ,7082,gail@yahoo.com,1
|
67 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Geoffrey Acey,7 West Ave #1,Palatine,IL,60067,geoffrey@gmail.com,0
|
68 |
+
Gail Similton,62 Monroe St,Kearny,NJ,7032,gail@yahoo.com,Gearldine Gellinger,4 Bloomfield Ave,Irving,TX,75061,gearldine_gellinger@gellinger.com,0
|
69 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Dominque Dickerson,69 Marquette Avenue,Fairbanks,AK,99712,dominque@aol.com,1
|
70 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Dominque Dickerson,69 Marquette Ave,Fairbanks,XK,99512,dominque@aol.com,1
|
71 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Rodolfo Butzen,41 Steel Ct,Northfield,MN,55057,rodolfo@hotmail.com,0
|
72 |
+
Dominque Dickerson,69 Marquette Ave,Fairbanks,AK,99712,dominque@aol.com,Mitsue Tollner,7 Eads St,Chicago,IL,60632,mitsue_tollner@yahoo.com,0
|
73 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Jennie Drymon,63728 Poway Rd #1,Saint Paul,GN,55101,jennie@yahoo.com,1
|
74 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoorcom,1
|
75 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Natalie Fern,7140 University Ave,Rock Springs,WY,82901,natalie.fern@hotmail.com,0
|
76 |
+
Jennie Drymon,63728 Poway Rd #1,Saint Paul,MN,55101,jennie@yahoo.com,Donte Kines,3 Aspen St,Worcester,MA,1602,dkines@hotmail.com,0
|
77 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Gail Similton,62 Monroe St,Opa Lecka,FL,33054,gail@cox.net,1
|
78 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Gail Similton,62 Monrov St,Opa Locka,FL,33054,gail@cox.net,1
|
79 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Kimberlie Duenas,8100 Jacksonville Rd #7,Hays,KS,67601,kimberlie_duenas@yahoo.com,0
|
80 |
+
Gail Similton,62 Monroe St,Opa Locka,FL,33054,gail@cox.net,Cordelia Storment,393 Hammond Dr,Lafayette,LA,70506,cordelia_storment@aol.com,0
|
81 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@moppinger.com,1
|
82 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Jade E Farrar,6882 Tkrresdale Ave,Greensboro,NC,27401,jade@koppinger.com,1
|
83 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Fernanda Jillson,60480 Old Us Highway 51,Preston,MD,21655,fjillson@aol.com,0
|
84 |
+
Jade Farrar,6882 Torresdale Ave,Greensboro,NC,27401,jade@koppinger.com,Erick Ferencz,20 S Babcock St,Fairbanks,AK,99712,erick.ferencz@aol.com,0
|
85 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Meaghan Garufi,69734 E Carrillo Street,Westborough,MA,1481,meaghan@brossart.com,1
|
86 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Meaghan Garufi,69734 E Carrillo St,Weswborough,MA,1581,meagvan@brossart.com,1
|
87 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Salome Lacovara,9677 Commerce Dr,Richmond,VA,23219,slacovara@gmail.com,0
|
88 |
+
Meaghan Garufi,69734 E Carrillo St,Westborough,MA,1581,meaghan@brossart.com,Carmen Sweigard,61304 N French Rd,Somerset,NJ,8873,csweigard@sweigard.com,0
|
89 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Whitley Tomasulo,5 S 15th St,El Monte,CA,91733,whitley@aol.com,1
|
90 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Whitley Tomasulo,2 S 15th St,Et Monte,CA,91731,whitley@aol.com,1
|
91 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Beatriz Corrington,481 W Lemon St,Middleboro,MA,2346,beatriz@yahoo.com,0
|
92 |
+
Whitley Tomasulo,2 S 15th St,El Monte,CA,91731,whitley@aol.com,Antione Onofrio,4 S Washington Ave,San Bernardino,CA,92410,aonofrio@onofrio.com,0
|
93 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Timothy Mulqueen,46 W 4th St,Saratoga,CR,95070,timothy@aol.com,1
|
94 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Timothy Mulqueen,44 W 4th St,Saratoga,CA,95040,timothy@aol.com,1
|
95 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Clorinda Heimann,105 Richmond Valley Rd,Escondido,CA,92025,clorinda.heimann@hotmail.com,0
|
96 |
+
Timothy Mulqueen,44 W 4th St,Saratoga,CA,95070,timothy@aol.com,Kanisha Waycott,5 Tomahawk Dr,Los Angeles,CA,90006,kanisha_waycott@yahoo.com,0
|
97 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,bnazxse@gmail.com,1
|
98 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94203,olive@gmail.com,1
|
99 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Refugia Jacobos,2184 Worth St,Hayward,CA,94545,refugia.jacobos@jacobos.com,0
|
100 |
+
Olive Matuszak,13252 Lighthouse Ave,San Mateo,CA,94403,olive@gmail.com,Clay Hoa,73 Saint Ann St #86,Reno,NV,89502,choa@hoa.org,0
|
prediction.py
ADDED
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[1]:
|
5 |
+
|
6 |
+
|
7 |
+
import os
|
8 |
+
import sys
|
9 |
+
import random
|
10 |
+
import statistics
|
11 |
+
import numpy as np
|
12 |
+
import matplotlib.pyplot as plt
|
13 |
+
import threading
|
14 |
+
import time
|
15 |
+
import queue
|
16 |
+
sys.path.append(os.path.abspath("../lib"))
|
17 |
+
sys.path.append(os.path.abspath("../supv"))
|
18 |
+
sys.path.append(os.path.abspath("../text"))
|
19 |
+
from util import *
|
20 |
+
from sampler import *
|
21 |
+
from tnn import *
|
22 |
+
from txproc import *
|
23 |
+
|
24 |
+
emailDoms = ["yahoo.com", "gmail.com", "hotmail.com", "aol.com"]
|
25 |
+
|
26 |
+
|
27 |
+
# In[4]:
|
28 |
+
|
29 |
+
|
30 |
+
def printNgramVec(ngv):
|
31 |
+
"""
|
32 |
+
print ngram vector
|
33 |
+
"""
|
34 |
+
print("ngram vector")
|
35 |
+
for i in range(len(ngv)):
|
36 |
+
if ngv[i] > 0:
|
37 |
+
print("{} {}".format(i, ngv[i]))
|
38 |
+
|
39 |
+
|
40 |
+
# In[5]:
|
41 |
+
|
42 |
+
|
43 |
+
def createNegMatch(tdata, ri):
|
44 |
+
"""
|
45 |
+
create negative match by randomly selecting another record
|
46 |
+
"""
|
47 |
+
nri = randomInt(0, len(tdata)-1)
|
48 |
+
while nri == ri:
|
49 |
+
nri = randomInt(0, len(tdata)-1)
|
50 |
+
return tdata[nri]
|
51 |
+
|
52 |
+
|
53 |
+
# In[6]:
|
54 |
+
|
55 |
+
|
56 |
+
def createNgramCreator():
|
57 |
+
""" create ngram creator """
|
58 |
+
cng = CharNGram(["lcc", "ucc", "dig"], 3, True)
|
59 |
+
spc = ["@", "#", "_", "-", "."]
|
60 |
+
cng.addSpChar(spc)
|
61 |
+
cng.setWsRepl("$")
|
62 |
+
cng.finalize()
|
63 |
+
return cng
|
64 |
+
|
65 |
+
|
66 |
+
# In[7]:
|
67 |
+
|
68 |
+
|
69 |
+
def getSim(rec, incOutput=True):
|
70 |
+
""" get rec pair similarity """
|
71 |
+
#print(rec)
|
72 |
+
sim = list()
|
73 |
+
for i in range(6):
|
74 |
+
#print("field " + str(i))
|
75 |
+
if i == 3:
|
76 |
+
s = levenshteinSimilarity(rec[i],rec[i+6])
|
77 |
+
else:
|
78 |
+
ngv1 = cng.toMgramCount(rec[i])
|
79 |
+
ngv2 = cng.toMgramCount(rec[i+6])
|
80 |
+
#printNgramVec(ngv1)
|
81 |
+
#printNgramVec(ngv2)
|
82 |
+
s = cosineSimilarity(ngv1, ngv2)
|
83 |
+
sim.append(s)
|
84 |
+
ss = toStrFromList(sim, 6)
|
85 |
+
srec = ss + "," + rec[-1] if incOutput else ss
|
86 |
+
return srec
|
87 |
+
|
88 |
+
|
89 |
+
# In[8]:
|
90 |
+
|
91 |
+
|
92 |
+
class SimThread (threading.Thread):
|
93 |
+
""" multi threaded similarity calculation """
|
94 |
+
|
95 |
+
def __init__(self, tName, cng, qu, incOutput, outQu, outQuSize):
|
96 |
+
""" initialize """
|
97 |
+
threading.Thread.__init__(self)
|
98 |
+
self.tName = tName
|
99 |
+
self.cng = cng
|
100 |
+
self.qu = qu
|
101 |
+
self.incOutput = incOutput
|
102 |
+
self.outQu = outQu
|
103 |
+
self.outQuSize = outQuSize
|
104 |
+
|
105 |
+
def run(self):
|
106 |
+
""" exeution """
|
107 |
+
while not exitFlag:
|
108 |
+
rec = dequeue(self.qu, workQuLock)
|
109 |
+
if rec is not None:
|
110 |
+
srec = getSim(rec, self.incOutput)
|
111 |
+
if outQu is None:
|
112 |
+
print(srec)
|
113 |
+
else:
|
114 |
+
enqueue(srec, self.outQu, outQuLock, self.outQuSize)
|
115 |
+
|
116 |
+
def createThreads(nworker, cng, workQu, incOutput, outQu, outQuSize):
|
117 |
+
"""create worker threads """
|
118 |
+
threadList = list(map(lambda i : "Thread-" + str(i+1), range(nworker)))
|
119 |
+
threads = list()
|
120 |
+
for tName in threadList:
|
121 |
+
thread = SimThread(tName, cng, workQu, incOutput, outQu, outQuSize)
|
122 |
+
thread.start()
|
123 |
+
threads.append(thread)
|
124 |
+
return threads
|
125 |
+
|
126 |
+
|
127 |
+
def enqueue(rec, qu, quLock, qSize):
|
128 |
+
""" enqueue record """
|
129 |
+
queued = False
|
130 |
+
while not queued:
|
131 |
+
quLock.acquire()
|
132 |
+
if qu.qsize() < qSize - 1:
|
133 |
+
qu.put(rec)
|
134 |
+
queued = True
|
135 |
+
quLock.release()
|
136 |
+
time.sleep(1)
|
137 |
+
|
138 |
+
def dequeue(qu, quLock):
|
139 |
+
""" dequeue record """
|
140 |
+
rec = None
|
141 |
+
quLock.acquire()
|
142 |
+
if not qu.empty():
|
143 |
+
rec = qu.get()
|
144 |
+
quLock.release()
|
145 |
+
|
146 |
+
return rec
|
147 |
+
|
148 |
+
|
149 |
+
if __name__ == "__main__":
|
150 |
+
#multi threading related
|
151 |
+
workQuLock = threading.Lock()
|
152 |
+
outQuLock = threading.Lock()
|
153 |
+
exitFlag = False
|
154 |
+
|
155 |
+
""" predict with neural network model """
|
156 |
+
newFilePath = sys.argv[1]
|
157 |
+
existFilePath = sys.argv[2]
|
158 |
+
nworker = int(sys.argv[3])
|
159 |
+
prFile = sys.argv[4]
|
160 |
+
|
161 |
+
regr = FeedForwardNetwork(prFile)
|
162 |
+
regr.buildModel()
|
163 |
+
cng = createNgramCreator()
|
164 |
+
|
165 |
+
#create threads
|
166 |
+
qSize = 100
|
167 |
+
workQu = queue.Queue(qSize)
|
168 |
+
outQu = queue.Queue(qSize)
|
169 |
+
threads = createThreads(nworker, cng, workQu, False, outQu, qSize)
|
170 |
+
|
171 |
+
for nrec in fileRecGen(newFilePath):
|
172 |
+
srecs = list()
|
173 |
+
ecount = 0
|
174 |
+
y_pred = []
|
175 |
+
#print("processing ", nrec)
|
176 |
+
for erec in fileRecGen(existFilePath):
|
177 |
+
rec = nrec.copy()
|
178 |
+
rec.extend(erec)
|
179 |
+
#print(rec)
|
180 |
+
|
181 |
+
enqueue(rec, workQu, workQuLock, qSize)
|
182 |
+
srec = dequeue(outQu, outQuLock)
|
183 |
+
if srec is not None:
|
184 |
+
srecs.append(strToFloatArray(srec))
|
185 |
+
ecount += 1
|
186 |
+
|
187 |
+
#wait til workq queue is drained
|
188 |
+
while not workQu.empty():
|
189 |
+
pass
|
190 |
+
|
191 |
+
#drain out queue
|
192 |
+
while len(srecs) < ecount:
|
193 |
+
srec = dequeue(outQu, outQuLock)
|
194 |
+
if srec is not None:
|
195 |
+
srecs.append(strToFloatArray(srec))
|
196 |
+
#predict
|
197 |
+
simMax = 0
|
198 |
+
sims = FeedForwardNetwork.predict(regr, srecs)
|
199 |
+
sims = sims.reshape(sims.shape[0])
|
200 |
+
y_pred.append(max(sims))
|
201 |
+
#print("{} {:.3f}".format(nrec, y_pred))
|
202 |
+
print(nrec, max(y_pred))
|
203 |
+
|
204 |
+
# exitFlag = True
|
205 |
+
|
206 |
+
predict_main()
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
|
sampler.py
ADDED
@@ -0,0 +1,1339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[ ]:
|
5 |
+
|
6 |
+
|
7 |
+
import sys
|
8 |
+
import random
|
9 |
+
import time
|
10 |
+
import math
|
11 |
+
import random
|
12 |
+
import numpy as np
|
13 |
+
from scipy import stats
|
14 |
+
from random import randint
|
15 |
+
from util import *
|
16 |
+
from stats import Histogram
|
17 |
+
|
18 |
+
def randomFloat(low, high):
|
19 |
+
"""
|
20 |
+
sample float within range
|
21 |
+
Parameters
|
22 |
+
low : low valuee
|
23 |
+
high : high valuee
|
24 |
+
"""
|
25 |
+
return random.random() * (high-low) + low
|
26 |
+
|
27 |
+
def randomInt(minv, maxv):
|
28 |
+
"""
|
29 |
+
sample int within range
|
30 |
+
Parameters
|
31 |
+
minv : low valuee
|
32 |
+
maxv : high valuee
|
33 |
+
"""
|
34 |
+
return randint(minv, maxv)
|
35 |
+
|
36 |
+
def randIndex(lData):
|
37 |
+
"""
|
38 |
+
random index of a list
|
39 |
+
Parameters
|
40 |
+
lData : list data
|
41 |
+
"""
|
42 |
+
return randint(0, len(lData)-1)
|
43 |
+
|
44 |
+
def randomUniformSampled(low, high):
|
45 |
+
"""
|
46 |
+
sample float within range
|
47 |
+
|
48 |
+
Parameters
|
49 |
+
low : low value
|
50 |
+
high : high value
|
51 |
+
"""
|
52 |
+
return np.random.uniform(low, high)
|
53 |
+
|
54 |
+
def randomUniformSampledList(low, high, size):
|
55 |
+
"""
|
56 |
+
sample floats within range to create list
|
57 |
+
Parameters
|
58 |
+
low : low value
|
59 |
+
high : high value
|
60 |
+
size ; size of list to be returned
|
61 |
+
"""
|
62 |
+
return np.random.uniform(low, high, size)
|
63 |
+
|
64 |
+
def randomNormSampled(mean, sd):
|
65 |
+
"""
|
66 |
+
sample float from normal
|
67 |
+
Parameters
|
68 |
+
mean : mean
|
69 |
+
sd : std deviation
|
70 |
+
"""
|
71 |
+
return np.random.normal(mean, sd)
|
72 |
+
|
73 |
+
def randomNormSampledList(mean, sd, size):
|
74 |
+
"""
|
75 |
+
sample float list from normal
|
76 |
+
Parameters
|
77 |
+
mean : mean
|
78 |
+
sd : std deviation
|
79 |
+
size : size of list to be returned
|
80 |
+
"""
|
81 |
+
return np.random.normal(mean, sd, size)
|
82 |
+
|
83 |
+
def randomSampledList(sampler, size):
|
84 |
+
"""
|
85 |
+
sample list from given sampler
|
86 |
+
Parameters
|
87 |
+
sampler : sampler object
|
88 |
+
size : size of list to be returned
|
89 |
+
"""
|
90 |
+
return list(map(lambda i : sampler.sample(), range(size)))
|
91 |
+
|
92 |
+
|
93 |
+
def minLimit(val, minv):
|
94 |
+
"""
|
95 |
+
min limit
|
96 |
+
|
97 |
+
Parameters
|
98 |
+
val : value
|
99 |
+
minv : min limit
|
100 |
+
"""
|
101 |
+
if (val < minv):
|
102 |
+
val = minv
|
103 |
+
return val
|
104 |
+
|
105 |
+
|
106 |
+
def rangeLimit(val, minv, maxv):
|
107 |
+
"""
|
108 |
+
range limit
|
109 |
+
Parameters
|
110 |
+
val : value
|
111 |
+
minv : min limit
|
112 |
+
maxv : max limit
|
113 |
+
"""
|
114 |
+
if (val < minv):
|
115 |
+
val = minv
|
116 |
+
elif (val > maxv):
|
117 |
+
val = maxv
|
118 |
+
return val
|
119 |
+
|
120 |
+
|
121 |
+
def sampleUniform(minv, maxv):
|
122 |
+
"""
|
123 |
+
sample int within range
|
124 |
+
Parameters
|
125 |
+
minv ; int min limit
|
126 |
+
maxv : int max limit
|
127 |
+
"""
|
128 |
+
return randint(minv, maxv)
|
129 |
+
|
130 |
+
|
131 |
+
def sampleFromBase(value, dev):
|
132 |
+
"""
|
133 |
+
sample int wrt base
|
134 |
+
Parameters
|
135 |
+
value : base value
|
136 |
+
dev : deviation
|
137 |
+
"""
|
138 |
+
return randint(value - dev, value + dev)
|
139 |
+
|
140 |
+
|
141 |
+
def sampleFloatFromBase(value, dev):
|
142 |
+
"""
|
143 |
+
sample float wrt base
|
144 |
+
Parameters
|
145 |
+
value : base value
|
146 |
+
dev : deviation
|
147 |
+
"""
|
148 |
+
return randomFloat(value - dev, value + dev)
|
149 |
+
|
150 |
+
|
151 |
+
def distrUniformWithRanndom(total, numItems, noiseLevel):
|
152 |
+
"""
|
153 |
+
uniformly distribute with some randomness and preserves total
|
154 |
+
Parameters
|
155 |
+
total : total count
|
156 |
+
numItems : no of bins
|
157 |
+
noiseLevel : noise level fraction
|
158 |
+
"""
|
159 |
+
perItem = total / numItems
|
160 |
+
var = perItem * noiseLevel
|
161 |
+
items = []
|
162 |
+
for i in range(numItems):
|
163 |
+
item = perItem + randomFloat(-var, var)
|
164 |
+
items.append(item)
|
165 |
+
|
166 |
+
#adjust last item
|
167 |
+
sm = sum(items[:-1])
|
168 |
+
items[-1] = total - sm
|
169 |
+
return items
|
170 |
+
|
171 |
+
|
172 |
+
def isEventSampled(threshold, maxv=100):
|
173 |
+
"""
|
174 |
+
sample event which occurs if sampled below threshold
|
175 |
+
Parameters
|
176 |
+
threshold : threshold for sampling
|
177 |
+
maxv : maximum values
|
178 |
+
"""
|
179 |
+
return randint(0, maxv) < threshold
|
180 |
+
|
181 |
+
|
182 |
+
def sampleBinaryEvents(events, probPercent):
|
183 |
+
"""
|
184 |
+
sample binary events
|
185 |
+
Parameters
|
186 |
+
events : two events
|
187 |
+
probPercent : probability as percentage
|
188 |
+
"""
|
189 |
+
if (randint(0, 100) < probPercent):
|
190 |
+
event = events[0]
|
191 |
+
else:
|
192 |
+
event = events[1]
|
193 |
+
return event
|
194 |
+
|
195 |
+
|
196 |
+
def addNoiseNum(value, sampler):
|
197 |
+
"""
|
198 |
+
add noise to numeric value
|
199 |
+
Parameters
|
200 |
+
value : base value
|
201 |
+
sampler : sampler for noise
|
202 |
+
"""
|
203 |
+
return value * (1 + sampler.sample())
|
204 |
+
|
205 |
+
|
206 |
+
def addNoiseCat(value, values, noise):
|
207 |
+
"""
|
208 |
+
add noise to categorical value i.e with some probability change value
|
209 |
+
Parameters
|
210 |
+
value : cat value
|
211 |
+
values : cat values
|
212 |
+
noise : noise level fraction
|
213 |
+
"""
|
214 |
+
newValue = value
|
215 |
+
threshold = int(noise * 100)
|
216 |
+
if (isEventSampled(threshold)):
|
217 |
+
newValue = selectRandomFromList(values)
|
218 |
+
while newValue == value:
|
219 |
+
newValue = selectRandomFromList(values)
|
220 |
+
return newValue
|
221 |
+
|
222 |
+
|
223 |
+
def sampleWithReplace(data, sampSize):
|
224 |
+
"""
|
225 |
+
sample with replacement
|
226 |
+
Parameters
|
227 |
+
data : array
|
228 |
+
sampSize : sample size
|
229 |
+
"""
|
230 |
+
sampled = list()
|
231 |
+
le = len(data)
|
232 |
+
if sampSize is None:
|
233 |
+
sampSize = le
|
234 |
+
for i in range(sampSize):
|
235 |
+
j = random.randint(0, le - 1)
|
236 |
+
sampled.append(data[j])
|
237 |
+
return sampled
|
238 |
+
|
239 |
+
class CumDistr:
|
240 |
+
"""
|
241 |
+
cumulative distr
|
242 |
+
"""
|
243 |
+
|
244 |
+
def __init__(self, data, numBins = None):
|
245 |
+
"""
|
246 |
+
initializer
|
247 |
+
|
248 |
+
Parameters
|
249 |
+
data : array
|
250 |
+
numBins : no of bins
|
251 |
+
"""
|
252 |
+
if not numBins:
|
253 |
+
numBins = int(len(data) / 5)
|
254 |
+
res = stats.cumfreq(data, numbins=numBins)
|
255 |
+
self.cdistr = res.cumcount / len(data)
|
256 |
+
self.loLim = res.lowerlimit
|
257 |
+
self.upLim = res.lowerlimit + res.binsize * res.cumcount.size
|
258 |
+
self.binWidth = res.binsize
|
259 |
+
|
260 |
+
def getDistr(self, value):
|
261 |
+
"""
|
262 |
+
get cumulative distribution
|
263 |
+
|
264 |
+
Parameters
|
265 |
+
value : value
|
266 |
+
"""
|
267 |
+
if value <= self.loLim:
|
268 |
+
d = 0.0
|
269 |
+
elif value >= self.upLim:
|
270 |
+
d = 1.0
|
271 |
+
else:
|
272 |
+
bin = int((value - self.loLim) / self.binWidth)
|
273 |
+
d = self.cdistr[bin]
|
274 |
+
return d
|
275 |
+
|
276 |
+
class BernoulliTrialSampler:
|
277 |
+
"""
|
278 |
+
bernoulli trial sampler return True or False
|
279 |
+
"""
|
280 |
+
|
281 |
+
def __init__(self, pr):
|
282 |
+
"""
|
283 |
+
initializer
|
284 |
+
|
285 |
+
Parameters
|
286 |
+
pr : probability
|
287 |
+
"""
|
288 |
+
self.pr = pr
|
289 |
+
|
290 |
+
def sample(self):
|
291 |
+
"""
|
292 |
+
samples value
|
293 |
+
"""
|
294 |
+
return random.random() < self.pr
|
295 |
+
|
296 |
+
class PoissonSampler:
|
297 |
+
"""
|
298 |
+
poisson sampler returns number of events
|
299 |
+
"""
|
300 |
+
def __init__(self, rateOccur, maxSamp):
|
301 |
+
"""
|
302 |
+
initializer
|
303 |
+
|
304 |
+
Parameters
|
305 |
+
rateOccur : rate of occurence
|
306 |
+
maxSamp : max limit on no of samples
|
307 |
+
"""
|
308 |
+
self.rateOccur = rateOccur
|
309 |
+
self.maxSamp = int(maxSamp)
|
310 |
+
self.pmax = self.calculatePr(rateOccur)
|
311 |
+
|
312 |
+
def calculatePr(self, numOccur):
|
313 |
+
"""
|
314 |
+
calulates probability
|
315 |
+
|
316 |
+
Parameters
|
317 |
+
numOccur : no of occurence
|
318 |
+
"""
|
319 |
+
p = (self.rateOccur ** numOccur) * math.exp(-self.rateOccur) / math.factorial(numOccur)
|
320 |
+
return p
|
321 |
+
|
322 |
+
def sample(self):
|
323 |
+
"""
|
324 |
+
samples value
|
325 |
+
"""
|
326 |
+
done = False
|
327 |
+
samp = 0
|
328 |
+
while not done:
|
329 |
+
no = randint(0, self.maxSamp)
|
330 |
+
sp = randomFloat(0.0, self.pmax)
|
331 |
+
ap = self.calculatePr(no)
|
332 |
+
if sp < ap:
|
333 |
+
done = True
|
334 |
+
samp = no
|
335 |
+
return samp
|
336 |
+
|
337 |
+
class ExponentialSampler:
|
338 |
+
"""
|
339 |
+
returns interval between events
|
340 |
+
"""
|
341 |
+
def __init__(self, rateOccur, maxSamp = None):
|
342 |
+
"""
|
343 |
+
initializer
|
344 |
+
|
345 |
+
Parameters
|
346 |
+
rateOccur : rate of occurence
|
347 |
+
maxSamp : max limit on interval
|
348 |
+
"""
|
349 |
+
self.interval = 1.0 / rateOccur
|
350 |
+
self.maxSamp = int(maxSamp) if maxSamp is not None else None
|
351 |
+
|
352 |
+
def sample(self):
|
353 |
+
"""
|
354 |
+
samples value
|
355 |
+
"""
|
356 |
+
sampled = np.random.exponential(scale=self.interval)
|
357 |
+
if self.maxSamp is not None:
|
358 |
+
while sampled > self.maxSamp:
|
359 |
+
sampled = np.random.exponential(scale=self.interval)
|
360 |
+
return sampled
|
361 |
+
|
362 |
+
class UniformNumericSampler:
|
363 |
+
"""
|
364 |
+
uniform sampler for numerical values
|
365 |
+
"""
|
366 |
+
def __init__(self, minv, maxv):
|
367 |
+
"""
|
368 |
+
initializer
|
369 |
+
|
370 |
+
Parameters
|
371 |
+
minv : min value
|
372 |
+
maxv : max value
|
373 |
+
"""
|
374 |
+
self.minv = minv
|
375 |
+
self.maxv = maxv
|
376 |
+
|
377 |
+
def isNumeric(self):
|
378 |
+
"""
|
379 |
+
returns true
|
380 |
+
"""
|
381 |
+
return True
|
382 |
+
|
383 |
+
def sample(self):
|
384 |
+
"""
|
385 |
+
samples value
|
386 |
+
"""
|
387 |
+
samp = sampleUniform(self.minv, self.maxv) if isinstance(self.minv, int) else randomFloat(self.minv, self.maxv)
|
388 |
+
return samp
|
389 |
+
|
390 |
+
class UniformCategoricalSampler:
|
391 |
+
"""
|
392 |
+
uniform sampler for categorical values
|
393 |
+
"""
|
394 |
+
def __init__(self, cvalues):
|
395 |
+
"""
|
396 |
+
initializer
|
397 |
+
|
398 |
+
Parameters
|
399 |
+
cvalues : categorical value list
|
400 |
+
"""
|
401 |
+
self.cvalues = cvalues
|
402 |
+
|
403 |
+
def isNumeric(self):
|
404 |
+
return False
|
405 |
+
|
406 |
+
def sample(self):
|
407 |
+
"""
|
408 |
+
samples value
|
409 |
+
"""
|
410 |
+
return selectRandomFromList(self.cvalues)
|
411 |
+
|
412 |
+
class NormalSampler:
|
413 |
+
"""
|
414 |
+
normal sampler
|
415 |
+
"""
|
416 |
+
def __init__(self, mean, stdDev):
|
417 |
+
"""
|
418 |
+
initializer
|
419 |
+
|
420 |
+
Parameters
|
421 |
+
mean : mean
|
422 |
+
stdDev : std deviation
|
423 |
+
"""
|
424 |
+
self.mean = mean
|
425 |
+
self.stdDev = stdDev
|
426 |
+
self.sampleAsInt = False
|
427 |
+
|
428 |
+
def isNumeric(self):
|
429 |
+
return True
|
430 |
+
|
431 |
+
def sampleAsIntValue(self):
|
432 |
+
"""
|
433 |
+
set True to sample as int
|
434 |
+
"""
|
435 |
+
self.sampleAsInt = True
|
436 |
+
|
437 |
+
def sample(self):
|
438 |
+
"""
|
439 |
+
samples value
|
440 |
+
"""
|
441 |
+
samp = np.random.normal(self.mean, self.stdDev)
|
442 |
+
if self.sampleAsInt:
|
443 |
+
samp = int(samp)
|
444 |
+
return samp
|
445 |
+
|
446 |
+
class LogNormalSampler:
|
447 |
+
"""
|
448 |
+
log normal sampler
|
449 |
+
"""
|
450 |
+
def __init__(self, mean, stdDev):
|
451 |
+
"""
|
452 |
+
initializer
|
453 |
+
|
454 |
+
Parameters
|
455 |
+
mean : mean
|
456 |
+
stdDev : std deviation
|
457 |
+
"""
|
458 |
+
self.mean = mean
|
459 |
+
self.stdDev = stdDev
|
460 |
+
|
461 |
+
def isNumeric(self):
|
462 |
+
return True
|
463 |
+
|
464 |
+
def sample(self):
|
465 |
+
"""
|
466 |
+
samples value
|
467 |
+
"""
|
468 |
+
return np.random.lognormal(self.mean, self.stdDev)
|
469 |
+
|
470 |
+
class NormalSamplerWithTrendCycle:
|
471 |
+
"""
|
472 |
+
normal sampler with cycle and trend
|
473 |
+
"""
|
474 |
+
def __init__(self, mean, stdDev, dmean, cycle, step=1):
|
475 |
+
"""
|
476 |
+
initializer
|
477 |
+
|
478 |
+
Parameters
|
479 |
+
mean : mean
|
480 |
+
stdDev : std deviation
|
481 |
+
dmean : trend delta
|
482 |
+
cycle : cycle values wrt base mean
|
483 |
+
step : adjustment step for cycle and trend
|
484 |
+
"""
|
485 |
+
self.mean = mean
|
486 |
+
self.cmean = mean
|
487 |
+
self.stdDev = stdDev
|
488 |
+
self.dmean = dmean
|
489 |
+
self.cycle = cycle
|
490 |
+
self.clen = len(cycle) if cycle is not None else 0
|
491 |
+
self.step = step
|
492 |
+
self.count = 0
|
493 |
+
|
494 |
+
def isNumeric(self):
|
495 |
+
return True
|
496 |
+
|
497 |
+
def sample(self):
|
498 |
+
"""
|
499 |
+
samples value
|
500 |
+
"""
|
501 |
+
s = np.random.normal(self.cmean, self.stdDev)
|
502 |
+
self.count += 1
|
503 |
+
if self.count % self.step == 0:
|
504 |
+
cy = 0
|
505 |
+
if self.clen > 1:
|
506 |
+
coff = self.count % self.clen
|
507 |
+
cy = self.cycle[coff]
|
508 |
+
tr = self.count * self.dmean
|
509 |
+
self.cmean = self.mean + tr + cy
|
510 |
+
return s
|
511 |
+
|
512 |
+
|
513 |
+
class ParetoSampler:
|
514 |
+
"""
|
515 |
+
pareto sampler
|
516 |
+
"""
|
517 |
+
def __init__(self, mode, shape):
|
518 |
+
"""
|
519 |
+
initializer
|
520 |
+
|
521 |
+
Parameters
|
522 |
+
mode : mode
|
523 |
+
shape : shape
|
524 |
+
"""
|
525 |
+
self.mode = mode
|
526 |
+
self.shape = shape
|
527 |
+
|
528 |
+
def isNumeric(self):
|
529 |
+
return True
|
530 |
+
|
531 |
+
def sample(self):
|
532 |
+
"""
|
533 |
+
samples value
|
534 |
+
"""
|
535 |
+
return (np.random.pareto(self.shape) + 1) * self.mode
|
536 |
+
|
537 |
+
class GammaSampler:
|
538 |
+
"""
|
539 |
+
pareto sampler
|
540 |
+
"""
|
541 |
+
def __init__(self, shape, scale):
|
542 |
+
"""
|
543 |
+
initializer
|
544 |
+
|
545 |
+
Parameters
|
546 |
+
shape : shape
|
547 |
+
scale : scale
|
548 |
+
"""
|
549 |
+
self.shape = shape
|
550 |
+
self.scale = scale
|
551 |
+
|
552 |
+
def isNumeric(self):
|
553 |
+
return True
|
554 |
+
|
555 |
+
def sample(self):
|
556 |
+
"""
|
557 |
+
samples value
|
558 |
+
"""
|
559 |
+
return np.random.gamma(self.shape, self.scale)
|
560 |
+
|
561 |
+
class GaussianRejectSampler:
|
562 |
+
"""
|
563 |
+
gaussian sampling based on rejection sampling
|
564 |
+
"""
|
565 |
+
def __init__(self, mean, stdDev):
|
566 |
+
"""
|
567 |
+
initializer
|
568 |
+
|
569 |
+
Parameters
|
570 |
+
mean : mean
|
571 |
+
stdDev : std deviation
|
572 |
+
"""
|
573 |
+
self.mean = mean
|
574 |
+
self.stdDev = stdDev
|
575 |
+
self.xmin = mean - 3 * stdDev
|
576 |
+
self.xmax = mean + 3 * stdDev
|
577 |
+
self.ymin = 0.0
|
578 |
+
self.fmax = 1.0 / (math.sqrt(2.0 * 3.14) * stdDev)
|
579 |
+
self.ymax = 1.05 * self.fmax
|
580 |
+
self.sampleAsInt = False
|
581 |
+
|
582 |
+
def isNumeric(self):
|
583 |
+
return True
|
584 |
+
|
585 |
+
def sampleAsIntValue(self):
|
586 |
+
"""
|
587 |
+
sample as int value
|
588 |
+
"""
|
589 |
+
self.sampleAsInt = True
|
590 |
+
|
591 |
+
def sample(self):
|
592 |
+
"""
|
593 |
+
samples value
|
594 |
+
"""
|
595 |
+
done = False
|
596 |
+
samp = 0
|
597 |
+
while not done:
|
598 |
+
x = randomFloat(self.xmin, self.xmax)
|
599 |
+
y = randomFloat(self.ymin, self.ymax)
|
600 |
+
f = self.fmax * math.exp(-(x - self.mean) * (x - self.mean) / (2.0 * self.stdDev * self.stdDev))
|
601 |
+
if (y < f):
|
602 |
+
done = True
|
603 |
+
samp = x
|
604 |
+
if self.sampleAsInt:
|
605 |
+
samp = int(samp)
|
606 |
+
return samp
|
607 |
+
|
608 |
+
class DiscreteRejectSampler:
|
609 |
+
"""
|
610 |
+
non parametric sampling for discrete values using given distribution based
|
611 |
+
on rejection sampling
|
612 |
+
"""
|
613 |
+
def __init__(self, xmin, xmax, step, *values):
|
614 |
+
"""
|
615 |
+
initializer
|
616 |
+
|
617 |
+
Parameters
|
618 |
+
xmin : min value
|
619 |
+
xmax : max value
|
620 |
+
step : discrete step
|
621 |
+
values : distr values
|
622 |
+
"""
|
623 |
+
self.xmin = xmin
|
624 |
+
self.xmax = xmax
|
625 |
+
self.step = step
|
626 |
+
self.distr = values
|
627 |
+
if (len(self.distr) == 1):
|
628 |
+
self.distr = self.distr[0]
|
629 |
+
numSteps = int((self.xmax - self.xmin) / self.step)
|
630 |
+
#print("{:.3f} {:.3f} {:.3f} {}".format(self.xmin, self.xmax, self.step, numSteps))
|
631 |
+
assert len(self.distr) == numSteps + 1, "invalid number of distr values expected {}".format(numSteps + 1)
|
632 |
+
self.ximin = 0
|
633 |
+
self.ximax = numSteps
|
634 |
+
self.pmax = float(max(self.distr))
|
635 |
+
|
636 |
+
def isNumeric(self):
|
637 |
+
return True
|
638 |
+
|
639 |
+
def sample(self):
|
640 |
+
"""
|
641 |
+
samples value
|
642 |
+
"""
|
643 |
+
done = False
|
644 |
+
samp = None
|
645 |
+
while not done:
|
646 |
+
xi = randint(self.ximin, self.ximax)
|
647 |
+
#print(formatAny(xi, "xi"))
|
648 |
+
ps = randomFloat(0.0, self.pmax)
|
649 |
+
pa = self.distr[xi]
|
650 |
+
if ps < pa:
|
651 |
+
samp = self.xmin + xi * self.step
|
652 |
+
done = True
|
653 |
+
return samp
|
654 |
+
|
655 |
+
|
656 |
+
class TriangularRejectSampler:
|
657 |
+
"""
|
658 |
+
non parametric sampling using triangular distribution based on rejection sampling
|
659 |
+
"""
|
660 |
+
def __init__(self, xmin, xmax, vertexValue, vertexPos=None):
|
661 |
+
"""
|
662 |
+
initializer
|
663 |
+
|
664 |
+
Parameters
|
665 |
+
xmin : min value
|
666 |
+
xmax : max value
|
667 |
+
vertexValue : distr value at vertex
|
668 |
+
vertexPos : vertex pposition
|
669 |
+
"""
|
670 |
+
self.xmin = xmin
|
671 |
+
self.xmax = xmax
|
672 |
+
self.vertexValue = vertexValue
|
673 |
+
if vertexPos:
|
674 |
+
assert vertexPos > xmin and vertexPos < xmax, "vertex position outside bound"
|
675 |
+
self.vertexPos = vertexPos
|
676 |
+
else:
|
677 |
+
self.vertexPos = 0.5 * (xmin + xmax)
|
678 |
+
self.s1 = vertexValue / (self.vertexPos - xmin)
|
679 |
+
self.s2 = vertexValue / (xmax - self.vertexPos)
|
680 |
+
|
681 |
+
def isNumeric(self):
|
682 |
+
return True
|
683 |
+
|
684 |
+
def sample(self):
|
685 |
+
"""
|
686 |
+
samples value
|
687 |
+
"""
|
688 |
+
done = False
|
689 |
+
samp = None
|
690 |
+
while not done:
|
691 |
+
x = randomFloat(self.xmin, self.xmax)
|
692 |
+
y = randomFloat(0.0, self.vertexValue)
|
693 |
+
f = (x - self.xmin) * self.s1 if x < self.vertexPos else (self.xmax - x) * self.s2
|
694 |
+
if (y < f):
|
695 |
+
done = True
|
696 |
+
samp = x
|
697 |
+
|
698 |
+
return samp;
|
699 |
+
|
700 |
+
class NonParamRejectSampler:
|
701 |
+
"""
|
702 |
+
non parametric sampling using given distribution based on rejection sampling
|
703 |
+
"""
|
704 |
+
def __init__(self, xmin, binWidth, *values):
|
705 |
+
"""
|
706 |
+
initializer
|
707 |
+
|
708 |
+
Parameters
|
709 |
+
xmin : min value
|
710 |
+
binWidth : bin width
|
711 |
+
values : distr values
|
712 |
+
"""
|
713 |
+
self.values = values
|
714 |
+
if (len(self.values) == 1):
|
715 |
+
self.values = self.values[0]
|
716 |
+
self.xmin = xmin
|
717 |
+
self.xmax = xmin + binWidth * (len(self.values) - 1)
|
718 |
+
#print(self.xmin, self.xmax, binWidth)
|
719 |
+
self.binWidth = binWidth
|
720 |
+
self.fmax = 0
|
721 |
+
for v in self.values:
|
722 |
+
if (v > self.fmax):
|
723 |
+
self.fmax = v
|
724 |
+
self.ymin = 0
|
725 |
+
self.ymax = self.fmax
|
726 |
+
self.sampleAsInt = True
|
727 |
+
|
728 |
+
def isNumeric(self):
|
729 |
+
return True
|
730 |
+
|
731 |
+
def sampleAsFloat(self):
|
732 |
+
self.sampleAsInt = False
|
733 |
+
|
734 |
+
def sample(self):
|
735 |
+
"""
|
736 |
+
samples value
|
737 |
+
"""
|
738 |
+
done = False
|
739 |
+
samp = 0
|
740 |
+
while not done:
|
741 |
+
if self.sampleAsInt:
|
742 |
+
x = random.randint(self.xmin, self.xmax)
|
743 |
+
y = random.randint(self.ymin, self.ymax)
|
744 |
+
else:
|
745 |
+
x = randomFloat(self.xmin, self.xmax)
|
746 |
+
y = randomFloat(self.ymin, self.ymax)
|
747 |
+
bin = int((x - self.xmin) / self.binWidth)
|
748 |
+
f = self.values[bin]
|
749 |
+
if (y < f):
|
750 |
+
done = True
|
751 |
+
samp = x
|
752 |
+
return samp
|
753 |
+
|
754 |
+
class JointNonParamRejectSampler:
|
755 |
+
"""
|
756 |
+
non parametric sampling using given distribution based on rejection sampling
|
757 |
+
"""
|
758 |
+
def __init__(self, xmin, xbinWidth, xnbin, ymin, ybinWidth, ynbin, *values):
|
759 |
+
"""
|
760 |
+
initializer
|
761 |
+
|
762 |
+
Parameters
|
763 |
+
xmin : min value for x
|
764 |
+
xbinWidth : bin width for x
|
765 |
+
xnbin : no of bins for x
|
766 |
+
ymin : min value for y
|
767 |
+
ybinWidth : bin width for y
|
768 |
+
ynbin : no of bins for y
|
769 |
+
values : distr values
|
770 |
+
"""
|
771 |
+
self.values = values
|
772 |
+
if (len(self.values) == 1):
|
773 |
+
self.values = self.values[0]
|
774 |
+
assert len(self.values) == xnbin * ynbin, "wrong number of values for joint distr"
|
775 |
+
self.xmin = xmin
|
776 |
+
self.xmax = xmin + xbinWidth * xnbin
|
777 |
+
self.xbinWidth = xbinWidth
|
778 |
+
self.ymin = ymin
|
779 |
+
self.ymax = ymin + ybinWidth * ynbin
|
780 |
+
self.ybinWidth = ybinWidth
|
781 |
+
self.pmax = max(self.values)
|
782 |
+
self.values = np.array(self.values).reshape(xnbin, ynbin)
|
783 |
+
|
784 |
+
def isNumeric(self):
|
785 |
+
return True
|
786 |
+
|
787 |
+
def sample(self):
|
788 |
+
"""
|
789 |
+
samples value
|
790 |
+
"""
|
791 |
+
done = False
|
792 |
+
samp = 0
|
793 |
+
while not done:
|
794 |
+
x = randomFloat(self.xmin, self.xmax)
|
795 |
+
y = randomFloat(self.ymin, self.ymax)
|
796 |
+
xbin = int((x - self.xmin) / self.xbinWidth)
|
797 |
+
ybin = int((y - self.ymin) / self.ybinWidth)
|
798 |
+
ap = self.values[xbin][ybin]
|
799 |
+
sp = randomFloat(0.0, self.pmax)
|
800 |
+
if (sp < ap):
|
801 |
+
done = True
|
802 |
+
samp = [x,y]
|
803 |
+
return samp
|
804 |
+
|
805 |
+
|
806 |
+
class JointNormalSampler:
|
807 |
+
"""
|
808 |
+
joint normal sampler
|
809 |
+
"""
|
810 |
+
def __init__(self, *values):
|
811 |
+
"""
|
812 |
+
initializer
|
813 |
+
|
814 |
+
Parameters
|
815 |
+
values : 2 mean values followed by 4 values for covar matrix
|
816 |
+
"""
|
817 |
+
lvalues = list(values)
|
818 |
+
assert len(lvalues) == 6, "incorrect number of arguments for joint normal sampler"
|
819 |
+
mean = lvalues[:2]
|
820 |
+
self.mean = np.array(mean)
|
821 |
+
sd = lvalues[2:]
|
822 |
+
self.sd = np.array(sd).reshape(2,2)
|
823 |
+
|
824 |
+
def isNumeric(self):
|
825 |
+
return True
|
826 |
+
|
827 |
+
def sample(self):
|
828 |
+
"""
|
829 |
+
samples value
|
830 |
+
"""
|
831 |
+
return list(np.random.multivariate_normal(self.mean, self.sd))
|
832 |
+
|
833 |
+
|
834 |
+
class MultiVarNormalSampler:
|
835 |
+
"""
|
836 |
+
muti variate normal sampler
|
837 |
+
"""
|
838 |
+
def __init__(self, numVar, *values):
|
839 |
+
"""
|
840 |
+
initializer
|
841 |
+
|
842 |
+
Parameters
|
843 |
+
numVar : no of variables
|
844 |
+
values : numVar mean values followed by numVar x numVar values for covar matrix
|
845 |
+
"""
|
846 |
+
lvalues = list(values)
|
847 |
+
assert len(lvalues) == numVar + numVar * numVar, "incorrect number of arguments for multi var normal sampler"
|
848 |
+
mean = lvalues[:numVar]
|
849 |
+
self.mean = np.array(mean)
|
850 |
+
sd = lvalues[numVar:]
|
851 |
+
self.sd = np.array(sd).reshape(numVar,numVar)
|
852 |
+
|
853 |
+
def isNumeric(self):
|
854 |
+
return True
|
855 |
+
|
856 |
+
def sample(self):
|
857 |
+
"""
|
858 |
+
samples value
|
859 |
+
"""
|
860 |
+
return list(np.random.multivariate_normal(self.mean, self.sd))
|
861 |
+
|
862 |
+
class CategoricalRejectSampler:
|
863 |
+
"""
|
864 |
+
non parametric sampling for categorical attributes using given distribution based
|
865 |
+
on rejection sampling
|
866 |
+
"""
|
867 |
+
def __init__(self, *values):
|
868 |
+
"""
|
869 |
+
initializer
|
870 |
+
|
871 |
+
Parameters
|
872 |
+
values : list of tuples which contains a categorical value and the corresponsding distr value
|
873 |
+
"""
|
874 |
+
self.distr = values
|
875 |
+
if (len(self.distr) == 1):
|
876 |
+
self.distr = self.distr[0]
|
877 |
+
maxv = 0
|
878 |
+
for t in self.distr:
|
879 |
+
if t[1] > maxv:
|
880 |
+
maxv = t[1]
|
881 |
+
self.maxv = maxv
|
882 |
+
|
883 |
+
def sample(self):
|
884 |
+
"""
|
885 |
+
samples value
|
886 |
+
"""
|
887 |
+
done = False
|
888 |
+
samp = ""
|
889 |
+
while not done:
|
890 |
+
t = self.distr[randint(0, len(self.distr)-1)]
|
891 |
+
d = randomFloat(0, self.maxv)
|
892 |
+
if (d <= t[1]):
|
893 |
+
done = True
|
894 |
+
samp = t[0]
|
895 |
+
return samp
|
896 |
+
|
897 |
+
|
898 |
+
class DistrMixtureSampler:
|
899 |
+
"""
|
900 |
+
distr mixture sampler
|
901 |
+
"""
|
902 |
+
def __init__(self, mixtureWtDistr, *compDistr):
|
903 |
+
"""
|
904 |
+
initializer
|
905 |
+
|
906 |
+
Parameters
|
907 |
+
mixtureWtDistr : sampler that returns index into sampler list
|
908 |
+
compDistr : sampler list
|
909 |
+
"""
|
910 |
+
self.mixtureWtDistr = mixtureWtDistr
|
911 |
+
self.compDistr = compDistr
|
912 |
+
if (len(self.compDistr) == 1):
|
913 |
+
self.compDistr = self.compDistr[0]
|
914 |
+
|
915 |
+
def isNumeric(self):
|
916 |
+
return True
|
917 |
+
|
918 |
+
def sample(self):
|
919 |
+
"""
|
920 |
+
samples value
|
921 |
+
"""
|
922 |
+
comp = self.mixtureWtDistr.sample()
|
923 |
+
|
924 |
+
#sample sampled comp distr
|
925 |
+
return self.compDistr[comp].sample()
|
926 |
+
|
927 |
+
class AncestralSampler:
|
928 |
+
"""
|
929 |
+
ancestral sampler using conditional distribution
|
930 |
+
"""
|
931 |
+
def __init__(self, parentDistr, childDistr, numChildren):
|
932 |
+
"""
|
933 |
+
initializer
|
934 |
+
|
935 |
+
Parameters
|
936 |
+
parentDistr : parent distr
|
937 |
+
childDistr : childdren distribution dictionary
|
938 |
+
numChildren : no of children
|
939 |
+
"""
|
940 |
+
self.parentDistr = parentDistr
|
941 |
+
self.childDistr = childDistr
|
942 |
+
self.numChildren = numChildren
|
943 |
+
|
944 |
+
def sample(self):
|
945 |
+
"""
|
946 |
+
samples value
|
947 |
+
"""
|
948 |
+
parent = self.parentDistr.sample()
|
949 |
+
|
950 |
+
#sample all children conditioned on parent
|
951 |
+
children = []
|
952 |
+
for i in range(self.numChildren):
|
953 |
+
key = (parent, i)
|
954 |
+
child = self.childDistr[key].sample()
|
955 |
+
children.append(child)
|
956 |
+
return (parent, children)
|
957 |
+
|
958 |
+
class ClusterSampler:
|
959 |
+
"""
|
960 |
+
sample cluster and then sample member of sampled cluster
|
961 |
+
"""
|
962 |
+
def __init__(self, clusters, *clustDistr):
|
963 |
+
"""
|
964 |
+
initializer
|
965 |
+
|
966 |
+
Parameters
|
967 |
+
clusters : dictionary clusters
|
968 |
+
clustDistr : distr for clusters
|
969 |
+
"""
|
970 |
+
self.sampler = CategoricalRejectSampler(*clustDistr)
|
971 |
+
self.clusters = clusters
|
972 |
+
|
973 |
+
def sample(self):
|
974 |
+
"""
|
975 |
+
samples value
|
976 |
+
"""
|
977 |
+
cluster = self.sampler.sample()
|
978 |
+
member = random.choice(self.clusters[cluster])
|
979 |
+
return (cluster, member)
|
980 |
+
|
981 |
+
|
982 |
+
class MetropolitanSampler:
|
983 |
+
"""
|
984 |
+
metropolitan sampler
|
985 |
+
"""
|
986 |
+
def __init__(self, propStdDev, min, binWidth, values):
|
987 |
+
"""
|
988 |
+
initializer
|
989 |
+
|
990 |
+
Parameters
|
991 |
+
propStdDev : proposal distr std dev
|
992 |
+
min : min domain value for target distr
|
993 |
+
binWidth : bin width
|
994 |
+
values : target distr values
|
995 |
+
"""
|
996 |
+
self.targetDistr = Histogram.createInitialized(min, binWidth, values)
|
997 |
+
self.propsalDistr = GaussianRejectSampler(0, propStdDev)
|
998 |
+
self.proposalMixture = False
|
999 |
+
|
1000 |
+
# bootstrap sample
|
1001 |
+
(minv, maxv) = self.targetDistr.getMinMax()
|
1002 |
+
self.curSample = random.randint(minv, maxv)
|
1003 |
+
self.curDistr = self.targetDistr.value(self.curSample)
|
1004 |
+
self.transCount = 0
|
1005 |
+
|
1006 |
+
def initialize(self):
|
1007 |
+
"""
|
1008 |
+
initialize
|
1009 |
+
"""
|
1010 |
+
(minv, maxv) = self.targetDistr.getMinMax()
|
1011 |
+
self.curSample = random.randint(minv, maxv)
|
1012 |
+
self.curDistr = self.targetDistr.value(self.curSample)
|
1013 |
+
self.transCount = 0
|
1014 |
+
|
1015 |
+
def setProposalDistr(self, propsalDistr):
|
1016 |
+
"""
|
1017 |
+
set custom proposal distribution
|
1018 |
+
Parameters
|
1019 |
+
propsalDistr : proposal distribution
|
1020 |
+
"""
|
1021 |
+
self.propsalDistr = propsalDistr
|
1022 |
+
|
1023 |
+
|
1024 |
+
def setGlobalProposalDistr(self, globPropStdDev, proposalChoiceThreshold):
|
1025 |
+
"""
|
1026 |
+
set custom proposal distribution
|
1027 |
+
Parameters
|
1028 |
+
globPropStdDev : global proposal distr std deviation
|
1029 |
+
proposalChoiceThreshold : threshold for using global proposal distribution
|
1030 |
+
"""
|
1031 |
+
self.globalProposalDistr = GaussianRejectSampler(0, globPropStdDev)
|
1032 |
+
self.proposalChoiceThreshold = proposalChoiceThreshold
|
1033 |
+
self.proposalMixture = True
|
1034 |
+
|
1035 |
+
def sample(self):
|
1036 |
+
"""
|
1037 |
+
samples value
|
1038 |
+
"""
|
1039 |
+
nextSample = self.proposalSample(1)
|
1040 |
+
self.targetSample(nextSample)
|
1041 |
+
return self.curSample;
|
1042 |
+
|
1043 |
+
def proposalSample(self, skip):
|
1044 |
+
"""
|
1045 |
+
sample from proposal distribution
|
1046 |
+
Parameters
|
1047 |
+
skip : no of samples to skip
|
1048 |
+
"""
|
1049 |
+
for i in range(skip):
|
1050 |
+
if not self.proposalMixture:
|
1051 |
+
#one proposal distr
|
1052 |
+
nextSample = self.curSample + self.propsalDistr.sample()
|
1053 |
+
nextSample = self.targetDistr.boundedValue(nextSample)
|
1054 |
+
else:
|
1055 |
+
#mixture of proposal distr
|
1056 |
+
if random.random() < self.proposalChoiceThreshold:
|
1057 |
+
nextSample = self.curSample + self.propsalDistr.sample()
|
1058 |
+
else:
|
1059 |
+
nextSample = self.curSample + self.globalProposalDistr.sample()
|
1060 |
+
nextSample = self.targetDistr.boundedValue(nextSample)
|
1061 |
+
|
1062 |
+
return nextSample
|
1063 |
+
|
1064 |
+
def targetSample(self, nextSample):
|
1065 |
+
"""
|
1066 |
+
target sample
|
1067 |
+
Parameters
|
1068 |
+
nextSample : proposal distr sample
|
1069 |
+
"""
|
1070 |
+
nextDistr = self.targetDistr.value(nextSample)
|
1071 |
+
|
1072 |
+
transition = False
|
1073 |
+
if nextDistr > self.curDistr:
|
1074 |
+
transition = True
|
1075 |
+
else:
|
1076 |
+
distrRatio = float(nextDistr) / self.curDistr
|
1077 |
+
if random.random() < distrRatio:
|
1078 |
+
transition = True
|
1079 |
+
|
1080 |
+
if transition:
|
1081 |
+
self.curSample = nextSample
|
1082 |
+
self.curDistr = nextDistr
|
1083 |
+
self.transCount += 1
|
1084 |
+
|
1085 |
+
|
1086 |
+
def subSample(self, skip):
|
1087 |
+
"""
|
1088 |
+
sub sample
|
1089 |
+
Parameters
|
1090 |
+
skip : no of samples to skip
|
1091 |
+
"""
|
1092 |
+
nextSample = self.proposalSample(skip)
|
1093 |
+
self.targetSample(nextSample)
|
1094 |
+
return self.curSample;
|
1095 |
+
|
1096 |
+
def setMixtureProposal(self, globPropStdDev, mixtureThreshold):
|
1097 |
+
"""
|
1098 |
+
mixture proposal
|
1099 |
+
Parameters
|
1100 |
+
globPropStdDev : global proposal distr std deviation
|
1101 |
+
mixtureThreshold : threshold for using global proposal distribution
|
1102 |
+
"""
|
1103 |
+
self.globalProposalDistr = GaussianRejectSampler(0, globPropStdDev)
|
1104 |
+
self.mixtureThreshold = mixtureThreshold
|
1105 |
+
|
1106 |
+
def samplePropsal(self):
|
1107 |
+
"""
|
1108 |
+
sample from proposal distr
|
1109 |
+
"""
|
1110 |
+
if self.globalPropsalDistr is None:
|
1111 |
+
proposal = self.propsalDistr.sample()
|
1112 |
+
else:
|
1113 |
+
if random.random() < self.mixtureThreshold:
|
1114 |
+
proposal = self.propsalDistr.sample()
|
1115 |
+
else:
|
1116 |
+
proposal = self.globalProposalDistr.sample()
|
1117 |
+
|
1118 |
+
return proposal
|
1119 |
+
|
1120 |
+
class PermutationSampler:
|
1121 |
+
"""
|
1122 |
+
permutation sampler by shuffling a list
|
1123 |
+
"""
|
1124 |
+
def __init__(self):
|
1125 |
+
"""
|
1126 |
+
initialize
|
1127 |
+
"""
|
1128 |
+
self.values = None
|
1129 |
+
self.numShuffles = None
|
1130 |
+
|
1131 |
+
@staticmethod
|
1132 |
+
def createSamplerWithValues(values, *numShuffles):
|
1133 |
+
"""
|
1134 |
+
creator with values
|
1135 |
+
Parameters
|
1136 |
+
values : list data
|
1137 |
+
numShuffles : no of shuffles or range of no of shuffles
|
1138 |
+
"""
|
1139 |
+
sampler = PermutationSampler()
|
1140 |
+
sampler.values = values
|
1141 |
+
sampler.numShuffles = numShuffles
|
1142 |
+
return sampler
|
1143 |
+
|
1144 |
+
@staticmethod
|
1145 |
+
def createSamplerWithRange(minv, maxv, *numShuffles):
|
1146 |
+
"""
|
1147 |
+
creator with ramge min and max
|
1148 |
+
|
1149 |
+
Parameters
|
1150 |
+
minv : min of range
|
1151 |
+
maxv : max of range
|
1152 |
+
numShuffles : no of shuffles or range of no of shuffles
|
1153 |
+
"""
|
1154 |
+
sampler = PermutationSampler()
|
1155 |
+
sampler.values = list(range(minv, maxv + 1))
|
1156 |
+
sampler.numShuffles = numShuffles
|
1157 |
+
return sampler
|
1158 |
+
|
1159 |
+
def sample(self):
|
1160 |
+
"""
|
1161 |
+
sample new permutation
|
1162 |
+
"""
|
1163 |
+
cloned = self.values.copy()
|
1164 |
+
shuffle(cloned, *self.numShuffles)
|
1165 |
+
return cloned
|
1166 |
+
|
1167 |
+
class SpikeyDataSampler:
|
1168 |
+
"""
|
1169 |
+
samples spikey data
|
1170 |
+
"""
|
1171 |
+
def __init__(self, intvMean, intvScale, distr, spikeValueMean, spikeValueStd, spikeMaxDuration, baseValue = 0):
|
1172 |
+
"""
|
1173 |
+
initializer
|
1174 |
+
|
1175 |
+
Parameters
|
1176 |
+
intvMean : interval mean
|
1177 |
+
intvScale : interval std dev
|
1178 |
+
distr : type of distr for interval
|
1179 |
+
spikeValueMean : spike value mean
|
1180 |
+
spikeValueStd : spike value std dev
|
1181 |
+
spikeMaxDuration : max duration for spike
|
1182 |
+
baseValue : base or offset value
|
1183 |
+
"""
|
1184 |
+
if distr == "norm":
|
1185 |
+
self.intvSampler = NormalSampler(intvMean, intvScale)
|
1186 |
+
elif distr == "expo":
|
1187 |
+
rate = 1.0 / intvScale
|
1188 |
+
self.intvSampler = ExponentialSampler(rate)
|
1189 |
+
else:
|
1190 |
+
raise ValueError("invalid distribution")
|
1191 |
+
|
1192 |
+
self.spikeSampler = NormalSampler(spikeValueMean, spikeValueStd)
|
1193 |
+
self.spikeMaxDuration = spikeMaxDuration
|
1194 |
+
self.baseValue = baseValue
|
1195 |
+
self.inSpike = False
|
1196 |
+
self.spikeCount = 0
|
1197 |
+
self.baseCount = 0
|
1198 |
+
self.baseLength = int(self.intvSampler.sample())
|
1199 |
+
self.spikeValues = list()
|
1200 |
+
self.spikeLength = None
|
1201 |
+
|
1202 |
+
def sample(self):
|
1203 |
+
"""
|
1204 |
+
sample new value
|
1205 |
+
"""
|
1206 |
+
if self.baseCount <= self.baseLength:
|
1207 |
+
sampled = self.baseValue
|
1208 |
+
self.baseCount += 1
|
1209 |
+
else:
|
1210 |
+
if not self.inSpike:
|
1211 |
+
#starting spike
|
1212 |
+
spikeVal = self.spikeSampler.sample()
|
1213 |
+
self.spikeLength = sampleUniform(1, self.spikeMaxDuration)
|
1214 |
+
spikeMaxPos = 0 if self.spikeLength == 1 else sampleUniform(0, self.spikeLength-1)
|
1215 |
+
self.spikeValues.clear()
|
1216 |
+
for i in range(self.spikeLength):
|
1217 |
+
if i < spikeMaxPos:
|
1218 |
+
frac = (i + 1) / (spikeMaxPos + 1)
|
1219 |
+
frac = sampleFloatFromBase(frac, 0.1 * frac)
|
1220 |
+
elif i > spikeMaxPos:
|
1221 |
+
frac = (self.spikeLength - i) / (self.spikeLength - spikeMaxPos)
|
1222 |
+
frac = sampleFloatFromBase(frac, 0.1 * frac)
|
1223 |
+
else:
|
1224 |
+
frac = 1.0
|
1225 |
+
self.spikeValues.append(frac * spikeVal)
|
1226 |
+
self.inSpike = True
|
1227 |
+
self.spikeCount = 0
|
1228 |
+
|
1229 |
+
|
1230 |
+
sampled = self.spikeValues[self.spikeCount]
|
1231 |
+
self.spikeCount += 1
|
1232 |
+
|
1233 |
+
if self.spikeCount == self.spikeLength:
|
1234 |
+
#ending spike
|
1235 |
+
self.baseCount = 0
|
1236 |
+
self.baseLength = int(self.intvSampler.sample())
|
1237 |
+
self.inSpike = False
|
1238 |
+
|
1239 |
+
return sampled
|
1240 |
+
|
1241 |
+
|
1242 |
+
class EventSampler:
|
1243 |
+
"""
|
1244 |
+
sample event
|
1245 |
+
"""
|
1246 |
+
def __init__(self, intvSampler, valSampler=None):
|
1247 |
+
"""
|
1248 |
+
initializer
|
1249 |
+
|
1250 |
+
Parameters
|
1251 |
+
intvSampler : interval sampler
|
1252 |
+
valSampler : value sampler
|
1253 |
+
"""
|
1254 |
+
self.intvSampler = intvSampler
|
1255 |
+
self.valSampler = valSampler
|
1256 |
+
self.trigger = int(self.intvSampler.sample())
|
1257 |
+
self.count = 0
|
1258 |
+
|
1259 |
+
def reset(self):
|
1260 |
+
"""
|
1261 |
+
reset trigger
|
1262 |
+
"""
|
1263 |
+
self.trigger = int(self.intvSampler.sample())
|
1264 |
+
self.count = 0
|
1265 |
+
|
1266 |
+
def sample(self):
|
1267 |
+
"""
|
1268 |
+
sample event
|
1269 |
+
"""
|
1270 |
+
if self.count == self.trigger:
|
1271 |
+
sampled = self.valSampler.sample() if self.valSampler is not None else 1.0
|
1272 |
+
self.trigger = int(self.intvSampler.sample())
|
1273 |
+
self.count = 0
|
1274 |
+
else:
|
1275 |
+
sample = 0.0
|
1276 |
+
self.count += 1
|
1277 |
+
return sampled
|
1278 |
+
|
1279 |
+
|
1280 |
+
|
1281 |
+
|
1282 |
+
def createSampler(data):
|
1283 |
+
"""
|
1284 |
+
create sampler
|
1285 |
+
|
1286 |
+
Parameters
|
1287 |
+
data : sampler description
|
1288 |
+
"""
|
1289 |
+
#print(data)
|
1290 |
+
items = data.split(":")
|
1291 |
+
size = len(items)
|
1292 |
+
dtype = items[-1]
|
1293 |
+
stype = items[-2]
|
1294 |
+
sampler = None
|
1295 |
+
if stype == "uniform":
|
1296 |
+
if dtype == "int":
|
1297 |
+
min = int(items[0])
|
1298 |
+
max = int(items[1])
|
1299 |
+
sampler = UniformNumericSampler(min, max)
|
1300 |
+
elif dtype == "float":
|
1301 |
+
min = float(items[0])
|
1302 |
+
max = float(items[1])
|
1303 |
+
sampler = UniformNumericSampler(min, max)
|
1304 |
+
elif dtype == "categorical":
|
1305 |
+
values = items[:-2]
|
1306 |
+
sampler = UniformCategoricalSampler(values)
|
1307 |
+
elif stype == "normal":
|
1308 |
+
mean = float(items[0])
|
1309 |
+
sd = float(items[1])
|
1310 |
+
sampler = NormalSampler(mean, sd)
|
1311 |
+
if dtype == "int":
|
1312 |
+
sampler.sampleAsIntValue()
|
1313 |
+
elif stype == "nonparam":
|
1314 |
+
if dtype == "int" or dtype == "float":
|
1315 |
+
min = int(items[0])
|
1316 |
+
binWidth = int(items[1])
|
1317 |
+
values = items[2:-2]
|
1318 |
+
values = list(map(lambda v: int(v), values))
|
1319 |
+
sampler = NonParamRejectSampler(min, binWidth, values)
|
1320 |
+
if dtype == "float":
|
1321 |
+
sampler.sampleAsFloat()
|
1322 |
+
elif dtype == "categorical":
|
1323 |
+
values = list()
|
1324 |
+
for i in range(0, size-2, 2):
|
1325 |
+
cval = items[i]
|
1326 |
+
dist = int(items[i+1])
|
1327 |
+
pair = (cval, dist)
|
1328 |
+
values.append(pair)
|
1329 |
+
sampler = CategoricalRejectSampler(values)
|
1330 |
+
elif stype == "discrete":
|
1331 |
+
vmin = int(items[0])
|
1332 |
+
vmax = int(items[1])
|
1333 |
+
step = int(items[2])
|
1334 |
+
values = list(map(lambda i : int(items[i]), range(3, len(items)-2)))
|
1335 |
+
sampler = DiscreteRejectSampler(vmin, vmax, step, values)
|
1336 |
+
else:
|
1337 |
+
raise ValueError("invalid sampler type " + dtype)
|
1338 |
+
return sampler
|
1339 |
+
|
spers_tr.txt
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
1.000000,1.000000,1.000000,1.000000,0.000000,0.750000,1
|
2 |
+
1.000000,1.000000,1.000000,1.000000,0.000000,1.000000,1
|
3 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
4 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.224000,0
|
5 |
+
0.289000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
6 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
7 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
8 |
+
0.000000,0.183000,0.000000,0.000000,0.000000,0.000000,0
|
9 |
+
1.000000,0.875000,1.000000,1.000000,1.000000,1.000000,1
|
10 |
+
1.000000,1.000000,0.000000,1.000000,1.000000,1.000000,1
|
11 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
12 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
13 |
+
0.289000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
14 |
+
0.667000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
15 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
16 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
17 |
+
1.000000,0.800000,1.000000,0.500000,1.000000,1.000000,1
|
18 |
+
0.750000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
19 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
20 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
21 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.204000,1
|
22 |
+
0.800000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
23 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
24 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
25 |
+
1.000000,0.894000,1.000000,1.000000,1.000000,1.000000,1
|
26 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.183000,1
|
27 |
+
0.000000,0.577000,0.000000,0.000000,0.000000,0.000000,0
|
28 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
29 |
+
1.000000,0.750000,1.000000,1.000000,1.000000,1.000000,1
|
30 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.750000,1
|
31 |
+
0.000000,0.000000,0.333000,0.000000,0.000000,0.000000,0
|
32 |
+
0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0
|
33 |
+
0.447000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
34 |
+
0.750000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
35 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
36 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.183000,0
|
37 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.750000,1
|
38 |
+
0.667000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
39 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
40 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
41 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
42 |
+
1.000000,1.000000,1.000000,1.000000,0.000000,1.000000,1
|
43 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
44 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
45 |
+
0.750000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
46 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
47 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
48 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
49 |
+
1.000000,1.000000,0.667000,1.000000,1.000000,1.000000,1
|
50 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.000000,1
|
51 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
52 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
53 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
54 |
+
1.000000,0.667000,1.000000,1.000000,1.000000,1.000000,1
|
55 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
56 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.365000,0
|
57 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
58 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.750000,1
|
59 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
60 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
61 |
+
1.000000,1.000000,1.000000,0.500000,0.000000,1.000000,1
|
62 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
63 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
64 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
65 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,0.000000,1
|
66 |
+
0.750000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
67 |
+
0.000000,0.224000,0.000000,0.000000,0.000000,0.000000,0
|
68 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
69 |
+
1.000000,1.000000,0.667000,0.500000,1.000000,1.000000,1
|
70 |
+
1.000000,1.000000,0.667000,1.000000,0.000000,1.000000,1
|
71 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.200000,0
|
72 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.200000,0
|
73 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
74 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
75 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
76 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
77 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
78 |
+
0.750000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
79 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
80 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
81 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
82 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.834000,1
|
83 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.167000,0
|
84 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
85 |
+
1.000000,1.000000,0.667000,1.000000,1.000000,1.000000,1
|
86 |
+
0.447000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
87 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
88 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
89 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
90 |
+
0.365000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
91 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
92 |
+
0.000000,0.289000,0.000000,0.000000,0.000000,0.000000,0
|
93 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
94 |
+
0.800000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
95 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
96 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
97 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
98 |
+
1.000000,1.000000,0.667000,1.000000,1.000000,1.000000,1
|
99 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
100 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
spers_va.txt
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
1.000000,0.913000,1.000000,1.000000,1.000000,1.000000,1
|
2 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
3 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
4 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
5 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
6 |
+
1.000000,1.000000,1.000000,1.000000,0.000000,1.000000,1
|
7 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
8 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
9 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
10 |
+
0.750000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
11 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
12 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.200000,0
|
13 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
14 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,0.750000,1
|
15 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
16 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
17 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
18 |
+
1.000000,1.000000,0.667000,1.000000,1.000000,1.000000,1
|
19 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
20 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
21 |
+
1.000000,0.857000,1.000000,1.000000,1.000000,1.000000,1
|
22 |
+
0.365000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
23 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.204000,0
|
24 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
25 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.800000,1
|
26 |
+
1.000000,0.750000,1.000000,1.000000,1.000000,1.000000,1
|
27 |
+
0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0
|
28 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
29 |
+
1.000000,1.000000,1.000000,1.000000,0.000000,1.000000,1
|
30 |
+
0.250000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
31 |
+
0.000000,0.224000,0.000000,0.000000,0.000000,0.000000,0
|
32 |
+
0.000000,0.250000,0.000000,0.000000,0.000000,0.189000,0
|
33 |
+
1.000000,1.000000,1.000000,1.000000,0.000000,1.000000,1
|
34 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,0.834000,1
|
35 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.144000,0
|
36 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
37 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.750000,1
|
38 |
+
1.000000,0.800000,1.000000,1.000000,1.000000,1.000000,1
|
39 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
40 |
+
0.000000,0.224000,0.000000,0.000000,0.000000,0.000000,0
|
41 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
42 |
+
1.000000,1.000000,0.750000,1.000000,1.000000,1.000000,1
|
43 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.338000,0
|
44 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
45 |
+
0.750000,1.000000,1.000000,1.000000,0.000000,1.000000,1
|
46 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
47 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
48 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
49 |
+
1.000000,1.000000,0.667000,1.000000,1.000000,1.000000,1
|
50 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
51 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
52 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
53 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
54 |
+
1.000000,0.667000,1.000000,1.000000,1.000000,1.000000,1
|
55 |
+
0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0
|
56 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
57 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
58 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
59 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
60 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
61 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.834000,1
|
62 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
63 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
64 |
+
0.000000,0.224000,0.000000,0.000000,0.000000,0.000000,0
|
65 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
66 |
+
1.000000,0.750000,1.000000,1.000000,0.000000,1.000000,1
|
67 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
68 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
69 |
+
1.000000,0.913000,1.000000,1.000000,1.000000,1.000000,1
|
70 |
+
1.000000,1.000000,1.000000,0.500000,0.000000,1.000000,1
|
71 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.183000,0
|
72 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
73 |
+
1.000000,1.000000,1.000000,0.500000,1.000000,1.000000,1
|
74 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.800000,1
|
75 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
76 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
77 |
+
1.000000,1.000000,0.667000,1.000000,1.000000,1.000000,1
|
78 |
+
1.000000,0.750000,1.000000,1.000000,1.000000,1.000000,1
|
79 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
80 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
81 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.834000,1
|
82 |
+
0.289000,0.834000,1.000000,1.000000,1.000000,1.000000,1
|
83 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
84 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.154000,0
|
85 |
+
1.000000,0.926000,1.000000,1.000000,0.000000,1.000000,1
|
86 |
+
1.000000,1.000000,0.667000,1.000000,1.000000,0.834000,1
|
87 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
88 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
89 |
+
1.000000,0.667000,1.000000,1.000000,1.000000,1.000000,1
|
90 |
+
1.000000,1.000000,0.500000,1.000000,1.000000,1.000000,1
|
91 |
+
0.000000,0.000000,0.000000,0.500000,0.000000,0.000000,0
|
92 |
+
0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0
|
93 |
+
1.000000,0.667000,1.000000,0.500000,1.000000,1.000000,1
|
94 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1
|
95 |
+
0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0
|
96 |
+
0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0
|
97 |
+
1.000000,1.000000,1.000000,1.000000,1.000000,0.000000,1
|
98 |
+
1.000000,1.000000,1.000000,1.000000,0.000000,1.000000,1
|
99 |
+
0.000000,0.000000,0.000000,1.000000,0.000000,0.149000,0
|
100 |
+
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0
|
stats.py
ADDED
@@ -0,0 +1,482 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[ ]:
|
5 |
+
|
6 |
+
|
7 |
+
import sys
|
8 |
+
import random
|
9 |
+
import time
|
10 |
+
import math
|
11 |
+
import numpy as np
|
12 |
+
import statistics
|
13 |
+
from util import *
|
14 |
+
|
15 |
+
"""
|
16 |
+
histogram class
|
17 |
+
"""
|
18 |
+
class Histogram:
|
19 |
+
def __init__(self, min, binWidth):
|
20 |
+
"""
|
21 |
+
initializer
|
22 |
+
|
23 |
+
Parameters
|
24 |
+
min : min x
|
25 |
+
binWidth : bin width
|
26 |
+
"""
|
27 |
+
self.xmin = min
|
28 |
+
self.binWidth = binWidth
|
29 |
+
self.normalized = False
|
30 |
+
|
31 |
+
@classmethod
|
32 |
+
def createInitialized(cls, xmin, binWidth, values):
|
33 |
+
"""
|
34 |
+
create histogram instance with min domain, bin width and values
|
35 |
+
|
36 |
+
Parameters
|
37 |
+
min : min x
|
38 |
+
binWidth : bin width
|
39 |
+
values : y values
|
40 |
+
"""
|
41 |
+
instance = cls(xmin, binWidth)
|
42 |
+
instance.xmax = xmin + binWidth * (len(values) - 1)
|
43 |
+
instance.ymin = 0
|
44 |
+
instance.bins = np.array(values)
|
45 |
+
instance.fmax = 0
|
46 |
+
for v in values:
|
47 |
+
if (v > instance.fmax):
|
48 |
+
instance.fmax = v
|
49 |
+
instance.ymin = 0.0
|
50 |
+
instance.ymax = instance.fmax
|
51 |
+
return instance
|
52 |
+
|
53 |
+
@classmethod
|
54 |
+
def createWithNumBins(cls, values, numBins=20):
|
55 |
+
"""
|
56 |
+
create histogram instance values and no of bins
|
57 |
+
|
58 |
+
Parameters
|
59 |
+
values : y values
|
60 |
+
numBins : no of bins
|
61 |
+
"""
|
62 |
+
xmin = min(values)
|
63 |
+
xmax = max(values)
|
64 |
+
binWidth = (xmax + .01 - (xmin - .01)) / numBins
|
65 |
+
instance = cls(xmin, binWidth)
|
66 |
+
instance.xmax = xmax
|
67 |
+
instance.numBin = numBins
|
68 |
+
instance.bins = np.zeros(instance.numBin)
|
69 |
+
for v in values:
|
70 |
+
instance.add(v)
|
71 |
+
return instance
|
72 |
+
|
73 |
+
@classmethod
|
74 |
+
def createUninitialized(cls, xmin, xmax, binWidth):
|
75 |
+
"""
|
76 |
+
create histogram instance with no y values using domain min , max and bin width
|
77 |
+
|
78 |
+
Parameters
|
79 |
+
min : min x
|
80 |
+
max : max x
|
81 |
+
binWidth : bin width
|
82 |
+
"""
|
83 |
+
instance = cls(xmin, binWidth)
|
84 |
+
instance.xmax = xmax
|
85 |
+
instance.numBin = (xmax - xmin) / binWidth + 1
|
86 |
+
instance.bins = np.zeros(instance.numBin)
|
87 |
+
return instance
|
88 |
+
|
89 |
+
def initialize(self):
|
90 |
+
"""
|
91 |
+
set y values to 0
|
92 |
+
"""
|
93 |
+
self.bins = np.zeros(self.numBin)
|
94 |
+
|
95 |
+
def add(self, value):
|
96 |
+
"""
|
97 |
+
adds a value to a bin
|
98 |
+
|
99 |
+
Parameters
|
100 |
+
value : value
|
101 |
+
"""
|
102 |
+
bin = int((value - self.xmin) / self.binWidth)
|
103 |
+
if (bin < 0 or bin > self.numBin - 1):
|
104 |
+
print (bin)
|
105 |
+
raise ValueError("outside histogram range")
|
106 |
+
self.bins[bin] += 1.0
|
107 |
+
|
108 |
+
def normalize(self):
|
109 |
+
"""
|
110 |
+
normalize bin counts
|
111 |
+
"""
|
112 |
+
if not self.normalized:
|
113 |
+
total = self.bins.sum()
|
114 |
+
self.bins = np.divide(self.bins, total)
|
115 |
+
self.normalized = True
|
116 |
+
|
117 |
+
def cumDistr(self):
|
118 |
+
"""
|
119 |
+
cumulative dists
|
120 |
+
"""
|
121 |
+
self.normalize()
|
122 |
+
self.cbins = np.cumsum(self.bins)
|
123 |
+
return self.cbins
|
124 |
+
|
125 |
+
def distr(self):
|
126 |
+
"""
|
127 |
+
distr
|
128 |
+
"""
|
129 |
+
self.normalize()
|
130 |
+
return self.bins
|
131 |
+
|
132 |
+
|
133 |
+
def percentile(self, percent):
|
134 |
+
"""
|
135 |
+
return value corresponding to a percentile
|
136 |
+
|
137 |
+
Parameters
|
138 |
+
percent : percentile value
|
139 |
+
"""
|
140 |
+
if self.cbins is None:
|
141 |
+
raise ValueError("cumulative distribution is not available")
|
142 |
+
|
143 |
+
for i,cuml in enumerate(self.cbins):
|
144 |
+
if percent > cuml:
|
145 |
+
value = (i * self.binWidth) - (self.binWidth / 2) + (percent - self.cbins[i-1]) * self.binWidth / (self.cbins[i] - self.cbins[i-1])
|
146 |
+
break
|
147 |
+
return value
|
148 |
+
|
149 |
+
def max(self):
|
150 |
+
"""
|
151 |
+
return max bin value
|
152 |
+
"""
|
153 |
+
return self.bins.max()
|
154 |
+
|
155 |
+
def value(self, x):
|
156 |
+
"""
|
157 |
+
return a bin value
|
158 |
+
|
159 |
+
Parameters
|
160 |
+
x : x value
|
161 |
+
"""
|
162 |
+
bin = int((x - self.xmin) / self.binWidth)
|
163 |
+
f = self.bins[bin]
|
164 |
+
return f
|
165 |
+
|
166 |
+
def bin(self, x):
|
167 |
+
"""
|
168 |
+
return a bin index
|
169 |
+
|
170 |
+
Parameters
|
171 |
+
x : x value
|
172 |
+
"""
|
173 |
+
return int((x - self.xmin) / self.binWidth)
|
174 |
+
|
175 |
+
def cumValue(self, x):
|
176 |
+
"""
|
177 |
+
return a cumulative bin value
|
178 |
+
|
179 |
+
Parameters
|
180 |
+
x : x value
|
181 |
+
"""
|
182 |
+
bin = int((x - self.xmin) / self.binWidth)
|
183 |
+
c = self.cbins[bin]
|
184 |
+
return c
|
185 |
+
|
186 |
+
|
187 |
+
def getMinMax(self):
|
188 |
+
"""
|
189 |
+
returns x min and x max
|
190 |
+
"""
|
191 |
+
return (self.xmin, self.xmax)
|
192 |
+
|
193 |
+
def boundedValue(self, x):
|
194 |
+
"""
|
195 |
+
return x bounde by min and max
|
196 |
+
|
197 |
+
Parameters
|
198 |
+
x : x value
|
199 |
+
"""
|
200 |
+
if x < self.xmin:
|
201 |
+
x = self.xmin
|
202 |
+
elif x > self.xmax:
|
203 |
+
x = self.xmax
|
204 |
+
return x
|
205 |
+
|
206 |
+
"""
|
207 |
+
categorical histogram class
|
208 |
+
"""
|
209 |
+
class CatHistogram:
|
210 |
+
def __init__(self):
|
211 |
+
"""
|
212 |
+
initializer
|
213 |
+
"""
|
214 |
+
self.binCounts = dict()
|
215 |
+
self.counts = 0
|
216 |
+
self.normalized = False
|
217 |
+
|
218 |
+
def add(self, value):
|
219 |
+
"""
|
220 |
+
adds a value to a bin
|
221 |
+
|
222 |
+
Parameters
|
223 |
+
x : x value
|
224 |
+
"""
|
225 |
+
addToKeyedCounter(self.binCounts, value)
|
226 |
+
self.counts += 1
|
227 |
+
|
228 |
+
def normalize(self):
|
229 |
+
"""
|
230 |
+
normalize
|
231 |
+
"""
|
232 |
+
if not self.normalized:
|
233 |
+
self.binCounts = dict(map(lambda r : (r[0],r[1] / self.counts), self.binCounts.items()))
|
234 |
+
self.normalized = True
|
235 |
+
|
236 |
+
def getMode(self):
|
237 |
+
"""
|
238 |
+
get mode
|
239 |
+
"""
|
240 |
+
maxk = None
|
241 |
+
maxv = 0
|
242 |
+
#print(self.binCounts)
|
243 |
+
for k,v in self.binCounts.items():
|
244 |
+
if v > maxv:
|
245 |
+
maxk = k
|
246 |
+
maxv = v
|
247 |
+
return (maxk, maxv)
|
248 |
+
|
249 |
+
def getEntropy(self):
|
250 |
+
"""
|
251 |
+
get entropy
|
252 |
+
"""
|
253 |
+
self.normalize()
|
254 |
+
entr = 0
|
255 |
+
#print(self.binCounts)
|
256 |
+
for k,v in self.binCounts.items():
|
257 |
+
entr -= v * math.log(v)
|
258 |
+
return entr
|
259 |
+
|
260 |
+
def getUniqueValues(self):
|
261 |
+
"""
|
262 |
+
get unique values
|
263 |
+
"""
|
264 |
+
return list(self.binCounts.keys())
|
265 |
+
|
266 |
+
def getDistr(self):
|
267 |
+
"""
|
268 |
+
get distribution
|
269 |
+
"""
|
270 |
+
self.normalize()
|
271 |
+
return self.binCounts.copy()
|
272 |
+
|
273 |
+
class RunningStat:
|
274 |
+
"""
|
275 |
+
running stat class
|
276 |
+
"""
|
277 |
+
def __init__(self):
|
278 |
+
"""
|
279 |
+
initializer
|
280 |
+
"""
|
281 |
+
self.sum = 0.0
|
282 |
+
self.sumSq = 0.0
|
283 |
+
self.count = 0
|
284 |
+
|
285 |
+
@staticmethod
|
286 |
+
def create(count, sum, sumSq):
|
287 |
+
"""
|
288 |
+
creates iinstance
|
289 |
+
|
290 |
+
Parameters
|
291 |
+
sum : sum of values
|
292 |
+
sumSq : sum of valure squared
|
293 |
+
"""
|
294 |
+
rs = RunningStat()
|
295 |
+
rs.sum = sum
|
296 |
+
rs.sumSq = sumSq
|
297 |
+
rs.count = count
|
298 |
+
return rs
|
299 |
+
|
300 |
+
def add(self, value):
|
301 |
+
"""
|
302 |
+
adds new value
|
303 |
+
Parameters
|
304 |
+
value : value to add
|
305 |
+
"""
|
306 |
+
self.sum += value
|
307 |
+
self.sumSq += (value * value)
|
308 |
+
self.count += 1
|
309 |
+
|
310 |
+
def getStat(self):
|
311 |
+
"""
|
312 |
+
return mean and std deviation
|
313 |
+
"""
|
314 |
+
mean = self.sum /self. count
|
315 |
+
t = self.sumSq / (self.count - 1) - mean * mean * self.count / (self.count - 1)
|
316 |
+
sd = math.sqrt(t)
|
317 |
+
re = (mean, sd)
|
318 |
+
return re
|
319 |
+
|
320 |
+
def addGetStat(self,value):
|
321 |
+
"""
|
322 |
+
calculate mean and std deviation with new value added
|
323 |
+
Parameters
|
324 |
+
value : value to add
|
325 |
+
"""
|
326 |
+
self.add(value)
|
327 |
+
re = self.getStat()
|
328 |
+
return re
|
329 |
+
|
330 |
+
def getCount(self):
|
331 |
+
"""
|
332 |
+
return count
|
333 |
+
"""
|
334 |
+
return self.count
|
335 |
+
|
336 |
+
def getState(self):
|
337 |
+
"""
|
338 |
+
return state
|
339 |
+
"""
|
340 |
+
s = (self.count, self.sum, self.sumSq)
|
341 |
+
return s
|
342 |
+
|
343 |
+
class SlidingWindowStat:
|
344 |
+
"""
|
345 |
+
sliding window stats
|
346 |
+
"""
|
347 |
+
def __init__(self):
|
348 |
+
"""
|
349 |
+
initializer
|
350 |
+
"""
|
351 |
+
self.sum = 0.0
|
352 |
+
self.sumSq = 0.0
|
353 |
+
self.count = 0
|
354 |
+
self.values = None
|
355 |
+
|
356 |
+
@staticmethod
|
357 |
+
def create(values, sum, sumSq):
|
358 |
+
"""
|
359 |
+
creates iinstance
|
360 |
+
|
361 |
+
Parameters
|
362 |
+
sum : sum of values
|
363 |
+
sumSq : sum of valure squared
|
364 |
+
"""
|
365 |
+
sws = SlidingWindowStat()
|
366 |
+
sws.sum = sum
|
367 |
+
sws.sumSq = sumSq
|
368 |
+
self.values = values.copy()
|
369 |
+
sws.count = len(self.values)
|
370 |
+
return sws
|
371 |
+
|
372 |
+
@staticmethod
|
373 |
+
def initialize(values):
|
374 |
+
"""
|
375 |
+
creates iinstance
|
376 |
+
|
377 |
+
Parameters
|
378 |
+
values : list of values
|
379 |
+
"""
|
380 |
+
sws = SlidingWindowStat()
|
381 |
+
sws.values = values.copy()
|
382 |
+
for v in sws.values:
|
383 |
+
sws.sum += v
|
384 |
+
sws.sumSq += v * v
|
385 |
+
sws.count = len(sws.values)
|
386 |
+
return sws
|
387 |
+
|
388 |
+
@staticmethod
|
389 |
+
def createEmpty(count):
|
390 |
+
"""
|
391 |
+
creates iinstance
|
392 |
+
|
393 |
+
Parameters
|
394 |
+
count : count of values
|
395 |
+
"""
|
396 |
+
sws = SlidingWindowStat()
|
397 |
+
sws.count = count
|
398 |
+
sws.values = list()
|
399 |
+
return sws
|
400 |
+
|
401 |
+
def add(self, value):
|
402 |
+
"""
|
403 |
+
adds new value
|
404 |
+
|
405 |
+
Parameters
|
406 |
+
value : value to add
|
407 |
+
"""
|
408 |
+
self.values.append(value)
|
409 |
+
if len(self.values) > self.count:
|
410 |
+
self.sum += value - self.values[0]
|
411 |
+
self.sumSq += (value * value) - (self.values[0] * self.values[0])
|
412 |
+
self.values.pop(0)
|
413 |
+
else:
|
414 |
+
self.sum += value
|
415 |
+
self.sumSq += (value * value)
|
416 |
+
|
417 |
+
|
418 |
+
def getStat(self):
|
419 |
+
"""
|
420 |
+
calculate mean and std deviation
|
421 |
+
"""
|
422 |
+
mean = self.sum /self. count
|
423 |
+
t = self.sumSq / (self.count - 1) - mean * mean * self.count / (self.count - 1)
|
424 |
+
sd = math.sqrt(t)
|
425 |
+
re = (mean, sd)
|
426 |
+
return re
|
427 |
+
|
428 |
+
def addGetStat(self,value):
|
429 |
+
"""
|
430 |
+
calculate mean and std deviation with new value added
|
431 |
+
"""
|
432 |
+
self.add(value)
|
433 |
+
re = self.getStat()
|
434 |
+
return re
|
435 |
+
|
436 |
+
def getCount(self):
|
437 |
+
"""
|
438 |
+
return count
|
439 |
+
"""
|
440 |
+
return self.count
|
441 |
+
|
442 |
+
def getCurSize(self):
|
443 |
+
"""
|
444 |
+
return count
|
445 |
+
"""
|
446 |
+
return len(self.values)
|
447 |
+
|
448 |
+
def getState(self):
|
449 |
+
"""
|
450 |
+
return state
|
451 |
+
"""
|
452 |
+
s = (self.count, self.sum, self.sumSq)
|
453 |
+
return s
|
454 |
+
|
455 |
+
|
456 |
+
def basicStat(ldata):
|
457 |
+
"""
|
458 |
+
mean and std dev
|
459 |
+
Parameters
|
460 |
+
ldata : list of values
|
461 |
+
"""
|
462 |
+
m = statistics.mean(ldata)
|
463 |
+
s = statistics.stdev(ldata, xbar=m)
|
464 |
+
r = (m, s)
|
465 |
+
return r
|
466 |
+
|
467 |
+
def getFileColumnStat(filePath, col, delem=","):
|
468 |
+
"""
|
469 |
+
gets stats for a file column
|
470 |
+
|
471 |
+
Parameters
|
472 |
+
filePath : file path
|
473 |
+
col : col index
|
474 |
+
delem : field delemter
|
475 |
+
"""
|
476 |
+
rs = RunningStat()
|
477 |
+
for rec in fileRecGen(filePath, delem):
|
478 |
+
va = float(rec[col])
|
479 |
+
rs.add(va)
|
480 |
+
|
481 |
+
return rs.getStat()
|
482 |
+
|
test.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
with open("spers_tr.txt", "r") as fp:
|
4 |
+
print(fp)
|
5 |
+
delim="\n"
|
6 |
+
for line in fp:
|
7 |
+
# print("READ")
|
8 |
+
#line = line[:-1]
|
9 |
+
if delim is not None:
|
10 |
+
line = line.split(delim)
|
11 |
+
print(line,type(line))
|
12 |
+
|
13 |
+
|
14 |
+
'''
|
15 |
+
def conv(fld):
|
16 |
+
return -float(fld[:-1]) if fld.endswith(b'-') else float(fld)
|
17 |
+
print(np.loadtxt("spers_tr.txt"), converters=conv )
|
18 |
+
'''
|
tnn.py
ADDED
@@ -0,0 +1,775 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[ ]:
|
5 |
+
|
6 |
+
|
7 |
+
import os
|
8 |
+
import sys
|
9 |
+
import matplotlib.pyplot as plt
|
10 |
+
import numpy as np
|
11 |
+
import torch
|
12 |
+
from torch.autograd import Variable
|
13 |
+
from torch.utils.data import Dataset, TensorDataset
|
14 |
+
from torch.utils.data import DataLoader
|
15 |
+
import sklearn as sk
|
16 |
+
from sklearn.neighbors import KDTree
|
17 |
+
import matplotlib
|
18 |
+
import random
|
19 |
+
import jprops
|
20 |
+
from random import randint
|
21 |
+
import statistics
|
22 |
+
sys.path.append(os.path.abspath("../lib"))
|
23 |
+
from util import *
|
24 |
+
from mlutil import *
|
25 |
+
|
26 |
+
"""
|
27 |
+
forward hook function
|
28 |
+
"""
|
29 |
+
intermedOut = {}
|
30 |
+
lvalues = list()
|
31 |
+
|
32 |
+
def hookFn(m, i, o):
|
33 |
+
"""
|
34 |
+
call back for latent values
|
35 |
+
"""
|
36 |
+
#intermedOut[m] = o
|
37 |
+
lv = o.data.cpu().numpy()
|
38 |
+
lv = lv[0].tolist()
|
39 |
+
lvalues.append(lv)
|
40 |
+
#print(lv)
|
41 |
+
|
42 |
+
def getLatValues():
|
43 |
+
"""
|
44 |
+
"""
|
45 |
+
return lvalues
|
46 |
+
|
47 |
+
class FeedForwardNetwork(torch.nn.Module):
|
48 |
+
def __init__(self, configFile, addDefValues=None):
|
49 |
+
"""
|
50 |
+
In the constructor we instantiate two nn.Linear modules and assign them as
|
51 |
+
member variables.
|
52 |
+
|
53 |
+
Parameters
|
54 |
+
configFile : config file path
|
55 |
+
addDefValues : dictionary of additional default values
|
56 |
+
"""
|
57 |
+
defValues = dict() if addDefValues is None else addDefValues.copy()
|
58 |
+
defValues["common.mode"] = ("training", None)
|
59 |
+
defValues["common.model.directory"] = ("model", None)
|
60 |
+
defValues["common.model.file"] = (None, None)
|
61 |
+
defValues["common.preprocessing"] = (None, None)
|
62 |
+
defValues["common.scaling.method"] = ("zscale", None)
|
63 |
+
defValues["common.scaling.minrows"] = (50, None)
|
64 |
+
defValues["common.scaling.param.file"] = (None, None)
|
65 |
+
defValues["common.verbose"] = (False, None)
|
66 |
+
defValues["common.device"] = ("cpu", None)
|
67 |
+
defValues["train.data.file"] = (None, "missing training data file")
|
68 |
+
defValues["train.data.fields"] = (None, "missing training data field ordinals")
|
69 |
+
defValues["train.data.feature.fields"] = (None, "missing training data feature field ordinals")
|
70 |
+
defValues["train.data.out.fields"] = (None, "missing training data feature field ordinals")
|
71 |
+
defValues["train.layer.data"] = (None, "missing layer data")
|
72 |
+
defValues["train.input.size"] = (None, None)
|
73 |
+
defValues["train.output.size"] = (None, "missing output size")
|
74 |
+
defValues["train.batch.size"] = (10, None)
|
75 |
+
defValues["train.loss.reduction"] = ("mean", None)
|
76 |
+
defValues["train.num.iterations"] = (500, None)
|
77 |
+
defValues["train.lossFn"] = ("mse", None)
|
78 |
+
defValues["train.optimizer"] = ("sgd", None)
|
79 |
+
defValues["train.opt.learning.rate"] = (.0001, None)
|
80 |
+
defValues["train.opt.weight.decay"] = (0, None)
|
81 |
+
defValues["train.opt.momentum"] = (0, None)
|
82 |
+
defValues["train.opt.eps"] = (1e-08, None)
|
83 |
+
defValues["train.opt.dampening"] = (0, None)
|
84 |
+
defValues["train.opt.momentum.nesterov"] = (False, None)
|
85 |
+
defValues["train.opt.betas"] = ([0.9, 0.999], None)
|
86 |
+
defValues["train.opt.alpha"] = (0.99, None)
|
87 |
+
defValues["train.save.model"] = (False, None)
|
88 |
+
defValues["train.track.error"] = (False, None)
|
89 |
+
defValues["train.epoch.intv"] = (5, None)
|
90 |
+
defValues["train.batch.intv"] = (5, None)
|
91 |
+
defValues["train.print.weights"] = (False, None)
|
92 |
+
defValues["valid.data.file"] = (None, None)
|
93 |
+
defValues["valid.accuracy.metric"] = (None, None)
|
94 |
+
defValues["predict.data.file"] = (None, None)
|
95 |
+
defValues["predict.use.saved.model"] = (True, None)
|
96 |
+
defValues["predict.output"] = ("binary", None)
|
97 |
+
defValues["predict.feat.pad.size"] = (60, None)
|
98 |
+
defValues["predict.print.output"] = (True, None)
|
99 |
+
defValues["calibrate.num.bins"] = (10, None)
|
100 |
+
defValues["calibrate.pred.prob.thresh"] = (0.5, None)
|
101 |
+
defValues["calibrate.num.nearest.neighbors"] = (10, None)
|
102 |
+
self.config = Configuration(configFile, defValues)
|
103 |
+
|
104 |
+
super(FeedForwardNetwork, self).__init__()
|
105 |
+
|
106 |
+
def setConfigParam(self, name, value):
|
107 |
+
"""
|
108 |
+
set config param
|
109 |
+
|
110 |
+
Parameters
|
111 |
+
name : config name
|
112 |
+
value : config value
|
113 |
+
"""
|
114 |
+
self.config.setParam(name, value)
|
115 |
+
|
116 |
+
def getConfig(self):
|
117 |
+
"""
|
118 |
+
get config object
|
119 |
+
"""
|
120 |
+
return self.config
|
121 |
+
|
122 |
+
def setVerbose(self, verbose):
|
123 |
+
self.verbose = verbose
|
124 |
+
|
125 |
+
def buildModel(self):
|
126 |
+
"""
|
127 |
+
Loads configuration and builds the various piecess necessary for the model
|
128 |
+
"""
|
129 |
+
torch.manual_seed(9999)
|
130 |
+
print("self.config", self.config)
|
131 |
+
self.verbose = self.config.getBooleanConfig("common.verbose")[0]
|
132 |
+
numinp = self.config.getIntConfig("train.input.size")[0]
|
133 |
+
if numinp is None:
|
134 |
+
numinp = len(self.config.getIntListConfig("train.data.feature.fields")[0])
|
135 |
+
#numOut = len(self.config.getStringConfig("train.data.out.fields")[0].split(","))
|
136 |
+
self.outputSize = self.config.getIntConfig("train.output.size")[0]
|
137 |
+
self.batchSize = self.config.getIntConfig("train.batch.size")[0]
|
138 |
+
#lossRed = self.config.getStringConfig("train.loss.reduction")[0]
|
139 |
+
#learnRate = self.config.getFloatConfig("train.opt.learning.rate")[0]
|
140 |
+
self.numIter = self.config.getIntConfig("train.num.iterations")[0]
|
141 |
+
optimizer = self.config.getStringConfig("train.optimizer")[0]
|
142 |
+
self.lossFnStr = self.config.getStringConfig("train.lossFn")[0]
|
143 |
+
self.accMetric = self.config.getStringConfig("valid.accuracy.metric")[0]
|
144 |
+
self.trackErr = self.config.getBooleanConfig("train.track.error")[0]
|
145 |
+
self.batchIntv = self.config.getIntConfig("train.batch.intv")[0]
|
146 |
+
self.restored = False
|
147 |
+
self.clabels = list(range(self.outputSize)) if self.outputSize > 1 else None
|
148 |
+
|
149 |
+
#build network
|
150 |
+
layers = list()
|
151 |
+
ninp = numinp
|
152 |
+
trData = self.config.getStringConfig("train.layer.data")[0].split(",")
|
153 |
+
for ld in trData:
|
154 |
+
lde = ld.split(":")
|
155 |
+
assert len(lde) == 5, "expecting 5 items for layer data"
|
156 |
+
|
157 |
+
#num of units, activation, whether batch normalize, whether batch normalize after activation, dropout fraction
|
158 |
+
nunit = int(lde[0])
|
159 |
+
actStr = lde[1]
|
160 |
+
act = FeedForwardNetwork.createActivation(actStr) if actStr != "none" else None
|
161 |
+
bnorm = lde[2] == "true"
|
162 |
+
afterAct = lde[3] == "true"
|
163 |
+
dpr = float(lde[4])
|
164 |
+
|
165 |
+
layers.append(torch.nn.Linear(ninp, nunit))
|
166 |
+
if bnorm:
|
167 |
+
#with batch norm
|
168 |
+
if afterAct:
|
169 |
+
safeAppend(layers, act)
|
170 |
+
layers.append(torch.nn.BatchNorm1d(nunit))
|
171 |
+
else:
|
172 |
+
layers.append(torch.nn.BatchNorm1d(nunit))
|
173 |
+
safeAppend(layers, act)
|
174 |
+
else:
|
175 |
+
#without batch norm
|
176 |
+
safeAppend(layers, act)
|
177 |
+
|
178 |
+
if dpr > 0:
|
179 |
+
layers.append(torch.nn.Dropout(dpr))
|
180 |
+
ninp = nunit
|
181 |
+
|
182 |
+
self.layers = torch.nn.Sequential(*layers)
|
183 |
+
|
184 |
+
self.device = FeedForwardNetwork.getDevice(self)
|
185 |
+
|
186 |
+
#training data
|
187 |
+
dataFile = self.config.getStringConfig("train.data.file")[0]
|
188 |
+
(featData, outData) = FeedForwardNetwork.prepData(self, dataFile)
|
189 |
+
self.featData = torch.from_numpy(featData)
|
190 |
+
self.outData = torch.from_numpy(outData)
|
191 |
+
|
192 |
+
#validation data
|
193 |
+
dataFile = self.config.getStringConfig("valid.data.file")[0]
|
194 |
+
(featDataV, outDataV) = FeedForwardNetwork.prepData(self, dataFile)
|
195 |
+
self.validFeatData = torch.from_numpy(featDataV)
|
196 |
+
self.validOutData = torch.from_numpy(outDataV)
|
197 |
+
|
198 |
+
# loss function and optimizer
|
199 |
+
self.lossFn = FeedForwardNetwork.createLossFunction(self, self.lossFnStr)
|
200 |
+
self.optimizer = FeedForwardNetwork.createOptimizer(self, optimizer)
|
201 |
+
|
202 |
+
self.yPred = None
|
203 |
+
self.restored = False
|
204 |
+
|
205 |
+
#mode to device
|
206 |
+
self.device = FeedForwardNetwork.getDevice(self)
|
207 |
+
self.featData = self.featData.to(self.device)
|
208 |
+
self.outData = self.outData.to(self.device)
|
209 |
+
self.validFeatData = self.validFeatData.to(self.device)
|
210 |
+
self.to(self.device)
|
211 |
+
|
212 |
+
@staticmethod
|
213 |
+
def getDevice(model):
|
214 |
+
"""
|
215 |
+
gets device
|
216 |
+
|
217 |
+
Parameters
|
218 |
+
model : torch model
|
219 |
+
"""
|
220 |
+
devType = model.config.getStringConfig("common.device")[0]
|
221 |
+
if devType == "cuda":
|
222 |
+
if torch.cuda.is_available():
|
223 |
+
device = torch.device("cuda")
|
224 |
+
else:
|
225 |
+
exitWithMsg("cuda not available")
|
226 |
+
else:
|
227 |
+
device = torch.device("cpu")
|
228 |
+
return device
|
229 |
+
|
230 |
+
def setValidationData(self, dataSource, prep=True):
|
231 |
+
"""
|
232 |
+
sets validation data
|
233 |
+
|
234 |
+
Parameters
|
235 |
+
dataSource : data source str if file path or 2D array
|
236 |
+
prep : if True load and prepare
|
237 |
+
"""
|
238 |
+
if prep:
|
239 |
+
(featDataV, outDataV) = FeedForwardNetwork.prepData(self, dataSource)
|
240 |
+
self.validFeatData = torch.from_numpy(featDataV)
|
241 |
+
self.validOutData = outDataV
|
242 |
+
else:
|
243 |
+
self.validFeatData = torch.from_numpy(dataSource[0])
|
244 |
+
self.validOutData = dataSource[1]
|
245 |
+
|
246 |
+
self.validFeatData = self.validFeatData.to(self.device)
|
247 |
+
|
248 |
+
@staticmethod
|
249 |
+
def createActivation(actName):
|
250 |
+
"""
|
251 |
+
create activation
|
252 |
+
|
253 |
+
Parameters
|
254 |
+
actName : activation name
|
255 |
+
"""
|
256 |
+
if actName is None:
|
257 |
+
activation = None
|
258 |
+
elif actName == "relu":
|
259 |
+
activation = torch.nn.ReLU()
|
260 |
+
elif actName == "tanh":
|
261 |
+
activation = torch.nn.Tanh()
|
262 |
+
elif actName == "sigmoid":
|
263 |
+
activation = torch.nn.Sigmoid()
|
264 |
+
elif actName == "softmax":
|
265 |
+
activation = torch.nn.Softmax(dim=1)
|
266 |
+
else:
|
267 |
+
exitWithMsg("invalid activation function name " + actName)
|
268 |
+
return activation
|
269 |
+
|
270 |
+
@staticmethod
|
271 |
+
def createLossFunction(model, lossFnName):
|
272 |
+
"""
|
273 |
+
create loss function
|
274 |
+
|
275 |
+
Parameters
|
276 |
+
lossFnName : loss function name
|
277 |
+
"""
|
278 |
+
config = model.config
|
279 |
+
lossRed = config.getStringConfig("train.loss.reduction")[0]
|
280 |
+
if lossFnName == "ltwo" or lossFnName == "mse":
|
281 |
+
lossFunc = torch.nn.MSELoss(reduction=lossRed)
|
282 |
+
elif lossFnName == "ce":
|
283 |
+
lossFunc = torch.nn.CrossEntropyLoss(reduction=lossRed)
|
284 |
+
elif lossFnName == "lone" or lossFnName == "mae":
|
285 |
+
lossFunc = torch.nn.L1Loss(reduction=lossRed)
|
286 |
+
elif lossFnName == "bce":
|
287 |
+
lossFunc = torch.nn.BCELoss(reduction=lossRed)
|
288 |
+
elif lossFnName == "bcel":
|
289 |
+
lossFunc = torch.nn.BCEWithLogitsLoss(reduction=lossRed)
|
290 |
+
elif lossFnName == "sm":
|
291 |
+
lossFunc = torch.nn.SoftMarginLoss(reduction=lossRed)
|
292 |
+
elif lossFnName == "mlsm":
|
293 |
+
lossFunc = torch.nn.MultiLabelSoftMarginLoss(reduction=lossRed)
|
294 |
+
else:
|
295 |
+
exitWithMsg("invalid loss function name " + lossFnName)
|
296 |
+
return lossFunc
|
297 |
+
|
298 |
+
@staticmethod
|
299 |
+
def createOptimizer(model, optName):
|
300 |
+
"""
|
301 |
+
create optimizer
|
302 |
+
|
303 |
+
Parameters
|
304 |
+
optName : optimizer name
|
305 |
+
"""
|
306 |
+
config = model.config
|
307 |
+
learnRate = config.getFloatConfig("train.opt.learning.rate")[0]
|
308 |
+
weightDecay = config.getFloatConfig("train.opt.weight.decay")[0]
|
309 |
+
momentum = config.getFloatConfig("train.opt.momentum")[0]
|
310 |
+
eps = config.getFloatConfig("train.opt.eps")[0]
|
311 |
+
if optName == "sgd":
|
312 |
+
dampening = config.getFloatConfig("train.opt.dampening")[0]
|
313 |
+
momentumNesterov = config.getBooleanConfig("train.opt.momentum.nesterov")[0]
|
314 |
+
optimizer = torch.optim.SGD(model.parameters(),lr=learnRate, momentum=momentum,
|
315 |
+
dampening=dampening, weight_decay=weightDecay, nesterov=momentumNesterov)
|
316 |
+
elif optName == "adam":
|
317 |
+
betas = config.getFloatListConfig("train.opt.betas")[0]
|
318 |
+
betas = (betas[0], betas[1])
|
319 |
+
optimizer = torch.optim.Adam(model.parameters(), lr=learnRate,betas=betas, eps = eps,
|
320 |
+
weight_decay=weightDecay)
|
321 |
+
elif optName == "rmsprop":
|
322 |
+
alpha = config.getFloatConfig("train.opt.alpha")[0]
|
323 |
+
optimizer = torch.optim.RMSprop(model.parameters(), lr=learnRate, alpha=alpha,
|
324 |
+
eps=eps, weight_decay=weightDecay, momentum=momentum)
|
325 |
+
else:
|
326 |
+
exitWithMsg("invalid optimizer name " + optName)
|
327 |
+
return optimizer
|
328 |
+
|
329 |
+
|
330 |
+
def forward(self, x):
|
331 |
+
"""
|
332 |
+
In the forward function we accept a Tensor of input data and we must return
|
333 |
+
a Tensor of output data. We can use Modules defined in the constructor as
|
334 |
+
well as arbitrary (differentiable) operations on Tensors.
|
335 |
+
|
336 |
+
Parameters
|
337 |
+
x : data batch
|
338 |
+
"""
|
339 |
+
y = self.layers(x)
|
340 |
+
return y
|
341 |
+
|
342 |
+
@staticmethod
|
343 |
+
def addForwardHook(model, l, cl = 0):
|
344 |
+
"""
|
345 |
+
register forward hooks
|
346 |
+
|
347 |
+
Parameters
|
348 |
+
l :
|
349 |
+
cl :
|
350 |
+
"""
|
351 |
+
for name, layer in model._modules.items():
|
352 |
+
#If it is a sequential, don't register a hook on it
|
353 |
+
# but recursively register hook on all it's module children
|
354 |
+
print(str(cl) + " : " + name)
|
355 |
+
if isinstance(layer, torch.nn.Sequential):
|
356 |
+
FeedForwardNetwork.addForwardHook(layer, l, cl)
|
357 |
+
else:
|
358 |
+
# it's a non sequential. Register a hook
|
359 |
+
if cl == l:
|
360 |
+
print("setting hook at layer " + str(l))
|
361 |
+
layer.register_forward_hook(hookFn)
|
362 |
+
cl += 1
|
363 |
+
|
364 |
+
@staticmethod
|
365 |
+
def prepData(model, dataSource, includeOutFld=True):
|
366 |
+
"""
|
367 |
+
loads and prepares data
|
368 |
+
|
369 |
+
Parameters
|
370 |
+
dataSource : data source str if file path or 2D array
|
371 |
+
includeOutFld : True if target freld to be included
|
372 |
+
"""
|
373 |
+
# parameters
|
374 |
+
fieldIndices = model.config.getIntListConfig("train.data.fields")[0]
|
375 |
+
featFieldIndices = model.config.getIntListConfig("train.data.feature.fields")[0]
|
376 |
+
|
377 |
+
#all data and feature data
|
378 |
+
isDataFile = isinstance(dataSource, str)
|
379 |
+
selFieldIndices = fieldIndices if includeOutFld else fieldIndices[:-1]
|
380 |
+
if isDataFile:
|
381 |
+
#source file path
|
382 |
+
(data, featData) = loadDataFile(dataSource, ",", selFieldIndices, featFieldIndices)
|
383 |
+
else:
|
384 |
+
# tabular data
|
385 |
+
data = tableSelFieldsFilter(dataSource, selFieldIndices)
|
386 |
+
featData = tableSelFieldsFilter(data, featFieldIndices)
|
387 |
+
#print(featData)
|
388 |
+
featData = np.array(featData)
|
389 |
+
|
390 |
+
if (model.config.getStringConfig("common.preprocessing")[0] == "scale"):
|
391 |
+
scalingMethod = model.config.getStringConfig("common.scaling.method")[0]
|
392 |
+
|
393 |
+
#scale only if there are enough rows
|
394 |
+
nrow = featData.shape[0]
|
395 |
+
minrows = model.config.getIntConfig("common.scaling.minrows")[0]
|
396 |
+
if nrow > minrows:
|
397 |
+
#in place scaling
|
398 |
+
featData = scaleData(featData, scalingMethod)
|
399 |
+
else:
|
400 |
+
#use pre computes scaling parameters
|
401 |
+
spFile = model.config.getStringConfig("common.scaling.param.file")[0]
|
402 |
+
if spFile is None:
|
403 |
+
pass
|
404 |
+
# exitWithMsg("for small data sets pre computed scaling parameters need to provided")
|
405 |
+
# scParams = restoreObject(spFile)
|
406 |
+
#scParams = None
|
407 |
+
#featData = scaleDataWithParams(featData, scalingMethod, scParams)
|
408 |
+
featData = np.array(featData)
|
409 |
+
|
410 |
+
# target data
|
411 |
+
if includeOutFld:
|
412 |
+
outFieldIndices = model.config.getStringConfig("train.data.out.fields")[0]
|
413 |
+
outFieldIndices = strToIntArray(outFieldIndices, ",")
|
414 |
+
if isDataFile:
|
415 |
+
outData = data[:,outFieldIndices]
|
416 |
+
else:
|
417 |
+
outData = tableSelFieldsFilter(data, outFieldIndices)
|
418 |
+
outData = np.array(outData)
|
419 |
+
foData = (featData.astype(np.float32), outData.astype(np.float32))
|
420 |
+
else:
|
421 |
+
foData = featData.astype(np.float32)
|
422 |
+
return foData
|
423 |
+
|
424 |
+
@staticmethod
|
425 |
+
def saveCheckpt(model):
|
426 |
+
"""
|
427 |
+
checkpoints model
|
428 |
+
|
429 |
+
Parameters
|
430 |
+
model : torch model
|
431 |
+
"""
|
432 |
+
print("..saving model checkpoint")
|
433 |
+
modelDirectory = model.config.getStringConfig("common.model.directory")[0]
|
434 |
+
assert os.path.exists(modelDirectory), "model save directory does not exist"
|
435 |
+
modelFile = model.config.getStringConfig("common.model.file")[0]
|
436 |
+
filepath = os.path.join(modelDirectory, modelFile)
|
437 |
+
state = {"state_dict": model.state_dict(), "optim_dict": model.optimizer.state_dict()}
|
438 |
+
torch.save(state, filepath)
|
439 |
+
if model.verbose:
|
440 |
+
print("model saved")
|
441 |
+
|
442 |
+
@staticmethod
|
443 |
+
def restoreCheckpt(model, loadOpt=False):
|
444 |
+
"""
|
445 |
+
restored checkpointed model
|
446 |
+
|
447 |
+
Parameters
|
448 |
+
model : torch model
|
449 |
+
loadOpt : True if optimizer to be loaded
|
450 |
+
"""
|
451 |
+
if not model.restored:
|
452 |
+
print("..restoring model checkpoint")
|
453 |
+
modelDirectory = model.config.getStringConfig("common.model.directory")[0]
|
454 |
+
modelFile = model.config.getStringConfig("common.model.file")[0]
|
455 |
+
filepath = os.path.join(modelDirectory, modelFile)
|
456 |
+
assert os.path.exists(filepath), "model save file does not exist"
|
457 |
+
checkpoint = torch.load(filepath)
|
458 |
+
model.load_state_dict(checkpoint["state_dict"])
|
459 |
+
model.to(model.device)
|
460 |
+
if loadOpt:
|
461 |
+
model.optimizer.load_state_dict(checkpoint["optim_dict"])
|
462 |
+
model.restored = True
|
463 |
+
|
464 |
+
@staticmethod
|
465 |
+
def processClassifOutput(yPred, config):
|
466 |
+
"""
|
467 |
+
extracts probability label 1 or label with highest probability
|
468 |
+
|
469 |
+
Parameters
|
470 |
+
yPred : predicted output
|
471 |
+
config : config object
|
472 |
+
"""
|
473 |
+
outType = config.getStringConfig("predict.output")[0]
|
474 |
+
if outType == "prob":
|
475 |
+
outputSize = config.getIntConfig("train.output.size")[0]
|
476 |
+
if outputSize == 2:
|
477 |
+
#return prob of pos class for binary classifier
|
478 |
+
yPred = yPred[:, 1]
|
479 |
+
else:
|
480 |
+
#return class value and probability for multi classifier
|
481 |
+
yCl = np.argmax(yPred, axis=1)
|
482 |
+
yPred = list(map(lambda y : y[0][y[1]], zip(yPred, yCl)))
|
483 |
+
yPred = zip(yCl, yPred)
|
484 |
+
else:
|
485 |
+
yPred = np.argmax(yPred, axis=1)
|
486 |
+
return yPred
|
487 |
+
|
488 |
+
@staticmethod
|
489 |
+
def printPrediction(yPred, config, dataSource):
|
490 |
+
"""
|
491 |
+
prints input feature data and prediction
|
492 |
+
|
493 |
+
Parameters
|
494 |
+
yPred : predicted output
|
495 |
+
config : config object
|
496 |
+
dataSource : data source str if file path or 2D array
|
497 |
+
"""
|
498 |
+
#prDataFilePath = config.getStringConfig("predict.data.file")[0]
|
499 |
+
padWidth = config.getIntConfig("predict.feat.pad.size")[0]
|
500 |
+
i = 0
|
501 |
+
if type(dataSource) == str:
|
502 |
+
for rec in fileRecGen(dataSource, ","):
|
503 |
+
feat = (",".join(rec)).ljust(padWidth, " ")
|
504 |
+
rec = feat + "\t" + str(yPred[i])
|
505 |
+
print(rec)
|
506 |
+
i += 1
|
507 |
+
else:
|
508 |
+
for rec in dataSource:
|
509 |
+
srec = toStrList(rec, 6)
|
510 |
+
feat = (",".join(srec)).ljust(padWidth, " ")
|
511 |
+
srec = feat + "\t" + str(yPred[i])
|
512 |
+
print(srec)
|
513 |
+
i += 1
|
514 |
+
|
515 |
+
|
516 |
+
@staticmethod
|
517 |
+
def allTrain(model):
|
518 |
+
"""
|
519 |
+
train with all data
|
520 |
+
|
521 |
+
Parameters
|
522 |
+
model : torch model
|
523 |
+
"""
|
524 |
+
# train mode
|
525 |
+
model.train()
|
526 |
+
for t in range(model.numIter):
|
527 |
+
|
528 |
+
|
529 |
+
# Forward pass: Compute predicted y by passing x to the model
|
530 |
+
yPred = model(model.featData)
|
531 |
+
|
532 |
+
# Compute and print loss
|
533 |
+
loss = model.lossFn(yPred, model.outData)
|
534 |
+
if model.verbose and t % 50 == 0:
|
535 |
+
print("epoch {} loss {:.6f}".format(t, loss.item()))
|
536 |
+
|
537 |
+
# Zero gradients, perform a backward pass, and update the weights.
|
538 |
+
model.optimizer.zero_grad()
|
539 |
+
loss.backward()
|
540 |
+
model.optimizer.step()
|
541 |
+
|
542 |
+
#validate
|
543 |
+
model.eval()
|
544 |
+
yPred = model(model.validFeatData)
|
545 |
+
yPred = yPred.data.cpu().numpy()
|
546 |
+
yActual = model.validOutData
|
547 |
+
if model.verbose:
|
548 |
+
result = np.concatenate((yPred, yActual), axis = 1)
|
549 |
+
print("predicted actual")
|
550 |
+
print(result)
|
551 |
+
|
552 |
+
score = perfMetric(model.accMetric, yActual, yPred)
|
553 |
+
print(formatFloat(3, score, "perf score"))
|
554 |
+
return score
|
555 |
+
|
556 |
+
@staticmethod
|
557 |
+
def batchTrain(model):
|
558 |
+
"""
|
559 |
+
train with batch data
|
560 |
+
|
561 |
+
Parameters
|
562 |
+
model : torch model
|
563 |
+
"""
|
564 |
+
model.restored = False
|
565 |
+
trainData = TensorDataset(model.featData, model.outData)
|
566 |
+
trainDataLoader = DataLoader(dataset=trainData, batch_size=model.batchSize, shuffle=True)
|
567 |
+
epochIntv = model.config.getIntConfig("train.epoch.intv")[0]
|
568 |
+
|
569 |
+
# train mode
|
570 |
+
model.train()
|
571 |
+
|
572 |
+
if model.trackErr:
|
573 |
+
trErr = list()
|
574 |
+
vaErr = list()
|
575 |
+
#epoch
|
576 |
+
for t in range(model.numIter):
|
577 |
+
#batch
|
578 |
+
b = 0
|
579 |
+
epochLoss = 0.0
|
580 |
+
for xBatch, yBatch in trainDataLoader:
|
581 |
+
|
582 |
+
# Forward pass: Compute predicted y by passing x to the model
|
583 |
+
xBatch, yBatch = xBatch.to(model.device), yBatch.to(model.device)
|
584 |
+
yPred = model(xBatch)
|
585 |
+
|
586 |
+
# Compute and print loss
|
587 |
+
loss = model.lossFn(yPred, yBatch)
|
588 |
+
if model.verbose and t % epochIntv == 0 and b % model.batchIntv == 0:
|
589 |
+
print("epoch {} batch {} loss {:.6f}".format(t, b, loss.item()))
|
590 |
+
|
591 |
+
if model.trackErr and model.batchIntv == 0:
|
592 |
+
epochLoss += loss.item()
|
593 |
+
|
594 |
+
#error tracking at batch level
|
595 |
+
if model.trackErr and model.batchIntv > 0 and b % model.batchIntv == 0:
|
596 |
+
trErr.append(loss.item())
|
597 |
+
vloss = FeedForwardNetwork.evaluateModel(model)
|
598 |
+
vaErr.append(vloss)
|
599 |
+
|
600 |
+
# Zero gradients, perform a backward pass, and update the weights.
|
601 |
+
model.optimizer.zero_grad()
|
602 |
+
loss.backward()
|
603 |
+
model.optimizer.step()
|
604 |
+
b += 1
|
605 |
+
|
606 |
+
#error tracking at epoch level
|
607 |
+
if model.trackErr and model.batchIntv == 0:
|
608 |
+
epochLoss /= len(trainDataLoader)
|
609 |
+
trErr.append(epochLoss)
|
610 |
+
vloss = FeedForwardNetwork.evaluateModel(model)
|
611 |
+
vaErr.append(vloss)
|
612 |
+
|
613 |
+
#validate
|
614 |
+
model.eval()
|
615 |
+
yPred = model(model.validFeatData)
|
616 |
+
yPred = yPred.data.cpu().numpy()
|
617 |
+
yActual = model.validOutData
|
618 |
+
if model.verbose:
|
619 |
+
vsize = yPred.shape[0]
|
620 |
+
print("\npredicted \t\t actual")
|
621 |
+
for i in range(vsize):
|
622 |
+
print(str(yPred[i]) + "\t" + str(yActual[i]))
|
623 |
+
|
624 |
+
score = perfMetric(model.accMetric, yActual, yPred)
|
625 |
+
print(yActual)
|
626 |
+
print(yPred)
|
627 |
+
print(formatFloat(3, score, "perf score"))
|
628 |
+
|
629 |
+
#save
|
630 |
+
modelSave = model.config.getBooleanConfig("train.model.save")[0]
|
631 |
+
if modelSave:
|
632 |
+
FeedForwardNetwork.saveCheckpt(model)
|
633 |
+
|
634 |
+
if model.trackErr:
|
635 |
+
FeedForwardNetwork.errorPlot(model, trErr, vaErr)
|
636 |
+
|
637 |
+
if model.config.getBooleanConfig("train.print.weights")[0]:
|
638 |
+
print("model weights")
|
639 |
+
for param in model.parameters():
|
640 |
+
print(param.data)
|
641 |
+
return score
|
642 |
+
|
643 |
+
@staticmethod
|
644 |
+
def errorPlot(model, trErr, vaErr):
|
645 |
+
"""
|
646 |
+
plot errors
|
647 |
+
|
648 |
+
Parameters
|
649 |
+
trErr : training error list
|
650 |
+
vaErr : validation error list
|
651 |
+
"""
|
652 |
+
x = np.arange(len(trErr))
|
653 |
+
plt.plot(x,trErr,label = "training error")
|
654 |
+
plt.plot(x,vaErr,label = "validation error")
|
655 |
+
plt.xlabel("iteration")
|
656 |
+
plt.ylabel("error")
|
657 |
+
plt.legend(["training error", "validation error"], loc='upper left')
|
658 |
+
plt.show()
|
659 |
+
|
660 |
+
@staticmethod
|
661 |
+
def modelPredict(model, dataSource = None):
|
662 |
+
"""
|
663 |
+
predict
|
664 |
+
|
665 |
+
Parameters
|
666 |
+
model : torch model
|
667 |
+
dataSource : data source
|
668 |
+
"""
|
669 |
+
#train or restore model
|
670 |
+
useSavedModel = model.config.getBooleanConfig("predict.use.saved.model")[0]
|
671 |
+
if useSavedModel:
|
672 |
+
FeedForwardNetwork.restoreCheckpt(model)
|
673 |
+
else:
|
674 |
+
FeedForwardNetwork.batchTrain(model)
|
675 |
+
|
676 |
+
#predict
|
677 |
+
if dataSource is None:
|
678 |
+
dataSource = model.config.getStringConfig("predict.data.file")[0]
|
679 |
+
featData = FeedForwardNetwork.prepData(model, dataSource, False)
|
680 |
+
#print("featData-----------",featData)
|
681 |
+
featData = torch.from_numpy(featData)
|
682 |
+
featData = featData.to(model.device)
|
683 |
+
|
684 |
+
model.eval()
|
685 |
+
yPred = model(featData)
|
686 |
+
yPred = yPred.data.cpu().numpy()
|
687 |
+
#print("yPred---------", yPred)
|
688 |
+
|
689 |
+
if model.outputSize >= 2:
|
690 |
+
#classification
|
691 |
+
yPred = FeedForwardNetwork.processClassifOutput(yPred, model.config)
|
692 |
+
|
693 |
+
# print prediction
|
694 |
+
if model.config.getBooleanConfig("predict.print.output")[0]:
|
695 |
+
FeedForwardNetwork.printPrediction(yPred, model.config, dataSource)
|
696 |
+
|
697 |
+
return yPred
|
698 |
+
|
699 |
+
def predict(self, dataSource = None):
|
700 |
+
"""
|
701 |
+
predict
|
702 |
+
|
703 |
+
Parameters
|
704 |
+
dataSource : data source
|
705 |
+
"""
|
706 |
+
return FeedForwardNetwork.modelPredict(self, dataSource)
|
707 |
+
|
708 |
+
@staticmethod
|
709 |
+
def evaluateModel(model):
|
710 |
+
"""
|
711 |
+
evaluate model
|
712 |
+
|
713 |
+
Parameters
|
714 |
+
model : torch model
|
715 |
+
"""
|
716 |
+
model.eval()
|
717 |
+
with torch.no_grad():
|
718 |
+
yPred = model(model.validFeatData)
|
719 |
+
#yPred = yPred.data.cpu().numpy()
|
720 |
+
yActual = model.validOutData
|
721 |
+
score = model.lossFn(yPred, yActual).item()
|
722 |
+
model.train()
|
723 |
+
return score
|
724 |
+
|
725 |
+
@staticmethod
|
726 |
+
def prepValidate(model, dataSource=None):
|
727 |
+
"""
|
728 |
+
prepare for validation
|
729 |
+
|
730 |
+
Parameters
|
731 |
+
model : torch model
|
732 |
+
dataSource : data source
|
733 |
+
"""
|
734 |
+
#train or restore model
|
735 |
+
if not model.restored:
|
736 |
+
useSavedModel = model.config.getBooleanConfig("predict.use.saved.model")[0]
|
737 |
+
if useSavedModel:
|
738 |
+
FeedForwardNetwork.restoreCheckpt(model)
|
739 |
+
else:
|
740 |
+
FeedForwardNetwork.batchTrain(model)
|
741 |
+
model.restored = True
|
742 |
+
|
743 |
+
if dataSource is not None:
|
744 |
+
model.setValidationData(dataSource)
|
745 |
+
|
746 |
+
@staticmethod
|
747 |
+
def validateModel(model, retPred=False):
|
748 |
+
"""
|
749 |
+
pmodel validation
|
750 |
+
|
751 |
+
Parameters
|
752 |
+
model : torch model
|
753 |
+
retPred : if True return prediction
|
754 |
+
"""
|
755 |
+
model.eval()
|
756 |
+
yPred = model(model.validFeatData)
|
757 |
+
yPred = yPred.data.cpu().numpy()
|
758 |
+
model.yPred = yPred
|
759 |
+
yActual = model.validOutData
|
760 |
+
vsize = yPred.shape[0]
|
761 |
+
if model.verbose:
|
762 |
+
print("\npredicted \t actual")
|
763 |
+
for i in range(vsize):
|
764 |
+
print("{:.3f}\t\t{:.3f}".format(yPred[i][0], yActual[i][0]))
|
765 |
+
|
766 |
+
score = perfMetric(model.accMetric, yActual, yPred)
|
767 |
+
print(formatFloat(3, score, "perf score"))
|
768 |
+
|
769 |
+
if retPred:
|
770 |
+
y = list(map(lambda i : (yPred[i][0], yActual[i][0]), range(vsize)))
|
771 |
+
res = (y, score)
|
772 |
+
return res
|
773 |
+
else:
|
774 |
+
return score
|
775 |
+
|
tnn_disamb.properties
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
common.mode=training
|
2 |
+
common.model.directory=./model/tnn
|
3 |
+
common.model.file=pdamb.mod
|
4 |
+
common.preprocessing=scale
|
5 |
+
common.scaling.method=minmax
|
6 |
+
common.verbose=True
|
7 |
+
train.data.file=spers_tr.txt
|
8 |
+
train.data.fields=0:6
|
9 |
+
train.data.feature.fields=0:5
|
10 |
+
train.data.out.fields=6
|
11 |
+
train.layer.data=1:none:false:false:-1.0
|
12 |
+
train.output.size=1
|
13 |
+
train.batch.size=64
|
14 |
+
train.loss.reduction=_
|
15 |
+
train.opt.learning.rate=.001
|
16 |
+
train.opt.weight.decay=_
|
17 |
+
train.opt.momentum=_
|
18 |
+
train.opt.eps=_
|
19 |
+
train.opt.dampening=_
|
20 |
+
train.opt.momentum.nesterov=_
|
21 |
+
train.opt.betas=_
|
22 |
+
train.opt.alpha=_
|
23 |
+
train.num.iterations=100
|
24 |
+
train.optimizer=_
|
25 |
+
train.lossFn=mse
|
26 |
+
train.model.save=True
|
27 |
+
train.track.error=True
|
28 |
+
train.epoch.intv=10
|
29 |
+
train.batch.intv=10
|
30 |
+
train.print.weights=True
|
31 |
+
valid.data.file=spers_va.txt
|
32 |
+
valid.accuracy.metric=acc
|
33 |
+
predict.data.file=spers_pr.txt
|
34 |
+
predict.use.saved.model=True
|
35 |
+
predict.output=_
|
36 |
+
predict.feat.pad.size=50
|
37 |
+
predict.print.output=False
|
txproc.py
ADDED
@@ -0,0 +1,973 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[ ]:
|
5 |
+
|
6 |
+
|
7 |
+
import os
|
8 |
+
import sys
|
9 |
+
from random import randint
|
10 |
+
import random
|
11 |
+
import time
|
12 |
+
from datetime import datetime
|
13 |
+
import re, string, unicodedata
|
14 |
+
import nltk
|
15 |
+
import contractions
|
16 |
+
import inflect
|
17 |
+
from bs4 import BeautifulSoup
|
18 |
+
from nltk import word_tokenize, sent_tokenize
|
19 |
+
from nltk.corpus import stopwords
|
20 |
+
from nltk.stem.isri import ISRIStemmer
|
21 |
+
from nltk.stem.porter import PorterStemmer
|
22 |
+
from nltk.stem.snowball import SnowballStemmer
|
23 |
+
from nltk.stem import LancasterStemmer, WordNetLemmatizer
|
24 |
+
from nltk.tag import StanfordNERTagger
|
25 |
+
from nltk.tokenize import word_tokenize, sent_tokenize
|
26 |
+
import spacy
|
27 |
+
import torch
|
28 |
+
from collections import defaultdict
|
29 |
+
import pickle
|
30 |
+
import numpy as np
|
31 |
+
import re
|
32 |
+
|
33 |
+
sys.path.append(os.path.abspath("../lib"))
|
34 |
+
from util import *
|
35 |
+
from mlutil import *
|
36 |
+
|
37 |
+
lcc = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k","l","m","n","o",
|
38 |
+
"p","q","r","s","t","u","v","w","x","y","z"]
|
39 |
+
ucc = ["A","B","C","D","E","F","G","H","I","J","K","L","M", "N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
|
40 |
+
dig = ["0","1","2","3","4","5","6","7","8","9"]
|
41 |
+
spc = ["@","#","$","%","^","&","*","(",")","_","+","{","}","[","]","|",":","<",">","?",";",",","."]
|
42 |
+
|
43 |
+
|
44 |
+
class TextPreProcessor:
|
45 |
+
"""
|
46 |
+
text preprocessor
|
47 |
+
"""
|
48 |
+
def __init__(self, stemmer = "lancaster", verbose=False):
|
49 |
+
self.verbose = verbose
|
50 |
+
self.lemmatizer = WordNetLemmatizer()
|
51 |
+
|
52 |
+
def stripHtml(self, text):
|
53 |
+
soup = BeautifulSoup(text, "html.parser")
|
54 |
+
return soup.get_text()
|
55 |
+
|
56 |
+
def removeBetweenSquareBrackets(self, text):
|
57 |
+
return re.sub('\[[^]]*\]', '', text)
|
58 |
+
|
59 |
+
def denoiseText(self, text):
|
60 |
+
text = stripHtml(text)
|
61 |
+
text = removeBetweenSquareBrackets(text)
|
62 |
+
return text
|
63 |
+
|
64 |
+
def replaceContractions(self, text):
|
65 |
+
"""Replace contractions in string of text"""
|
66 |
+
return contractions.fix(text)
|
67 |
+
|
68 |
+
def tokenize(self, text):
|
69 |
+
words = nltk.word_tokenize(text)
|
70 |
+
return words
|
71 |
+
|
72 |
+
def removeNonAscii(self, words):
|
73 |
+
"""Remove non-ASCII characters from list of tokenized words"""
|
74 |
+
newWords = []
|
75 |
+
for word in words:
|
76 |
+
if isinstance(word, unicode):
|
77 |
+
newWord = unicodedata.normalize('NFKD', word).encode('ascii', 'ignore')
|
78 |
+
else:
|
79 |
+
newWord = word
|
80 |
+
newWords.append(newWord)
|
81 |
+
return newWords
|
82 |
+
|
83 |
+
def replaceNonAsciiFromText(self, text):
|
84 |
+
""" replaces non ascii with blank """
|
85 |
+
return ''.join([i if ord(i) < 128 else ' ' for i in text])
|
86 |
+
|
87 |
+
def removeNonAsciiFromText(self, text):
|
88 |
+
""" replaces non ascii with blank """
|
89 |
+
return ''.join([i if ord(i) < 128 else '' for i in text])
|
90 |
+
|
91 |
+
def allow(self, words):
|
92 |
+
""" allow only specific charaters """
|
93 |
+
allowed = [word for word in words if re.match('^[A-Za-z0-9\.\,\:\;\!\?\(\)\'\-\$\@\%\"]+$', word) is not None]
|
94 |
+
return allowed
|
95 |
+
|
96 |
+
def toLowercase(self, words):
|
97 |
+
"""Convert all characters to lowercase from list of tokenized words"""
|
98 |
+
newWords = [word.lower() for word in words]
|
99 |
+
return newWords
|
100 |
+
|
101 |
+
def removePunctuation(self, words):
|
102 |
+
"""Remove punctuation from list of tokenized words"""
|
103 |
+
newWords = []
|
104 |
+
for word in words:
|
105 |
+
newWord = re.sub(r'[^\w\s]', '', word)
|
106 |
+
if newWord != '':
|
107 |
+
newWords.append(newWord)
|
108 |
+
return newWords
|
109 |
+
|
110 |
+
def replaceNumbers(self, words):
|
111 |
+
"""Replace all interger occurrences in list of tokenized words with textual representation"""
|
112 |
+
p = inflect.engine()
|
113 |
+
newWords = []
|
114 |
+
for word in words:
|
115 |
+
if word.isdigit():
|
116 |
+
newWord = p.number_to_words(word)
|
117 |
+
newWords.append(newWord)
|
118 |
+
else:
|
119 |
+
newWords.append(word)
|
120 |
+
return newWords
|
121 |
+
|
122 |
+
def removeStopwords(self, words):
|
123 |
+
"""Remove stop words from list of tokenized words"""
|
124 |
+
newWords = []
|
125 |
+
for word in words:
|
126 |
+
if word not in stopwords.words('english'):
|
127 |
+
newWords.append(word)
|
128 |
+
return newWords
|
129 |
+
|
130 |
+
def removeCustomStopwords(self, words, stopWords):
|
131 |
+
"""Remove stop words from list of tokenized words"""
|
132 |
+
removed = [word for word in words if word not in stopWords]
|
133 |
+
return removed
|
134 |
+
|
135 |
+
def removeLowFreqWords(self, words, minFreq):
|
136 |
+
"""Remove low frewquncy words from list of tokenized words"""
|
137 |
+
frequency = defaultdict(int)
|
138 |
+
for word in words:
|
139 |
+
frequency[word] += 1
|
140 |
+
removed = [word for word in words if frequency[word] > minFreq]
|
141 |
+
return removed
|
142 |
+
|
143 |
+
def removeNumbers(self, words):
|
144 |
+
"""Remove numbers"""
|
145 |
+
removed = [word for word in words if not isNumber(word)]
|
146 |
+
return removed
|
147 |
+
|
148 |
+
def removeShortWords(self, words, minLengh):
|
149 |
+
"""Remove short words """
|
150 |
+
removed = [word for word in words if len(word) >= minLengh]
|
151 |
+
return removed
|
152 |
+
|
153 |
+
def keepAllowedWords(self, words, keepWords):
|
154 |
+
"""Keep words from the list only"""
|
155 |
+
kept = [word for word in words if word in keepWords]
|
156 |
+
return kept
|
157 |
+
|
158 |
+
def stemWords(self, words):
|
159 |
+
"""Stem words in list of tokenized words"""
|
160 |
+
if stemmer == "lancaster":
|
161 |
+
stemmer = LancasterStemmer()
|
162 |
+
elif stemmer == "snowbal":
|
163 |
+
stemmer = SnowballStemmer()
|
164 |
+
elif stemmer == "porter":
|
165 |
+
stemmer = PorterStemmer()
|
166 |
+
stems = [stemmer.stem(word) for word in words]
|
167 |
+
return stems
|
168 |
+
|
169 |
+
def lemmatizeWords(self, words):
|
170 |
+
"""Lemmatize tokens in list of tokenized words"""
|
171 |
+
lemmas = [self.lemmatizer.lemmatize(word) for word in words]
|
172 |
+
return lemmas
|
173 |
+
|
174 |
+
def lemmatizeVerbs(self, words):
|
175 |
+
"""Lemmatize verbs in list of tokenized words"""
|
176 |
+
lemmas = [self.lemmatizer.lemmatize(word, pos='v') for word in words]
|
177 |
+
return lemmas
|
178 |
+
|
179 |
+
def normalize(self, words):
|
180 |
+
words = self.removeNonAscii(words)
|
181 |
+
words = self.toLowercase(words)
|
182 |
+
words = self.removePunctuation(words)
|
183 |
+
words = self.replaceNumbers(words)
|
184 |
+
words = self.removeStopwords(words)
|
185 |
+
return words
|
186 |
+
|
187 |
+
def posTag(self, textTokens):
|
188 |
+
tags = nltk.pos_tag(textTokens)
|
189 |
+
return tags
|
190 |
+
|
191 |
+
def extractEntity(self, textTokens, classifierPath, jarPath):
|
192 |
+
st = StanfordNERTagger(classifierPath, jarPath)
|
193 |
+
entities = st.tag(textTokens)
|
194 |
+
return entities
|
195 |
+
|
196 |
+
def documentFeatures(self, document, wordFeatures):
|
197 |
+
documentWords = set(document)
|
198 |
+
features = {}
|
199 |
+
for word in wordFeatures:
|
200 |
+
features[word] = (word in documentWords)
|
201 |
+
return features
|
202 |
+
|
203 |
+
class NGram:
|
204 |
+
"""
|
205 |
+
word ngram
|
206 |
+
"""
|
207 |
+
def __init__(self, vocFilt, verbose=False):
|
208 |
+
"""
|
209 |
+
initialize
|
210 |
+
"""
|
211 |
+
self.vocFilt = vocFilt
|
212 |
+
self.nGramCounter = dict()
|
213 |
+
self.nGramFreq = dict()
|
214 |
+
self.corpSize = 0
|
215 |
+
self.vocabulary = set()
|
216 |
+
self.freqDone = False
|
217 |
+
self.verbose = verbose
|
218 |
+
self.vecWords = None
|
219 |
+
self.nonZeroCount = 0
|
220 |
+
|
221 |
+
def countDocNGrams(self, words):
|
222 |
+
"""
|
223 |
+
count words in a doc
|
224 |
+
"""
|
225 |
+
if self.verbose:
|
226 |
+
print ("doc size " + str(len(words)))
|
227 |
+
nGrams = self.toNGram(words)
|
228 |
+
for nGram in nGrams:
|
229 |
+
count = self.nGramCounter.get(nGram, 0)
|
230 |
+
self.nGramCounter[nGram] = count + 1
|
231 |
+
self.corpSize += 1
|
232 |
+
self.vocabulary.update(words)
|
233 |
+
|
234 |
+
def remLowCount(self, minCount):
|
235 |
+
"""
|
236 |
+
removes items with count below threshold
|
237 |
+
"""
|
238 |
+
self.nGramCounter = dict(filter(lambda item: item[1] >= minCount, self.nGramCounter.items()))
|
239 |
+
|
240 |
+
def getVocabSize(self):
|
241 |
+
"""
|
242 |
+
get vocabulary size
|
243 |
+
"""
|
244 |
+
return len(self.nGramCounter)
|
245 |
+
|
246 |
+
def getNGramFreq(self):
|
247 |
+
"""
|
248 |
+
get normalized count
|
249 |
+
"""
|
250 |
+
if self.verbose:
|
251 |
+
print ("counter size " + str(len(self.nGramCounter)))
|
252 |
+
if not self.freqDone:
|
253 |
+
for item in self.nGramCounter.items():
|
254 |
+
self.nGramFreq[item[0]] = float(item[1]) / self.corpSize
|
255 |
+
self.freqDone = True
|
256 |
+
return self.nGramFreq
|
257 |
+
|
258 |
+
def getNGramIndex(self, show):
|
259 |
+
"""
|
260 |
+
convert to list
|
261 |
+
"""
|
262 |
+
if self.vecWords is None:
|
263 |
+
self.vecWords = list(self.nGramCounter)
|
264 |
+
if show:
|
265 |
+
for vw in enumerate(self.vecWords):
|
266 |
+
print(vw)
|
267 |
+
|
268 |
+
def getVector(self, words, byCount, normalized):
|
269 |
+
"""
|
270 |
+
convert to vector
|
271 |
+
"""
|
272 |
+
if self.vecWords is None:
|
273 |
+
self.vecWords = list(self.nGramCounter)
|
274 |
+
|
275 |
+
nGrams = self.toNGram(words)
|
276 |
+
if self.verbose:
|
277 |
+
print("vocabulary size {}".format(len(self.vecWords)))
|
278 |
+
print("ngrams")
|
279 |
+
print(nGrams)
|
280 |
+
self.nonZeroCount = 0
|
281 |
+
vec = list(map(lambda vw: self.getVecElem(vw, nGrams, byCount, normalized), self.vecWords))
|
282 |
+
return vec
|
283 |
+
|
284 |
+
def getVecElem(self, vw, nGrams, byCount, normalized):
|
285 |
+
"""
|
286 |
+
get vector element
|
287 |
+
"""
|
288 |
+
if vw in nGrams:
|
289 |
+
if byCount:
|
290 |
+
if normalized:
|
291 |
+
el = self.nGramFreq[vw]
|
292 |
+
else:
|
293 |
+
el = self.nGramCounter[vw]
|
294 |
+
else:
|
295 |
+
el = 1
|
296 |
+
self.nonZeroCount += 1
|
297 |
+
else:
|
298 |
+
if (byCount and normalized):
|
299 |
+
el = 0.0
|
300 |
+
else:
|
301 |
+
el = 0
|
302 |
+
return el
|
303 |
+
|
304 |
+
def getNonZeroCount(self):
|
305 |
+
"""
|
306 |
+
get non zero vector element count
|
307 |
+
"""
|
308 |
+
return self.nonZeroCount
|
309 |
+
|
310 |
+
def toBiGram(self, words):
|
311 |
+
"""
|
312 |
+
convert to bigram
|
313 |
+
"""
|
314 |
+
if self.verbose:
|
315 |
+
print ("doc size " + str(len(words)))
|
316 |
+
biGrams = list()
|
317 |
+
for i in range(len(words)-1):
|
318 |
+
w1 = words[i]
|
319 |
+
w2 = words[i+1]
|
320 |
+
if self.vocFilt is None or (w1 in self.vocFilt and w2 in self.vocFilt):
|
321 |
+
nGram = (w1, w2)
|
322 |
+
biGrams.append(nGram)
|
323 |
+
return biGrams
|
324 |
+
|
325 |
+
def toTriGram(self, words):
|
326 |
+
"""
|
327 |
+
convert to trigram
|
328 |
+
"""
|
329 |
+
if self.verbose:
|
330 |
+
print ("doc size " + str(len(words)))
|
331 |
+
triGrams = list()
|
332 |
+
for i in range(len(words)-2):
|
333 |
+
w1 = words[i]
|
334 |
+
w2 = words[i+1]
|
335 |
+
w3 = words[i+2]
|
336 |
+
if self.vocFilt is None or (w1 in self.vocFilt and w2 in self.vocFilt and w3 in self.vocFilt):
|
337 |
+
nGram = (w1, w2, w3)
|
338 |
+
triGrams.append(nGram)
|
339 |
+
return triGrams
|
340 |
+
|
341 |
+
def save(self, saveFile):
|
342 |
+
"""
|
343 |
+
save
|
344 |
+
"""
|
345 |
+
sf = open(saveFile, "wb")
|
346 |
+
pickle.dump(self, sf)
|
347 |
+
sf.close()
|
348 |
+
|
349 |
+
@staticmethod
|
350 |
+
def load(saveFile):
|
351 |
+
"""
|
352 |
+
load
|
353 |
+
"""
|
354 |
+
sf = open(saveFile, "rb")
|
355 |
+
nGrams = pickle.load(sf)
|
356 |
+
sf.close()
|
357 |
+
return nGrams
|
358 |
+
|
359 |
+
class CharNGram:
|
360 |
+
"""
|
361 |
+
character n gram
|
362 |
+
"""
|
363 |
+
def __init__(self, domains, ngsize, verbose=False):
|
364 |
+
"""
|
365 |
+
initialize
|
366 |
+
"""
|
367 |
+
self.chDomain = list()
|
368 |
+
self.ws = "#"
|
369 |
+
self.chDomain.append(self.ws)
|
370 |
+
for d in domains:
|
371 |
+
if d == "lcc":
|
372 |
+
self.chDomain.extend(lcc)
|
373 |
+
elif d == "ucc":
|
374 |
+
self.chDomain.extend(ucc)
|
375 |
+
elif d == "dig":
|
376 |
+
self.chDomain.extend(dig)
|
377 |
+
elif d == "spc":
|
378 |
+
self.chDomain.extend(spc)
|
379 |
+
else:
|
380 |
+
raise ValueError("invalid character type " + d)
|
381 |
+
|
382 |
+
self.ngsize = ngsize
|
383 |
+
self.radixPow = None
|
384 |
+
self.cntVecSize = None
|
385 |
+
|
386 |
+
def addSpChar(self, spChar):
|
387 |
+
"""
|
388 |
+
add special characters
|
389 |
+
"""
|
390 |
+
self.chDomain.extend(spChar)
|
391 |
+
|
392 |
+
def setWsRepl(self, ws):
|
393 |
+
"""
|
394 |
+
set white space replacement charater
|
395 |
+
"""
|
396 |
+
self.ws = ws
|
397 |
+
self.chDomain[0] = self.ws
|
398 |
+
|
399 |
+
def finalize(self):
|
400 |
+
"""
|
401 |
+
final setup
|
402 |
+
"""
|
403 |
+
domSize = len(self.chDomain)
|
404 |
+
self.cntVecSize = int(math.pow(domSize, self.ngsize))
|
405 |
+
if self.radixPow is None:
|
406 |
+
self.radixPow = list()
|
407 |
+
for i in range(self.ngsize-1, 0, -1):
|
408 |
+
self.radixPow.append(int(math.pow(domSize, i)))
|
409 |
+
self.radixPow.append(1)
|
410 |
+
|
411 |
+
|
412 |
+
def toMgramCount(self, text):
|
413 |
+
"""
|
414 |
+
get ngram count list
|
415 |
+
"""
|
416 |
+
#print(text)
|
417 |
+
ngCounts = [0] * self.cntVecSize
|
418 |
+
|
419 |
+
ngram = list()
|
420 |
+
totNgCount = 0
|
421 |
+
for ch in text:
|
422 |
+
if ch.isspace():
|
423 |
+
l = len(ngram)
|
424 |
+
if l == 0 or ngram[l-1] != self.ws:
|
425 |
+
ngram.append(self.ws)
|
426 |
+
else:
|
427 |
+
ngram.append(ch)
|
428 |
+
|
429 |
+
if len(ngram) == self.ngsize:
|
430 |
+
i = self.__getNgramIndex(ngram)
|
431 |
+
assert i < self.cntVecSize, "ngram index out of range index " + str(i) + " size " + str(self.cntVecSize)
|
432 |
+
ngCounts[i] += 1
|
433 |
+
ngram.clear()
|
434 |
+
totNgCount += 1
|
435 |
+
|
436 |
+
return ngCounts
|
437 |
+
|
438 |
+
def __getNgramIndex(self, ngram):
|
439 |
+
"""
|
440 |
+
get index of an ngram into a list of size equal total number of possible ngrams
|
441 |
+
"""
|
442 |
+
assert len(ngram) == len(self.radixPow), "ngram size mismatch"
|
443 |
+
ngi = 0
|
444 |
+
for ch, rp in zip(ngram, self.radixPow):
|
445 |
+
i = self.chDomain.index(ch)
|
446 |
+
ngi += i * rp
|
447 |
+
|
448 |
+
return ngi
|
449 |
+
|
450 |
+
|
451 |
+
class TfIdf:
|
452 |
+
"""
|
453 |
+
TF IDF
|
454 |
+
"""
|
455 |
+
def __init__(self, vocFilt, doIdf, verbose=False):
|
456 |
+
"""
|
457 |
+
initialize
|
458 |
+
"""
|
459 |
+
self.vocFilt = vocFilt
|
460 |
+
self.doIdf = doIdf
|
461 |
+
self.wordCounter = {}
|
462 |
+
self.wordFreq = {}
|
463 |
+
self.wordInDocCount = {}
|
464 |
+
self.docCount = 0
|
465 |
+
self.corpSize = 0
|
466 |
+
self.freqDone = False
|
467 |
+
self.vocabulary = set()
|
468 |
+
self.wordIndex = None
|
469 |
+
self.verbose = verbose
|
470 |
+
self.vecWords = None
|
471 |
+
|
472 |
+
def countDocWords(self, words):
|
473 |
+
"""
|
474 |
+
count words in a doc
|
475 |
+
"""
|
476 |
+
if self.verbose:
|
477 |
+
print ("doc size " + str(len(words)))
|
478 |
+
for word in words:
|
479 |
+
if self.vocFilt is None or word in self.vocFilt:
|
480 |
+
count = self.wordCounter.get(word, 0)
|
481 |
+
self.wordCounter[word] = count + 1
|
482 |
+
self.corpSize += len(words)
|
483 |
+
self.vocabulary.update(words)
|
484 |
+
|
485 |
+
if (self.doIdf):
|
486 |
+
self.docCount += 1
|
487 |
+
for word in set(words):
|
488 |
+
self.wordInDocCount.get(word, 0)
|
489 |
+
self.wordInDocCount[word] = count + 1
|
490 |
+
self.freqDone = False
|
491 |
+
|
492 |
+
|
493 |
+
def getWordFreq(self):
|
494 |
+
"""
|
495 |
+
get tfidf for corpus
|
496 |
+
"""
|
497 |
+
if self.verbose:
|
498 |
+
print ("counter size " + str(len(self.wordCounter)))
|
499 |
+
if not self.freqDone:
|
500 |
+
for item in self.wordCounter.items():
|
501 |
+
self.wordFreq[item[0]] = float(item[1]) / self.corpSize
|
502 |
+
if self.doIdf:
|
503 |
+
for k in self.wordFreq.keys():
|
504 |
+
self.wordFreq.items[k] *= math.log(self.docCount / self.wordInDocCount.items[k])
|
505 |
+
self.freqDone = True
|
506 |
+
return self.wordFreq
|
507 |
+
|
508 |
+
def getCount(self, word):
|
509 |
+
"""
|
510 |
+
get counter
|
511 |
+
"""
|
512 |
+
if word in self.wordCounter:
|
513 |
+
count = self.wordCounter[word]
|
514 |
+
else:
|
515 |
+
raise ValueError("word not found in count table " + word)
|
516 |
+
return count
|
517 |
+
|
518 |
+
def getFreq(self, word):
|
519 |
+
"""
|
520 |
+
get normalized frequency
|
521 |
+
"""
|
522 |
+
if word in self.wordFreq:
|
523 |
+
freq = self.wordFreq[word]
|
524 |
+
else:
|
525 |
+
raise ValueError("word not found in count table " + word)
|
526 |
+
return freq
|
527 |
+
|
528 |
+
def resetCounter(self):
|
529 |
+
"""
|
530 |
+
reset counter
|
531 |
+
"""
|
532 |
+
self.wordCounter = {}
|
533 |
+
|
534 |
+
def buildVocabulary(self, words):
|
535 |
+
"""
|
536 |
+
build vocbulary
|
537 |
+
"""
|
538 |
+
self.vocabulary.update(words)
|
539 |
+
|
540 |
+
def getVocabulary(self):
|
541 |
+
"""
|
542 |
+
return vocabulary
|
543 |
+
"""
|
544 |
+
return self.vocabulary
|
545 |
+
|
546 |
+
def creatWordIndex(self):
|
547 |
+
"""
|
548 |
+
index for all words in vcabulary
|
549 |
+
"""
|
550 |
+
self.wordIndex = {word : idx for idx, word in enumerate(list(self.vocabulary))}
|
551 |
+
|
552 |
+
def getVector(self, words, byCount, normalized):
|
553 |
+
"""
|
554 |
+
get vector
|
555 |
+
"""
|
556 |
+
if self.vecWords is None:
|
557 |
+
self.vecWords = list(self.wordCounter)
|
558 |
+
vec = list(map(lambda vw: self.getVecElem(vw, words, byCount, normalized), self.vecWords))
|
559 |
+
return vec
|
560 |
+
|
561 |
+
def getVecElem(self, vw, words, byCount, normalized):
|
562 |
+
"""
|
563 |
+
vector element
|
564 |
+
"""
|
565 |
+
el = 0
|
566 |
+
if vw in words:
|
567 |
+
if byCount:
|
568 |
+
if normalized:
|
569 |
+
el = self.wordFreq[vw]
|
570 |
+
else:
|
571 |
+
el = self.wordCounter[vw]
|
572 |
+
else:
|
573 |
+
el = 1
|
574 |
+
return el
|
575 |
+
|
576 |
+
def save(self, saveFile):
|
577 |
+
"""
|
578 |
+
save
|
579 |
+
"""
|
580 |
+
sf = open(saveFile, "wb")
|
581 |
+
pickle.dump(self, sf)
|
582 |
+
sf.close()
|
583 |
+
|
584 |
+
# load
|
585 |
+
@staticmethod
|
586 |
+
def load(saveFile):
|
587 |
+
"""
|
588 |
+
load
|
589 |
+
"""
|
590 |
+
sf = open(saveFile, "rb")
|
591 |
+
tfidf = pickle.load(sf)
|
592 |
+
sf.close()
|
593 |
+
return tfidf
|
594 |
+
|
595 |
+
# bigram
|
596 |
+
class BiGram(NGram):
|
597 |
+
def __init__(self, vocFilt, verbose=False):
|
598 |
+
"""
|
599 |
+
initialize
|
600 |
+
"""
|
601 |
+
super(BiGram, self).__init__(vocFilt, verbose)
|
602 |
+
|
603 |
+
def toNGram(self, words):
|
604 |
+
"""
|
605 |
+
convert to Ngrams
|
606 |
+
"""
|
607 |
+
return self.toBiGram(words)
|
608 |
+
|
609 |
+
# trigram
|
610 |
+
class TriGram(NGram):
|
611 |
+
def __init__(self, vocFilt, verbose=False):
|
612 |
+
"""
|
613 |
+
initialize
|
614 |
+
"""
|
615 |
+
super(TriGram, self).__init__(vocFilt, verbose)
|
616 |
+
|
617 |
+
def toNGram(self, words):
|
618 |
+
"""
|
619 |
+
convert to Ngrams
|
620 |
+
"""
|
621 |
+
return self.toTriGram(words)
|
622 |
+
|
623 |
+
|
624 |
+
|
625 |
+
class DocSentences:
|
626 |
+
"""
|
627 |
+
sentence processor
|
628 |
+
"""
|
629 |
+
def __init__(self, filePath, minLength, verbose, text=None):
|
630 |
+
"""
|
631 |
+
initialize
|
632 |
+
"""
|
633 |
+
if filePath:
|
634 |
+
self.filePath = filePath
|
635 |
+
with open(filePath, 'r') as contentFile:
|
636 |
+
content = contentFile.read()
|
637 |
+
elif text:
|
638 |
+
content = text
|
639 |
+
else:
|
640 |
+
raise valueError("either file path or text must be provided")
|
641 |
+
|
642 |
+
#self.sentences = content.split('.')
|
643 |
+
self.verbose = verbose
|
644 |
+
tp = TextPreProcessor()
|
645 |
+
content = tp.removeNonAsciiFromText(content)
|
646 |
+
sentences = sent_tokenize(content)
|
647 |
+
self.sentences = list(filter(lambda s: len(nltk.word_tokenize(s)) >= minLength, sentences))
|
648 |
+
if self.verbose:
|
649 |
+
print ("num of senteces after length filter " + str(len(self.sentences)))
|
650 |
+
self.sentencesAsTokens = [clean(s, tp, verbose) for s in self.sentences]
|
651 |
+
|
652 |
+
# get sentence tokens
|
653 |
+
def getSentencesAsTokens(self):
|
654 |
+
return self.sentencesAsTokens
|
655 |
+
|
656 |
+
# get sentences
|
657 |
+
def getSentences(self):
|
658 |
+
return self.sentences
|
659 |
+
|
660 |
+
# build term freq table
|
661 |
+
def getTermFreqTable(self):
|
662 |
+
# term count table for all words
|
663 |
+
termTable = TfIdf(None, False)
|
664 |
+
sentWords = self.getSentencesAsTokens()
|
665 |
+
for seWords in sentWords:
|
666 |
+
termTable.countDocWords(seWords)
|
667 |
+
return termTable
|
668 |
+
|
669 |
+
# sentence processor
|
670 |
+
class WordVectorContainer:
|
671 |
+
def __init__(self, dirPath, verbose):
|
672 |
+
"""
|
673 |
+
initialize
|
674 |
+
"""
|
675 |
+
self.docs = list()
|
676 |
+
self.wordVectors = list()
|
677 |
+
self.tp = TextPreProcessor()
|
678 |
+
self.similarityAlgo = "cosine"
|
679 |
+
self.simAlgoNormalizer = None
|
680 |
+
self.termTable = None
|
681 |
+
|
682 |
+
|
683 |
+
def addDir(self, dirPath):
|
684 |
+
"""
|
685 |
+
add content of all files ina directory
|
686 |
+
"""
|
687 |
+
docs, filePaths = getFileContent(dirPath, verbose)
|
688 |
+
self.docs.extend(docs)
|
689 |
+
self.wordVectors.extend([clean(doc, self.tp, verbose) for doc in docs])
|
690 |
+
|
691 |
+
def addFile(self, filePath):
|
692 |
+
"""
|
693 |
+
add file content
|
694 |
+
"""
|
695 |
+
with open(filePath, 'r') as contentFile:
|
696 |
+
content = contentFile.read()
|
697 |
+
self.wordVectors.append(clean(content, self.tp, verbose))
|
698 |
+
|
699 |
+
def addText(self, text):
|
700 |
+
"""
|
701 |
+
add text
|
702 |
+
"""
|
703 |
+
self.wordVectors.append(clean(text, self.tp, verbose))
|
704 |
+
|
705 |
+
def addWords(self, words):
|
706 |
+
"""
|
707 |
+
add words
|
708 |
+
"""
|
709 |
+
self.wordVectors.append(words)
|
710 |
+
|
711 |
+
def withSimilarityAlgo(self, algo, normalizer=None):
|
712 |
+
"""
|
713 |
+
set similarity algo
|
714 |
+
"""
|
715 |
+
self.similarityAlgo = algo
|
716 |
+
self.simAlgoNormalizer = normalizer
|
717 |
+
|
718 |
+
def getDocsWords(self):
|
719 |
+
"""
|
720 |
+
get word vectors
|
721 |
+
"""
|
722 |
+
return self.wordVectors
|
723 |
+
|
724 |
+
def getDocs(self):
|
725 |
+
"""
|
726 |
+
get docs
|
727 |
+
"""
|
728 |
+
return self.docs
|
729 |
+
|
730 |
+
def getTermFreqTable(self):
|
731 |
+
"""
|
732 |
+
term count table for all words
|
733 |
+
"""
|
734 |
+
self.termTable = TfIdf(None, False)
|
735 |
+
for words in self.wordVectors:
|
736 |
+
self.termTable.countDocWords(words)
|
737 |
+
self.termTable.getWordFreq()
|
738 |
+
return self.termTable
|
739 |
+
|
740 |
+
def getPairWiseSimilarity(self, byCount, normalized):
|
741 |
+
"""
|
742 |
+
pair wise similarity
|
743 |
+
"""
|
744 |
+
self.getNumWordVectors()
|
745 |
+
|
746 |
+
size = len(self.wordVectors)
|
747 |
+
simArray = np.empty(shape=(size,size))
|
748 |
+
for i in range(size):
|
749 |
+
simArray[i][i] = 1.0
|
750 |
+
|
751 |
+
for i in range(size):
|
752 |
+
for j in range(i+1, size):
|
753 |
+
if self.similarityAlgo == "cosine":
|
754 |
+
sim = cosineSimilarity(self.numWordVectors[i], self.numWordVectors[j])
|
755 |
+
elif self.similarityAlgo == "jaccard":
|
756 |
+
sim = jaccardSimilarity(self.wordVectors[i], self.wordVectors[j], self.simAlgoNormalizer[0], self.simAlgoNormalizer[1])
|
757 |
+
else:
|
758 |
+
raise ValueError("invalid similarity algorithms")
|
759 |
+
simArray[i][j] = sim
|
760 |
+
simArray[j][i] = sim
|
761 |
+
return simArray
|
762 |
+
|
763 |
+
def getInterSetSimilarity(self, byCount, normalized, split):
|
764 |
+
"""
|
765 |
+
inter set pair wise similarity
|
766 |
+
"""
|
767 |
+
self.getNumWordVectors()
|
768 |
+
size = len(self.wordVectors)
|
769 |
+
if not self.similarityAlgo == "jaccard":
|
770 |
+
firstNumVec = self.numWordVectors[:split]
|
771 |
+
secNumVec = self.numWordVectors[split:]
|
772 |
+
fiSize = len(firstNumVec)
|
773 |
+
seSize = len(secNumVec)
|
774 |
+
else:
|
775 |
+
firstVec = self.wordVectors[:split]
|
776 |
+
secVec = self.wordVectors[split:]
|
777 |
+
fiSize = len(firstVec)
|
778 |
+
seSize = len(secVec)
|
779 |
+
|
780 |
+
simArray = np.empty(shape=(fiSize,seSize))
|
781 |
+
for i in range(fiSize):
|
782 |
+
for j in range(seSize):
|
783 |
+
if self.similarityAlgo == "cosine":
|
784 |
+
sim = cosineSimilarity(firstNumVec[i], secNumVec[j])
|
785 |
+
elif self.similarityAlgo == "jaccard":
|
786 |
+
sim = jaccardSimilarity(firstVec[i], secVec[j], self.simAlgoNormalizer[0], self.simAlgoNormalizer[1])
|
787 |
+
else:
|
788 |
+
raise ValueError("invalid similarity algorithms")
|
789 |
+
simArray[i][j] = sim
|
790 |
+
return simArray
|
791 |
+
|
792 |
+
def getNumWordVectors(self):
|
793 |
+
"""
|
794 |
+
get vectors
|
795 |
+
"""
|
796 |
+
if not self.similarityAlgo == "jaccard":
|
797 |
+
if self.numWordVectors is None:
|
798 |
+
self.numWordVectors = list(map(lambda wv: self.termTable.getVector(wv, byCount, normalized), self.wordVectors))
|
799 |
+
|
800 |
+
# fragments documents into whole doc, paragraph or passages
|
801 |
+
class TextFragmentGenerator:
|
802 |
+
def __init__(self, level, minParNl, passSize, verbose=False):
|
803 |
+
"""
|
804 |
+
initialize
|
805 |
+
"""
|
806 |
+
self.level = level
|
807 |
+
self.minParNl = minParNl
|
808 |
+
self.passSize = passSize
|
809 |
+
self.fragments = None
|
810 |
+
self.verbose = verbose
|
811 |
+
|
812 |
+
def loadDocs(self, fpaths):
|
813 |
+
"""
|
814 |
+
loads documents from one file, multiple files or all files under directory
|
815 |
+
"""
|
816 |
+
fPaths = fpaths.split(",")
|
817 |
+
if len(fPaths) == 1:
|
818 |
+
if os.path.isfile(fPaths[0]):
|
819 |
+
#one file
|
820 |
+
if self.verbose:
|
821 |
+
print("got one file from path")
|
822 |
+
dnames = fPaths
|
823 |
+
docStr = getOneFileContent(fPaths[0])
|
824 |
+
dtexts = [docStr]
|
825 |
+
else:
|
826 |
+
#all files under directory
|
827 |
+
if self.verbose:
|
828 |
+
print("got all files under directory from path")
|
829 |
+
dtexts, dnames = getFileContent(fPaths[0])
|
830 |
+
if self.verbose:
|
831 |
+
print("found {} files".format(len(dtexts)))
|
832 |
+
else:
|
833 |
+
#list of files
|
834 |
+
if self.verbose:
|
835 |
+
print("got list of files from path")
|
836 |
+
dnames = fPaths
|
837 |
+
dtexts = list(map(getOneFileContent, fpaths))
|
838 |
+
if self.verbose:
|
839 |
+
print("found {} files".format(len(dtexts)))
|
840 |
+
|
841 |
+
ndocs = (dtexts, dnames)
|
842 |
+
if self.verbose:
|
843 |
+
print("docs")
|
844 |
+
for dn, dt in zip(dnames, dtexts):
|
845 |
+
print(dn + "\t" + dt[:40])
|
846 |
+
|
847 |
+
return ndocs
|
848 |
+
|
849 |
+
def generateFragmentsFromFiles(self, fpaths):
|
850 |
+
"""
|
851 |
+
fragments documents into whole doc, paragraph or passages
|
852 |
+
"""
|
853 |
+
dtexts, dnames = self.loadDocs(fpaths)
|
854 |
+
return self.generateFragments(dtexts, dnames)
|
855 |
+
|
856 |
+
|
857 |
+
def generateFragmentsFromNamedDocs(self, ndocs):
|
858 |
+
"""
|
859 |
+
fragments documents into whole doc, paragraph or passages
|
860 |
+
"""
|
861 |
+
dtexts = list(map(lambda nd : nd[1], ndocs))
|
862 |
+
dnames = list(map(lambda nd : nd[0], ndocs))
|
863 |
+
#for i in range(len(dtexts)):
|
864 |
+
# print(dnames[i])
|
865 |
+
# print(dtexts[i][:40])
|
866 |
+
return self.generateFragments(dtexts, dnames)
|
867 |
+
|
868 |
+
def generateFragments(self, dtexts, dnames):
|
869 |
+
"""
|
870 |
+
fragments documents into whole doc, paragraph or passages
|
871 |
+
"""
|
872 |
+
if self.level == "para" or self.level == "passage":
|
873 |
+
#split paras
|
874 |
+
dptexts = list()
|
875 |
+
dpnames = list()
|
876 |
+
for dt, dn in zip(dtexts, dnames):
|
877 |
+
paras = getParas(dt, self.minParNl)
|
878 |
+
if self.verbose:
|
879 |
+
print(dn)
|
880 |
+
print("no of paras {}".format(len(paras)))
|
881 |
+
dptexts.extend(paras)
|
882 |
+
pnames = list(map(lambda i : dn + ":" + str(i), range(len(paras))))
|
883 |
+
dpnames.extend(pnames)
|
884 |
+
dtexts = dptexts
|
885 |
+
dnames = dpnames
|
886 |
+
|
887 |
+
if self.level == "passage":
|
888 |
+
#split each para into passages
|
889 |
+
dptexts = list()
|
890 |
+
dpnames = list()
|
891 |
+
for dt, dn in zip(dtexts, dnames):
|
892 |
+
sents = sent_tokenize(dt.strip())
|
893 |
+
if self.verbose:
|
894 |
+
print(dn)
|
895 |
+
print("no of sentences {}".format(len(sents)))
|
896 |
+
span = self.passSize
|
897 |
+
if len(sents) <= span:
|
898 |
+
pass
|
899 |
+
else:
|
900 |
+
for i in range(0, len(sents) - span, 1):
|
901 |
+
dptext = None
|
902 |
+
for j in range(span):
|
903 |
+
if dptext is None:
|
904 |
+
dptext = sents[i + j] + ". "
|
905 |
+
else:
|
906 |
+
dptext = dptext + sents[i + j] + ". "
|
907 |
+
dpname = dn + ":" + str(i)
|
908 |
+
dptexts.append(dptext)
|
909 |
+
dpnames.append(dpname)
|
910 |
+
|
911 |
+
dtexts = dptexts
|
912 |
+
dnames = dpnames
|
913 |
+
|
914 |
+
self.fragments = list(zip(dnames, dtexts))
|
915 |
+
#if self.verbose:
|
916 |
+
# print("num fragments {}".format(len(self.fragments)))
|
917 |
+
return self.fragments
|
918 |
+
|
919 |
+
def showFragments(self):
|
920 |
+
"""
|
921 |
+
show fragments
|
922 |
+
"""
|
923 |
+
print("showing all " + self.level + " for the first 40 characters")
|
924 |
+
for dn, dt in self.fragments:
|
925 |
+
print(dn + "\t" + dt[:40])
|
926 |
+
|
927 |
+
def isDocLevel(self):
|
928 |
+
"""
|
929 |
+
true if fragment is at doc level
|
930 |
+
"""
|
931 |
+
return self.level != "para" and self.level != "passage"
|
932 |
+
|
933 |
+
# clean doc to create term array
|
934 |
+
def clean(doc, preprocessor, verbose):
|
935 |
+
"""
|
936 |
+
text pre process
|
937 |
+
"""
|
938 |
+
if verbose:
|
939 |
+
print ("--raw doc")
|
940 |
+
print (doc)
|
941 |
+
#print "next clean"
|
942 |
+
doc = preprocessor.removeNonAsciiFromText(doc)
|
943 |
+
words = preprocessor.tokenize(doc)
|
944 |
+
words = preprocessor.allow(words)
|
945 |
+
words = preprocessor.toLowercase(words)
|
946 |
+
words = preprocessor.removeStopwords(words)
|
947 |
+
words = preprocessor.removeShortWords(words, 3)
|
948 |
+
words = preprocessor.removePunctuation(words)
|
949 |
+
words = preprocessor.lemmatizeWords(words)
|
950 |
+
#words = preprocessor.removeNonAscii(words)
|
951 |
+
if verbose:
|
952 |
+
print ("--after pre processing")
|
953 |
+
print (words)
|
954 |
+
return words
|
955 |
+
|
956 |
+
# get sentences
|
957 |
+
def getSentences(filePath):
|
958 |
+
"""
|
959 |
+
text pre process
|
960 |
+
"""
|
961 |
+
with open(filePath, 'r') as contentFile:
|
962 |
+
content = contentFile.read()
|
963 |
+
sentences = content.split('.')
|
964 |
+
return sentences
|
965 |
+
|
966 |
+
def getParas(text, minParNl=2):
|
967 |
+
"""
|
968 |
+
split into paras
|
969 |
+
"""
|
970 |
+
regx = "\n+" if minParNl == 1 else "\n{2,}"
|
971 |
+
paras = re.split(regx, text.replace("\r\n", "\n"))
|
972 |
+
return paras
|
973 |
+
|
us-500.csv
ADDED
@@ -0,0 +1,501 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
first_name,last_name,company_name,address,city,county,state,zip,phone1,phone2,email,web
|
2 |
+
James,Butt,"Benton, John B Jr",6649 N Blue Gum St,New Orleans,Orleans,LA,70116,504-621-8927,504-845-1427,jbutt@gmail.com,http://www.bentonjohnbjr.com
|
3 |
+
Josephine,Darakjy,"Chanay, Jeffrey A Esq",4 B Blue Ridge Blvd,Brighton,Livingston,MI,48116,810-292-9388,810-374-9840,josephine_darakjy@darakjy.org,http://www.chanayjeffreyaesq.com
|
4 |
+
Art,Venere,"Chemel, James L Cpa",8 W Cerritos Ave #54,Bridgeport,Gloucester,NJ,8014,856-636-8749,856-264-4130,art@venere.org,http://www.chemeljameslcpa.com
|
5 |
+
Lenna,Paprocki,Feltz Printing Service,639 Main St,Anchorage,Anchorage,AK,99501,907-385-4412,907-921-2010,lpaprocki@hotmail.com,http://www.feltzprintingservice.com
|
6 |
+
Donette,Foller,Printing Dimensions,34 Center St,Hamilton,Butler,OH,45011,513-570-1893,513-549-4561,donette.foller@cox.net,http://www.printingdimensions.com
|
7 |
+
Simona,Morasca,"Chapman, Ross E Esq",3 Mcauley Dr,Ashland,Ashland,OH,44805,419-503-2484,419-800-6759,simona@morasca.com,http://www.chapmanrosseesq.com
|
8 |
+
Mitsue,Tollner,Morlong Associates,7 Eads St,Chicago,Cook,IL,60632,773-573-6914,773-924-8565,mitsue_tollner@yahoo.com,http://www.morlongassociates.com
|
9 |
+
Leota,Dilliard,Commercial Press,7 W Jackson Blvd,San Jose,Santa Clara,CA,95111,408-752-3500,408-813-1105,leota@hotmail.com,http://www.commercialpress.com
|
10 |
+
Sage,Wieser,Truhlar And Truhlar Attys,5 Boston Ave #88,Sioux Falls,Minnehaha,SD,57105,605-414-2147,605-794-4895,sage_wieser@cox.net,http://www.truhlarandtruhlarattys.com
|
11 |
+
Kris,Marrier,"King, Christopher A Esq",228 Runamuck Pl #2808,Baltimore,Baltimore City,MD,21224,410-655-8723,410-804-4694,kris@gmail.com,http://www.kingchristopheraesq.com
|
12 |
+
Minna,Amigon,"Dorl, James J Esq",2371 Jerrold Ave,Kulpsville,Montgomery,PA,19443,215-874-1229,215-422-8694,minna_amigon@yahoo.com,http://www.dorljamesjesq.com
|
13 |
+
Abel,Maclead,Rangoni Of Florence,37275 St Rt 17m M,Middle Island,Suffolk,NY,11953,631-335-3414,631-677-3675,amaclead@gmail.com,http://www.rangoniofflorence.com
|
14 |
+
Kiley,Caldarera,Feiner Bros,25 E 75th St #69,Los Angeles,Los Angeles,CA,90034,310-498-5651,310-254-3084,kiley.caldarera@aol.com,http://www.feinerbros.com
|
15 |
+
Graciela,Ruta,Buckley Miller & Wright,98 Connecticut Ave Nw,Chagrin Falls,Geauga,OH,44023,440-780-8425,440-579-7763,gruta@cox.net,http://www.buckleymillerwright.com
|
16 |
+
Cammy,Albares,"Rousseaux, Michael Esq",56 E Morehead St,Laredo,Webb,TX,78045,956-537-6195,956-841-7216,calbares@gmail.com,http://www.rousseauxmichaelesq.com
|
17 |
+
Mattie,Poquette,Century Communications,73 State Road 434 E,Phoenix,Maricopa,AZ,85013,602-277-4385,602-953-6360,mattie@aol.com,http://www.centurycommunications.com
|
18 |
+
Meaghan,Garufi,"Bolton, Wilbur Esq",69734 E Carrillo St,Mc Minnville,Warren,TN,37110,931-313-9635,931-235-7959,meaghan@hotmail.com,http://www.boltonwilburesq.com
|
19 |
+
Gladys,Rim,T M Byxbee Company Pc,322 New Horizon Blvd,Milwaukee,Milwaukee,WI,53207,414-661-9598,414-377-2880,gladys.rim@rim.org,http://www.tmbyxbeecompanypc.com
|
20 |
+
Yuki,Whobrey,Farmers Insurance Group,1 State Route 27,Taylor,Wayne,MI,48180,313-288-7937,313-341-4470,yuki_whobrey@aol.com,http://www.farmersinsurancegroup.com
|
21 |
+
Fletcher,Flosi,Post Box Services Plus,394 Manchester Blvd,Rockford,Winnebago,IL,61109,815-828-2147,815-426-5657,fletcher.flosi@yahoo.com,http://www.postboxservicesplus.com
|
22 |
+
Bette,Nicka,Sport En Art,6 S 33rd St,Aston,Delaware,PA,19014,610-545-3615,610-492-4643,bette_nicka@cox.net,http://www.sportenart.com
|
23 |
+
Veronika,Inouye,C 4 Network Inc,6 Greenleaf Ave,San Jose,Santa Clara,CA,95111,408-540-1785,408-813-4592,vinouye@aol.com,http://www.cnetworkinc.com
|
24 |
+
Willard,Kolmetz,"Ingalls, Donald R Esq",618 W Yakima Ave,Irving,Dallas,TX,75062,972-303-9197,972-896-4882,willard@hotmail.com,http://www.ingallsdonaldresq.com
|
25 |
+
Maryann,Royster,"Franklin, Peter L Esq",74 S Westgate St,Albany,Albany,NY,12204,518-966-7987,518-448-8982,mroyster@royster.com,http://www.franklinpeterlesq.com
|
26 |
+
Alisha,Slusarski,Wtlz Power 107 Fm,3273 State St,Middlesex,Middlesex,NJ,8846,732-658-3154,732-635-3453,alisha@slusarski.com,http://www.wtlzpowerfm.com
|
27 |
+
Allene,Iturbide,"Ledecky, David Esq",1 Central Ave,Stevens Point,Portage,WI,54481,715-662-6764,715-530-9863,allene_iturbide@cox.net,http://www.ledeckydavidesq.com
|
28 |
+
Chanel,Caudy,Professional Image Inc,86 Nw 66th St #8673,Shawnee,Johnson,KS,66218,913-388-2079,913-899-1103,chanel.caudy@caudy.org,http://www.professionalimageinc.com
|
29 |
+
Ezekiel,Chui,"Sider, Donald C Esq",2 Cedar Ave #84,Easton,Talbot,MD,21601,410-669-1642,410-235-8738,ezekiel@chui.com,http://www.siderdonaldcesq.com
|
30 |
+
Willow,Kusko,U Pull It,90991 Thorburn Ave,New York,New York,NY,10011,212-582-4976,212-934-5167,wkusko@yahoo.com,http://www.upullit.com
|
31 |
+
Bernardo,Figeroa,"Clark, Richard Cpa",386 9th Ave N,Conroe,Montgomery,TX,77301,936-336-3951,936-597-3614,bfigeroa@aol.com,http://www.clarkrichardcpa.com
|
32 |
+
Ammie,Corrio,"Moskowitz, Barry S",74874 Atlantic Ave,Columbus,Franklin,OH,43215,614-801-9788,614-648-3265,ammie@corrio.com,http://www.moskowitzbarrys.com
|
33 |
+
Francine,Vocelka,Cascade Realty Advisors Inc,366 South Dr,Las Cruces,Dona Ana,NM,88011,505-977-3911,505-335-5293,francine_vocelka@vocelka.com,http://www.cascaderealtyadvisorsinc.com
|
34 |
+
Ernie,Stenseth,Knwz Newsradio,45 E Liberty St,Ridgefield Park,Bergen,NJ,7660,201-709-6245,201-387-9093,ernie_stenseth@aol.com,http://www.knwznewsradio.com
|
35 |
+
Albina,Glick,"Giampetro, Anthony D",4 Ralph Ct,Dunellen,Middlesex,NJ,8812,732-924-7882,732-782-6701,albina@glick.com,http://www.giampetroanthonyd.com
|
36 |
+
Alishia,Sergi,Milford Enterprises Inc,2742 Distribution Way,New York,New York,NY,10025,212-860-1579,212-753-2740,asergi@gmail.com,http://www.milfordenterprisesinc.com
|
37 |
+
Solange,Shinko,"Mosocco, Ronald A",426 Wolf St,Metairie,Jefferson,LA,70002,504-979-9175,504-265-8174,solange@shinko.com,http://www.mosoccoronalda.com
|
38 |
+
Jose,Stockham,Tri State Refueler Co,128 Bransten Rd,New York,New York,NY,10011,212-675-8570,212-569-4233,jose@yahoo.com,http://www.tristaterefuelerco.com
|
39 |
+
Rozella,Ostrosky,Parkway Company,17 Morena Blvd,Camarillo,Ventura,CA,93012,805-832-6163,805-609-1531,rozella.ostrosky@ostrosky.com,http://www.parkwaycompany.com
|
40 |
+
Valentine,Gillian,Fbs Business Finance,775 W 17th St,San Antonio,Bexar,TX,78204,210-812-9597,210-300-6244,valentine_gillian@gmail.com,http://www.fbsbusinessfinance.com
|
41 |
+
Kati,Rulapaugh,Eder Assocs Consltng Engrs Pc,6980 Dorsett Rd,Abilene,Dickinson,KS,67410,785-463-7829,785-219-7724,kati.rulapaugh@hotmail.com,http://www.ederassocsconsltngengrspc.com
|
42 |
+
Youlanda,Schemmer,Tri M Tool Inc,2881 Lewis Rd,Prineville,Crook,OR,97754,541-548-8197,541-993-2611,youlanda@aol.com,http://www.trimtoolinc.com
|
43 |
+
Dyan,Oldroyd,International Eyelets Inc,7219 Woodfield Rd,Overland Park,Johnson,KS,66204,913-413-4604,913-645-8918,doldroyd@aol.com,http://www.internationaleyeletsinc.com
|
44 |
+
Roxane,Campain,Rapid Trading Intl,1048 Main St,Fairbanks,Fairbanks North Star,AK,99708,907-231-4722,907-335-6568,roxane@hotmail.com,http://www.rapidtradingintl.com
|
45 |
+
Lavera,Perin,Abc Enterprises Inc,678 3rd Ave,Miami,Miami-Dade,FL,33196,305-606-7291,305-995-2078,lperin@perin.org,http://www.abcenterprisesinc.com
|
46 |
+
Erick,Ferencz,Cindy Turner Associates,20 S Babcock St,Fairbanks,Fairbanks North Star,AK,99712,907-741-1044,907-227-6777,erick.ferencz@aol.com,http://www.cindyturnerassociates.com
|
47 |
+
Fatima,Saylors,"Stanton, James D Esq",2 Lighthouse Ave,Hopkins,Hennepin,MN,55343,952-768-2416,952-479-2375,fsaylors@saylors.org,http://www.stantonjamesdesq.com
|
48 |
+
Jina,Briddick,Grace Pastries Inc,38938 Park Blvd,Boston,Suffolk,MA,2128,617-399-5124,617-997-5771,jina_briddick@briddick.com,http://www.gracepastriesinc.com
|
49 |
+
Kanisha,Waycott,"Schroer, Gene E Esq",5 Tomahawk Dr,Los Angeles,Los Angeles,CA,90006,323-453-2780,323-315-7314,kanisha_waycott@yahoo.com,http://www.schroergeneeesq.com
|
50 |
+
Emerson,Bowley,Knights Inn,762 S Main St,Madison,Dane,WI,53711,608-336-7444,608-658-7940,emerson.bowley@bowley.org,http://www.knightsinn.com
|
51 |
+
Blair,Malet,Bollinger Mach Shp & Shipyard,209 Decker Dr,Philadelphia,Philadelphia,PA,19132,215-907-9111,215-794-4519,bmalet@yahoo.com,http://www.bollingermachshpshipyard.com
|
52 |
+
Brock,Bolognia,Orinda News,4486 W O St #1,New York,New York,NY,10003,212-402-9216,212-617-5063,bbolognia@yahoo.com,http://www.orindanews.com
|
53 |
+
Lorrie,Nestle,Ballard Spahr Andrews,39 S 7th St,Tullahoma,Coffee,TN,37388,931-875-6644,931-303-6041,lnestle@hotmail.com,http://www.ballardspahrandrews.com
|
54 |
+
Sabra,Uyetake,Lowy Limousine Service,98839 Hawthorne Blvd #6101,Columbia,Richland,SC,29201,803-925-5213,803-681-3678,sabra@uyetake.org,http://www.lowylimousineservice.com
|
55 |
+
Marjory,Mastella,Vicon Corporation,71 San Mateo Ave,Wayne,Delaware,PA,19087,610-814-5533,610-379-7125,mmastella@mastella.com,http://www.viconcorporation.com
|
56 |
+
Karl,Klonowski,"Rossi, Michael M",76 Brooks St #9,Flemington,Hunterdon,NJ,8822,908-877-6135,908-470-4661,karl_klonowski@yahoo.com,http://www.rossimichaelm.com
|
57 |
+
Tonette,Wenner,Northwest Publishing,4545 Courthouse Rd,Westbury,Nassau,NY,11590,516-968-6051,516-333-4861,twenner@aol.com,http://www.northwestpublishing.com
|
58 |
+
Amber,Monarrez,Branford Wire & Mfg Co,14288 Foster Ave #4121,Jenkintown,Montgomery,PA,19046,215-934-8655,215-329-6386,amber_monarrez@monarrez.org,http://www.branfordwiremfgco.com
|
59 |
+
Shenika,Seewald,East Coast Marketing,4 Otis St,Van Nuys,Los Angeles,CA,91405,818-423-4007,818-749-8650,shenika@gmail.com,http://www.eastcoastmarketing.com
|
60 |
+
Delmy,Ahle,Wye Technologies Inc,65895 S 16th St,Providence,Providence,RI,2909,401-458-2547,401-559-8961,delmy.ahle@hotmail.com,http://www.wyetechnologiesinc.com
|
61 |
+
Deeanna,Juhas,"Healy, George W Iv",14302 Pennsylvania Ave,Huntingdon Valley,Montgomery,PA,19006,215-211-9589,215-417-9563,deeanna_juhas@gmail.com,http://www.healygeorgewiv.com
|
62 |
+
Blondell,Pugh,Alpenlite Inc,201 Hawk Ct,Providence,Providence,RI,2904,401-960-8259,401-300-8122,bpugh@aol.com,http://www.alpenliteinc.com
|
63 |
+
Jamal,Vanausdal,"Hubbard, Bruce Esq",53075 Sw 152nd Ter #615,Monroe Township,Middlesex,NJ,8831,732-234-1546,732-904-2931,jamal@vanausdal.org,http://www.hubbardbruceesq.com
|
64 |
+
Cecily,Hollack,Arthur A Oliver & Son Inc,59 N Groesbeck Hwy,Austin,Travis,TX,78731,512-486-3817,512-861-3814,cecily@hollack.org,http://www.arthuraoliversoninc.com
|
65 |
+
Carmelina,Lindall,George Jessop Carter Jewelers,2664 Lewis Rd,Littleton,Douglas,CO,80126,303-724-7371,303-874-5160,carmelina_lindall@lindall.com,http://www.georgejessopcarterjewelers.com
|
66 |
+
Maurine,Yglesias,"Schultz, Thomas C Md",59 Shady Ln #53,Milwaukee,Milwaukee,WI,53214,414-748-1374,414-573-7719,maurine_yglesias@yglesias.com,http://www.schultzthomascmd.com
|
67 |
+
Tawna,Buvens,H H H Enterprises Inc,3305 Nabell Ave #679,New York,New York,NY,10009,212-674-9610,212-462-9157,tawna@gmail.com,http://www.hhhenterprisesinc.com
|
68 |
+
Penney,Weight,Hawaiian King Hotel,18 Fountain St,Anchorage,Anchorage,AK,99515,907-797-9628,907-873-2882,penney_weight@aol.com,http://www.hawaiiankinghotel.com
|
69 |
+
Elly,Morocco,Killion Industries,7 W 32nd St,Erie,Erie,PA,16502,814-393-5571,814-420-3553,elly_morocco@gmail.com,http://www.killionindustries.com
|
70 |
+
Ilene,Eroman,"Robinson, William J Esq",2853 S Central Expy,Glen Burnie,Anne Arundel,MD,21061,410-914-9018,410-937-4543,ilene.eroman@hotmail.com,http://www.robinsonwilliamjesq.com
|
71 |
+
Vallie,Mondella,Private Properties,74 W College St,Boise,Ada,ID,83707,208-862-5339,208-737-8439,vmondella@mondella.com,http://www.privateproperties.com
|
72 |
+
Kallie,Blackwood,Rowley Schlimgen Inc,701 S Harrison Rd,San Francisco,San Francisco,CA,94104,415-315-2761,415-604-7609,kallie.blackwood@gmail.com,http://www.rowleyschlimgeninc.com
|
73 |
+
Johnetta,Abdallah,Forging Specialties,1088 Pinehurst St,Chapel Hill,Orange,NC,27514,919-225-9345,919-715-3791,johnetta_abdallah@aol.com,http://www.forgingspecialties.com
|
74 |
+
Bobbye,Rhym,"Smits, Patricia Garity",30 W 80th St #1995,San Carlos,San Mateo,CA,94070,650-528-5783,650-811-9032,brhym@rhym.com,http://www.smitspatriciagarity.com
|
75 |
+
Micaela,Rhymes,H Lee Leonard Attorney At Law,20932 Hedley St,Concord,Contra Costa,CA,94520,925-647-3298,925-522-7798,micaela_rhymes@gmail.com,http://www.hleeleonardattorneyatlaw.com
|
76 |
+
Tamar,Hoogland,A K Construction Co,2737 Pistorio Rd #9230,London,Madison,OH,43140,740-343-8575,740-526-5410,tamar@hotmail.com,http://www.akconstructionco.com
|
77 |
+
Moon,Parlato,"Ambelang, Jessica M Md",74989 Brandon St,Wellsville,Allegany,NY,14895,585-866-8313,585-498-4278,moon@yahoo.com,http://www.ambelangjessicammd.com
|
78 |
+
Laurel,Reitler,Q A Service,6 Kains Ave,Baltimore,Baltimore City,MD,21215,410-520-4832,410-957-6903,laurel_reitler@reitler.com,http://www.qaservice.com
|
79 |
+
Delisa,Crupi,Wood & Whitacre Contractors,47565 W Grand Ave,Newark,Essex,NJ,7105,973-354-2040,973-847-9611,delisa.crupi@crupi.com,http://www.woodwhitacrecontractors.com
|
80 |
+
Viva,Toelkes,Mark Iv Press Ltd,4284 Dorigo Ln,Chicago,Cook,IL,60647,773-446-5569,773-352-3437,viva.toelkes@gmail.com,http://www.markivpressltd.com
|
81 |
+
Elza,Lipke,Museum Of Science & Industry,6794 Lake Dr E,Newark,Essex,NJ,7104,973-927-3447,973-796-3667,elza@yahoo.com,http://www.museumofscienceindustry.com
|
82 |
+
Devorah,Chickering,Garrison Ind,31 Douglas Blvd #950,Clovis,Curry,NM,88101,505-975-8559,505-950-1763,devorah@hotmail.com,http://www.garrisonind.com
|
83 |
+
Timothy,Mulqueen,Saronix Nymph Products,44 W 4th St,Staten Island,Richmond,NY,10309,718-332-6527,718-654-7063,timothy_mulqueen@mulqueen.org,http://www.saronixnymphproducts.com
|
84 |
+
Arlette,Honeywell,Smc Inc,11279 Loytan St,Jacksonville,Duval,FL,32254,904-775-4480,904-514-9918,ahoneywell@honeywell.com,http://www.smcinc.com
|
85 |
+
Dominque,Dickerson,E A I Electronic Assocs Inc,69 Marquette Ave,Hayward,Alameda,CA,94545,510-993-3758,510-901-7640,dominque.dickerson@dickerson.org,http://www.eaielectronicassocsinc.com
|
86 |
+
Lettie,Isenhower,"Conte, Christopher A Esq",70 W Main St,Beachwood,Cuyahoga,OH,44122,216-657-7668,216-733-8494,lettie_isenhower@yahoo.com,http://www.contechristopheraesq.com
|
87 |
+
Myra,Munns,Anker Law Office,461 Prospect Pl #316,Euless,Tarrant,TX,76040,817-914-7518,817-451-3518,mmunns@cox.net,http://www.ankerlawoffice.com
|
88 |
+
Stephaine,Barfield,Beutelschies & Company,47154 Whipple Ave Nw,Gardena,Los Angeles,CA,90247,310-774-7643,310-968-1219,stephaine@barfield.com,http://www.beutelschiescompany.com
|
89 |
+
Lai,Gato,"Fligg, Kenneth I Jr",37 Alabama Ave,Evanston,Cook,IL,60201,847-728-7286,847-957-4614,lai.gato@gato.org,http://www.fliggkennethijr.com
|
90 |
+
Stephen,Emigh,"Sharp, J Daniel Esq",3777 E Richmond St #900,Akron,Summit,OH,44302,330-537-5358,330-700-2312,stephen_emigh@hotmail.com,http://www.sharpjdanielesq.com
|
91 |
+
Tyra,Shields,"Assink, Anne H Esq",3 Fort Worth Ave,Philadelphia,Philadelphia,PA,19106,215-255-1641,215-228-8264,tshields@gmail.com,http://www.assinkannehesq.com
|
92 |
+
Tammara,Wardrip,Jewel My Shop Inc,4800 Black Horse Pike,Burlingame,San Mateo,CA,94010,650-803-1936,650-216-5075,twardrip@cox.net,http://www.jewelmyshopinc.com
|
93 |
+
Cory,Gibes,Chinese Translation Resources,83649 W Belmont Ave,San Gabriel,Los Angeles,CA,91776,626-572-1096,626-696-2777,cory.gibes@gmail.com,http://www.chinesetranslationresources.com
|
94 |
+
Danica,Bruschke,"Stevens, Charles T",840 15th Ave,Waco,McLennan,TX,76708,254-782-8569,254-205-1422,danica_bruschke@gmail.com,http://www.stevenscharlest.com
|
95 |
+
Wilda,Giguere,"Mclaughlin, Luther W Cpa",1747 Calle Amanecer #2,Anchorage,Anchorage,AK,99501,907-870-5536,907-914-9482,wilda@cox.net,http://www.mclaughlinlutherwcpa.com
|
96 |
+
Elvera,Benimadho,Tree Musketeers,99385 Charity St #840,San Jose,Santa Clara,CA,95110,408-703-8505,408-440-8447,elvera.benimadho@cox.net,http://www.treemusketeers.com
|
97 |
+
Carma,Vanheusen,Springfield Div Oh Edison Co,68556 Central Hwy,San Leandro,Alameda,CA,94577,510-503-7169,510-452-4835,carma@cox.net,http://www.springfielddivohedisonco.com
|
98 |
+
Malinda,Hochard,Logan Memorial Hospital,55 Riverside Ave,Indianapolis,Marion,IN,46202,317-722-5066,317-472-2412,malinda.hochard@yahoo.com,http://www.loganmemorialhospital.com
|
99 |
+
Natalie,Fern,"Kelly, Charles G Esq",7140 University Ave,Rock Springs,Sweetwater,WY,82901,307-704-8713,307-279-3793,natalie.fern@hotmail.com,http://www.kellycharlesgesq.com
|
100 |
+
Lisha,Centini,Industrial Paper Shredders Inc,64 5th Ave #1153,Mc Lean,Fairfax,VA,22102,703-235-3937,703-475-7568,lisha@centini.org,http://www.industrialpapershreddersinc.com
|
101 |
+
Arlene,Klusman,Beck Horizon Builders,3 Secor Rd,New Orleans,Orleans,LA,70112,504-710-5840,504-946-1807,arlene_klusman@gmail.com,http://www.beckhorizonbuilders.com
|
102 |
+
Alease,Buemi,Porto Cayo At Hawks Cay,4 Webbs Chapel Rd,Boulder,Boulder,CO,80303,303-301-4946,303-521-9860,alease@buemi.com,http://www.portocayoathawkscay.com
|
103 |
+
Louisa,Cronauer,Pacific Grove Museum Ntrl Hist,524 Louisiana Ave Nw,San Leandro,Alameda,CA,94577,510-828-7047,510-472-7758,louisa@cronauer.com,http://www.pacificgrovemuseumntrlhist.com
|
104 |
+
Angella,Cetta,Bender & Hatley Pc,185 Blackstone Bldge,Honolulu,Honolulu,HI,96817,808-892-7943,808-475-2310,angella.cetta@hotmail.com,http://www.benderhatleypc.com
|
105 |
+
Cyndy,Goldammer,Di Cristina J & Son,170 Wyoming Ave,Burnsville,Dakota,MN,55337,952-334-9408,952-938-9457,cgoldammer@cox.net,http://www.dicristinajson.com
|
106 |
+
Rosio,Cork,Green Goddess,4 10th St W,High Point,Guilford,NC,27263,336-243-5659,336-497-4407,rosio.cork@gmail.com,http://www.greengoddess.com
|
107 |
+
Celeste,Korando,American Arts & Graphics,7 W Pinhook Rd,Lynbrook,Nassau,NY,11563,516-509-2347,516-365-7266,ckorando@hotmail.com,http://www.americanartsgraphics.com
|
108 |
+
Twana,Felger,Opryland Hotel,1 Commerce Way,Portland,Washington,OR,97224,503-939-3153,503-909-7167,twana.felger@felger.org,http://www.oprylandhotel.com
|
109 |
+
Estrella,Samu,Marking Devices Pubg Co,64 Lakeview Ave,Beloit,Rock,WI,53511,608-976-7199,608-942-8836,estrella@aol.com,http://www.markingdevicespubgco.com
|
110 |
+
Donte,Kines,W Tc Industries Inc,3 Aspen St,Worcester,Worcester,MA,1602,508-429-8576,508-843-1426,dkines@hotmail.com,http://www.wtcindustriesinc.com
|
111 |
+
Tiffiny,Steffensmeier,Whitehall Robbins Labs Divsn,32860 Sierra Rd,Miami,Miami-Dade,FL,33133,305-385-9695,305-304-6573,tiffiny_steffensmeier@cox.net,http://www.whitehallrobbinslabsdivsn.com
|
112 |
+
Edna,Miceli,Sampler,555 Main St,Erie,Erie,PA,16502,814-460-2655,814-299-2877,emiceli@miceli.org,http://www.sampler.com
|
113 |
+
Sue,Kownacki,Juno Chefs Incorporated,2 Se 3rd Ave,Mesquite,Dallas,TX,75149,972-666-3413,972-742-4000,sue@aol.com,http://www.junochefsincorporated.com
|
114 |
+
Jesusa,Shin,"Carroccio, A Thomas Esq",2239 Shawnee Mission Pky,Tullahoma,Coffee,TN,37388,931-273-8709,931-739-1551,jshin@shin.com,http://www.carroccioathomasesq.com
|
115 |
+
Rolland,Francescon,"Stanley, Richard L Esq",2726 Charcot Ave,Paterson,Passaic,NJ,7501,973-649-2922,973-284-4048,rolland@cox.net,http://www.stanleyrichardlesq.com
|
116 |
+
Pamella,Schmierer,K Cs Cstm Mouldings Windows,5161 Dorsett Rd,Homestead,Miami-Dade,FL,33030,305-420-8970,305-575-8481,pamella.schmierer@schmierer.org,http://www.kcscstmmouldingswindows.com
|
117 |
+
Glory,Kulzer,Comfort Inn,55892 Jacksonville Rd,Owings Mills,Baltimore,MD,21117,410-224-9462,410-916-8015,gkulzer@kulzer.org,http://www.comfortinn.com
|
118 |
+
Shawna,Palaspas,"Windsor, James L Esq",5 N Cleveland Massillon Rd,Thousand Oaks,Ventura,CA,91362,805-275-3566,805-638-6617,shawna_palaspas@palaspas.org,http://www.windsorjameslesq.com
|
119 |
+
Brandon,Callaro,Jackson Shields Yeiser,7 Benton Dr,Honolulu,Honolulu,HI,96819,808-215-6832,808-240-5168,brandon_callaro@hotmail.com,http://www.jacksonshieldsyeiser.com
|
120 |
+
Scarlet,Cartan,"Box, J Calvin Esq",9390 S Howell Ave,Albany,Dougherty,GA,31701,229-735-3378,229-365-9658,scarlet.cartan@yahoo.com,http://www.boxjcalvinesq.com
|
121 |
+
Oretha,Menter,Custom Engineering Inc,8 County Center Dr #647,Boston,Suffolk,MA,2210,617-418-5043,617-697-6024,oretha_menter@yahoo.com,http://www.customengineeringinc.com
|
122 |
+
Ty,Smith,Bresler Eitel Framg Gllry Ltd,4646 Kaahumanu St,Hackensack,Bergen,NJ,7601,201-672-1553,201-995-3149,tsmith@aol.com,http://www.breslereitelframggllryltd.com
|
123 |
+
Xuan,Rochin,"Carol, Drake Sparks Esq",2 Monroe St,San Mateo,San Mateo,CA,94403,650-933-5072,650-247-2625,xuan@gmail.com,http://www.caroldrakesparksesq.com
|
124 |
+
Lindsey,Dilello,Biltmore Investors Bank,52777 Leaders Heights Rd,Ontario,San Bernardino,CA,91761,909-639-9887,909-589-1693,lindsey.dilello@hotmail.com,http://www.biltmoreinvestorsbank.com
|
125 |
+
Devora,Perez,Desco Equipment Corp,72868 Blackington Ave,Oakland,Alameda,CA,94606,510-955-3016,510-755-9274,devora_perez@perez.org,http://www.descoequipmentcorp.com
|
126 |
+
Herman,Demesa,Merlin Electric Co,9 Norristown Rd,Troy,Rensselaer,NY,12180,518-497-2940,518-931-7852,hdemesa@cox.net,http://www.merlinelectricco.com
|
127 |
+
Rory,Papasergi,Bailey Cntl Co Div Babcock,83 County Road 437 #8581,Clarks Summit,Lackawanna,PA,18411,570-867-7489,570-469-8401,rpapasergi@cox.net,http://www.baileycntlcodivbabcock.com
|
128 |
+
Talia,Riopelle,Ford Brothers Wholesale Inc,1 N Harlem Ave #9,Orange,Essex,NJ,7050,973-245-2133,973-818-9788,talia_riopelle@aol.com,http://www.fordbrotherswholesaleinc.com
|
129 |
+
Van,Shire,Cambridge Inn,90131 J St,Pittstown,Hunterdon,NJ,8867,908-409-2890,908-448-1209,van.shire@shire.com,http://www.cambridgeinn.com
|
130 |
+
Lucina,Lary,"Matricciani, Albert J Jr",8597 W National Ave,Cocoa,Brevard,FL,32922,321-749-4981,321-632-4668,lucina_lary@cox.net,http://www.matriccianialbertjjr.com
|
131 |
+
Bok,Isaacs,Nelson Hawaiian Ltd,6 Gilson St,Bronx,Bronx,NY,10468,718-809-3762,718-478-8568,bok.isaacs@aol.com,http://www.nelsonhawaiianltd.com
|
132 |
+
Rolande,Spickerman,Neland Travel Agency,65 W Maple Ave,Pearl City,Honolulu,HI,96782,808-315-3077,808-526-5863,rolande.spickerman@spickerman.com,http://www.nelandtravelagency.com
|
133 |
+
Howard,Paulas,"Asendorf, J Alan Esq",866 34th Ave,Denver,Denver,CO,80231,303-623-4241,303-692-3118,hpaulas@gmail.com,http://www.asendorfjalanesq.com
|
134 |
+
Kimbery,Madarang,"Silberman, Arthur L Esq",798 Lund Farm Way,Rockaway,Morris,NJ,7866,973-310-1634,973-225-6259,kimbery_madarang@cox.net,http://www.silbermanarthurlesq.com
|
135 |
+
Thurman,Manno,Honey Bee Breeding Genetics &,9387 Charcot Ave,Absecon,Atlantic,NJ,8201,609-524-3586,609-234-8376,thurman.manno@yahoo.com,http://www.honeybeebreedinggenetics.com
|
136 |
+
Becky,Mirafuentes,Wells Kravitz Schnitzer,30553 Washington Rd,Plainfield,Union,NJ,7062,908-877-8409,908-426-8272,becky.mirafuentes@mirafuentes.com,http://www.wellskravitzschnitzer.com
|
137 |
+
Beatriz,Corrington,Prohab Rehabilitation Servs,481 W Lemon St,Middleboro,Plymouth,MA,2346,508-584-4279,508-315-3867,beatriz@yahoo.com,http://www.prohabrehabilitationservs.com
|
138 |
+
Marti,Maybury,"Eldridge, Kristin K Esq",4 Warehouse Point Rd #7,Chicago,Cook,IL,60638,773-775-4522,773-539-1058,marti.maybury@yahoo.com,http://www.eldridgekristinkesq.com
|
139 |
+
Nieves,Gotter,"Vlahos, John J Esq",4940 Pulaski Park Dr,Portland,Multnomah,OR,97202,503-527-5274,503-455-3094,nieves_gotter@gmail.com,http://www.vlahosjohnjesq.com
|
140 |
+
Leatha,Hagele,Ninas Indian Grs & Videos,627 Walford Ave,Dallas,Dallas,TX,75227,214-339-1809,214-225-5850,lhagele@cox.net,http://www.ninasindiangrsvideos.com
|
141 |
+
Valentin,Klimek,"Schmid, Gayanne K Esq",137 Pioneer Way,Chicago,Cook,IL,60604,312-303-5453,312-512-2338,vklimek@klimek.org,http://www.schmidgayannekesq.com
|
142 |
+
Melissa,Wiklund,Moapa Valley Federal Credit Un,61 13 Stoneridge #835,Findlay,Hancock,OH,45840,419-939-3613,419-254-4591,melissa@cox.net,http://www.moapavalleyfederalcreditun.com
|
143 |
+
Sheridan,Zane,Kentucky Tennessee Clay Co,2409 Alabama Rd,Riverside,Riverside,CA,92501,951-645-3605,951-248-6822,sheridan.zane@zane.com,http://www.kentuckytennesseeclayco.com
|
144 |
+
Bulah,Padilla,Admiral Party Rentals & Sales,8927 Vandever Ave,Waco,McLennan,TX,76707,254-463-4368,254-816-8417,bulah_padilla@hotmail.com,http://www.admiralpartyrentalssales.com
|
145 |
+
Audra,Kohnert,"Nelson, Karolyn King Esq",134 Lewis Rd,Nashville,Davidson,TN,37211,615-406-7854,615-448-9249,audra@kohnert.com,http://www.nelsonkarolynkingesq.com
|
146 |
+
Daren,Weirather,Panasystems,9 N College Ave #3,Milwaukee,Milwaukee,WI,53216,414-959-2540,414-838-3151,dweirather@aol.com,http://www.panasystems.com
|
147 |
+
Fernanda,Jillson,"Shank, Edward L Esq",60480 Old Us Highway 51,Preston,Caroline,MD,21655,410-387-5260,410-724-6472,fjillson@aol.com,http://www.shankedwardlesq.com
|
148 |
+
Gearldine,Gellinger,Megibow & Edwards,4 Bloomfield Ave,Irving,Dallas,TX,75061,972-934-6914,972-821-7118,gearldine_gellinger@gellinger.com,http://www.megibowedwards.com
|
149 |
+
Chau,Kitzman,"Benoff, Edward Esq",429 Tiger Ln,Beverly Hills,Los Angeles,CA,90212,310-560-8022,310-969-7230,chau@gmail.com,http://www.benoffedwardesq.com
|
150 |
+
Theola,Frey,Woodbridge Free Public Library,54169 N Main St,Massapequa,Nassau,NY,11758,516-948-5768,516-357-3362,theola_frey@frey.com,http://www.woodbridgefreepubliclibrary.com
|
151 |
+
Cheryl,Haroldson,New York Life John Thune,92 Main St,Atlantic City,Atlantic,NJ,8401,609-518-7697,609-263-9243,cheryl@haroldson.org,http://www.newyorklifejohnthune.com
|
152 |
+
Laticia,Merced,Alinabal Inc,72 Mannix Dr,Cincinnati,Hamilton,OH,45203,513-508-7371,513-418-1566,lmerced@gmail.com,http://www.alinabalinc.com
|
153 |
+
Carissa,Batman,"Poletto, Kim David Esq",12270 Caton Center Dr,Eugene,Lane,OR,97401,541-326-4074,541-801-5717,carissa.batman@yahoo.com,http://www.polettokimdavidesq.com
|
154 |
+
Lezlie,Craghead,"Chang, Carolyn Esq",749 W 18th St #45,Smithfield,Johnston,NC,27577,919-533-3762,919-885-2453,lezlie.craghead@craghead.org,http://www.changcarolynesq.com
|
155 |
+
Ozell,Shealy,Silver Bros Inc,8 Industry Ln,New York,New York,NY,10002,212-332-8435,212-880-8865,oshealy@hotmail.com,http://www.silverbrosinc.com
|
156 |
+
Arminda,Parvis,Newtec Inc,1 Huntwood Ave,Phoenix,Maricopa,AZ,85017,602-906-9419,602-277-3025,arminda@parvis.com,http://www.newtecinc.com
|
157 |
+
Reita,Leto,Creative Business Systems,55262 N French Rd,Indianapolis,Marion,IN,46240,317-234-1135,317-787-5514,reita.leto@gmail.com,http://www.creativebusinesssystems.com
|
158 |
+
Yolando,Luczki,Dal Tile Corporation,422 E 21st St,Syracuse,Onondaga,NY,13214,315-304-4759,315-640-6357,yolando@cox.net,http://www.daltilecorporation.com
|
159 |
+
Lizette,Stem,Edward S Katz,501 N 19th Ave,Cherry Hill,Camden,NJ,8002,856-487-5412,856-702-3676,lizette.stem@aol.com,http://www.edwardskatz.com
|
160 |
+
Gregoria,Pawlowicz,Oh My Goodknits Inc,455 N Main Ave,Garden City,Nassau,NY,11530,516-212-1915,516-376-4230,gpawlowicz@yahoo.com,http://www.ohmygoodknitsinc.com
|
161 |
+
Carin,Deleo,"Redeker, Debbie",1844 Southern Blvd,Little Rock,Pulaski,AR,72202,501-308-1040,501-409-6072,cdeleo@deleo.com,http://www.redekerdebbie.com
|
162 |
+
Chantell,Maynerich,Desert Sands Motel,2023 Greg St,Saint Paul,Ramsey,MN,55101,651-591-2583,651-776-9688,chantell@yahoo.com,http://www.desertsandsmotel.com
|
163 |
+
Dierdre,Yum,Cummins Southern Plains Inc,63381 Jenks Ave,Philadelphia,Philadelphia,PA,19134,215-325-3042,215-346-4666,dyum@yahoo.com,http://www.cumminssouthernplainsinc.com
|
164 |
+
Larae,Gudroe,Lehigh Furn Divsn Lehigh,6651 Municipal Rd,Houma,Terrebonne,LA,70360,985-890-7262,985-261-5783,larae_gudroe@gmail.com,http://www.lehighfurndivsnlehigh.com
|
165 |
+
Latrice,Tolfree,United Van Lines Agent,81 Norris Ave #525,Ronkonkoma,Suffolk,NY,11779,631-957-7624,631-998-2102,latrice.tolfree@hotmail.com,http://www.unitedvanlinesagent.com
|
166 |
+
Kerry,Theodorov,Capitol Reporters,6916 W Main St,Sacramento,Sacramento,CA,95827,916-591-3277,916-770-7448,kerry.theodorov@gmail.com,http://www.capitolreporters.com
|
167 |
+
Dorthy,Hidvegi,Kwik Kopy Printing,9635 S Main St,Boise,Ada,ID,83704,208-649-2373,208-690-3315,dhidvegi@yahoo.com,http://www.kwikkopyprinting.com
|
168 |
+
Fannie,Lungren,Centro Inc,17 Us Highway 111,Round Rock,Williamson,TX,78664,512-587-5746,512-528-9933,fannie.lungren@yahoo.com,http://www.centroinc.com
|
169 |
+
Evangelina,Radde,"Campbell, Jan Esq",992 Civic Center Dr,Philadelphia,Philadelphia,PA,19123,215-964-3284,215-417-5612,evangelina@aol.com,http://www.campbelljanesq.com
|
170 |
+
Novella,Degroot,"Evans, C Kelly Esq",303 N Radcliffe St,Hilo,Hawaii,HI,96720,808-477-4775,808-746-1865,novella_degroot@degroot.org,http://www.evansckellyesq.com
|
171 |
+
Clay,Hoa,Scat Enterprises,73 Saint Ann St #86,Reno,Washoe,NV,89502,775-501-8109,775-848-9135,choa@hoa.org,http://www.scatenterprises.com
|
172 |
+
Jennifer,Fallick,"Nagle, Daniel J Esq",44 58th St,Wheeling,Cook,IL,60090,847-979-9545,847-800-3054,jfallick@yahoo.com,http://www.nagledanieljesq.com
|
173 |
+
Irma,Wolfgramm,Serendiquity Bed & Breakfast,9745 W Main St,Randolph,Morris,NJ,7869,973-545-7355,973-868-8660,irma.wolfgramm@hotmail.com,http://www.serendiquitybedbreakfast.com
|
174 |
+
Eun,Coody,Ray Carolyne Realty,84 Bloomfield Ave,Spartanburg,Spartanburg,SC,29301,864-256-3620,864-594-4578,eun@yahoo.com,http://www.raycarolynerealty.com
|
175 |
+
Sylvia,Cousey,"Berg, Charles E",287 Youngstown Warren Rd,Hampstead,Carroll,MD,21074,410-209-9545,410-863-8263,sylvia_cousey@cousey.org,http://www.bergcharlese.com
|
176 |
+
Nana,Wrinkles,"Ray, Milbern D",6 Van Buren St,Mount Vernon,Westchester,NY,10553,914-855-2115,914-796-3775,nana@aol.com,http://www.raymilbernd.com
|
177 |
+
Layla,Springe,Chadds Ford Winery,229 N Forty Driv,New York,New York,NY,10011,212-260-3151,212-253-7448,layla.springe@cox.net,http://www.chaddsfordwinery.com
|
178 |
+
Joesph,Degonia,A R Packaging,2887 Knowlton St #5435,Berkeley,Alameda,CA,94710,510-677-9785,510-942-5916,joesph_degonia@degonia.org,http://www.arpackaging.com
|
179 |
+
Annabelle,Boord,Corn Popper,523 Marquette Ave,Concord,Middlesex,MA,1742,978-697-6263,978-289-7717,annabelle.boord@cox.net,http://www.cornpopper.com
|
180 |
+
Stephaine,Vinning,Birite Foodservice Distr,3717 Hamann Industrial Pky,San Francisco,San Francisco,CA,94104,415-767-6596,415-712-9530,stephaine@cox.net,http://www.biritefoodservicedistr.com
|
181 |
+
Nelida,Sawchuk,Anchorage Museum Of Hist & Art,3 State Route 35 S,Paramus,Bergen,NJ,7652,201-971-1638,201-247-8925,nelida@gmail.com,http://www.anchoragemuseumofhistart.com
|
182 |
+
Marguerita,Hiatt,"Haber, George D Md",82 N Highway 67,Oakley,Contra Costa,CA,94561,925-634-7158,925-541-8521,marguerita.hiatt@gmail.com,http://www.habergeorgedmd.com
|
183 |
+
Carmela,Cookey,Royal Pontiac Olds Inc,9 Murfreesboro Rd,Chicago,Cook,IL,60623,773-494-4195,773-297-9391,ccookey@cookey.org,http://www.royalpontiacoldsinc.com
|
184 |
+
Junita,Brideau,Leonards Antiques Inc,6 S Broadway St,Cedar Grove,Essex,NJ,7009,973-943-3423,973-582-5469,jbrideau@aol.com,http://www.leonardsantiquesinc.com
|
185 |
+
Claribel,Varriano,Meca,6 Harry L Dr #6327,Perrysburg,Wood,OH,43551,419-544-4900,419-573-2033,claribel_varriano@cox.net,http://www.meca.com
|
186 |
+
Benton,Skursky,Nercon Engineering & Mfg Inc,47939 Porter Ave,Gardena,Los Angeles,CA,90248,310-579-2907,310-694-8466,benton.skursky@aol.com,http://www.nerconengineeringmfginc.com
|
187 |
+
Hillary,Skulski,Replica I,9 Wales Rd Ne #914,Homosassa,Citrus,FL,34448,352-242-2570,352-990-5946,hillary.skulski@aol.com,http://www.replicai.com
|
188 |
+
Merilyn,Bayless,20 20 Printing Inc,195 13n N,Santa Clara,Santa Clara,CA,95054,408-758-5015,408-346-2180,merilyn_bayless@cox.net,http://www.printinginc.com
|
189 |
+
Teri,Ennaco,Publishers Group West,99 Tank Farm Rd,Hazleton,Luzerne,PA,18201,570-889-5187,570-355-1665,tennaco@gmail.com,http://www.publishersgroupwest.com
|
190 |
+
Merlyn,Lawler,"Nischwitz, Jeffrey L Esq",4671 Alemany Blvd,Jersey City,Hudson,NJ,7304,201-588-7810,201-858-9960,merlyn_lawler@hotmail.com,http://www.nischwitzjeffreylesq.com
|
191 |
+
Georgene,Montezuma,Payne Blades & Wellborn Pa,98 University Dr,San Ramon,Contra Costa,CA,94583,925-615-5185,925-943-3449,gmontezuma@cox.net,http://www.paynebladeswellbornpa.com
|
192 |
+
Jettie,Mconnell,Coldwell Bnkr Wright Real Est,50 E Wacker Dr,Bridgewater,Somerset,NJ,8807,908-802-3564,908-602-5258,jmconnell@hotmail.com,http://www.coldwellbnkrwrightrealest.com
|
193 |
+
Lemuel,Latzke,Computer Repair Service,70 Euclid Ave #722,Bohemia,Suffolk,NY,11716,631-748-6479,631-291-4976,lemuel.latzke@gmail.com,http://www.computerrepairservice.com
|
194 |
+
Melodie,Knipp,Fleetwood Building Block Inc,326 E Main St #6496,Thousand Oaks,Ventura,CA,91362,805-690-1682,805-810-8964,mknipp@gmail.com,http://www.fleetwoodbuildingblockinc.com
|
195 |
+
Candida,Corbley,Colts Neck Medical Assocs Inc,406 Main St,Somerville,Somerset,NJ,8876,908-275-8357,908-943-6103,candida_corbley@hotmail.com,http://www.coltsneckmedicalassocsinc.com
|
196 |
+
Karan,Karpin,New England Taxidermy,3 Elmwood Dr,Beaverton,Washington,OR,97005,503-940-8327,503-707-5812,karan_karpin@gmail.com,http://www.newenglandtaxidermy.com
|
197 |
+
Andra,Scheyer,"Ludcke, George O Esq",9 Church St,Salem,Marion,OR,97302,503-516-2189,503-950-3068,andra@gmail.com,http://www.ludckegeorgeoesq.com
|
198 |
+
Felicidad,Poullion,"Mccorkle, Tom S Esq",9939 N 14th St,Riverton,Burlington,NJ,8077,856-305-9731,856-828-6021,fpoullion@poullion.com,http://www.mccorkletomsesq.com
|
199 |
+
Belen,Strassner,Eagle Software Inc,5384 Southwyck Blvd,Douglasville,Douglas,GA,30135,770-507-8791,770-802-4003,belen_strassner@aol.com,http://www.eaglesoftwareinc.com
|
200 |
+
Gracia,Melnyk,Juvenile & Adult Super,97 Airport Loop Dr,Jacksonville,Duval,FL,32216,904-235-3633,904-627-4341,gracia@melnyk.com,http://www.juvenileadultsuper.com
|
201 |
+
Jolanda,Hanafan,"Perez, Joseph J Esq",37855 Nolan Rd,Bangor,Penobscot,ME,4401,207-458-9196,207-233-6185,jhanafan@gmail.com,http://www.perezjosephjesq.com
|
202 |
+
Barrett,Toyama,Case Foundation Co,4252 N Washington Ave #9,Kennedale,Tarrant,TX,76060,817-765-5781,817-577-6151,barrett.toyama@toyama.org,http://www.casefoundationco.com
|
203 |
+
Helga,Fredicks,Eis Environmental Engrs Inc,42754 S Ash Ave,Buffalo,Erie,NY,14228,716-752-4114,716-854-9845,helga_fredicks@yahoo.com,http://www.eisenvironmentalengrsinc.com
|
204 |
+
Ashlyn,Pinilla,Art Crafters,703 Beville Rd,Opa Locka,Miami-Dade,FL,33054,305-670-9628,305-857-5489,apinilla@cox.net,http://www.artcrafters.com
|
205 |
+
Fausto,Agramonte,Marriott Hotels Resorts Suites,5 Harrison Rd,New York,New York,NY,10038,212-313-1783,212-778-3063,fausto_agramonte@yahoo.com,http://www.marriotthotelsresortssuites.com
|
206 |
+
Ronny,Caiafa,Remaco Inc,73 Southern Blvd,Philadelphia,Philadelphia,PA,19103,215-605-7570,215-511-3531,ronny.caiafa@caiafa.org,http://www.remacoinc.com
|
207 |
+
Marge,Limmel,"Bjork, Robert D Jr",189 Village Park Rd,Crestview,Okaloosa,FL,32536,850-430-1663,850-330-8079,marge@gmail.com,http://www.bjorkrobertdjr.com
|
208 |
+
Norah,Waymire,"Carmichael, Jeffery L Esq",6 Middlegate Rd #106,San Francisco,San Francisco,CA,94107,415-306-7897,415-874-2984,norah.waymire@gmail.com,http://www.carmichaeljefferylesq.com
|
209 |
+
Aliza,Baltimore,"Andrews, J Robert Esq",1128 Delaware St,San Jose,Santa Clara,CA,95132,408-504-3552,408-425-1994,aliza@aol.com,http://www.andrewsjrobertesq.com
|
210 |
+
Mozell,Pelkowski,Winship & Byrne,577 Parade St,South San Francisco,San Mateo,CA,94080,650-947-1215,650-960-1069,mpelkowski@pelkowski.org,http://www.winshipbyrne.com
|
211 |
+
Viola,Bitsuie,Burton & Davis,70 Mechanic St,Northridge,Los Angeles,CA,91325,818-864-4875,818-481-5787,viola@gmail.com,http://www.burtondavis.com
|
212 |
+
Franklyn,Emard,Olympic Graphic Arts,4379 Highway 116,Philadelphia,Philadelphia,PA,19103,215-558-8189,215-483-3003,femard@emard.com,http://www.olympicgraphicarts.com
|
213 |
+
Willodean,Konopacki,Magnuson,55 Hawthorne Blvd,Lafayette,Lafayette,LA,70506,337-253-8384,337-774-7564,willodean_konopacki@konopacki.org,http://www.magnuson.com
|
214 |
+
Beckie,Silvestrini,A All American Travel Inc,7116 Western Ave,Dearborn,Wayne,MI,48126,313-533-4884,313-390-7855,beckie.silvestrini@silvestrini.com,http://www.aallamericantravelinc.com
|
215 |
+
Rebecka,Gesick,Polykote Inc,2026 N Plankinton Ave #3,Austin,Travis,TX,78754,512-213-8574,512-693-8345,rgesick@gesick.org,http://www.polykoteinc.com
|
216 |
+
Frederica,Blunk,Jets Cybernetics,99586 Main St,Dallas,Dallas,TX,75207,214-428-2285,214-529-1949,frederica_blunk@gmail.com,http://www.jetscybernetics.com
|
217 |
+
Glen,Bartolet,Metlab Testing Services,8739 Hudson St,Vashon,King,WA,98070,206-697-5796,206-389-1482,glen_bartolet@hotmail.com,http://www.metlabtestingservices.com
|
218 |
+
Freeman,Gochal,"Kellermann, William T Esq",383 Gunderman Rd #197,Coatesville,Chester,PA,19320,610-476-3501,610-752-2683,freeman_gochal@aol.com,http://www.kellermannwilliamtesq.com
|
219 |
+
Vincent,Meinerding,"Arturi, Peter D Esq",4441 Point Term Mkt,Philadelphia,Philadelphia,PA,19143,215-372-1718,215-829-4221,vincent.meinerding@hotmail.com,http://www.arturipeterdesq.com
|
220 |
+
Rima,Bevelacqua,Mcauley Mfg Co,2972 Lafayette Ave,Gardena,Los Angeles,CA,90248,310-858-5079,310-499-4200,rima@cox.net,http://www.mcauleymfgco.com
|
221 |
+
Glendora,Sarbacher,Defur Voran Hanley Radcliff,2140 Diamond Blvd,Rohnert Park,Sonoma,CA,94928,707-653-8214,707-881-3154,gsarbacher@gmail.com,http://www.defurvoranhanleyradcliff.com
|
222 |
+
Avery,Steier,Dill Dill Carr & Stonbraker Pc,93 Redmond Rd #492,Orlando,Orange,FL,32803,407-808-9439,407-945-8566,avery@cox.net,http://www.dilldillcarrstonbrakerpc.com
|
223 |
+
Cristy,Lother,Kleensteel,3989 Portage Tr,Escondido,San Diego,CA,92025,760-971-4322,760-465-4762,cristy@lother.com,http://www.kleensteel.com
|
224 |
+
Nicolette,Brossart,Goulds Pumps Inc Slurry Pump,1 Midway Rd,Westborough,Worcester,MA,1581,508-837-9230,508-504-6388,nicolette_brossart@brossart.com,http://www.gouldspumpsincslurrypump.com
|
225 |
+
Tracey,Modzelewski,Kansas City Insurance Report,77132 Coon Rapids Blvd Nw,Conroe,Montgomery,TX,77301,936-264-9294,936-988-8171,tracey@hotmail.com,http://www.kansascityinsurancereport.com
|
226 |
+
Virgina,Tegarden,Berhanu International Foods,755 Harbor Way,Milwaukee,Milwaukee,WI,53226,414-214-8697,414-411-5744,virgina_tegarden@tegarden.com,http://www.berhanuinternationalfoods.com
|
227 |
+
Tiera,Frankel,Roland Ashcroft,87 Sierra Rd,El Monte,Los Angeles,CA,91731,626-636-4117,626-638-4241,tfrankel@aol.com,http://www.rolandashcroft.com
|
228 |
+
Alaine,Bergesen,Hispanic Magazine,7667 S Hulen St #42,Yonkers,Westchester,NY,10701,914-300-9193,914-654-1426,alaine_bergesen@cox.net,http://www.hispanicmagazine.com
|
229 |
+
Earleen,Mai,Little Sheet Metal Co,75684 S Withlapopka Dr #32,Dallas,Dallas,TX,75227,214-289-1973,214-785-6750,earleen_mai@cox.net,http://www.littlesheetmetalco.com
|
230 |
+
Leonida,Gobern,"Holmes, Armstead J Esq",5 Elmwood Park Blvd,Biloxi,Harrison,MS,39530,228-235-5615,228-432-4635,leonida@gobern.org,http://www.holmesarmsteadjesq.com
|
231 |
+
Ressie,Auffrey,"Faw, James C Cpa",23 Palo Alto Sq,Miami,Miami-Dade,FL,33134,305-604-8981,305-287-4743,ressie.auffrey@yahoo.com,http://www.fawjamesccpa.com
|
232 |
+
Justine,Mugnolo,Evans Rule Company,38062 E Main St,New York,New York,NY,10048,212-304-9225,212-311-6377,jmugnolo@yahoo.com,http://www.evansrulecompany.com
|
233 |
+
Eladia,Saulter,Tyee Productions Inc,3958 S Dupont Hwy #7,Ramsey,Bergen,NJ,7446,201-474-4924,201-365-8698,eladia@saulter.com,http://www.tyeeproductionsinc.com
|
234 |
+
Chaya,Malvin,Dunnells & Duvall,560 Civic Center Dr,Ann Arbor,Washtenaw,MI,48103,734-928-5182,734-408-8174,chaya@malvin.com,http://www.dunnellsduvall.com
|
235 |
+
Gwenn,Suffield,Deltam Systems Inc,3270 Dequindre Rd,Deer Park,Suffolk,NY,11729,631-258-6558,631-295-9879,gwenn_suffield@suffield.org,http://www.deltamsystemsinc.com
|
236 |
+
Salena,Karpel,Hammill Mfg Co,1 Garfield Ave #7,Canton,Stark,OH,44707,330-791-8557,330-618-2579,skarpel@cox.net,http://www.hammillmfgco.com
|
237 |
+
Yoko,Fishburne,Sams Corner Store,9122 Carpenter Ave,New Haven,New Haven,CT,6511,203-506-4706,203-840-8634,yoko@fishburne.com,http://www.samscornerstore.com
|
238 |
+
Taryn,Moyd,"Siskin, Mark J Esq",48 Lenox St,Fairfax,Fairfax City,VA,22030,703-322-4041,703-938-7939,taryn.moyd@hotmail.com,http://www.siskinmarkjesq.com
|
239 |
+
Katina,Polidori,Cape & Associates Real Estate,5 Little River Tpke,Wilmington,Middlesex,MA,1887,978-626-2978,978-679-7429,katina_polidori@aol.com,http://www.capeassociatesrealestate.com
|
240 |
+
Rickie,Plumer,Merrill Lynch,3 N Groesbeck Hwy,Toledo,Lucas,OH,43613,419-693-1334,419-313-5571,rickie.plumer@aol.com,http://www.merrilllynch.com
|
241 |
+
Alex,Loader,"Sublett, Scott Esq",37 N Elm St #916,Tacoma,Pierce,WA,98409,253-660-7821,253-875-9222,alex@loader.com,http://www.sublettscottesq.com
|
242 |
+
Lashon,Vizarro,Sentry Signs,433 Westminster Blvd #590,Roseville,Placer,CA,95661,916-741-7884,916-289-4526,lashon@aol.com,http://www.sentrysigns.com
|
243 |
+
Lauran,Burnard,Professionals Unlimited,66697 Park Pl #3224,Riverton,Fremont,WY,82501,307-342-7795,307-453-7589,lburnard@burnard.com,http://www.professionalsunlimited.com
|
244 |
+
Ceola,Setter,Southern Steel Shelving Co,96263 Greenwood Pl,Warren,Knox,ME,4864,207-627-7565,207-297-5029,ceola.setter@setter.org,http://www.southernsteelshelvingco.com
|
245 |
+
My,Rantanen,"Bosco, Paul J",8 Mcarthur Ln,Richboro,Bucks,PA,18954,215-491-5633,215-647-2158,my@hotmail.com,http://www.boscopaulj.com
|
246 |
+
Lorrine,Worlds,"Longo, Nicholas J Esq",8 Fair Lawn Ave,Tampa,Hillsborough,FL,33614,813-769-2939,813-863-6467,lorrine.worlds@worlds.com,http://www.longonicholasjesq.com
|
247 |
+
Peggie,Sturiale,Henry County Middle School,9 N 14th St,El Cajon,San Diego,CA,92020,619-608-1763,619-695-8086,peggie@cox.net,http://www.henrycountymiddleschool.com
|
248 |
+
Marvel,Raymo,Edison Supply & Equipment Co,9 Vanowen St,College Station,Brazos,TX,77840,979-718-8968,979-809-5770,mraymo@yahoo.com,http://www.edisonsupplyequipmentco.com
|
249 |
+
Daron,Dinos,"Wolf, Warren R Esq",18 Waterloo Geneva Rd,Highland Park,Lake,IL,60035,847-233-3075,847-265-6609,daron_dinos@cox.net,http://www.wolfwarrenresq.com
|
250 |
+
An,Fritz,Linguistic Systems Inc,506 S Hacienda Dr,Atlantic City,Atlantic,NJ,8401,609-228-5265,609-854-7156,an_fritz@hotmail.com,http://www.linguisticsystemsinc.com
|
251 |
+
Portia,Stimmel,Peace Christian Center,3732 Sherman Ave,Bridgewater,Somerset,NJ,8807,908-722-7128,908-670-4712,portia.stimmel@aol.com,http://www.peacechristiancenter.com
|
252 |
+
Rhea,Aredondo,Double B Foods Inc,25657 Live Oak St,Brooklyn,Kings,NY,11226,718-560-9537,718-280-4183,rhea_aredondo@cox.net,http://www.doublebfoodsinc.com
|
253 |
+
Benedict,Sama,Alexander & Alexander Inc,4923 Carey Ave,Saint Louis,Saint Louis City,MO,63104,314-787-1588,314-858-4832,bsama@cox.net,http://www.alexanderalexanderinc.com
|
254 |
+
Alyce,Arias,Fairbanks Scales,3196 S Rider Trl,Stockton,San Joaquin,CA,95207,209-317-1801,209-242-7022,alyce@arias.org,http://www.fairbanksscales.com
|
255 |
+
Heike,Berganza,Cali Sportswear Cutting Dept,3 Railway Ave #75,Little Falls,Passaic,NJ,7424,973-936-5095,973-822-8827,heike@gmail.com,http://www.calisportswearcuttingdept.com
|
256 |
+
Carey,Dopico,"Garofani, John Esq",87393 E Highland Rd,Indianapolis,Marion,IN,46220,317-578-2453,317-441-5848,carey_dopico@dopico.org,http://www.garofanijohnesq.com
|
257 |
+
Dottie,Hellickson,Thompson Fabricating Co,67 E Chestnut Hill Rd,Seattle,King,WA,98133,206-540-6076,206-295-5631,dottie@hellickson.org,http://www.thompsonfabricatingco.com
|
258 |
+
Deandrea,Hughey,Century 21 Krall Real Estate,33 Lewis Rd #46,Burlington,Alamance,NC,27215,336-822-7652,336-467-3095,deandrea@yahoo.com,http://www.centurykrallrealestate.com
|
259 |
+
Kimberlie,Duenas,Mid Contntl Rlty & Prop Mgmt,8100 Jacksonville Rd #7,Hays,Ellis,KS,67601,785-629-8542,785-616-1685,kimberlie_duenas@yahoo.com,http://www.midcontntlrltypropmgmt.com
|
260 |
+
Martina,Staback,Ace Signs Inc,7 W Wabansia Ave #227,Orlando,Orange,FL,32822,407-471-6908,407-429-2145,martina_staback@staback.com,http://www.acesignsinc.com
|
261 |
+
Skye,Fillingim,Rodeway Inn,25 Minters Chapel Rd #9,Minneapolis,Hennepin,MN,55401,612-508-2655,612-664-6304,skye_fillingim@yahoo.com,http://www.rodewayinn.com
|
262 |
+
Jade,Farrar,Bonnet & Daughter,6882 Torresdale Ave,Columbia,Richland,SC,29201,803-352-5387,803-975-3405,jade.farrar@yahoo.com,http://www.bonnetdaughter.com
|
263 |
+
Charlene,Hamilton,Oshins & Gibbons,985 E 6th Ave,Santa Rosa,Sonoma,CA,95407,707-300-1771,707-821-8037,charlene.hamilton@hotmail.com,http://www.oshinsgibbons.com
|
264 |
+
Geoffrey,Acey,Price Business Services,7 West Ave #1,Palatine,Cook,IL,60067,847-222-1734,847-556-2909,geoffrey@gmail.com,http://www.pricebusinessservices.com
|
265 |
+
Stevie,Westerbeck,"Wise, Dennis W Md",26659 N 13th St,Costa Mesa,Orange,CA,92626,949-867-4077,949-903-3898,stevie.westerbeck@yahoo.com,http://www.wisedenniswmd.com
|
266 |
+
Pamella,Fortino,Super 8 Motel,669 Packerland Dr #1438,Denver,Denver,CO,80212,303-404-2210,303-794-1341,pamella@fortino.com,http://www.supermotel.com
|
267 |
+
Harrison,Haufler,John Wagner Associates,759 Eldora St,New Haven,New Haven,CT,6515,203-801-6193,203-801-8497,hhaufler@hotmail.com,http://www.johnwagnerassociates.com
|
268 |
+
Johnna,Engelberg,Thrifty Oil Co,5 S Colorado Blvd #449,Bothell,Snohomish,WA,98021,425-986-7573,425-700-3751,jengelberg@engelberg.org,http://www.thriftyoilco.com
|
269 |
+
Buddy,Cloney,Larkfield Photo,944 Gaither Dr,Strongsville,Cuyahoga,OH,44136,440-989-5826,440-327-2093,buddy.cloney@yahoo.com,http://www.larkfieldphoto.com
|
270 |
+
Dalene,Riden,Silverman Planetarium,66552 Malone Rd,Plaistow,Rockingham,NH,3865,603-315-6839,603-745-7497,dalene.riden@aol.com,http://www.silvermanplanetarium.com
|
271 |
+
Jerry,Zurcher,J & F Lumber,77 Massillon Rd #822,Satellite Beach,Brevard,FL,32937,321-518-5938,321-597-2159,jzurcher@zurcher.org,http://www.jflumber.com
|
272 |
+
Haydee,Denooyer,Cleaning Station Inc,25346 New Rd,New York,New York,NY,10016,212-792-8658,212-782-3493,hdenooyer@denooyer.org,http://www.cleaningstationinc.com
|
273 |
+
Joseph,Cryer,Ames Stationers,60 Fillmore Ave,Huntington Beach,Orange,CA,92647,714-584-2237,714-698-2170,joseph_cryer@cox.net,http://www.amesstationers.com
|
274 |
+
Deonna,Kippley,Midas Muffler Shops,57 Haven Ave #90,Southfield,Oakland,MI,48075,248-913-4677,248-793-4966,deonna_kippley@hotmail.com,http://www.midasmufflershops.com
|
275 |
+
Raymon,Calvaresi,Seaboard Securities Inc,6538 E Pomona St #60,Indianapolis,Marion,IN,46222,317-825-4724,317-342-1532,raymon.calvaresi@gmail.com,http://www.seaboardsecuritiesinc.com
|
276 |
+
Alecia,Bubash,"Petersen, James E Esq",6535 Joyce St,Wichita Falls,Wichita,TX,76301,940-276-7922,940-302-3036,alecia@aol.com,http://www.petersenjameseesq.com
|
277 |
+
Ma,Layous,Development Authority,78112 Morris Ave,North Haven,New Haven,CT,6473,203-721-3388,203-564-1543,mlayous@hotmail.com,http://www.developmentauthority.com
|
278 |
+
Detra,Coyier,Schott Fiber Optics Inc,96950 Hidden Ln,Aberdeen,Harford,MD,21001,410-739-9277,410-259-2118,detra@aol.com,http://www.schottfiberopticsinc.com
|
279 |
+
Terrilyn,Rodeigues,Stuart J Agins,3718 S Main St,New Orleans,Orleans,LA,70130,504-463-4384,504-635-8518,terrilyn.rodeigues@cox.net,http://www.stuartjagins.com
|
280 |
+
Salome,Lacovara,Mitsumi Electronics Corp,9677 Commerce Dr,Richmond,Richmond City,VA,23219,804-550-5097,804-858-1011,slacovara@gmail.com,http://www.mitsumielectronicscorp.com
|
281 |
+
Garry,Keetch,Italian Express Franchise Corp,5 Green Pond Rd #4,Southampton,Bucks,PA,18966,215-979-8776,215-846-9046,garry_keetch@hotmail.com,http://www.italianexpressfranchisecorp.com
|
282 |
+
Matthew,Neither,American Council On Sci & Hlth,636 Commerce Dr #42,Shakopee,Scott,MN,55379,952-651-7597,952-906-4597,mneither@yahoo.com,http://www.americancouncilonscihlth.com
|
283 |
+
Theodora,Restrepo,"Kleri, Patricia S Esq",42744 Hamann Industrial Pky #82,Miami,Miami-Dade,FL,33136,305-936-8226,305-573-1085,theodora.restrepo@restrepo.com,http://www.kleripatriciasesq.com
|
284 |
+
Noah,Kalafatis,Twiggs Abrams Blanchard,1950 5th Ave,Milwaukee,Milwaukee,WI,53209,414-263-5287,414-660-9766,noah.kalafatis@aol.com,http://www.twiggsabramsblanchard.com
|
285 |
+
Carmen,Sweigard,Maui Research & Technology Pk,61304 N French Rd,Somerset,Somerset,NJ,8873,732-941-2621,732-445-6940,csweigard@sweigard.com,http://www.mauiresearchtechnologypk.com
|
286 |
+
Lavonda,Hengel,Bradley Nameplate Corp,87 Imperial Ct #79,Fargo,Cass,ND,58102,701-898-2154,701-421-7080,lavonda@cox.net,http://www.bradleynameplatecorp.com
|
287 |
+
Junita,Stoltzman,Geonex Martel Inc,94 W Dodge Rd,Carson City,Carson City,NV,89701,775-638-9963,775-578-1214,junita@aol.com,http://www.geonexmartelinc.com
|
288 |
+
Herminia,Nicolozakes,Sea Island Div Of Fstr Ind Inc,4 58th St #3519,Scottsdale,Maricopa,AZ,85254,602-954-5141,602-304-6433,herminia@nicolozakes.org,http://www.seaislanddivoffstrindinc.com
|
289 |
+
Casie,Good,"Papay, Debbie J Esq",5221 Bear Valley Rd,Nashville,Davidson,TN,37211,615-390-2251,615-825-4297,casie.good@aol.com,http://www.papaydebbiejesq.com
|
290 |
+
Reena,Maisto,Lane Promotions,9648 S Main,Salisbury,Wicomico,MD,21801,410-351-1863,410-951-2667,reena@hotmail.com,http://www.lanepromotions.com
|
291 |
+
Mirta,Mallett,Stephen Kennerly Archts Inc Pc,7 S San Marcos Rd,New York,New York,NY,10004,212-870-1286,212-745-6948,mirta_mallett@gmail.com,http://www.stephenkennerlyarchtsincpc.com
|
292 |
+
Cathrine,Pontoriero,Business Systems Of Wis Inc,812 S Haven St,Amarillo,Randall,TX,79109,806-703-1435,806-558-5848,cathrine.pontoriero@pontoriero.com,http://www.businesssystemsofwisinc.com
|
293 |
+
Filiberto,Tawil,"Flash, Elena Salerno Esq",3882 W Congress St #799,Los Angeles,Los Angeles,CA,90016,323-765-2528,323-842-8226,ftawil@hotmail.com,http://www.flashelenasalernoesq.com
|
294 |
+
Raul,Upthegrove,"Neeley, Gregory W Esq",4 E Colonial Dr,La Mesa,San Diego,CA,91942,619-509-5282,619-666-4765,rupthegrove@yahoo.com,http://www.neeleygregorywesq.com
|
295 |
+
Sarah,Candlish,Alabama Educational Tv Comm,45 2nd Ave #9759,Atlanta,Fulton,GA,30328,770-732-1194,770-531-2842,sarah.candlish@gmail.com,http://www.alabamaeducationaltvcomm.com
|
296 |
+
Lucy,Treston,Franz Inc,57254 Brickell Ave #372,Worcester,Worcester,MA,1602,508-769-5250,508-502-5634,lucy@cox.net,http://www.franzinc.com
|
297 |
+
Judy,Aquas,Plantation Restaurant,8977 Connecticut Ave Nw #3,Niles,Berrien,MI,49120,269-756-7222,269-431-9464,jaquas@aquas.com,http://www.plantationrestaurant.com
|
298 |
+
Yvonne,Tjepkema,Radio Communications Co,9 Waydell St,Fairfield,Essex,NJ,7004,973-714-1721,973-976-8627,yvonne.tjepkema@hotmail.com,http://www.radiocommunicationsco.com
|
299 |
+
Kayleigh,Lace,Dentalaw Divsn Hlth Care,43 Huey P Long Ave,Lafayette,Lafayette,LA,70508,337-740-9323,337-751-2326,kayleigh.lace@yahoo.com,http://www.dentalawdivsnhlthcare.com
|
300 |
+
Felix,Hirpara,American Speedy Printing Ctrs,7563 Cornwall Rd #4462,Denver,Lancaster,PA,17517,717-491-5643,717-583-1497,felix_hirpara@cox.net,http://www.americanspeedyprintingctrs.com
|
301 |
+
Tresa,Sweely,"Grayson, Grant S Esq",22 Bridle Ln,Valley Park,Saint Louis,MO,63088,314-359-9566,314-231-3514,tresa_sweely@hotmail.com,http://www.graysongrantsesq.com
|
302 |
+
Kristeen,Turinetti,Jeanerette Middle School,70099 E North Ave,Arlington,Tarrant,TX,76013,817-213-8851,817-947-9480,kristeen@gmail.com,http://www.jeanerettemiddleschool.com
|
303 |
+
Jenelle,Regusters,"Haavisto, Brian F Esq",3211 E Northeast Loop,Tampa,Hillsborough,FL,33619,813-932-8715,813-357-7296,jregusters@regusters.com,http://www.haavistobrianfesq.com
|
304 |
+
Renea,Monterrubio,Wmmt Radio Station,26 Montgomery St,Atlanta,Fulton,GA,30328,770-679-4752,770-930-9967,renea@hotmail.com,http://www.wmmtradiostation.com
|
305 |
+
Olive,Matuszak,Colony Paints Sales Ofc & Plnt,13252 Lighthouse Ave,Cathedral City,Riverside,CA,92234,760-938-6069,760-745-2649,olive@aol.com,http://www.colonypaintssalesofcplnt.com
|
306 |
+
Ligia,Reiber,Floral Expressions,206 Main St #2804,Lansing,Ingham,MI,48933,517-906-1108,517-747-7664,lreiber@cox.net,http://www.floralexpressions.com
|
307 |
+
Christiane,Eschberger,Casco Services Inc,96541 W Central Blvd,Phoenix,Maricopa,AZ,85034,602-390-4944,602-330-6894,christiane.eschberger@yahoo.com,http://www.cascoservicesinc.com
|
308 |
+
Goldie,Schirpke,"Reuter, Arthur C Jr",34 Saint George Ave #2,Bangor,Penobscot,ME,4401,207-295-7569,207-748-3722,goldie.schirpke@yahoo.com,http://www.reuterarthurcjr.com
|
309 |
+
Loreta,Timenez,"Kaminski, Katherine Andritsaki",47857 Coney Island Ave,Clinton,Prince Georges,MD,20735,301-696-6420,301-392-6698,loreta.timenez@hotmail.com,http://www.kaminskikatherineandritsaki.com
|
310 |
+
Fabiola,Hauenstein,Sidewinder Products Corp,8573 Lincoln Blvd,York,York,PA,17404,717-809-3119,717-344-2804,fabiola.hauenstein@hauenstein.org,http://www.sidewinderproductscorp.com
|
311 |
+
Amie,Perigo,General Foam Corporation,596 Santa Maria Ave #7913,Mesquite,Dallas,TX,75150,972-419-7946,972-898-1033,amie.perigo@yahoo.com,http://www.generalfoamcorporation.com
|
312 |
+
Raina,Brachle,Ikg Borden Divsn Harsco Corp,3829 Ventura Blvd,Butte,Silver Bow,MT,59701,406-318-1515,406-374-7752,raina.brachle@brachle.org,http://www.ikgbordendivsnharscocorp.com
|
313 |
+
Erinn,Canlas,Anchor Computer Inc,13 S Hacienda Dr,Livingston,Essex,NJ,7039,973-767-3008,973-563-9502,erinn.canlas@canlas.com,http://www.anchorcomputerinc.com
|
314 |
+
Cherry,Lietz,Sebring & Co,40 9th Ave Sw #91,Waterford,Oakland,MI,48329,248-980-6904,248-697-7722,cherry@lietz.com,http://www.sebringco.com
|
315 |
+
Kattie,Vonasek,H A C Farm Lines Co Optv Assoc,2845 Boulder Crescent St,Cleveland,Cuyahoga,OH,44103,216-923-3715,216-270-9653,kattie@vonasek.org,http://www.hacfarmlinescooptvassoc.com
|
316 |
+
Lilli,Scriven,"Hunter, John J Esq",33 State St,Abilene,Taylor,TX,79601,325-631-1560,325-667-7868,lilli@aol.com,http://www.hunterjohnjesq.com
|
317 |
+
Whitley,Tomasulo,Freehold Fence Co,2 S 15th St,Fort Worth,Tarrant,TX,76107,817-526-4408,817-819-7799,whitley.tomasulo@aol.com,http://www.freeholdfenceco.com
|
318 |
+
Barbra,Adkin,Binswanger,4 Kohler Memorial Dr,Brooklyn,Kings,NY,11230,718-201-3751,718-732-9475,badkin@hotmail.com,http://www.binswanger.com
|
319 |
+
Hermila,Thyberg,Chilton Malting Co,1 Rancho Del Mar Shopping C,Providence,Providence,RI,2903,401-893-4882,401-885-7681,hermila_thyberg@hotmail.com,http://www.chiltonmaltingco.com
|
320 |
+
Jesusita,Flister,"Schoen, Edward J Jr",3943 N Highland Ave,Lancaster,Lancaster,PA,17601,717-885-9118,717-686-7564,jesusita.flister@hotmail.com,http://www.schoenedwardjjr.com
|
321 |
+
Caitlin,Julia,"Helderman, Seymour Cpa",5 Williams St,Johnston,Providence,RI,2919,401-948-4982,401-552-9059,caitlin.julia@julia.org,http://www.heldermanseymourcpa.com
|
322 |
+
Roosevelt,Hoffis,"Denbrook, Myron",60 Old Dover Rd,Hialeah,Miami-Dade,FL,33014,305-622-4739,305-302-1135,roosevelt.hoffis@aol.com,http://www.denbrookmyron.com
|
323 |
+
Helaine,Halter,"Lippitt, Mike",8 Sheridan Rd,Jersey City,Hudson,NJ,7304,201-832-4168,201-412-3040,hhalter@yahoo.com,http://www.lippittmike.com
|
324 |
+
Lorean,Martabano,"Hiram, Hogg P Esq",85092 Southern Blvd,San Antonio,Bexar,TX,78204,210-856-4979,210-634-2447,lorean.martabano@hotmail.com,http://www.hiramhoggpesq.com
|
325 |
+
France,Buzick,In Travel Agency,64 Newman Springs Rd E,Brooklyn,Kings,NY,11219,718-478-8504,718-853-3740,france.buzick@yahoo.com,http://www.intravelagency.com
|
326 |
+
Justine,Ferrario,Newhart Foods Inc,48 Stratford Ave,Pomona,Los Angeles,CA,91768,909-993-3242,909-631-5703,jferrario@hotmail.com,http://www.newhartfoodsinc.com
|
327 |
+
Adelina,Nabours,Courtyard By Marriott,80 Pittsford Victor Rd #9,Cleveland,Cuyahoga,OH,44103,216-230-4892,216-937-5320,adelina_nabours@gmail.com,http://www.courtyardbymarriott.com
|
328 |
+
Derick,Dhamer,"Studer, Eugene A Esq",87163 N Main Ave,New York,New York,NY,10013,212-304-4515,212-225-9676,ddhamer@cox.net,http://www.studereugeneaesq.com
|
329 |
+
Jerry,Dallen,Seashore Supply Co Waretown,393 Lafayette Ave,Richmond,Richmond City,VA,23219,804-762-9576,804-808-9574,jerry.dallen@yahoo.com,http://www.seashoresupplycowaretown.com
|
330 |
+
Leota,Ragel,Mayar Silk Inc,99 5th Ave #33,Trion,Chattooga,GA,30753,706-221-4243,706-616-5131,leota.ragel@gmail.com,http://www.mayarsilkinc.com
|
331 |
+
Jutta,Amyot,National Medical Excess Corp,49 N Mays St,Broussard,Lafayette,LA,70518,337-515-1438,337-991-8070,jamyot@hotmail.com,http://www.nationalmedicalexcesscorp.com
|
332 |
+
Aja,Gehrett,Stero Company,993 Washington Ave,Nutley,Essex,NJ,7110,973-544-2677,973-986-4456,aja_gehrett@hotmail.com,http://www.sterocompany.com
|
333 |
+
Kirk,Herritt,"Hasting, H Duane Esq",88 15th Ave Ne,Vestal,Broome,NY,13850,607-407-3716,607-350-7690,kirk.herritt@aol.com,http://www.hastinghduaneesq.com
|
334 |
+
Leonora,Mauson,Insty Prints,3381 E 40th Ave,Passaic,Passaic,NJ,7055,973-412-2995,973-355-2120,leonora@yahoo.com,http://www.instyprints.com
|
335 |
+
Winfred,Brucato,Glenridge Manor Mobile Home Pk,201 Ridgewood Rd,Moscow,Latah,ID,83843,208-252-4552,208-793-4108,winfred_brucato@hotmail.com,http://www.glenridgemanormobilehomepk.com
|
336 |
+
Tarra,Nachor,Circuit Solution Inc,39 Moccasin Dr,San Francisco,San Francisco,CA,94104,415-411-1775,415-284-2730,tarra.nachor@cox.net,http://www.circuitsolutioninc.com
|
337 |
+
Corinne,Loder,Local Office,4 Carroll St,North Attleboro,Bristol,MA,2760,508-942-4186,508-618-7826,corinne@loder.org,http://www.localoffice.com
|
338 |
+
Dulce,Labreche,Lee Kilkelly Paulson & Kabaker,9581 E Arapahoe Rd,Rochester,Oakland,MI,48307,248-357-8718,248-811-5696,dulce_labreche@yahoo.com,http://www.leekilkellypaulsonkabaker.com
|
339 |
+
Kate,Keneipp,"Davis, Maxon R Esq",33 N Michigan Ave,Green Bay,Brown,WI,54301,920-353-6377,920-355-1610,kate_keneipp@yahoo.com,http://www.davismaxonresq.com
|
340 |
+
Kaitlyn,Ogg,"Garrison, Paul E Esq",2 S Biscayne Blvd,Baltimore,Baltimore City,MD,21230,410-665-4903,410-773-3862,kaitlyn.ogg@gmail.com,http://www.garrisonpauleesq.com
|
341 |
+
Sherita,Saras,Black History Resource Center,8 Us Highway 22,Colorado Springs,El Paso,CO,80937,719-669-1664,719-547-9543,sherita.saras@cox.net,http://www.blackhistoryresourcecenter.com
|
342 |
+
Lashawnda,Stuer,"Rodriguez, J Christopher Esq",7422 Martin Ave #8,Toledo,Lucas,OH,43607,419-588-8719,419-399-1744,lstuer@cox.net,http://www.rodriguezjchristopheresq.com
|
343 |
+
Ernest,Syrop,Grant Family Health Center,94 Chase Rd,Hyattsville,Prince Georges,MD,20785,301-998-9644,301-257-4883,ernest@cox.net,http://www.grantfamilyhealthcenter.com
|
344 |
+
Nobuko,Halsey,Goeman Wood Products Inc,8139 I Hwy 10 #92,New Bedford,Bristol,MA,2745,508-855-9887,508-897-7916,nobuko.halsey@yahoo.com,http://www.goemanwoodproductsinc.com
|
345 |
+
Lavonna,Wolny,"Linhares, Kenneth A Esq",5 Cabot Rd,Mc Lean,Fairfax,VA,22102,703-483-1970,703-892-2914,lavonna.wolny@hotmail.com,http://www.linhareskennethaesq.com
|
346 |
+
Lashaunda,Lizama,Earnhardt Printing,3387 Ryan Dr,Hanover,Anne Arundel,MD,21076,410-678-2473,410-912-6032,llizama@cox.net,http://www.earnhardtprinting.com
|
347 |
+
Mariann,Bilden,H P G Industrys Inc,3125 Packer Ave #9851,Austin,Travis,TX,78753,512-223-4791,512-742-1149,mariann.bilden@aol.com,http://www.hpgindustrysinc.com
|
348 |
+
Helene,Rodenberger,Bailey Transportation Prod Inc,347 Chestnut St,Peoria,Maricopa,AZ,85381,623-461-8551,623-426-4907,helene@aol.com,http://www.baileytransportationprodinc.com
|
349 |
+
Roselle,Estell,Mcglynn Bliss Pc,8116 Mount Vernon Ave,Bucyrus,Crawford,OH,44820,419-571-5920,419-488-6648,roselle.estell@hotmail.com,http://www.mcglynnblisspc.com
|
350 |
+
Samira,Heintzman,Mutual Fish Co,8772 Old County Rd #5410,Kent,King,WA,98032,206-311-4137,206-923-6042,sheintzman@hotmail.com,http://www.mutualfishco.com
|
351 |
+
Margart,Meisel,"Yeates, Arthur L Aia",868 State St #38,Cincinnati,Hamilton,OH,45251,513-617-2362,513-747-9603,margart_meisel@yahoo.com,http://www.yeatesarthurlaia.com
|
352 |
+
Kristofer,Bennick,"Logan, Ronald J Esq",772 W River Dr,Bloomington,Monroe,IN,47404,812-368-1511,812-442-8544,kristofer.bennick@yahoo.com,http://www.loganronaldjesq.com
|
353 |
+
Weldon,Acuff,Advantage Martgage Company,73 W Barstow Ave,Arlington Heights,Cook,IL,60004,847-353-2156,847-613-5866,wacuff@gmail.com,http://www.advantagemartgagecompany.com
|
354 |
+
Shalon,Shadrick,Germer And Gertz Llp,61047 Mayfield Ave,Brooklyn,Kings,NY,11223,718-232-2337,718-394-4974,shalon@cox.net,http://www.germerandgertzllp.com
|
355 |
+
Denise,Patak,Spence Law Offices,2139 Santa Rosa Ave,Orlando,Orange,FL,32801,407-446-4358,407-808-3254,denise@patak.org,http://www.spencelawoffices.com
|
356 |
+
Louvenia,Beech,John Ortiz Nts Therapy Center,598 43rd St,Beverly Hills,Los Angeles,CA,90210,310-820-2117,310-652-2379,louvenia.beech@beech.com,http://www.johnortizntstherapycenter.com
|
357 |
+
Audry,Yaw,Mike Uchrin Htg & Air Cond Inc,70295 Pioneer Ct,Brandon,Hillsborough,FL,33511,813-797-4816,813-744-7100,audry.yaw@yaw.org,http://www.mikeuchrinhtgaircondinc.com
|
358 |
+
Kristel,Ehmann,"Mccoy, Joy Reynolds Esq",92899 Kalakaua Ave,El Paso,El Paso,TX,79925,915-452-1290,915-300-6100,kristel.ehmann@aol.com,http://www.mccoyjoyreynoldsesq.com
|
359 |
+
Vincenza,Zepp,Kbor 1600 Am,395 S 6th St #2,El Cajon,San Diego,CA,92020,619-603-5125,619-935-6661,vzepp@gmail.com,http://www.kboram.com
|
360 |
+
Elouise,Gwalthney,Quality Inn Northwest,9506 Edgemore Ave,Bladensburg,Prince Georges,MD,20710,301-841-5012,301-591-3034,egwalthney@yahoo.com,http://www.qualityinnnorthwest.com
|
361 |
+
Venita,Maillard,Wallace Church Assoc Inc,72119 S Walker Ave #63,Anaheim,Orange,CA,92801,714-523-6653,714-663-9740,venita_maillard@gmail.com,http://www.wallacechurchassocinc.com
|
362 |
+
Kasandra,Semidey,Can Tron,369 Latham St #500,Saint Louis,Saint Louis City,MO,63102,314-732-9131,314-697-3652,kasandra_semidey@semidey.com,http://www.cantron.com
|
363 |
+
Xochitl,Discipio,Ravaal Enterprises Inc,3158 Runamuck Pl,Round Rock,Williamson,TX,78664,512-233-1831,512-942-3411,xdiscipio@gmail.com,http://www.ravaalenterprisesinc.com
|
364 |
+
Maile,Linahan,Thompson Steel Company Inc,9 Plainsboro Rd #598,Greensboro,Guilford,NC,27409,336-670-2640,336-364-6037,mlinahan@yahoo.com,http://www.thompsonsteelcompanyinc.com
|
365 |
+
Krissy,Rauser,"Anderson, Mark A Esq",8728 S Broad St,Coram,Suffolk,NY,11727,631-443-4710,631-288-2866,krauser@cox.net,http://www.andersonmarkaesq.com
|
366 |
+
Pete,Dubaldi,Womack & Galich,2215 Prosperity Dr,Lyndhurst,Bergen,NJ,7071,201-825-2514,201-749-8866,pdubaldi@hotmail.com,http://www.womackgalich.com
|
367 |
+
Linn,Paa,Valerie & Company,1 S Pine St,Memphis,Shelby,TN,38112,901-412-4381,901-573-9024,linn_paa@paa.com,http://www.valeriecompany.com
|
368 |
+
Paris,Wide,Gehring Pumps Inc,187 Market St,Atlanta,Fulton,GA,30342,404-505-4445,404-607-8435,paris@hotmail.com,http://www.gehringpumpsinc.com
|
369 |
+
Wynell,Dorshorst,"Haehnel, Craig W Esq",94290 S Buchanan St,Pacifica,San Mateo,CA,94044,650-473-1262,650-749-9879,wynell_dorshorst@dorshorst.org,http://www.haehnelcraigwesq.com
|
370 |
+
Quentin,Birkner,Spoor Behrins Campbell & Young,7061 N 2nd St,Burnsville,Dakota,MN,55337,952-702-7993,952-314-5871,qbirkner@aol.com,http://www.spoorbehrinscampbellyoung.com
|
371 |
+
Regenia,Kannady,Ken Jeter Store Equipment Inc,10759 Main St,Scottsdale,Maricopa,AZ,85260,480-726-1280,480-205-5121,regenia.kannady@cox.net,http://www.kenjeterstoreequipmentinc.com
|
372 |
+
Sheron,Louissant,"Potter, Brenda J Cpa",97 E 3rd St #9,Long Island City,Queens,NY,11101,718-976-8610,718-613-9994,sheron@aol.com,http://www.potterbrendajcpa.com
|
373 |
+
Izetta,Funnell,Baird Kurtz & Dobson,82 Winsor St #54,Atlanta,Dekalb,GA,30340,770-844-3447,770-584-4119,izetta.funnell@hotmail.com,http://www.bairdkurtzdobson.com
|
374 |
+
Rodolfo,Butzen,"Minor, Cynthia A Esq",41 Steel Ct,Northfield,Rice,MN,55057,507-210-3510,507-590-5237,rodolfo@hotmail.com,http://www.minorcynthiaaesq.com
|
375 |
+
Zona,Colla,"Solove, Robert A Esq",49440 Dearborn St,Norwalk,Fairfield,CT,6854,203-461-1949,203-938-2557,zona@hotmail.com,http://www.soloverobertaesq.com
|
376 |
+
Serina,Zagen,Mark Ii Imports Inc,7 S Beverly Dr,Fort Wayne,Allen,IN,46802,260-273-3725,260-382-4869,szagen@aol.com,http://www.markiiimportsinc.com
|
377 |
+
Paz,Sahagun,White Sign Div Ctrl Equip Co,919 Wall Blvd,Meridian,Lauderdale,MS,39307,601-927-8287,601-249-4511,paz_sahagun@cox.net,http://www.whitesigndivctrlequipco.com
|
378 |
+
Markus,Lukasik,M & M Store Fixtures Co Inc,89 20th St E #779,Sterling Heights,Macomb,MI,48310,586-970-7380,586-247-1614,markus@yahoo.com,http://www.mmstorefixturescoinc.com
|
379 |
+
Jaclyn,Bachman,Judah Caster & Wheel Co,721 Interstate 45 S,Colorado Springs,El Paso,CO,80919,719-853-3600,719-223-2074,jaclyn@aol.com,http://www.judahcasterwheelco.com
|
380 |
+
Cyril,Daufeldt,Galaxy International Inc,3 Lawton St,New York,New York,NY,10013,212-745-8484,212-422-5427,cyril_daufeldt@daufeldt.com,http://www.galaxyinternationalinc.com
|
381 |
+
Gayla,Schnitzler,Sigma Corp Of America,38 Pleasant Hill Rd,Hayward,Alameda,CA,94545,510-686-3407,510-441-4055,gschnitzler@gmail.com,http://www.sigmacorpofamerica.com
|
382 |
+
Erick,Nievas,"Soward, Anne Esq",45 E Acacia Ct,Chicago,Cook,IL,60624,773-704-9903,773-359-6109,erick_nievas@aol.com,http://www.sowardanneesq.com
|
383 |
+
Jennie,Drymon,"Osborne, Michelle M Esq",63728 Poway Rd #1,Scranton,Lackawanna,PA,18509,570-218-4831,570-868-8688,jennie@cox.net,http://www.osbornemichellemesq.com
|
384 |
+
Mitsue,Scipione,Students In Free Entrprs Natl,77 222 Dr,Oroville,Butte,CA,95965,530-986-9272,530-399-3254,mscipione@scipione.com,http://www.studentsinfreeentrprsnatl.com
|
385 |
+
Ciara,Ventura,"Johnson, Robert M Esq",53 W Carey St,Port Jervis,Orange,NY,12771,845-823-8877,845-694-7919,cventura@yahoo.com,http://www.johnsonrobertmesq.com
|
386 |
+
Galen,Cantres,Del Charro Apartments,617 Nw 36th Ave,Brook Park,Cuyahoga,OH,44142,216-600-6111,216-871-6876,galen@yahoo.com,http://www.delcharroapartments.com
|
387 |
+
Truman,Feichtner,Legal Search Inc,539 Coldwater Canyon Ave,Bloomfield,Essex,NJ,7003,973-852-2736,973-473-5108,tfeichtner@yahoo.com,http://www.legalsearchinc.com
|
388 |
+
Gail,Kitty,Service Supply Co Inc,735 Crawford Dr,Anchorage,Anchorage,AK,99501,907-435-9166,907-770-3542,gail@kitty.com,http://www.servicesupplycoinc.com
|
389 |
+
Dalene,Schoeneck,"Sameshima, Douglas J Esq",910 Rahway Ave,Philadelphia,Philadelphia,PA,19102,215-268-1275,215-380-8820,dalene@schoeneck.org,http://www.sameshimadouglasjesq.com
|
390 |
+
Gertude,Witten,"Thompson, John Randolph Jr",7 Tarrytown Rd,Cincinnati,Hamilton,OH,45217,513-977-7043,513-863-9471,gertude.witten@gmail.com,http://www.thompsonjohnrandolphjr.com
|
391 |
+
Lizbeth,Kohl,E T Balancing Co Inc,35433 Blake St #588,Gardena,Los Angeles,CA,90248,310-699-1222,310-955-5788,lizbeth@yahoo.com,http://www.etbalancingcoinc.com
|
392 |
+
Glenn,Berray,"Griswold, John E Esq",29 Cherry St #7073,Des Moines,Polk,IA,50315,515-370-7348,515-372-1738,gberray@gmail.com,http://www.griswoldjohneesq.com
|
393 |
+
Lashandra,Klang,Acqua Group,810 N La Brea Ave,King of Prussia,Montgomery,PA,19406,610-809-1818,610-378-7332,lashandra@yahoo.com,http://www.acquagroup.com
|
394 |
+
Lenna,Newville,"Brooks, Morris J Jr",987 Main St,Raleigh,Wake,NC,27601,919-623-2524,919-254-5987,lnewville@newville.com,http://www.brooksmorrisjjr.com
|
395 |
+
Laurel,Pagliuca,Printing Images Corp,36 Enterprise St Se,Richland,Benton,WA,99352,509-695-5199,509-595-6485,laurel@yahoo.com,http://www.printingimagescorp.com
|
396 |
+
Mireya,Frerking,Roberts Supply Co Inc,8429 Miller Rd,Pelham,Westchester,NY,10803,914-868-5965,914-883-3061,mireya.frerking@hotmail.com,http://www.robertssupplycoinc.com
|
397 |
+
Annelle,Tagala,Vico Products Mfg Co,5 W 7th St,Parkville,Baltimore,MD,21234,410-757-1035,410-234-2267,annelle@yahoo.com,http://www.vicoproductsmfgco.com
|
398 |
+
Dean,Ketelsen,J M Custom Design Millwork,2 Flynn Rd,Hicksville,Nassau,NY,11801,516-847-4418,516-732-6649,dean_ketelsen@gmail.com,http://www.jmcustomdesignmillwork.com
|
399 |
+
Levi,Munis,Farrell & Johnson Office Equip,2094 Ne 36th Ave,Worcester,Worcester,MA,1603,508-456-4907,508-658-7802,levi.munis@gmail.com,http://www.farrelljohnsonofficeequip.com
|
400 |
+
Sylvie,Ryser,Millers Market & Deli,649 Tulane Ave,Tulsa,Tulsa,OK,74105,918-644-9555,918-565-1706,sylvie@aol.com,http://www.millersmarketdeli.com
|
401 |
+
Sharee,Maile,Holiday Inn Naperville,2094 Montour Blvd,Muskegon,Muskegon,MI,49442,231-467-9978,231-265-6940,sharee_maile@aol.com,http://www.holidayinnnaperville.com
|
402 |
+
Cordelia,Storment,"Burrows, Jon H Esq",393 Hammond Dr,Lafayette,Lafayette,LA,70506,337-566-6001,337-255-3427,cordelia_storment@aol.com,http://www.burrowsjonhesq.com
|
403 |
+
Mollie,Mcdoniel,Dock Seal Specialty,8590 Lake Lizzie Dr,Bowling Green,Wood,OH,43402,419-975-3182,419-417-4674,mollie_mcdoniel@yahoo.com,http://www.docksealspecialty.com
|
404 |
+
Brett,Mccullan,Five Star Limousines Of Tx Inc,87895 Concord Rd,La Mesa,San Diego,CA,91942,619-461-9984,619-727-3892,brett.mccullan@mccullan.com,http://www.fivestarlimousinesoftxinc.com
|
405 |
+
Teddy,Pedrozo,"Barkan, Neal J Esq",46314 Route 130,Bridgeport,Fairfield,CT,6610,203-892-3863,203-918-3939,teddy_pedrozo@aol.com,http://www.barkannealjesq.com
|
406 |
+
Tasia,Andreason,"Campbell, Robert A",4 Cowesett Ave,Kearny,Hudson,NJ,7032,201-920-9002,201-969-7063,tasia_andreason@yahoo.com,http://www.campbellroberta.com
|
407 |
+
Hubert,Walthall,"Dee, Deanna",95 Main Ave #2,Barberton,Summit,OH,44203,330-903-1345,330-566-8898,hubert@walthall.org,http://www.deedeanna.com
|
408 |
+
Arthur,Farrow,"Young, Timothy L Esq",28 S 7th St #2824,Englewood,Bergen,NJ,7631,201-238-5688,201-772-4377,arthur.farrow@yahoo.com,http://www.youngtimothylesq.com
|
409 |
+
Vilma,Berlanga,"Wells, D Fred Esq",79 S Howell Ave,Grand Rapids,Kent,MI,49546,616-737-3085,616-568-4113,vberlanga@berlanga.com,http://www.wellsdfredesq.com
|
410 |
+
Billye,Miro,"Gray, Francine H Esq",36 Lancaster Dr Se,Pearl,Rankin,MS,39208,601-567-5386,601-637-5479,billye_miro@cox.net,http://www.grayfrancinehesq.com
|
411 |
+
Glenna,Slayton,Toledo Iv Care,2759 Livingston Ave,Memphis,Shelby,TN,38118,901-640-9178,901-869-4314,glenna_slayton@cox.net,http://www.toledoivcare.com
|
412 |
+
Mitzie,Hudnall,Cangro Transmission Co,17 Jersey Ave,Englewood,Arapahoe,CO,80110,303-402-1940,303-997-7760,mitzie_hudnall@yahoo.com,http://www.cangrotransmissionco.com
|
413 |
+
Bernardine,Rodefer,Sat Poly Inc,2 W Grand Ave,Memphis,Shelby,TN,38112,901-901-4726,901-739-5892,bernardine_rodefer@yahoo.com,http://www.satpolyinc.com
|
414 |
+
Staci,Schmaltz,Midwest Contracting & Mfg Inc,18 Coronado Ave #563,Pasadena,Los Angeles,CA,91106,626-866-2339,626-293-7678,staci_schmaltz@aol.com,http://www.midwestcontractingmfginc.com
|
415 |
+
Nichelle,Meteer,Print Doctor,72 Beechwood Ter,Chicago,Cook,IL,60657,773-225-9985,773-857-2231,nichelle_meteer@meteer.com,http://www.printdoctor.com
|
416 |
+
Janine,Rhoden,Nordic Group Inc,92 Broadway,Astoria,Queens,NY,11103,718-228-5894,718-728-5051,jrhoden@yahoo.com,http://www.nordicgroupinc.com
|
417 |
+
Ettie,Hoopengardner,Jackson Millwork Co,39 Franklin Ave,Richland,Benton,WA,99352,509-755-5393,509-847-3352,ettie.hoopengardner@hotmail.com,http://www.jacksonmillworkco.com
|
418 |
+
Eden,Jayson,Harris Corporation,4 Iwaena St,Baltimore,Baltimore City,MD,21202,410-890-7866,410-429-4888,eden_jayson@yahoo.com,http://www.harriscorporation.com
|
419 |
+
Lynelle,Auber,United Cerebral Palsy Of Ne Pa,32820 Corkwood Rd,Newark,Essex,NJ,7104,973-860-8610,973-605-6492,lynelle_auber@gmail.com,http://www.unitedcerebralpalsyofnepa.com
|
420 |
+
Merissa,Tomblin,One Day Surgery Center Inc,34 Raritan Center Pky,Bellflower,Los Angeles,CA,90706,562-579-6900,562-719-7922,merissa.tomblin@gmail.com,http://www.onedaysurgerycenterinc.com
|
421 |
+
Golda,Kaniecki,Calaveras Prospect,6201 S Nevada Ave,Toms River,Ocean,NJ,8755,732-628-9909,732-617-5310,golda_kaniecki@yahoo.com,http://www.calaverasprospect.com
|
422 |
+
Catarina,Gleich,"Terk, Robert E Esq",78 Maryland Dr #146,Denville,Morris,NJ,7834,973-210-3994,973-491-8723,catarina_gleich@hotmail.com,http://www.terkroberteesq.com
|
423 |
+
Virgie,Kiel,"Cullen, Terrence P Esq",76598 Rd I 95 #1,Denver,Denver,CO,80216,303-776-7548,303-845-5408,vkiel@hotmail.com,http://www.cullenterrencepesq.com
|
424 |
+
Jolene,Ostolaza,Central Die Casting Mfg Co Inc,1610 14th St Nw,Newport News,Newport News City,VA,23608,757-682-7116,757-940-1741,jolene@yahoo.com,http://www.centraldiecastingmfgcoinc.com
|
425 |
+
Keneth,Borgman,Centerline Engineering,86350 Roszel Rd,Phoenix,Maricopa,AZ,85012,602-919-4211,602-442-3092,keneth@yahoo.com,http://www.centerlineengineering.com
|
426 |
+
Rikki,Nayar,Targan & Kievit Pa,1644 Clove Rd,Miami,Miami-Dade,FL,33155,305-968-9487,305-978-2069,rikki@nayar.com,http://www.targankievitpa.com
|
427 |
+
Elke,Sengbusch,Riley Riper Hollin & Colagreco,9 W Central Ave,Phoenix,Maricopa,AZ,85013,602-896-2993,602-575-3457,elke_sengbusch@yahoo.com,http://www.rileyriperhollincolagreco.com
|
428 |
+
Hoa,Sarao,"Kaplan, Joel S Esq",27846 Lafayette Ave,Oak Hill,Volusia,FL,32759,386-526-7800,386-599-7296,hoa@sarao.org,http://www.kaplanjoelsesq.com
|
429 |
+
Trinidad,Mcrae,Water Office,10276 Brooks St,San Francisco,San Francisco,CA,94105,415-331-9634,415-419-1597,trinidad_mcrae@yahoo.com,http://www.wateroffice.com
|
430 |
+
Mari,Lueckenbach,"Westbrooks, Nelson E Jr",1 Century Park E,San Diego,San Diego,CA,92110,858-793-9684,858-228-5683,mari_lueckenbach@yahoo.com,http://www.westbrooksnelsonejr.com
|
431 |
+
Selma,Husser,Armon Communications,9 State Highway 57 #22,Jersey City,Hudson,NJ,7306,201-991-8369,201-772-7699,selma.husser@cox.net,http://www.armoncommunications.com
|
432 |
+
Antione,Onofrio,Jacobs & Gerber Inc,4 S Washington Ave,San Bernardino,San Bernardino,CA,92410,909-430-7765,909-665-3223,aonofrio@onofrio.com,http://www.jacobsgerberinc.com
|
433 |
+
Luisa,Jurney,Forest Fire Laboratory,25 Se 176th Pl,Cambridge,Middlesex,MA,2138,617-365-2134,617-544-2541,ljurney@hotmail.com,http://www.forestfirelaboratory.com
|
434 |
+
Clorinda,Heimann,"Haughey, Charles Jr",105 Richmond Valley Rd,Escondido,San Diego,CA,92025,760-291-5497,760-261-4786,clorinda.heimann@hotmail.com,http://www.haugheycharlesjr.com
|
435 |
+
Dick,Wenzinger,Wheaton Plastic Products,22 Spruce St #595,Gardena,Los Angeles,CA,90248,310-510-9713,310-936-2258,dick@yahoo.com,http://www.wheatonplasticproducts.com
|
436 |
+
Ahmed,Angalich,Reese Plastics,2 W Beverly Blvd,Harrisburg,Dauphin,PA,17110,717-528-8996,717-632-5831,ahmed.angalich@angalich.com,http://www.reeseplastics.com
|
437 |
+
Iluminada,Ohms,Nazette Marner Good Wendt,72 Southern Blvd,Mesa,Maricopa,AZ,85204,480-293-2882,480-866-6544,iluminada.ohms@yahoo.com,http://www.nazettemarnergoodwendt.com
|
438 |
+
Joanna,Leinenbach,Levinson Axelrod Wheaton,1 Washington St,Lake Worth,Palm Beach,FL,33461,561-470-4574,561-951-9734,joanna_leinenbach@hotmail.com,http://www.levinsonaxelrodwheaton.com
|
439 |
+
Caprice,Suell,"Egnor, W Dan Esq",90177 N 55th Ave,Nashville,Davidson,TN,37211,615-246-1824,615-726-4537,caprice@aol.com,http://www.egnorwdanesq.com
|
440 |
+
Stephane,Myricks,Portland Central Thriftlodge,9 Tower Ave,Burlington,Boone,KY,41005,859-717-7638,859-308-4286,stephane_myricks@cox.net,http://www.portlandcentralthriftlodge.com
|
441 |
+
Quentin,Swayze,Ulbrich Trucking,278 Bayview Ave,Milan,Monroe,MI,48160,734-561-6170,734-851-8571,quentin_swayze@yahoo.com,http://www.ulbrichtrucking.com
|
442 |
+
Annmarie,Castros,Tipiak Inc,80312 W 32nd St,Conroe,Montgomery,TX,77301,936-751-7961,936-937-2334,annmarie_castros@gmail.com,http://www.tipiakinc.com
|
443 |
+
Shonda,Greenbush,Saint George Well Drilling,82 Us Highway 46,Clifton,Passaic,NJ,7011,973-482-2430,973-644-2974,shonda_greenbush@cox.net,http://www.saintgeorgewelldrilling.com
|
444 |
+
Cecil,Lapage,"Hawkes, Douglas D",4 Stovall St #72,Union City,Hudson,NJ,7087,201-693-3967,201-856-2720,clapage@lapage.com,http://www.hawkesdouglasd.com
|
445 |
+
Jeanice,Claucherty,Accurel Systems Intrntl Corp,19 Amboy Ave,Miami,Miami-Dade,FL,33142,305-988-4162,305-306-7834,jeanice.claucherty@yahoo.com,http://www.accurelsystemsintrntlcorp.com
|
446 |
+
Josphine,Villanueva,Santa Cruz Community Internet,63 Smith Ln #8343,Moss,Clay,TN,38575,931-553-9774,931-486-6946,josphine_villanueva@villanueva.com,http://www.santacruzcommunityinternet.com
|
447 |
+
Daniel,Perruzza,Gersh & Danielson,11360 S Halsted St,Santa Ana,Orange,CA,92705,714-771-3880,714-531-1391,dperruzza@perruzza.com,http://www.gershdanielson.com
|
448 |
+
Cassi,Wildfong,"Cobb, James O Esq",26849 Jefferson Hwy,Rolling Meadows,Cook,IL,60008,847-633-3216,847-755-9041,cassi.wildfong@aol.com,http://www.cobbjamesoesq.com
|
449 |
+
Britt,Galam,Wheatley Trucking Company,2500 Pringle Rd Se #508,Hatfield,Montgomery,PA,19440,215-888-3304,215-351-8523,britt@galam.org,http://www.wheatleytruckingcompany.com
|
450 |
+
Adell,Lipkin,Systems Graph Inc Ab Dick Dlr,65 Mountain View Dr,Whippany,Morris,NJ,7981,973-654-1561,973-662-8988,adell.lipkin@lipkin.com,http://www.systemsgraphincabdickdlr.com
|
451 |
+
Jacqueline,Rowling,John Hancock Mutl Life Ins Co,1 N San Saba,Erie,Erie,PA,16501,814-865-8113,814-481-1700,jacqueline.rowling@yahoo.com,http://www.johnhancockmutllifeinsco.com
|
452 |
+
Lonny,Weglarz,History Division Of State,51120 State Route 18,Salt Lake City,Salt Lake,UT,84115,801-293-9853,801-892-8781,lonny_weglarz@gmail.com,http://www.historydivisionofstate.com
|
453 |
+
Lonna,Diestel,"Dimmock, Thomas J Esq",1482 College Ave,Fayetteville,Cumberland,NC,28301,910-922-3672,910-200-7912,lonna_diestel@gmail.com,http://www.dimmockthomasjesq.com
|
454 |
+
Cristal,Samara,Intermed Inc,4119 Metropolitan Dr,Los Angeles,Los Angeles,CA,90021,213-975-8026,213-696-8004,cristal@cox.net,http://www.intermedinc.com
|
455 |
+
Kenneth,Grenet,Bank Of New York,2167 Sierra Rd,East Lansing,Ingham,MI,48823,517-499-2322,517-867-8077,kenneth.grenet@grenet.org,http://www.bankofnewyork.com
|
456 |
+
Elli,Mclaird,Sportmaster Intrnatl,6 Sunrise Ave,Utica,Oneida,NY,13501,315-818-2638,315-474-5570,emclaird@mclaird.com,http://www.sportmasterintrnatl.com
|
457 |
+
Alline,Jeanty,W W John Holden Inc,55713 Lake City Hwy,South Bend,St Joseph,IN,46601,574-656-2800,574-405-1983,ajeanty@gmail.com,http://www.wwjohnholdeninc.com
|
458 |
+
Sharika,Eanes,Maccani & Delp,75698 N Fiesta Blvd,Orlando,Orange,FL,32806,407-312-1691,407-472-1332,sharika.eanes@aol.com,http://www.maccanidelp.com
|
459 |
+
Nu,Mcnease,Amazonia Film Project,88 Sw 28th Ter,Harrison,Hudson,NJ,7029,973-751-9003,973-903-4175,nu@gmail.com,http://www.amazoniafilmproject.com
|
460 |
+
Daniela,Comnick,Water & Sewer Department,7 Flowers Rd #403,Trenton,Mercer,NJ,8611,609-200-8577,609-398-2805,dcomnick@cox.net,http://www.watersewerdepartment.com
|
461 |
+
Cecilia,Colaizzo,Switchcraft Inc,4 Nw 12th St #3849,Madison,Dane,WI,53717,608-382-4541,608-302-3387,cecilia_colaizzo@colaizzo.com,http://www.switchcraftinc.com
|
462 |
+
Leslie,Threets,C W D C Metal Fabricators,2 A Kelley Dr,Katonah,Westchester,NY,10536,914-861-9748,914-396-2615,leslie@cox.net,http://www.cwdcmetalfabricators.com
|
463 |
+
Nan,Koppinger,"Shimotani, Grace T",88827 Frankford Ave,Greensboro,Guilford,NC,27401,336-370-5333,336-564-1492,nan@koppinger.com,http://www.shimotanigracet.com
|
464 |
+
Izetta,Dewar,"Lisatoni, Jean Esq",2 W Scyene Rd #3,Baltimore,Baltimore City,MD,21217,410-473-1708,410-522-7621,idewar@dewar.com,http://www.lisatonijeanesq.com
|
465 |
+
Tegan,Arceo,Ceramic Tile Sales Inc,62260 Park Stre,Monroe Township,Middlesex,NJ,8831,732-730-2692,732-705-6719,tegan.arceo@arceo.org,http://www.ceramictilesalesinc.com
|
466 |
+
Ruthann,Keener,Maiden Craft Inc,3424 29th St Se,Kerrville,Kerr,TX,78028,830-258-2769,830-919-5991,ruthann@hotmail.com,http://www.maidencraftinc.com
|
467 |
+
Joni,Breland,Carriage House Cllsn Rpr Inc,35 E Main St #43,Elk Grove Village,Cook,IL,60007,847-519-5906,847-740-5304,joni_breland@cox.net,http://www.carriagehousecllsnrprinc.com
|
468 |
+
Vi,Rentfro,Video Workshop,7163 W Clark Rd,Freehold,Monmouth,NJ,7728,732-605-4781,732-724-7251,vrentfro@cox.net,http://www.videoworkshop.com
|
469 |
+
Colette,Kardas,Fresno Tile Center Inc,21575 S Apple Creek Rd,Omaha,Douglas,NE,68124,402-896-5943,402-707-1602,colette.kardas@yahoo.com,http://www.fresnotilecenterinc.com
|
470 |
+
Malcolm,Tromblay,Versatile Sash & Woodwork,747 Leonis Blvd,Annandale,Fairfax,VA,22003,703-221-5602,703-874-4248,malcolm_tromblay@cox.net,http://www.versatilesashwoodwork.com
|
471 |
+
Ryan,Harnos,Warner Electric Brk & Cltch Co,13 Gunnison St,Plano,Collin,TX,75075,972-558-1665,972-961-4968,ryan@cox.net,http://www.warnerelectricbrkcltchco.com
|
472 |
+
Jess,Chaffins,New York Public Library,18 3rd Ave,New York,New York,NY,10016,212-510-4633,212-428-9538,jess.chaffins@chaffins.org,http://www.newyorkpubliclibrary.com
|
473 |
+
Sharen,Bourbon,"Mccaleb, John A Esq",62 W Austin St,Syosset,Nassau,NY,11791,516-816-1541,516-749-3188,sbourbon@yahoo.com,http://www.mccalebjohnaesq.com
|
474 |
+
Nickolas,Juvera,United Oil Co Inc,177 S Rider Trl #52,Crystal River,Citrus,FL,34429,352-598-8301,352-947-6152,nickolas_juvera@cox.net,http://www.unitedoilcoinc.com
|
475 |
+
Gary,Nunlee,Irving Foot Center,2 W Mount Royal Ave,Fortville,Hancock,IN,46040,317-542-6023,317-887-8486,gary_nunlee@nunlee.org,http://www.irvingfootcenter.com
|
476 |
+
Diane,Devreese,Acme Supply Co,1953 Telegraph Rd,Saint Joseph,Buchanan,MO,64504,816-557-9673,816-329-5565,diane@cox.net,http://www.acmesupplyco.com
|
477 |
+
Roslyn,Chavous,"Mcrae, James L",63517 Dupont St,Jackson,Hinds,MS,39211,601-234-9632,601-973-5754,roslyn.chavous@chavous.org,http://www.mcraejamesl.com
|
478 |
+
Glory,Schieler,Mcgraths Seafood,5 E Truman Rd,Abilene,Taylor,TX,79602,325-869-2649,325-740-3778,glory@yahoo.com,http://www.mcgrathsseafood.com
|
479 |
+
Rasheeda,Sayaphon,"Kummerer, J Michael Esq",251 Park Ave #979,Saratoga,Santa Clara,CA,95070,408-805-4309,408-997-7490,rasheeda@aol.com,http://www.kummererjmichaelesq.com
|
480 |
+
Alpha,Palaia,"Stoffer, James M Jr",43496 Commercial Dr #29,Cherry Hill,Camden,NJ,8003,856-312-2629,856-513-7024,alpha@yahoo.com,http://www.stofferjamesmjr.com
|
481 |
+
Refugia,Jacobos,North Central Fl Sfty Cncl,2184 Worth St,Hayward,Alameda,CA,94545,510-974-8671,510-509-3496,refugia.jacobos@jacobos.com,http://www.northcentralflsftycncl.com
|
482 |
+
Shawnda,Yori,Fiorucci Foods Usa Inc,50126 N Plankinton Ave,Longwood,Seminole,FL,32750,407-538-5106,407-564-8113,shawnda.yori@yahoo.com,http://www.fioruccifoodsusainc.com
|
483 |
+
Mona,Delasancha,Sign All,38773 Gravois Ave,Cheyenne,Laramie,WY,82001,307-403-1488,307-816-7115,mdelasancha@hotmail.com,http://www.signall.com
|
484 |
+
Gilma,Liukko,Sammys Steak Den,16452 Greenwich St,Garden City,Nassau,NY,11530,516-393-9967,516-407-9573,gilma_liukko@gmail.com,http://www.sammyssteakden.com
|
485 |
+
Janey,Gabisi,"Dobscha, Stephen F Esq",40 Cambridge Ave,Madison,Dane,WI,53715,608-967-7194,608-586-6912,jgabisi@hotmail.com,http://www.dobschastephenfesq.com
|
486 |
+
Lili,Paskin,Morgan Custom Homes,20113 4th Ave E,Kearny,Hudson,NJ,7032,201-431-2989,201-478-8540,lili.paskin@cox.net,http://www.morgancustomhomes.com
|
487 |
+
Loren,Asar,Olsen Payne & Company,6 Ridgewood Center Dr,Old Forge,Lackawanna,PA,18518,570-648-3035,570-569-2356,loren.asar@aol.com,http://www.olsenpaynecompany.com
|
488 |
+
Dorothy,Chesterfield,Cowan & Kelly,469 Outwater Ln,San Diego,San Diego,CA,92126,858-617-7834,858-732-1884,dorothy@cox.net,http://www.cowankelly.com
|
489 |
+
Gail,Similton,"Johnson, Wes Esq",62 Monroe St,Thousand Palms,Riverside,CA,92276,760-616-5388,760-493-9208,gail_similton@similton.com,http://www.johnsonwesesq.com
|
490 |
+
Catalina,Tillotson,Icn Pharmaceuticals Inc,3338 A Lockport Pl #6,Margate City,Atlantic,NJ,8402,609-373-3332,609-826-4990,catalina@hotmail.com,http://www.icnpharmaceuticalsinc.com
|
491 |
+
Lawrence,Lorens,New England Sec Equip Co Inc,9 Hwy,Providence,Providence,RI,2906,401-465-6432,401-893-1820,lawrence.lorens@hotmail.com,http://www.newenglandsecequipcoinc.com
|
492 |
+
Carlee,Boulter,"Tippett, Troy M Ii",8284 Hart St,Abilene,Dickinson,KS,67410,785-347-1805,785-253-7049,carlee.boulter@hotmail.com,http://www.tippetttroymii.com
|
493 |
+
Thaddeus,Ankeny,Atc Contracting,5 Washington St #1,Roseville,Placer,CA,95678,916-920-3571,916-459-2433,tankeny@ankeny.org,http://www.atccontracting.com
|
494 |
+
Jovita,Oles,"Pagano, Philip G Esq",8 S Haven St,Daytona Beach,Volusia,FL,32114,386-248-4118,386-208-6976,joles@gmail.com,http://www.paganophilipgesq.com
|
495 |
+
Alesia,Hixenbaugh,Kwikprint,9 Front St,Washington,District of Columbia,DC,20001,202-646-7516,202-276-6826,alesia_hixenbaugh@hixenbaugh.org,http://www.kwikprint.com
|
496 |
+
Lai,Harabedian,Buergi & Madden Scale,1933 Packer Ave #2,Novato,Marin,CA,94945,415-423-3294,415-926-6089,lai@gmail.com,http://www.buergimaddenscale.com
|
497 |
+
Brittni,Gillaspie,Inner Label,67 Rv Cent,Boise,Ada,ID,83709,208-709-1235,208-206-9848,bgillaspie@gillaspie.com,http://www.innerlabel.com
|
498 |
+
Raylene,Kampa,Hermar Inc,2 Sw Nyberg Rd,Elkhart,Elkhart,IN,46514,574-499-1454,574-330-1884,rkampa@kampa.org,http://www.hermarinc.com
|
499 |
+
Flo,Bookamer,Simonton Howe & Schneider Pc,89992 E 15th St,Alliance,Box Butte,NE,69301,308-726-2182,308-250-6987,flo.bookamer@cox.net,http://www.simontonhoweschneiderpc.com
|
500 |
+
Jani,Biddy,Warehouse Office & Paper Prod,61556 W 20th Ave,Seattle,King,WA,98104,206-711-6498,206-395-6284,jbiddy@yahoo.com,http://www.warehouseofficepaperprod.com
|
501 |
+
Chauncey,Motley,Affiliated With Travelodge,63 E Aurora Dr,Orlando,Orange,FL,32804,407-413-4842,407-557-8857,chauncey_motley@aol.com,http://www.affiliatedwithtravelodge.com
|
util.py
ADDED
@@ -0,0 +1,2114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[ ]:
|
5 |
+
|
6 |
+
|
7 |
+
import os
|
8 |
+
import sys
|
9 |
+
from random import randint
|
10 |
+
import random
|
11 |
+
import time
|
12 |
+
import uuid
|
13 |
+
from datetime import datetime
|
14 |
+
import math
|
15 |
+
import numpy as np
|
16 |
+
import pandas as pd
|
17 |
+
import matplotlib.pyplot as plt
|
18 |
+
import numpy as np
|
19 |
+
import logging
|
20 |
+
import logging.handlers
|
21 |
+
import pickle
|
22 |
+
from contextlib import contextmanager
|
23 |
+
|
24 |
+
tokens = ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M",
|
25 |
+
"N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"]
|
26 |
+
numTokens = tokens[:10]
|
27 |
+
alphaTokens = tokens[10:36]
|
28 |
+
loCaseChars = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k","l","m","n","o",
|
29 |
+
"p","q","r","s","t","u","v","w","x","y","z"]
|
30 |
+
|
31 |
+
typeInt = "int"
|
32 |
+
typeFloat = "float"
|
33 |
+
typeString = "string"
|
34 |
+
|
35 |
+
secInMinute = 60
|
36 |
+
secInHour = 60 * 60
|
37 |
+
secInDay = 24 * secInHour
|
38 |
+
secInWeek = 7 * secInDay
|
39 |
+
secInYear = 365 * secInDay
|
40 |
+
secInMonth = secInYear / 12
|
41 |
+
|
42 |
+
minInHour = 60
|
43 |
+
minInDay = 24 * minInHour
|
44 |
+
|
45 |
+
ftPerYard = 3
|
46 |
+
ftPerMile = ftPerYard * 1760
|
47 |
+
|
48 |
+
|
49 |
+
def genID(size):
|
50 |
+
"""
|
51 |
+
generates ID
|
52 |
+
|
53 |
+
Parameters
|
54 |
+
size : size of ID
|
55 |
+
"""
|
56 |
+
id = ""
|
57 |
+
for i in range(size):
|
58 |
+
id = id + selectRandomFromList(tokens)
|
59 |
+
return id
|
60 |
+
|
61 |
+
def genIdList(numId, idSize):
|
62 |
+
"""
|
63 |
+
generate list of IDs
|
64 |
+
|
65 |
+
Parameters:
|
66 |
+
numId: number of Ids
|
67 |
+
idSize: ID size
|
68 |
+
"""
|
69 |
+
iDs = []
|
70 |
+
for i in range(numId):
|
71 |
+
iDs.append(genID(idSize))
|
72 |
+
return iDs
|
73 |
+
|
74 |
+
def genNumID(size):
|
75 |
+
"""
|
76 |
+
generates ID consisting of digits onl
|
77 |
+
|
78 |
+
Parameters
|
79 |
+
size : size of ID
|
80 |
+
"""
|
81 |
+
id = ""
|
82 |
+
for i in range(size):
|
83 |
+
id = id + selectRandomFromList(numTokens)
|
84 |
+
return id
|
85 |
+
|
86 |
+
def genLowCaseID(size):
|
87 |
+
"""
|
88 |
+
generates ID consisting of lower case chars
|
89 |
+
|
90 |
+
Parameters
|
91 |
+
size : size of ID
|
92 |
+
"""
|
93 |
+
id = ""
|
94 |
+
for i in range(size):
|
95 |
+
id = id + selectRandomFromList(loCaseChars)
|
96 |
+
return id
|
97 |
+
|
98 |
+
def genNumIdList(numId, idSize):
|
99 |
+
"""
|
100 |
+
generate list of numeric IDs
|
101 |
+
|
102 |
+
Parameters:
|
103 |
+
numId: number of Ids
|
104 |
+
idSize: ID size
|
105 |
+
"""
|
106 |
+
iDs = []
|
107 |
+
for i in range(numId):
|
108 |
+
iDs.append(genNumID(idSize))
|
109 |
+
return iDs
|
110 |
+
|
111 |
+
def genNameInitial():
|
112 |
+
"""
|
113 |
+
generate name initial
|
114 |
+
"""
|
115 |
+
return selectRandomFromList(alphaTokens) + selectRandomFromList(alphaTokens)
|
116 |
+
|
117 |
+
def genPhoneNum(arCode):
|
118 |
+
"""
|
119 |
+
generates phone number
|
120 |
+
|
121 |
+
Parameters
|
122 |
+
arCode: area code
|
123 |
+
"""
|
124 |
+
phNum = genNumID(7)
|
125 |
+
return arCode + str(phNum)
|
126 |
+
|
127 |
+
def selectRandomFromList(ldata):
|
128 |
+
"""
|
129 |
+
select an element randomly from a lis
|
130 |
+
|
131 |
+
Parameters
|
132 |
+
ldata : list data
|
133 |
+
"""
|
134 |
+
return ldata[randint(0, len(ldata)-1)]
|
135 |
+
|
136 |
+
def selectOtherRandomFromList(ldata, cval):
|
137 |
+
"""
|
138 |
+
select an element randomly from a list excluding the given one
|
139 |
+
|
140 |
+
Parameters
|
141 |
+
ldata : list data
|
142 |
+
cval : value to be excluded
|
143 |
+
"""
|
144 |
+
nval = selectRandomFromList(ldata)
|
145 |
+
while nval == cval:
|
146 |
+
nval = selectRandomFromList(ldata)
|
147 |
+
return nval
|
148 |
+
|
149 |
+
def selectRandomSubListFromList(ldata, num):
|
150 |
+
"""
|
151 |
+
generates random sublist from a list without replacemment
|
152 |
+
|
153 |
+
Parameters
|
154 |
+
ldata : list data
|
155 |
+
num : output list size
|
156 |
+
"""
|
157 |
+
assertLesser(num, len(ldata), "size of sublist to be sampled greater than or equal to main list")
|
158 |
+
i = randint(0, len(ldata)-1)
|
159 |
+
sel = ldata[i]
|
160 |
+
selSet = {i}
|
161 |
+
selList = [sel]
|
162 |
+
while (len(selSet) < num):
|
163 |
+
i = randint(0, len(ldata)-1)
|
164 |
+
if (i not in selSet):
|
165 |
+
sel = ldata[i]
|
166 |
+
selSet.add(i)
|
167 |
+
selList.append(sel)
|
168 |
+
return selList
|
169 |
+
|
170 |
+
def selectRandomSubListFromListWithRepl(ldata, num):
|
171 |
+
"""
|
172 |
+
generates random sublist from a list with replacemment
|
173 |
+
|
174 |
+
Parameters
|
175 |
+
ldata : list data
|
176 |
+
num : output list size
|
177 |
+
"""
|
178 |
+
return list(map(lambda i : selectRandomFromList(ldata), range(num)))
|
179 |
+
|
180 |
+
def selectRandomFromDict(ddata):
|
181 |
+
"""
|
182 |
+
select an element randomly from a dictionary
|
183 |
+
|
184 |
+
Parameters
|
185 |
+
ddata : dictionary data
|
186 |
+
"""
|
187 |
+
dkeys = list(ddata.keys())
|
188 |
+
dk = selectRandomFromList(dkeys)
|
189 |
+
el = (dk, ddata[dk])
|
190 |
+
return el
|
191 |
+
|
192 |
+
def setListRandomFromList(ldata, ldataRepl):
|
193 |
+
"""
|
194 |
+
sets some elents in the first list randomly with elements from the second list
|
195 |
+
|
196 |
+
Parameters
|
197 |
+
ldata : list data
|
198 |
+
ldataRepl : list with replacement data
|
199 |
+
"""
|
200 |
+
l = len(ldata)
|
201 |
+
selSet = set()
|
202 |
+
for d in ldataRepl:
|
203 |
+
i = randint(0, l-1)
|
204 |
+
while i in selSet:
|
205 |
+
i = randint(0, l-1)
|
206 |
+
ldata[i] = d
|
207 |
+
selSet.add(i)
|
208 |
+
|
209 |
+
def genIpAddress():
|
210 |
+
"""
|
211 |
+
generates IP address
|
212 |
+
"""
|
213 |
+
i1 = randint(0,256)
|
214 |
+
i2 = randint(0,256)
|
215 |
+
i3 = randint(0,256)
|
216 |
+
i4 = randint(0,256)
|
217 |
+
ip = "%d.%d.%d.%d" %(i1,i2,i3,i4)
|
218 |
+
return ip
|
219 |
+
|
220 |
+
def curTimeMs():
|
221 |
+
"""
|
222 |
+
current time in ms
|
223 |
+
"""
|
224 |
+
return int((datetime.utcnow() - datetime(1970,1,1)).total_seconds() * 1000)
|
225 |
+
|
226 |
+
def secDegPolyFit(x1, y1, x2, y2, x3, y3):
|
227 |
+
"""
|
228 |
+
second deg polynomial
|
229 |
+
|
230 |
+
Parameters
|
231 |
+
x1 : 1st point x
|
232 |
+
y1 : 1st point y
|
233 |
+
x2 : 2nd point x
|
234 |
+
y2 : 2nd point y
|
235 |
+
x3 : 3rd point x
|
236 |
+
y3 : 3rd point y
|
237 |
+
"""
|
238 |
+
t = (y1 - y2) / (x1 - x2)
|
239 |
+
a = t - (y2 - y3) / (x2 - x3)
|
240 |
+
a = a / (x1 - x3)
|
241 |
+
b = t - a * (x1 + x2)
|
242 |
+
c = y1 - a * x1 * x1 - b * x1
|
243 |
+
return (a, b, c)
|
244 |
+
|
245 |
+
def range_limit(val, minv, maxv):
|
246 |
+
"""
|
247 |
+
range limit a value
|
248 |
+
|
249 |
+
Parameters
|
250 |
+
val : data value
|
251 |
+
minv : minimum
|
252 |
+
maxv : maximum
|
253 |
+
"""
|
254 |
+
if (val < minv):
|
255 |
+
val = minv
|
256 |
+
elif (val > maxv):
|
257 |
+
val = maxv
|
258 |
+
return val
|
259 |
+
|
260 |
+
def isInRange(val, minv, maxv):
|
261 |
+
"""
|
262 |
+
checks if within range
|
263 |
+
|
264 |
+
Parameters
|
265 |
+
val : data value
|
266 |
+
minv : minimum
|
267 |
+
maxv : maximum
|
268 |
+
"""
|
269 |
+
return val >= minv and val <= maxv
|
270 |
+
|
271 |
+
def stripFileLines(filePath, offset):
|
272 |
+
"""
|
273 |
+
strips number of chars from both ends
|
274 |
+
|
275 |
+
Parameters
|
276 |
+
filePath : file path
|
277 |
+
offset : offset from both ends of line
|
278 |
+
"""
|
279 |
+
fp = open(filePath, "r")
|
280 |
+
for line in fp:
|
281 |
+
stripped = line[offset:len(line) - 1 - offset]
|
282 |
+
print (stripped)
|
283 |
+
fp.close()
|
284 |
+
|
285 |
+
def genLatLong(lat1, long1, lat2, long2):
|
286 |
+
"""
|
287 |
+
generate lat log within limits
|
288 |
+
|
289 |
+
Parameters
|
290 |
+
lat1 : lat of 1st point
|
291 |
+
long1 : long of 1st point
|
292 |
+
lat2 : lat of 2nd point
|
293 |
+
long2 : long of 2nd point
|
294 |
+
"""
|
295 |
+
lat = lat1 + (lat2 - lat1) * random.random()
|
296 |
+
longg = long1 + (long2 - long1) * random.random()
|
297 |
+
return (lat, longg)
|
298 |
+
|
299 |
+
def geoDistance(lat1, long1, lat2, long2):
|
300 |
+
"""
|
301 |
+
find geo distance in ft
|
302 |
+
|
303 |
+
Parameters
|
304 |
+
lat1 : lat of 1st point
|
305 |
+
long1 : long of 1st point
|
306 |
+
lat2 : lat of 2nd point
|
307 |
+
long2 : long of 2nd point
|
308 |
+
"""
|
309 |
+
latDiff = math.radians(lat1 - lat2)
|
310 |
+
longDiff = math.radians(long1 - long2)
|
311 |
+
l1 = math.sin(latDiff/2.0)
|
312 |
+
l2 = math.sin(longDiff/2.0)
|
313 |
+
l3 = math.cos(math.radians(lat1))
|
314 |
+
l4 = math.cos(math.radians(lat2))
|
315 |
+
a = l1 * l1 + l3 * l4 * l2 * l2
|
316 |
+
l5 = math.sqrt(a)
|
317 |
+
l6 = math.sqrt(1.0 - a)
|
318 |
+
c = 2.0 * math.atan2(l5, l6)
|
319 |
+
r = 6371008.8 * 3.280840
|
320 |
+
return c * r
|
321 |
+
|
322 |
+
def minLimit(val, limit):
|
323 |
+
"""
|
324 |
+
min limit
|
325 |
+
Parameters
|
326 |
+
"""
|
327 |
+
if (val < limit):
|
328 |
+
val = limit
|
329 |
+
return val;
|
330 |
+
|
331 |
+
def maxLimit(val, limit):
|
332 |
+
"""
|
333 |
+
max limit
|
334 |
+
Parameters
|
335 |
+
"""
|
336 |
+
if (val > limit):
|
337 |
+
val = limit
|
338 |
+
return val;
|
339 |
+
|
340 |
+
def rangeSample(val, minLim, maxLim):
|
341 |
+
"""
|
342 |
+
if out side range sample within range
|
343 |
+
|
344 |
+
Parameters
|
345 |
+
val : value
|
346 |
+
minLim : minimum
|
347 |
+
maxLim : maximum
|
348 |
+
"""
|
349 |
+
if val < minLim or val > maxLim:
|
350 |
+
val = randint(minLim, maxLim)
|
351 |
+
return val
|
352 |
+
|
353 |
+
def genRandomIntListWithinRange(size, minLim, maxLim):
|
354 |
+
"""
|
355 |
+
random unique list of integers within range
|
356 |
+
|
357 |
+
Parameters
|
358 |
+
size : size of returned list
|
359 |
+
minLim : minimum
|
360 |
+
maxLim : maximum
|
361 |
+
"""
|
362 |
+
values = set()
|
363 |
+
for i in range(size):
|
364 |
+
val = randint(minLim, maxLim)
|
365 |
+
while val not in values:
|
366 |
+
values.add(val)
|
367 |
+
return list(values)
|
368 |
+
|
369 |
+
def preturbScalar(value, vrange):
|
370 |
+
"""
|
371 |
+
preturbs a mutiplicative value within range
|
372 |
+
|
373 |
+
Parameters
|
374 |
+
value : data value
|
375 |
+
vrange : value delta fraction
|
376 |
+
"""
|
377 |
+
scale = 1.0 - vrange + 2 * vrange * random.random()
|
378 |
+
return value * scale
|
379 |
+
|
380 |
+
def preturbScalarAbs(value, vrange):
|
381 |
+
"""
|
382 |
+
preturbs an absolute value within range
|
383 |
+
|
384 |
+
Parameters
|
385 |
+
value : data value
|
386 |
+
vrange : value delta absolute
|
387 |
+
"""
|
388 |
+
delta = - vrange + 2.0 * vrange * random.random()
|
389 |
+
return value + delta
|
390 |
+
|
391 |
+
def preturbVector(values, vrange):
|
392 |
+
"""
|
393 |
+
preturbs a list within range
|
394 |
+
|
395 |
+
Parameters
|
396 |
+
values : list data
|
397 |
+
vrange : value delta fraction
|
398 |
+
"""
|
399 |
+
nValues = list(map(lambda va: preturbScalar(va, vrange), values))
|
400 |
+
return nValues
|
401 |
+
|
402 |
+
def randomShiftVector(values, smin, smax):
|
403 |
+
"""
|
404 |
+
shifts a list by a random quanity with a range
|
405 |
+
|
406 |
+
Parameters
|
407 |
+
values : list data
|
408 |
+
smin : samplinf minimum
|
409 |
+
smax : sampling maximum
|
410 |
+
"""
|
411 |
+
shift = np.random.uniform(smin, smax)
|
412 |
+
return list(map(lambda va: va + shift, values))
|
413 |
+
|
414 |
+
def floatRange(beg, end, incr):
|
415 |
+
"""
|
416 |
+
generates float range
|
417 |
+
|
418 |
+
Parameters
|
419 |
+
beg :range begin
|
420 |
+
end: range end
|
421 |
+
incr : range increment
|
422 |
+
"""
|
423 |
+
return list(np.arange(beg, end, incr))
|
424 |
+
|
425 |
+
def shuffle(values, *numShuffles):
|
426 |
+
"""
|
427 |
+
in place shuffling with swap of pairs
|
428 |
+
|
429 |
+
Parameters
|
430 |
+
values : list data
|
431 |
+
numShuffles : parameter list for number of shuffles
|
432 |
+
"""
|
433 |
+
size = len(values)
|
434 |
+
if len(numShuffles) == 0:
|
435 |
+
numShuffle = int(size / 2)
|
436 |
+
elif len(numShuffles) == 1:
|
437 |
+
numShuffle = numShuffles[0]
|
438 |
+
else:
|
439 |
+
numShuffle = randint(numShuffles[0], numShuffles[1])
|
440 |
+
print("numShuffle {}".format(numShuffle))
|
441 |
+
for i in range(numShuffle):
|
442 |
+
first = random.randint(0, size - 1)
|
443 |
+
second = random.randint(0, size - 1)
|
444 |
+
while first == second:
|
445 |
+
second = random.randint(0, size - 1)
|
446 |
+
tmp = values[first]
|
447 |
+
values[first] = values[second]
|
448 |
+
values[second] = tmp
|
449 |
+
|
450 |
+
|
451 |
+
def splitList(itms, numGr):
|
452 |
+
"""
|
453 |
+
splits a list into sub lists of approximately equal size, with items in sublists randomly chod=sen
|
454 |
+
|
455 |
+
Parameters
|
456 |
+
itms ; list of values
|
457 |
+
numGr : no of groups
|
458 |
+
"""
|
459 |
+
tcount = len(itms)
|
460 |
+
cItems = list(itms)
|
461 |
+
sz = int(len(cItems) / numGr)
|
462 |
+
groups = list()
|
463 |
+
count = 0
|
464 |
+
for i in range(numGr):
|
465 |
+
if (i == numGr - 1):
|
466 |
+
csz = tcount - count
|
467 |
+
else:
|
468 |
+
csz = sz + randint(-2, 2)
|
469 |
+
count += csz
|
470 |
+
gr = list()
|
471 |
+
for j in range(csz):
|
472 |
+
it = selectRandomFromList(cItems)
|
473 |
+
gr.append(it)
|
474 |
+
cItems.remove(it)
|
475 |
+
groups.append(gr)
|
476 |
+
return groups
|
477 |
+
|
478 |
+
def multVector(values, vrange):
|
479 |
+
"""
|
480 |
+
multiplies a list within value range
|
481 |
+
|
482 |
+
Parameters
|
483 |
+
values : list of values
|
484 |
+
vrange : fraction of vaue to be used to update
|
485 |
+
"""
|
486 |
+
scale = 1.0 - vrange + 2 * vrange * random.random()
|
487 |
+
nValues = list(map(lambda va: va * scale, values))
|
488 |
+
return nValues
|
489 |
+
|
490 |
+
def weightedAverage(values, weights):
|
491 |
+
"""
|
492 |
+
calculates weighted average
|
493 |
+
|
494 |
+
Parameters
|
495 |
+
values : list of values
|
496 |
+
weights : list of weights
|
497 |
+
"""
|
498 |
+
assert len(values) == len(weights), "values and weights should be same size"
|
499 |
+
vw = zip(values, weights)
|
500 |
+
wva = list(map(lambda e : e[0] * e[1], vw))
|
501 |
+
#wa = sum(x * y for x, y in vw) / sum(weights)
|
502 |
+
wav = sum(wva) / sum(weights)
|
503 |
+
return wav
|
504 |
+
|
505 |
+
def extractFields(line, delim, keepIndices):
|
506 |
+
"""
|
507 |
+
breaks a line into fields and keeps only specified fileds and returns new line
|
508 |
+
|
509 |
+
Parameters
|
510 |
+
line ; deli separated string
|
511 |
+
delim : delemeter
|
512 |
+
keepIndices : list of indexes to fields to be retained
|
513 |
+
"""
|
514 |
+
items = line.split(delim)
|
515 |
+
newLine = []
|
516 |
+
for i in keepIndices:
|
517 |
+
newLine.append(line[i])
|
518 |
+
return delim.join(newLine)
|
519 |
+
|
520 |
+
def remFields(line, delim, remIndices):
|
521 |
+
"""
|
522 |
+
removes fields from delim separated string
|
523 |
+
|
524 |
+
Parameters
|
525 |
+
line ; delemeter separated string
|
526 |
+
delim : delemeter
|
527 |
+
remIndices : list of indexes to fields to be removed
|
528 |
+
"""
|
529 |
+
items = line.split(delim)
|
530 |
+
newLine = []
|
531 |
+
for i in range(len(items)):
|
532 |
+
if not arrayContains(remIndices, i):
|
533 |
+
newLine.append(line[i])
|
534 |
+
return delim.join(newLine)
|
535 |
+
|
536 |
+
def extractList(data, indices):
|
537 |
+
"""
|
538 |
+
extracts list from another list, given indices
|
539 |
+
|
540 |
+
Parameters
|
541 |
+
remIndices : list data
|
542 |
+
indices : list of indexes to fields to be retained
|
543 |
+
"""
|
544 |
+
if areAllFieldsIncluded(data, indices):
|
545 |
+
exList = data.copy()
|
546 |
+
#print("all indices")
|
547 |
+
else:
|
548 |
+
exList = list()
|
549 |
+
le = len(data)
|
550 |
+
for i in indices:
|
551 |
+
assert i < le , "index {} out of bound {}".format(i, le)
|
552 |
+
exList.append(data[i])
|
553 |
+
|
554 |
+
return exList
|
555 |
+
|
556 |
+
def arrayContains(arr, item):
|
557 |
+
"""
|
558 |
+
checks if array contains an item
|
559 |
+
|
560 |
+
Parameters
|
561 |
+
arr : list data
|
562 |
+
item : item to search
|
563 |
+
"""
|
564 |
+
contains = True
|
565 |
+
try:
|
566 |
+
arr.index(item)
|
567 |
+
except ValueError:
|
568 |
+
contains = False
|
569 |
+
return contains
|
570 |
+
|
571 |
+
def strToIntArray(line, delim=","):
|
572 |
+
"""
|
573 |
+
int array from delim separated string
|
574 |
+
|
575 |
+
Parameters
|
576 |
+
line ; delemeter separated string
|
577 |
+
"""
|
578 |
+
arr = line.split(delim)
|
579 |
+
return [int(a) for a in arr]
|
580 |
+
|
581 |
+
def strToFloatArray(line, delim=","):
|
582 |
+
"""
|
583 |
+
float array from delim separated string
|
584 |
+
|
585 |
+
Parameters
|
586 |
+
line ; delemeter separated string
|
587 |
+
"""
|
588 |
+
arr = line.split(delim)
|
589 |
+
return [float(a) for a in arr]
|
590 |
+
|
591 |
+
def strListOrRangeToIntArray(line):
|
592 |
+
"""
|
593 |
+
int array from delim separated string or range
|
594 |
+
|
595 |
+
Parameters
|
596 |
+
line ; delemeter separated string
|
597 |
+
"""
|
598 |
+
varr = line.split(",")
|
599 |
+
if (len(varr) > 1):
|
600 |
+
iarr = list(map(lambda v: int(v), varr))
|
601 |
+
else:
|
602 |
+
vrange = line.split(":")
|
603 |
+
if (len(vrange) == 2):
|
604 |
+
lo = int(vrange[0])
|
605 |
+
hi = int(vrange[1])
|
606 |
+
iarr = list(range(lo, hi+1))
|
607 |
+
else:
|
608 |
+
iarr = [int(line)]
|
609 |
+
return iarr
|
610 |
+
|
611 |
+
def toStr(val, precision):
|
612 |
+
"""
|
613 |
+
converts any type to string
|
614 |
+
|
615 |
+
Parameters
|
616 |
+
val : value
|
617 |
+
precision ; precision for float value
|
618 |
+
"""
|
619 |
+
if type(val) == float or type(val) == np.float64 or type(val) == np.float32:
|
620 |
+
format = "%" + ".%df" %(precision)
|
621 |
+
sVal = format %(val)
|
622 |
+
else:
|
623 |
+
sVal = str(val)
|
624 |
+
return sVal
|
625 |
+
|
626 |
+
def toStrFromList(values, precision, delim=","):
|
627 |
+
"""
|
628 |
+
converts list of any type to delim separated string
|
629 |
+
|
630 |
+
Parameters
|
631 |
+
values : list data
|
632 |
+
precision ; precision for float value
|
633 |
+
delim : delemeter
|
634 |
+
"""
|
635 |
+
sValues = list(map(lambda v: toStr(v, precision), values))
|
636 |
+
return delim.join(sValues)
|
637 |
+
|
638 |
+
def toIntList(values):
|
639 |
+
"""
|
640 |
+
convert to int list
|
641 |
+
|
642 |
+
Parameters
|
643 |
+
values : list data
|
644 |
+
"""
|
645 |
+
return list(map(lambda va: int(va), values))
|
646 |
+
|
647 |
+
def toFloatList(values):
|
648 |
+
"""
|
649 |
+
convert to float list
|
650 |
+
|
651 |
+
Parameters
|
652 |
+
values : list data
|
653 |
+
"""
|
654 |
+
return list(map(lambda va: float(va), values))
|
655 |
+
|
656 |
+
def toStrList(values, precision=None):
|
657 |
+
"""
|
658 |
+
convert to string list
|
659 |
+
|
660 |
+
Parameters
|
661 |
+
values : list data
|
662 |
+
precision ; precision for float value
|
663 |
+
"""
|
664 |
+
return list(map(lambda va: toStr(va, precision), values))
|
665 |
+
|
666 |
+
def toIntFromBoolean(value):
|
667 |
+
"""
|
668 |
+
convert to int
|
669 |
+
|
670 |
+
Parameters
|
671 |
+
value : boolean value
|
672 |
+
"""
|
673 |
+
ival = 1 if value else 0
|
674 |
+
return ival
|
675 |
+
|
676 |
+
def typedValue(val, dtype=None):
|
677 |
+
"""
|
678 |
+
return typed value given string, discovers data type if not specified
|
679 |
+
|
680 |
+
Parameters
|
681 |
+
val : value
|
682 |
+
dtype : data type
|
683 |
+
"""
|
684 |
+
tVal = None
|
685 |
+
|
686 |
+
if dtype is not None:
|
687 |
+
if dtype == "num":
|
688 |
+
dtype = "int" if dtype.find(".") == -1 else "float"
|
689 |
+
|
690 |
+
if dtype == "int":
|
691 |
+
tVal = int(val)
|
692 |
+
elif dtype == "float":
|
693 |
+
tVal = float(val)
|
694 |
+
elif dtype == "bool":
|
695 |
+
tVal = bool(val)
|
696 |
+
else:
|
697 |
+
tVal = val
|
698 |
+
else:
|
699 |
+
if type(val) == str:
|
700 |
+
lVal = val.lower()
|
701 |
+
|
702 |
+
#int
|
703 |
+
done = True
|
704 |
+
try:
|
705 |
+
tVal = int(val)
|
706 |
+
except ValueError:
|
707 |
+
done = False
|
708 |
+
|
709 |
+
#float
|
710 |
+
if not done:
|
711 |
+
done = True
|
712 |
+
try:
|
713 |
+
tVal = float(val)
|
714 |
+
except ValueError:
|
715 |
+
done = False
|
716 |
+
|
717 |
+
#boolean
|
718 |
+
if not done:
|
719 |
+
done = True
|
720 |
+
if lVal == "true":
|
721 |
+
tVal = True
|
722 |
+
elif lVal == "false":
|
723 |
+
tVal = False
|
724 |
+
else:
|
725 |
+
done = False
|
726 |
+
#None
|
727 |
+
if not done:
|
728 |
+
if lVal == "none":
|
729 |
+
tVal = None
|
730 |
+
else:
|
731 |
+
tVal = val
|
732 |
+
else:
|
733 |
+
tVal = val
|
734 |
+
|
735 |
+
return tVal
|
736 |
+
|
737 |
+
def getAllFiles(dirPath):
|
738 |
+
"""
|
739 |
+
get all files recursively
|
740 |
+
|
741 |
+
Parameters
|
742 |
+
dirPath : directory path
|
743 |
+
"""
|
744 |
+
filePaths = []
|
745 |
+
for (thisDir, subDirs, fileNames) in os.walk(dirPath):
|
746 |
+
for fileName in fileNames:
|
747 |
+
filePaths.append(os.path.join(thisDir, fileName))
|
748 |
+
filePaths.sort()
|
749 |
+
return filePaths
|
750 |
+
|
751 |
+
def getFileContent(fpath, verbose=False):
|
752 |
+
"""
|
753 |
+
get file contents in directory
|
754 |
+
|
755 |
+
Parameters
|
756 |
+
fpath ; directory path
|
757 |
+
verbose : verbosity flag
|
758 |
+
"""
|
759 |
+
# dcument list
|
760 |
+
docComplete = []
|
761 |
+
filePaths = getAllFiles(fpath)
|
762 |
+
|
763 |
+
# read files
|
764 |
+
for filePath in filePaths:
|
765 |
+
if verbose:
|
766 |
+
print("next file " + filePath)
|
767 |
+
with open(filePath, 'r') as contentFile:
|
768 |
+
content = contentFile.read()
|
769 |
+
docComplete.append(content)
|
770 |
+
return (docComplete, filePaths)
|
771 |
+
|
772 |
+
def getOneFileContent(fpath):
|
773 |
+
"""
|
774 |
+
get one file contents
|
775 |
+
|
776 |
+
Parameters
|
777 |
+
fpath : file path
|
778 |
+
"""
|
779 |
+
with open(fpath, 'r') as contentFile:
|
780 |
+
docStr = contentFile.read()
|
781 |
+
return docStr
|
782 |
+
|
783 |
+
def getFileLines(dirPath, delim=","):
|
784 |
+
"""
|
785 |
+
get lines from a file
|
786 |
+
|
787 |
+
Parameters
|
788 |
+
dirPath : file path
|
789 |
+
delim : delemeter
|
790 |
+
"""
|
791 |
+
lines = list()
|
792 |
+
for li in fileRecGen(dirPath, delim):
|
793 |
+
lines.append(li)
|
794 |
+
return lines
|
795 |
+
|
796 |
+
def getFileSampleLines(dirPath, percen, delim=","):
|
797 |
+
"""
|
798 |
+
get sampled lines from a file
|
799 |
+
|
800 |
+
Parameters
|
801 |
+
dirPath : file path
|
802 |
+
percen : sampling percentage
|
803 |
+
delim : delemeter
|
804 |
+
"""
|
805 |
+
lines = list()
|
806 |
+
for li in fileRecGen(dirPath, delim):
|
807 |
+
if randint(0, 100) < percen:
|
808 |
+
lines.append(li)
|
809 |
+
return lines
|
810 |
+
|
811 |
+
def getFileColumnAsString(dirPath, index, delim=","):
|
812 |
+
"""
|
813 |
+
get string column from a file
|
814 |
+
|
815 |
+
Parameters
|
816 |
+
dirPath : file path
|
817 |
+
index : index
|
818 |
+
delim : delemeter
|
819 |
+
"""
|
820 |
+
fields = list()
|
821 |
+
for rec in fileRecGen(dirPath, delim):
|
822 |
+
fields.append(rec[index])
|
823 |
+
#print(fields)
|
824 |
+
return fields
|
825 |
+
|
826 |
+
def getFileColumnsAsString(dirPath, indexes, delim=","):
|
827 |
+
"""
|
828 |
+
get multiple string columns from a file
|
829 |
+
|
830 |
+
Parameters
|
831 |
+
dirPath : file path
|
832 |
+
indexes : indexes of columns
|
833 |
+
delim : delemeter
|
834 |
+
"""
|
835 |
+
nindex = len(indexes)
|
836 |
+
columns = list(map(lambda i : list(), range(nindex)))
|
837 |
+
for rec in fileRecGen(dirPath, delim):
|
838 |
+
for i in range(nindex):
|
839 |
+
columns[i].append(rec[indexes[i]])
|
840 |
+
return columns
|
841 |
+
|
842 |
+
def getFileColumnAsFloat(dirPath, index, delim=","):
|
843 |
+
"""
|
844 |
+
get float fileds from a file
|
845 |
+
|
846 |
+
Parameters
|
847 |
+
dirPath : file path
|
848 |
+
index : index
|
849 |
+
delim : delemeter
|
850 |
+
"""
|
851 |
+
#print("{} {}".format(dirPath, index))
|
852 |
+
fields = getFileColumnAsString(dirPath, index, delim)
|
853 |
+
return list(map(lambda v:float(v), fields))
|
854 |
+
|
855 |
+
def getFileColumnAsInt(dirPath, index, delim=","):
|
856 |
+
"""
|
857 |
+
get float fileds from a file
|
858 |
+
|
859 |
+
Parameters
|
860 |
+
dirPath : file path
|
861 |
+
index : index
|
862 |
+
delim : delemeter
|
863 |
+
"""
|
864 |
+
fields = getFileColumnAsString(dirPath, index, delim)
|
865 |
+
return list(map(lambda v:int(v), fields))
|
866 |
+
|
867 |
+
def getFileAsIntMatrix(dirPath, columns, delim=","):
|
868 |
+
"""
|
869 |
+
extracts int matrix from csv file given column indices with each row being concatenation of
|
870 |
+
extracted column values row size = num of columns
|
871 |
+
|
872 |
+
Parameters
|
873 |
+
dirPath : file path
|
874 |
+
columns : indexes of columns
|
875 |
+
delim : delemeter
|
876 |
+
"""
|
877 |
+
mat = list()
|
878 |
+
for rec in fileSelFieldsRecGen(dirPath, columns, delim):
|
879 |
+
mat.append(asIntList(rec))
|
880 |
+
return mat
|
881 |
+
|
882 |
+
def getFileAsFloatMatrix(dirPath, columns, delim=","):
|
883 |
+
"""
|
884 |
+
extracts float matrix from csv file given column indices with each row being concatenation of
|
885 |
+
extracted column values row size = num of columns
|
886 |
+
Parameters
|
887 |
+
dirPath : file path
|
888 |
+
columns : indexes of columns
|
889 |
+
delim : delemeter
|
890 |
+
"""
|
891 |
+
mat = list()
|
892 |
+
for rec in fileSelFieldsRecGen(dirPath, columns, delim):
|
893 |
+
mat.append(asFloatList(rec))
|
894 |
+
return mat
|
895 |
+
|
896 |
+
def getFileAsFloatColumn(dirPath):
|
897 |
+
"""
|
898 |
+
grt float list from a file with one float per row
|
899 |
+
Parameters
|
900 |
+
dirPath : file path
|
901 |
+
"""
|
902 |
+
flist = list()
|
903 |
+
for rec in fileRecGen(dirPath, None):
|
904 |
+
flist.append(float(rec))
|
905 |
+
return flist
|
906 |
+
|
907 |
+
def getFileAsFiltFloatMatrix(dirPath, filt, columns, delim=","):
|
908 |
+
"""
|
909 |
+
extracts float matrix from csv file given row filter and column indices with each row being
|
910 |
+
concatenation of extracted column values row size = num of columns
|
911 |
+
Parameters
|
912 |
+
dirPath : file path
|
913 |
+
columns : indexes of columns
|
914 |
+
filt : row filter lambda
|
915 |
+
delim : delemeter
|
916 |
+
"""
|
917 |
+
mat = list()
|
918 |
+
for rec in fileFiltSelFieldsRecGen(dirPath, filt, columns, delim):
|
919 |
+
mat.append(asFloatList(rec))
|
920 |
+
return mat
|
921 |
+
|
922 |
+
def getFileAsTypedRecords(dirPath, types, delim=","):
|
923 |
+
"""
|
924 |
+
extracts typed records from csv file with each row being concatenation of
|
925 |
+
extracted column values
|
926 |
+
Parameters
|
927 |
+
dirPath : file path
|
928 |
+
types : data types
|
929 |
+
delim : delemeter
|
930 |
+
"""
|
931 |
+
(dtypes, cvalues) = extractTypesFromString(types)
|
932 |
+
tdata = list()
|
933 |
+
for rec in fileRecGen(dirPath, delim):
|
934 |
+
trec = list()
|
935 |
+
for index, value in enumerate(rec):
|
936 |
+
value = __convToTyped(index, value, dtypes)
|
937 |
+
trec.append(value)
|
938 |
+
tdata.append(trec)
|
939 |
+
return tdata
|
940 |
+
|
941 |
+
|
942 |
+
def getFileColsAsTypedRecords(dirPath, columns, types, delim=","):
|
943 |
+
"""
|
944 |
+
extracts typed records from csv file given column indices with each row being concatenation of
|
945 |
+
extracted column values
|
946 |
+
Parameters
|
947 |
+
Parameters
|
948 |
+
dirPath : file path
|
949 |
+
columns : column indexes
|
950 |
+
types : data types
|
951 |
+
delim : delemeter
|
952 |
+
"""
|
953 |
+
(dtypes, cvalues) = extractTypesFromString(types)
|
954 |
+
tdata = list()
|
955 |
+
for rec in fileSelFieldsRecGen(dirPath, columns, delim):
|
956 |
+
trec = list()
|
957 |
+
for indx, value in enumerate(rec):
|
958 |
+
tindx = columns[indx]
|
959 |
+
value = __convToTyped(tindx, value, dtypes)
|
960 |
+
trec.append(value)
|
961 |
+
tdata.append(trec)
|
962 |
+
return tdata
|
963 |
+
|
964 |
+
def getFileColumnsMinMax(dirPath, columns, dtype, delim=","):
|
965 |
+
"""
|
966 |
+
extracts numeric matrix from csv file given column indices. For each column return min and max
|
967 |
+
Parameters
|
968 |
+
dirPath : file path
|
969 |
+
columns : column indexes
|
970 |
+
dtype : data type
|
971 |
+
delim : delemeter
|
972 |
+
"""
|
973 |
+
dtypes = list(map(lambda c : str(c) + ":" + dtype, columns))
|
974 |
+
dtypes = ",".join(dtypes)
|
975 |
+
#print(dtypes)
|
976 |
+
|
977 |
+
tdata = getFileColsAsTypedRecords(dirPath, columns, dtypes, delim)
|
978 |
+
minMax = list()
|
979 |
+
ncola = len(tdata[0])
|
980 |
+
ncole = len(columns)
|
981 |
+
assertEqual(ncola, ncole, "actual no of columns different from expected")
|
982 |
+
|
983 |
+
for ci in range(ncole):
|
984 |
+
vmin = sys.float_info.max
|
985 |
+
vmax = sys.float_info.min
|
986 |
+
for r in tdata:
|
987 |
+
cv = r[ci]
|
988 |
+
vmin = cv if cv < vmin else vmin
|
989 |
+
vmax = cv if cv > vmax else vmax
|
990 |
+
mm = (vmin, vmax, vmax - vmin)
|
991 |
+
minMax.append(mm)
|
992 |
+
|
993 |
+
return minMax
|
994 |
+
|
995 |
+
|
996 |
+
def getRecAsTypedRecord(rec, types, delim=None):
|
997 |
+
"""
|
998 |
+
converts record to typed records
|
999 |
+
Parameters
|
1000 |
+
rec : delemeter separate string or list of string
|
1001 |
+
types : field data types
|
1002 |
+
delim : delemeter
|
1003 |
+
"""
|
1004 |
+
if delim is not None:
|
1005 |
+
rec = rec.split(delim)
|
1006 |
+
(dtypes, cvalues) = extractTypesFromString(types)
|
1007 |
+
#print(types)
|
1008 |
+
#print(dtypes)
|
1009 |
+
trec = list()
|
1010 |
+
for ind, value in enumerate(rec):
|
1011 |
+
tvalue = __convToTyped(ind, value, dtypes)
|
1012 |
+
trec.append(tvalue)
|
1013 |
+
return trec
|
1014 |
+
|
1015 |
+
def __convToTyped(index, value, dtypes):
|
1016 |
+
"""
|
1017 |
+
convert to typed value
|
1018 |
+
Parameters
|
1019 |
+
index : index in type list
|
1020 |
+
value : data value
|
1021 |
+
dtypes : data type list
|
1022 |
+
"""
|
1023 |
+
#print(index, value)
|
1024 |
+
dtype = dtypes[index]
|
1025 |
+
tvalue = value
|
1026 |
+
if dtype == "int":
|
1027 |
+
tvalue = int(value)
|
1028 |
+
elif dtype == "float":
|
1029 |
+
tvalue = float(value)
|
1030 |
+
return tvalue
|
1031 |
+
|
1032 |
+
|
1033 |
+
|
1034 |
+
def extractTypesFromString(types):
|
1035 |
+
"""
|
1036 |
+
extracts column data types and set values for categorical variables
|
1037 |
+
Parameters
|
1038 |
+
types : encoded type information
|
1039 |
+
"""
|
1040 |
+
ftypes = types.split(",")
|
1041 |
+
dtypes = dict()
|
1042 |
+
cvalues = dict()
|
1043 |
+
for ftype in ftypes:
|
1044 |
+
items = ftype.split(":")
|
1045 |
+
cindex = int(items[0])
|
1046 |
+
dtype = items[1]
|
1047 |
+
dtypes[cindex] = dtype
|
1048 |
+
if len(items) == 3:
|
1049 |
+
sitems = items[2].split()
|
1050 |
+
cvalues[cindex] = sitems
|
1051 |
+
return (dtypes, cvalues)
|
1052 |
+
|
1053 |
+
def getMultipleFileAsInttMatrix(dirPathWithCol, delim=","):
|
1054 |
+
"""
|
1055 |
+
extracts int matrix from from csv files given column index for each file.
|
1056 |
+
num of columns = number of rows in each file and num of rows = number of files
|
1057 |
+
Parameters
|
1058 |
+
dirPathWithCol: list of file path and collumn index pair
|
1059 |
+
delim : delemeter
|
1060 |
+
"""
|
1061 |
+
mat = list()
|
1062 |
+
minLen = -1
|
1063 |
+
for path, col in dirPathWithCol:
|
1064 |
+
colVals = getFileColumnAsInt(path, col, delim)
|
1065 |
+
if minLen < 0 or len(colVals) < minLen:
|
1066 |
+
minLen = len(colVals)
|
1067 |
+
mat.append(colVals)
|
1068 |
+
|
1069 |
+
#make all same length
|
1070 |
+
mat = list(map(lambda li:li[:minLen], mat))
|
1071 |
+
return mat
|
1072 |
+
|
1073 |
+
def getMultipleFileAsFloatMatrix(dirPathWithCol, delim=","):
|
1074 |
+
"""
|
1075 |
+
extracts float matrix from from csv files given column index for each file.
|
1076 |
+
num of columns = number of rows in each file and num of rows = number of files
|
1077 |
+
Parameters
|
1078 |
+
dirPathWithCol: list of file path and collumn index pair
|
1079 |
+
delim : delemeter
|
1080 |
+
"""
|
1081 |
+
mat = list()
|
1082 |
+
minLen = -1
|
1083 |
+
for path, col in dirPathWithCol:
|
1084 |
+
colVals = getFileColumnAsFloat(path, col, delim)
|
1085 |
+
if minLen < 0 or len(colVals) < minLen:
|
1086 |
+
minLen = len(colVals)
|
1087 |
+
mat.append(colVals)
|
1088 |
+
|
1089 |
+
#make all same length
|
1090 |
+
mat = list(map(lambda li:li[:minLen], mat))
|
1091 |
+
return mat
|
1092 |
+
|
1093 |
+
def writeStrListToFile(ldata, filePath, delem=","):
|
1094 |
+
"""
|
1095 |
+
writes list of dlem separated string or list of list of string to afile
|
1096 |
+
|
1097 |
+
Parameters
|
1098 |
+
ldata : list data
|
1099 |
+
filePath : file path
|
1100 |
+
delim : delemeter
|
1101 |
+
"""
|
1102 |
+
with open(filePath, "w") as fh:
|
1103 |
+
for r in ldata:
|
1104 |
+
if type(r) == list:
|
1105 |
+
r = delem.join(r)
|
1106 |
+
fh.write(r + "\n")
|
1107 |
+
|
1108 |
+
def writeFloatListToFile(ldata, prec, filePath):
|
1109 |
+
"""
|
1110 |
+
writes float list to file, one value per line
|
1111 |
+
|
1112 |
+
Parameters
|
1113 |
+
ldata : list data
|
1114 |
+
prec : precision
|
1115 |
+
filePath : file path
|
1116 |
+
"""
|
1117 |
+
with open(filePath, "w") as fh:
|
1118 |
+
for d in ldata:
|
1119 |
+
fh.write(formatFloat(prec, d) + "\n")
|
1120 |
+
|
1121 |
+
|
1122 |
+
def takeFirst(elems):
|
1123 |
+
"""
|
1124 |
+
return fisrt item
|
1125 |
+
Parameters
|
1126 |
+
elems : list of data
|
1127 |
+
"""
|
1128 |
+
return elems[0]
|
1129 |
+
|
1130 |
+
def takeSecond(elems):
|
1131 |
+
"""
|
1132 |
+
return 2nd element
|
1133 |
+
Parameters
|
1134 |
+
elems : list of data
|
1135 |
+
"""
|
1136 |
+
return elems[1]
|
1137 |
+
|
1138 |
+
def takeThird(elems):
|
1139 |
+
"""
|
1140 |
+
returns 3rd element
|
1141 |
+
Parameters
|
1142 |
+
elems : list of data
|
1143 |
+
"""
|
1144 |
+
return elems[2]
|
1145 |
+
|
1146 |
+
def addToKeyedCounter(dCounter, key, count=1):
|
1147 |
+
"""
|
1148 |
+
add to to keyed counter
|
1149 |
+
Parameters
|
1150 |
+
dCounter : dictionary of counters
|
1151 |
+
key : dictionary key
|
1152 |
+
count : count to add
|
1153 |
+
"""
|
1154 |
+
curCount = dCounter.get(key, 0)
|
1155 |
+
dCounter[key] = curCount + count
|
1156 |
+
|
1157 |
+
def incrKeyedCounter(dCounter, key):
|
1158 |
+
"""
|
1159 |
+
increment keyed counter
|
1160 |
+
Parameters
|
1161 |
+
dCounter : dictionary of counters
|
1162 |
+
key : dictionary key
|
1163 |
+
"""
|
1164 |
+
addToKeyedCounter(dCounter, key, 1)
|
1165 |
+
|
1166 |
+
def appendKeyedList(dList, key, elem):
|
1167 |
+
"""
|
1168 |
+
keyed list
|
1169 |
+
Parameters
|
1170 |
+
dList : dictionary of lists
|
1171 |
+
key : dictionary key
|
1172 |
+
elem : value to append
|
1173 |
+
"""
|
1174 |
+
curList = dList.get(key, [])
|
1175 |
+
curList.append(elem)
|
1176 |
+
dList[key] = curList
|
1177 |
+
|
1178 |
+
def isNumber(st):
|
1179 |
+
"""
|
1180 |
+
Returns True is string is a number
|
1181 |
+
Parameters
|
1182 |
+
st : string value
|
1183 |
+
"""
|
1184 |
+
return st.replace('.','',1).isdigit()
|
1185 |
+
|
1186 |
+
def removeNan(values):
|
1187 |
+
"""
|
1188 |
+
removes nan from list
|
1189 |
+
Parameters
|
1190 |
+
values : list data
|
1191 |
+
"""
|
1192 |
+
return list(filter(lambda v: not math.isnan(v), values))
|
1193 |
+
|
1194 |
+
def fileRecGen(filePath, delim = ","):
|
1195 |
+
"""
|
1196 |
+
file record generator
|
1197 |
+
Parameters
|
1198 |
+
filePath ; file path
|
1199 |
+
delim : delemeter
|
1200 |
+
"""
|
1201 |
+
with open(filePath, "r") as fp:
|
1202 |
+
for line in fp:
|
1203 |
+
line = line[:-1]
|
1204 |
+
if delim is not None:
|
1205 |
+
line = line.split(delim)
|
1206 |
+
yield line
|
1207 |
+
|
1208 |
+
def fileSelFieldsRecGen(dirPath, columns, delim=","):
|
1209 |
+
"""
|
1210 |
+
file record generator given column indices
|
1211 |
+
Parameters
|
1212 |
+
filePath ; file path
|
1213 |
+
columns : column indexes as int array or coma separated string
|
1214 |
+
delim : delemeter
|
1215 |
+
"""
|
1216 |
+
if type(columns) == str:
|
1217 |
+
columns = strToIntArray(columns, delim)
|
1218 |
+
for rec in fileRecGen(dirPath, delim):
|
1219 |
+
extracted = extractList(rec, columns)
|
1220 |
+
yield extracted
|
1221 |
+
|
1222 |
+
def fileFiltRecGen(filePath, filt, delim = ","):
|
1223 |
+
"""
|
1224 |
+
file record generator with row filter applied
|
1225 |
+
Parameters
|
1226 |
+
filePath ; file path
|
1227 |
+
filt : row filter
|
1228 |
+
delim : delemeter
|
1229 |
+
"""
|
1230 |
+
with open(filePath, "r") as fp:
|
1231 |
+
for line in fp:
|
1232 |
+
line = line[:-1]
|
1233 |
+
if delim is not None:
|
1234 |
+
line = line.split(delim)
|
1235 |
+
if filt(line):
|
1236 |
+
yield line
|
1237 |
+
|
1238 |
+
def fileFiltSelFieldsRecGen(filePath, filt, columns, delim = ","):
|
1239 |
+
"""
|
1240 |
+
file record generator with row and column filter applied
|
1241 |
+
Parameters
|
1242 |
+
filePath ; file path
|
1243 |
+
filt : row filter
|
1244 |
+
columns : column indexes as int array or coma separated string
|
1245 |
+
delim : delemeter
|
1246 |
+
"""
|
1247 |
+
columns = strToIntArray(columns, delim)
|
1248 |
+
with open(filePath, "r") as fp:
|
1249 |
+
for line in fp:
|
1250 |
+
line = line[:-1]
|
1251 |
+
if delim is not None:
|
1252 |
+
line = line.split(delim)
|
1253 |
+
if filt(line):
|
1254 |
+
selected = extractList(line, columns)
|
1255 |
+
yield selected
|
1256 |
+
|
1257 |
+
def fileTypedRecGen(filePath, ftypes, delim = ","):
|
1258 |
+
"""
|
1259 |
+
file typed record generator
|
1260 |
+
Parameters
|
1261 |
+
filePath ; file path
|
1262 |
+
ftypes : list of field types
|
1263 |
+
delim : delemeter
|
1264 |
+
"""
|
1265 |
+
with open(filePath, "r") as fp:
|
1266 |
+
for line in fp:
|
1267 |
+
line = line[:-1]
|
1268 |
+
line = line.split(delim)
|
1269 |
+
for i in range(0, len(ftypes), 2):
|
1270 |
+
ci = ftypes[i]
|
1271 |
+
dtype = ftypes[i+1]
|
1272 |
+
assertLesser(ci, len(line), "index out of bound")
|
1273 |
+
if dtype == "int":
|
1274 |
+
line[ci] = int(line[ci])
|
1275 |
+
elif dtype == "float":
|
1276 |
+
line[ci] = float(line[ci])
|
1277 |
+
else:
|
1278 |
+
exitWithMsg("invalid data type")
|
1279 |
+
yield line
|
1280 |
+
|
1281 |
+
def fileMutatedFieldsRecGen(dirPath, mutator, delim=","):
|
1282 |
+
"""
|
1283 |
+
file record generator with some columns mutated
|
1284 |
+
Parameters
|
1285 |
+
dirPath ; file path
|
1286 |
+
mutator : row field mutator
|
1287 |
+
delim : delemeter
|
1288 |
+
"""
|
1289 |
+
for rec in fileRecGen(dirPath, delim):
|
1290 |
+
mutated = mutator(rec)
|
1291 |
+
yield mutated
|
1292 |
+
|
1293 |
+
def tableSelFieldsFilter(tdata, columns):
|
1294 |
+
"""
|
1295 |
+
gets tabular data for selected columns
|
1296 |
+
Parameters
|
1297 |
+
tdata : tabular data
|
1298 |
+
columns : column indexes
|
1299 |
+
"""
|
1300 |
+
if areAllFieldsIncluded(tdata[0], columns):
|
1301 |
+
ntdata = tdata
|
1302 |
+
else:
|
1303 |
+
ntdata = list()
|
1304 |
+
for rec in tdata:
|
1305 |
+
#print(rec)
|
1306 |
+
#print(columns)
|
1307 |
+
nrec = extractList(rec, columns)
|
1308 |
+
ntdata.append(nrec)
|
1309 |
+
return ntdata
|
1310 |
+
|
1311 |
+
|
1312 |
+
def areAllFieldsIncluded(ldata, columns):
|
1313 |
+
"""
|
1314 |
+
return True id all indexes are in the columns
|
1315 |
+
Parameters
|
1316 |
+
ldata : list data
|
1317 |
+
columns : column indexes
|
1318 |
+
"""
|
1319 |
+
return list(range(len(ldata))) == columns
|
1320 |
+
|
1321 |
+
def asIntList(items):
|
1322 |
+
"""
|
1323 |
+
returns int list
|
1324 |
+
Parameters
|
1325 |
+
items : list data
|
1326 |
+
"""
|
1327 |
+
return [int(i) for i in items]
|
1328 |
+
|
1329 |
+
def asFloatList(items):
|
1330 |
+
"""
|
1331 |
+
returns float list
|
1332 |
+
Parameters
|
1333 |
+
items : list data
|
1334 |
+
"""
|
1335 |
+
return [float(i) for i in items]
|
1336 |
+
|
1337 |
+
def pastTime(interval, unit):
|
1338 |
+
"""
|
1339 |
+
current and past time
|
1340 |
+
Parameters
|
1341 |
+
interval : time interval
|
1342 |
+
unit: time unit
|
1343 |
+
"""
|
1344 |
+
curTime = int(time.time())
|
1345 |
+
if unit == "d":
|
1346 |
+
pastTime = curTime - interval * secInDay
|
1347 |
+
elif unit == "h":
|
1348 |
+
pastTime = curTime - interval * secInHour
|
1349 |
+
elif unit == "m":
|
1350 |
+
pastTime = curTime - interval * secInMinute
|
1351 |
+
else:
|
1352 |
+
raise ValueError("invalid time unit " + unit)
|
1353 |
+
return (curTime, pastTime)
|
1354 |
+
|
1355 |
+
def minuteAlign(ts):
|
1356 |
+
"""
|
1357 |
+
minute aligned time
|
1358 |
+
Parameters
|
1359 |
+
ts : time stamp in sec
|
1360 |
+
"""
|
1361 |
+
return int((ts / secInMinute)) * secInMinute
|
1362 |
+
|
1363 |
+
def multMinuteAlign(ts, min):
|
1364 |
+
"""
|
1365 |
+
multi minute aligned time
|
1366 |
+
Parameters
|
1367 |
+
ts : time stamp in sec
|
1368 |
+
min : minute value
|
1369 |
+
"""
|
1370 |
+
intv = secInMinute * min
|
1371 |
+
return int((ts / intv)) * intv
|
1372 |
+
|
1373 |
+
def hourAlign(ts):
|
1374 |
+
"""
|
1375 |
+
hour aligned time
|
1376 |
+
Parameters
|
1377 |
+
ts : time stamp in sec
|
1378 |
+
"""
|
1379 |
+
return int((ts / secInHour)) * secInHour
|
1380 |
+
|
1381 |
+
def hourOfDayAlign(ts, hour):
|
1382 |
+
"""
|
1383 |
+
hour of day aligned time
|
1384 |
+
Parameters
|
1385 |
+
ts : time stamp in sec
|
1386 |
+
hour : hour of day
|
1387 |
+
"""
|
1388 |
+
day = int(ts / secInDay)
|
1389 |
+
return (24 * day + hour) * secInHour
|
1390 |
+
|
1391 |
+
def dayAlign(ts):
|
1392 |
+
"""
|
1393 |
+
day aligned time
|
1394 |
+
Parameters
|
1395 |
+
ts : time stamp in sec
|
1396 |
+
"""
|
1397 |
+
return int(ts / secInDay) * secInDay
|
1398 |
+
|
1399 |
+
def timeAlign(ts, unit):
|
1400 |
+
"""
|
1401 |
+
boundary alignment of time
|
1402 |
+
Parameters
|
1403 |
+
ts : time stamp in sec
|
1404 |
+
unit : unit of time
|
1405 |
+
"""
|
1406 |
+
alignedTs = 0
|
1407 |
+
if unit == "s":
|
1408 |
+
alignedTs = ts
|
1409 |
+
elif unit == "m":
|
1410 |
+
alignedTs = minuteAlign(ts)
|
1411 |
+
elif unit == "h":
|
1412 |
+
alignedTs = hourAlign(ts)
|
1413 |
+
elif unit == "d":
|
1414 |
+
alignedTs = dayAlign(ts)
|
1415 |
+
else:
|
1416 |
+
raise ValueError("invalid time unit")
|
1417 |
+
return alignedTs
|
1418 |
+
|
1419 |
+
def monthOfYear(ts):
|
1420 |
+
"""
|
1421 |
+
month of year
|
1422 |
+
Parameters
|
1423 |
+
ts : time stamp in sec
|
1424 |
+
"""
|
1425 |
+
rem = ts % secInYear
|
1426 |
+
dow = int(rem / secInMonth)
|
1427 |
+
return dow
|
1428 |
+
|
1429 |
+
def dayOfWeek(ts):
|
1430 |
+
"""
|
1431 |
+
day of week
|
1432 |
+
Parameters
|
1433 |
+
ts : time stamp in sec
|
1434 |
+
"""
|
1435 |
+
rem = ts % secInWeek
|
1436 |
+
dow = int(rem / secInDay)
|
1437 |
+
return dow
|
1438 |
+
|
1439 |
+
def hourOfDay(ts):
|
1440 |
+
"""
|
1441 |
+
hour of day
|
1442 |
+
Parameters
|
1443 |
+
ts : time stamp in sec
|
1444 |
+
"""
|
1445 |
+
rem = ts % secInDay
|
1446 |
+
hod = int(rem / secInHour)
|
1447 |
+
return hod
|
1448 |
+
|
1449 |
+
def processCmdLineArgs(expectedTypes, usage):
|
1450 |
+
"""
|
1451 |
+
process command line args and returns args as typed values
|
1452 |
+
Parameters
|
1453 |
+
expectedTypes : expected data types of arguments
|
1454 |
+
usage : usage message string
|
1455 |
+
"""
|
1456 |
+
args = []
|
1457 |
+
numComLineArgs = len(sys.argv)
|
1458 |
+
numExpected = len(expectedTypes)
|
1459 |
+
if (numComLineArgs - 1 == len(expectedTypes)):
|
1460 |
+
try:
|
1461 |
+
for i in range(0, numExpected):
|
1462 |
+
if (expectedTypes[i] == typeInt):
|
1463 |
+
args.append(int(sys.argv[i+1]))
|
1464 |
+
elif (expectedTypes[i] == typeFloat):
|
1465 |
+
args.append(float(sys.argv[i+1]))
|
1466 |
+
elif (expectedTypes[i] == typeString):
|
1467 |
+
args.append(sys.argv[i+1])
|
1468 |
+
except ValueError:
|
1469 |
+
print ("expected number of command line arguments found but there is type mis match")
|
1470 |
+
sys.exit(1)
|
1471 |
+
else:
|
1472 |
+
print ("expected number of command line arguments not found")
|
1473 |
+
print (usage)
|
1474 |
+
sys.exit(1)
|
1475 |
+
return args
|
1476 |
+
|
1477 |
+
def mutateString(val, numMutate, ctype):
|
1478 |
+
"""
|
1479 |
+
mutate string multiple times
|
1480 |
+
Parameters
|
1481 |
+
val : string value
|
1482 |
+
numMutate : num of mutations
|
1483 |
+
ctype : type of character to mutate with
|
1484 |
+
"""
|
1485 |
+
mutations = set()
|
1486 |
+
count = 0
|
1487 |
+
while count < numMutate:
|
1488 |
+
j = randint(0, len(val)-1)
|
1489 |
+
if j not in mutations:
|
1490 |
+
if ctype == "alpha":
|
1491 |
+
ch = selectRandomFromList(alphaTokens)
|
1492 |
+
elif ctype == "num":
|
1493 |
+
ch = selectRandomFromList(numTokens)
|
1494 |
+
elif ctype == "any":
|
1495 |
+
ch = selectRandomFromList(tokens)
|
1496 |
+
val = val[:j] + ch + val[j+1:]
|
1497 |
+
mutations.add(j)
|
1498 |
+
count += 1
|
1499 |
+
return val
|
1500 |
+
|
1501 |
+
def mutateList(values, numMutate, vmin, vmax):
|
1502 |
+
"""
|
1503 |
+
mutate list multiple times
|
1504 |
+
Parameters
|
1505 |
+
values : list value
|
1506 |
+
numMutate : num of mutations
|
1507 |
+
vmin : minimum of value range
|
1508 |
+
vmax : maximum of value range
|
1509 |
+
"""
|
1510 |
+
mutations = set()
|
1511 |
+
count = 0
|
1512 |
+
while count < numMutate:
|
1513 |
+
j = randint(0, len(values)-1)
|
1514 |
+
if j not in mutations:
|
1515 |
+
values[j] = np.random.uniform(vmin, vmax)
|
1516 |
+
count += 1
|
1517 |
+
return values
|
1518 |
+
|
1519 |
+
|
1520 |
+
def swap(values, first, second):
|
1521 |
+
"""
|
1522 |
+
swap two elements
|
1523 |
+
Parameters
|
1524 |
+
values : list value
|
1525 |
+
first : first swap position
|
1526 |
+
second : second swap position
|
1527 |
+
"""
|
1528 |
+
t = values[first]
|
1529 |
+
values[first] = values[second]
|
1530 |
+
values[second] = t
|
1531 |
+
|
1532 |
+
def swapBetweenLists(values1, values2):
|
1533 |
+
"""
|
1534 |
+
swap two elements between 2 lists
|
1535 |
+
Parameters
|
1536 |
+
values1 : first list of values
|
1537 |
+
values2 : second list of values
|
1538 |
+
"""
|
1539 |
+
p1 = randint(0, len(values1)-1)
|
1540 |
+
p2 = randint(0, len(values2)-1)
|
1541 |
+
tmp = values1[p1]
|
1542 |
+
values1[p1] = values2[p2]
|
1543 |
+
values2[p2] = tmp
|
1544 |
+
|
1545 |
+
def safeAppend(values, value):
|
1546 |
+
"""
|
1547 |
+
append only if not None
|
1548 |
+
Parameters
|
1549 |
+
values : list value
|
1550 |
+
value : value to append
|
1551 |
+
"""
|
1552 |
+
if value is not None:
|
1553 |
+
values.append(value)
|
1554 |
+
|
1555 |
+
def getAllIndex(ldata, fldata):
|
1556 |
+
"""
|
1557 |
+
get ALL indexes of list elements
|
1558 |
+
Parameters
|
1559 |
+
ldata : list data to find index in
|
1560 |
+
fldata : list data for values for index look up
|
1561 |
+
"""
|
1562 |
+
return list(map(lambda e : fldata.index(e), ldata))
|
1563 |
+
|
1564 |
+
def findIntersection(lOne, lTwo):
|
1565 |
+
"""
|
1566 |
+
find intersection elements between 2 lists
|
1567 |
+
Parameters
|
1568 |
+
lOne : first list of data
|
1569 |
+
lTwo : second list of data
|
1570 |
+
"""
|
1571 |
+
sOne = set(lOne)
|
1572 |
+
sTwo = set(lTwo)
|
1573 |
+
sInt = sOne.intersection(sTwo)
|
1574 |
+
return list(sInt)
|
1575 |
+
|
1576 |
+
def isIntvOverlapped(rOne, rTwo):
|
1577 |
+
"""
|
1578 |
+
checks overlap between 2 intervals
|
1579 |
+
Parameters
|
1580 |
+
rOne : first interval boundaries
|
1581 |
+
rTwo : second interval boundaries
|
1582 |
+
"""
|
1583 |
+
clear = rOne[1] <= rTwo[0] or rOne[0] >= rTwo[1]
|
1584 |
+
return not clear
|
1585 |
+
|
1586 |
+
def isIntvLess(rOne, rTwo):
|
1587 |
+
"""
|
1588 |
+
checks if first iterval is less than second
|
1589 |
+
Parameters
|
1590 |
+
rOne : first interval boundaries
|
1591 |
+
rTwo : second interval boundaries
|
1592 |
+
"""
|
1593 |
+
less = rOne[1] <= rTwo[0]
|
1594 |
+
return less
|
1595 |
+
|
1596 |
+
def findRank(e, values):
|
1597 |
+
"""
|
1598 |
+
find rank of value in a list
|
1599 |
+
Parameters
|
1600 |
+
e : value to compare with
|
1601 |
+
values : list data
|
1602 |
+
"""
|
1603 |
+
count = 1
|
1604 |
+
for ve in values:
|
1605 |
+
if ve < e:
|
1606 |
+
count += 1
|
1607 |
+
return count
|
1608 |
+
|
1609 |
+
def findRanks(toBeRanked, values):
|
1610 |
+
"""
|
1611 |
+
find ranks of values in one list in another list
|
1612 |
+
Parameters
|
1613 |
+
toBeRanked : list of values for which ranks are found
|
1614 |
+
values : list in which rank is found :
|
1615 |
+
"""
|
1616 |
+
return list(map(lambda e: findRank(e, values), toBeRanked))
|
1617 |
+
|
1618 |
+
def formatFloat(prec, value, label = None):
|
1619 |
+
"""
|
1620 |
+
formats a float with optional label
|
1621 |
+
Parameters
|
1622 |
+
prec : precision
|
1623 |
+
value : data value
|
1624 |
+
label : label for data
|
1625 |
+
"""
|
1626 |
+
st = (label + " ") if label else ""
|
1627 |
+
formatter = "{:." + str(prec) + "f}"
|
1628 |
+
return st + formatter.format(value)
|
1629 |
+
|
1630 |
+
def formatAny(value, label = None):
|
1631 |
+
"""
|
1632 |
+
formats any obkect with optional label
|
1633 |
+
Parameters
|
1634 |
+
value : data value
|
1635 |
+
label : label for data
|
1636 |
+
"""
|
1637 |
+
st = (label + " ") if label else ""
|
1638 |
+
return st + str(value)
|
1639 |
+
|
1640 |
+
def printList(values):
|
1641 |
+
"""
|
1642 |
+
pretty print list
|
1643 |
+
Parameters
|
1644 |
+
values : list of values
|
1645 |
+
"""
|
1646 |
+
for v in values:
|
1647 |
+
print(v)
|
1648 |
+
|
1649 |
+
def printMap(values, klab, vlab, precision, offset=16):
|
1650 |
+
"""
|
1651 |
+
pretty print hash map
|
1652 |
+
Parameters
|
1653 |
+
values : dictionary of values
|
1654 |
+
klab : label for key
|
1655 |
+
vlab : label for value
|
1656 |
+
precision : precision
|
1657 |
+
offset : left justify offset
|
1658 |
+
"""
|
1659 |
+
print(klab.ljust(offset, " ") + vlab)
|
1660 |
+
for k in values.keys():
|
1661 |
+
v = values[k]
|
1662 |
+
ks = toStr(k, precision).ljust(offset, " ")
|
1663 |
+
vs = toStr(v, precision)
|
1664 |
+
print(ks + vs)
|
1665 |
+
|
1666 |
+
def printPairList(values, lab1, lab2, precision, offset=16):
|
1667 |
+
"""
|
1668 |
+
pretty print list of pairs
|
1669 |
+
Parameters
|
1670 |
+
values : dictionary of values
|
1671 |
+
lab1 : first label
|
1672 |
+
lab2 : second label
|
1673 |
+
precision : precision
|
1674 |
+
offset : left justify offset
|
1675 |
+
"""
|
1676 |
+
print(lab1.ljust(offset, " ") + lab2)
|
1677 |
+
for (v1, v2) in values:
|
1678 |
+
sv1 = toStr(v1, precision).ljust(offset, " ")
|
1679 |
+
sv2 = toStr(v2, precision)
|
1680 |
+
print(sv1 + sv2)
|
1681 |
+
|
1682 |
+
def createMap(*values):
|
1683 |
+
"""
|
1684 |
+
create disctionary with results
|
1685 |
+
Parameters
|
1686 |
+
values : sequence of key value pairs
|
1687 |
+
"""
|
1688 |
+
result = dict()
|
1689 |
+
for i in range(0, len(values), 2):
|
1690 |
+
result[values[i]] = values[i+1]
|
1691 |
+
return result
|
1692 |
+
|
1693 |
+
def getColMinMax(table, col):
|
1694 |
+
"""
|
1695 |
+
return min, max values of a column
|
1696 |
+
Parameters
|
1697 |
+
table : tabular data
|
1698 |
+
col : column index
|
1699 |
+
"""
|
1700 |
+
vmin = None
|
1701 |
+
vmax = None
|
1702 |
+
for rec in table:
|
1703 |
+
value = rec[col]
|
1704 |
+
if vmin is None:
|
1705 |
+
vmin = value
|
1706 |
+
vmax = value
|
1707 |
+
else:
|
1708 |
+
if value < vmin:
|
1709 |
+
vmin = value
|
1710 |
+
elif value > vmax:
|
1711 |
+
vmax = value
|
1712 |
+
return (vmin, vmax, vmax - vmin)
|
1713 |
+
|
1714 |
+
def createLogger(name, logFilePath, logLevName):
|
1715 |
+
"""
|
1716 |
+
creates logger
|
1717 |
+
Parameters
|
1718 |
+
name : logger name
|
1719 |
+
logFilePath : log file path
|
1720 |
+
logLevName : log level
|
1721 |
+
"""
|
1722 |
+
logger = logging.getLogger(name)
|
1723 |
+
fHandler = logging.handlers.RotatingFileHandler(logFilePath, maxBytes=1048576, backupCount=4)
|
1724 |
+
logLev = logLevName.lower()
|
1725 |
+
if logLev == "debug":
|
1726 |
+
logLevel = logging.DEBUG
|
1727 |
+
elif logLev == "info":
|
1728 |
+
logLevel = logging.INFO
|
1729 |
+
elif logLev == "warning":
|
1730 |
+
logLevel = logging.WARNING
|
1731 |
+
elif logLev == "error":
|
1732 |
+
logLevel = logging.ERROR
|
1733 |
+
elif logLev == "critical":
|
1734 |
+
logLevel = logging.CRITICAL
|
1735 |
+
else:
|
1736 |
+
raise ValueError("invalid log level name " + logLevelName)
|
1737 |
+
fHandler.setLevel(logLevel)
|
1738 |
+
fFormat = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
1739 |
+
fHandler.setFormatter(fFormat)
|
1740 |
+
logger.addHandler(fHandler)
|
1741 |
+
logger.setLevel(logLevel)
|
1742 |
+
return logger
|
1743 |
+
|
1744 |
+
@contextmanager
|
1745 |
+
def suppressStdout():
|
1746 |
+
"""
|
1747 |
+
suppress stdout
|
1748 |
+
Parameters
|
1749 |
+
"""
|
1750 |
+
with open(os.devnull, "w") as devnull:
|
1751 |
+
oldStdout = sys.stdout
|
1752 |
+
sys.stdout = devnull
|
1753 |
+
try:
|
1754 |
+
yield
|
1755 |
+
finally:
|
1756 |
+
sys.stdout = oldStdout
|
1757 |
+
|
1758 |
+
def exitWithMsg(msg):
|
1759 |
+
"""
|
1760 |
+
print message and exit
|
1761 |
+
Parameters
|
1762 |
+
msg : message
|
1763 |
+
"""
|
1764 |
+
print(msg + " -- quitting")
|
1765 |
+
sys.exit(0)
|
1766 |
+
|
1767 |
+
def drawLine(data, yscale=None):
|
1768 |
+
"""
|
1769 |
+
line plot
|
1770 |
+
Parameters
|
1771 |
+
data : list data
|
1772 |
+
yscale : y axis scale
|
1773 |
+
"""
|
1774 |
+
plt.plot(data)
|
1775 |
+
if yscale:
|
1776 |
+
step = int(yscale / 10)
|
1777 |
+
step = int(step / 10) * 10
|
1778 |
+
plt.yticks(range(0, yscale, step))
|
1779 |
+
plt.show()
|
1780 |
+
|
1781 |
+
def drawPlot(x, y, xlabel, ylabel):
|
1782 |
+
"""
|
1783 |
+
line plot
|
1784 |
+
Parameters
|
1785 |
+
x : x values
|
1786 |
+
y : y values
|
1787 |
+
xlabel : x axis label
|
1788 |
+
ylabel : y axis label
|
1789 |
+
"""
|
1790 |
+
plt.plot(x,y)
|
1791 |
+
plt.xlabel(xlabel)
|
1792 |
+
plt.ylabel(ylabel)
|
1793 |
+
plt.show()
|
1794 |
+
|
1795 |
+
def drawPairPlot(x, y1, y2, xlabel,ylabel, y1label, y2label):
|
1796 |
+
"""
|
1797 |
+
line plot of 2 lines
|
1798 |
+
Parameters
|
1799 |
+
x : x values
|
1800 |
+
y1 : first y values
|
1801 |
+
y2 : second y values
|
1802 |
+
xlabel : x labbel
|
1803 |
+
ylabel : y label
|
1804 |
+
y1label : first plot label
|
1805 |
+
y2label : second plot label
|
1806 |
+
"""
|
1807 |
+
plt.plot(x, y1, label = y1label)
|
1808 |
+
plt.plot(x, y2, label = y2label)
|
1809 |
+
plt.xlabel(xlabel)
|
1810 |
+
plt.ylabel(ylabel)
|
1811 |
+
plt.legend()
|
1812 |
+
plt.show()
|
1813 |
+
|
1814 |
+
def drawHist(ldata, myTitle, myXlabel, myYlabel, nbins=10):
|
1815 |
+
"""
|
1816 |
+
draw histogram
|
1817 |
+
Parameters
|
1818 |
+
ldata : list data
|
1819 |
+
myTitle : title
|
1820 |
+
myXlabel : x label
|
1821 |
+
myYlabel : y label
|
1822 |
+
nbins : num of bins
|
1823 |
+
"""
|
1824 |
+
plt.hist(ldata, bins=nbins, density=True)
|
1825 |
+
plt.title(myTitle)
|
1826 |
+
plt.xlabel(myXlabel)
|
1827 |
+
plt.ylabel(myYlabel)
|
1828 |
+
plt.show()
|
1829 |
+
|
1830 |
+
def saveObject(obj, filePath):
|
1831 |
+
"""
|
1832 |
+
saves an object
|
1833 |
+
Parameters
|
1834 |
+
obj : object
|
1835 |
+
filePath : file path for saved object
|
1836 |
+
"""
|
1837 |
+
with open(filePath, "wb") as outfile:
|
1838 |
+
pickle.dump(obj,outfile)
|
1839 |
+
|
1840 |
+
def restoreObject(filePath):
|
1841 |
+
"""
|
1842 |
+
restores an object
|
1843 |
+
Parameters
|
1844 |
+
filePath : file path to restore object from
|
1845 |
+
"""
|
1846 |
+
with open(filePath, "rb") as infile:
|
1847 |
+
obj = pickle.load(infile)
|
1848 |
+
return obj
|
1849 |
+
|
1850 |
+
def isNumeric(data):
|
1851 |
+
"""
|
1852 |
+
true if all elements int or float
|
1853 |
+
Parameters
|
1854 |
+
data : numeric data list
|
1855 |
+
"""
|
1856 |
+
if type(data) == list or type(data) == np.ndarray:
|
1857 |
+
col = pd.Series(data)
|
1858 |
+
else:
|
1859 |
+
col = data
|
1860 |
+
return col.dtype == np.int32 or col.dtype == np.int64 or col.dtype == np.float32 or col.dtype == np.float64
|
1861 |
+
|
1862 |
+
def isInteger(data):
|
1863 |
+
"""
|
1864 |
+
true if all elements int
|
1865 |
+
Parameters
|
1866 |
+
data : numeric data list
|
1867 |
+
"""
|
1868 |
+
if type(data) == list or type(data) == np.ndarray:
|
1869 |
+
col = pd.Series(data)
|
1870 |
+
else:
|
1871 |
+
col = data
|
1872 |
+
return col.dtype == np.int32 or col.dtype == np.int64
|
1873 |
+
|
1874 |
+
def isFloat(data):
|
1875 |
+
"""
|
1876 |
+
true if all elements float
|
1877 |
+
Parameters
|
1878 |
+
data : numeric data list
|
1879 |
+
"""
|
1880 |
+
if type(data) == list or type(data) == np.ndarray:
|
1881 |
+
col = pd.Series(data)
|
1882 |
+
else:
|
1883 |
+
col = data
|
1884 |
+
return col.dtype == np.float32 or col.dtype == np.float64
|
1885 |
+
|
1886 |
+
def isBinary(data):
|
1887 |
+
"""
|
1888 |
+
true if all elements either 0 or 1
|
1889 |
+
Parameters
|
1890 |
+
data : binary data
|
1891 |
+
"""
|
1892 |
+
re = next((d for d in data if not (type(d) == int and (d == 0 or d == 1))), None)
|
1893 |
+
return (re is None)
|
1894 |
+
|
1895 |
+
def isCategorical(data):
|
1896 |
+
"""
|
1897 |
+
true if all elements int or string
|
1898 |
+
Parameters
|
1899 |
+
data : data value
|
1900 |
+
"""
|
1901 |
+
re = next((d for d in data if not (type(d) == int or type(d) == str)), None)
|
1902 |
+
return (re is None)
|
1903 |
+
|
1904 |
+
def assertEqual(value, veq, msg):
|
1905 |
+
"""
|
1906 |
+
assert equal to
|
1907 |
+
Parameters
|
1908 |
+
value : value
|
1909 |
+
veq : value to be equated with
|
1910 |
+
msg : error msg
|
1911 |
+
"""
|
1912 |
+
assert value == veq , msg
|
1913 |
+
|
1914 |
+
def assertGreater(value, vmin, msg):
|
1915 |
+
"""
|
1916 |
+
assert greater than
|
1917 |
+
Parameters
|
1918 |
+
value : value
|
1919 |
+
vmin : minimum value
|
1920 |
+
msg : error msg
|
1921 |
+
"""
|
1922 |
+
assert value > vmin , msg
|
1923 |
+
|
1924 |
+
def assertGreaterEqual(value, vmin, msg):
|
1925 |
+
"""
|
1926 |
+
assert greater than
|
1927 |
+
Parameters
|
1928 |
+
value : value
|
1929 |
+
vmin : minimum value
|
1930 |
+
msg : error msg
|
1931 |
+
"""
|
1932 |
+
assert value >= vmin , msg
|
1933 |
+
|
1934 |
+
def assertLesser(value, vmax, msg):
|
1935 |
+
"""
|
1936 |
+
assert less than
|
1937 |
+
Parameters
|
1938 |
+
value : value
|
1939 |
+
vmax : maximum value
|
1940 |
+
msg : error msg
|
1941 |
+
"""
|
1942 |
+
assert value < vmax , msg
|
1943 |
+
|
1944 |
+
def assertLesserEqual(value, vmax, msg):
|
1945 |
+
"""
|
1946 |
+
assert less than
|
1947 |
+
Parameters
|
1948 |
+
value : value
|
1949 |
+
vmax : maximum value
|
1950 |
+
msg : error msg
|
1951 |
+
"""
|
1952 |
+
assert value <= vmax , msg
|
1953 |
+
|
1954 |
+
def assertWithinRange(value, vmin, vmax, msg):
|
1955 |
+
"""
|
1956 |
+
assert within range
|
1957 |
+
Parameters
|
1958 |
+
value : value
|
1959 |
+
vmin : minimum value
|
1960 |
+
vmax : maximum value
|
1961 |
+
msg : error msg
|
1962 |
+
"""
|
1963 |
+
assert value >= vmin and value <= vmax, msg
|
1964 |
+
|
1965 |
+
def assertInList(value, values, msg):
|
1966 |
+
"""
|
1967 |
+
assert contains in a list
|
1968 |
+
Parameters
|
1969 |
+
value ; balue to check for inclusion
|
1970 |
+
values : list data
|
1971 |
+
msg : error msg
|
1972 |
+
"""
|
1973 |
+
assert value in values, msg
|
1974 |
+
|
1975 |
+
def maxListDist(l1, l2):
|
1976 |
+
"""
|
1977 |
+
maximum list element difference between 2 lists
|
1978 |
+
Parameters
|
1979 |
+
l1 : first list data
|
1980 |
+
l2 : second list data
|
1981 |
+
"""
|
1982 |
+
dist = max(list(map(lambda v : abs(v[0] - v[1]), zip(l1, l2))))
|
1983 |
+
return dist
|
1984 |
+
|
1985 |
+
def fileLineCount(fPath):
|
1986 |
+
"""
|
1987 |
+
number of lines ina file
|
1988 |
+
Parameters
|
1989 |
+
fPath : file path
|
1990 |
+
"""
|
1991 |
+
with open(fPath) as f:
|
1992 |
+
for i, li in enumerate(f):
|
1993 |
+
pass
|
1994 |
+
return (i + 1)
|
1995 |
+
|
1996 |
+
def getAlphaNumCharCount(sdata):
|
1997 |
+
"""
|
1998 |
+
number of alphabetic and numeric charcters in a string
|
1999 |
+
Parameters
|
2000 |
+
sdata : string data
|
2001 |
+
"""
|
2002 |
+
acount = 0
|
2003 |
+
ncount = 0
|
2004 |
+
scount = 0
|
2005 |
+
ocount = 0
|
2006 |
+
assertEqual(type(sdata), str, "input must be string")
|
2007 |
+
for c in sdata:
|
2008 |
+
if c.isnumeric():
|
2009 |
+
ncount += 1
|
2010 |
+
elif c.isalpha():
|
2011 |
+
acount += 1
|
2012 |
+
elif c.isspace():
|
2013 |
+
scount += 1
|
2014 |
+
else:
|
2015 |
+
ocount += 1
|
2016 |
+
r = (acount, ncount, ocount)
|
2017 |
+
return r
|
2018 |
+
|
2019 |
+
class StepFunction:
|
2020 |
+
"""
|
2021 |
+
step function
|
2022 |
+
Parameters
|
2023 |
+
"""
|
2024 |
+
def __init__(self, *values):
|
2025 |
+
"""
|
2026 |
+
initilizer
|
2027 |
+
|
2028 |
+
Parameters
|
2029 |
+
values : list of tuples, wich each tuple containing 2 x values and corresponding y value
|
2030 |
+
"""
|
2031 |
+
self.points = values
|
2032 |
+
|
2033 |
+
def find(self, x):
|
2034 |
+
"""
|
2035 |
+
finds step function value
|
2036 |
+
|
2037 |
+
Parameters
|
2038 |
+
x : x value
|
2039 |
+
"""
|
2040 |
+
found = False
|
2041 |
+
y = 0
|
2042 |
+
for p in self.points:
|
2043 |
+
if (x >= p[0] and x < p[1]):
|
2044 |
+
y = p[2]
|
2045 |
+
found = True
|
2046 |
+
break
|
2047 |
+
|
2048 |
+
if not found:
|
2049 |
+
l = len(self.points)
|
2050 |
+
if (x < self.points[0][0]):
|
2051 |
+
y = self.points[0][2]
|
2052 |
+
elif (x > self.points[l-1][1]):
|
2053 |
+
y = self.points[l-1][2]
|
2054 |
+
return y
|
2055 |
+
|
2056 |
+
|
2057 |
+
class DummyVarGenerator:
|
2058 |
+
"""
|
2059 |
+
dummy variable generator for categorical variable
|
2060 |
+
"""
|
2061 |
+
def __init__(self, rowSize, catValues, trueVal, falseVal, delim=None):
|
2062 |
+
"""
|
2063 |
+
initilizer
|
2064 |
+
|
2065 |
+
Parameters
|
2066 |
+
rowSize : row size
|
2067 |
+
catValues : dictionary with field index as key and list of categorical values as value
|
2068 |
+
trueVal : true value, typically "1"
|
2069 |
+
falseval : false value , typically "0"
|
2070 |
+
delim : field delemeter
|
2071 |
+
"""
|
2072 |
+
self.rowSize = rowSize
|
2073 |
+
self.catValues = catValues
|
2074 |
+
numCatVar = len(catValues)
|
2075 |
+
colCount = 0
|
2076 |
+
for v in self.catValues.values():
|
2077 |
+
colCount += len(v)
|
2078 |
+
self.newRowSize = rowSize - numCatVar + colCount
|
2079 |
+
#print ("new row size {}".format(self.newRowSize))
|
2080 |
+
self.trueVal = trueVal
|
2081 |
+
self.falseVal = falseVal
|
2082 |
+
self.delim = delim
|
2083 |
+
|
2084 |
+
def processRow(self, row):
|
2085 |
+
"""
|
2086 |
+
encodes categorical variables, returning as delemeter separate dstring or list
|
2087 |
+
|
2088 |
+
Parameters
|
2089 |
+
row : row either delemeter separated string or list
|
2090 |
+
"""
|
2091 |
+
if self.delim is not None:
|
2092 |
+
rowArr = row.split(self.delim)
|
2093 |
+
msg = "row does not have expected number of columns found " + str(len(rowArr)) + " expected " + str(self.rowSize)
|
2094 |
+
assert len(rowArr) == self.rowSize, msg
|
2095 |
+
else:
|
2096 |
+
rowArr = row
|
2097 |
+
|
2098 |
+
newRowArr = []
|
2099 |
+
for i in range(len(rowArr)):
|
2100 |
+
curVal = rowArr[i]
|
2101 |
+
if (i in self.catValues):
|
2102 |
+
values = self.catValues[i]
|
2103 |
+
for val in values:
|
2104 |
+
if val == curVal:
|
2105 |
+
newVal = self.trueVal
|
2106 |
+
else:
|
2107 |
+
newVal = self.falseVal
|
2108 |
+
newRowArr.append(newVal)
|
2109 |
+
else:
|
2110 |
+
newRowArr.append(curVal)
|
2111 |
+
assert len(newRowArr) == self.newRowSize, "invalid new row size " + str(len(newRowArr)) + " expected " + str(self.newRowSize)
|
2112 |
+
encRow = self.delim.join(newRowArr) if self.delim is not None else newRowArr
|
2113 |
+
return encRow
|
2114 |
+
|