How to manually predict data from Machine Learning model - machine-learning

I finally managed to come up with a really good ML model, with an accuracy over 90%. Great! But now I need to use this in real world :)
My dataset is something like this: every time a user accessed my website in the last 2 years I saved in a database if that user was using a computer or a smartphone, time of the day, week day, where the user is located.. And every time in the future, if the user did a conversion on my website, I would update the database to save that this particular user made a conversion.
I trained my ML algorithm using Naive Bayes (I used [Rubix ML][1] library for PHP which is pretty great, the devs behind it are awesome and kind people) and the results were surprisingly good, it can 90% of the time predict if a user that accessed my website will convert. That's a huge milestone to me!
So now comes the real world part: I need to extract some "logic" from the model. I can save the model weighs/configs to a txt file after training it, and then I can load that configurations and start making predictions on the fly.
BUT I CANT make predictions on the fly on my use case, here is the why: I am using Google Ads to advertise this website and I need to tell Google Ads "hey google, please show my ads only to people using computer, at night, on saturday which are female ate 18-24 age". I need to tell that to Google before running my campaign.
So here comes the real world part: how do I make any sense of those weights/configs saved in the txt file? I would like to know the relationship/interaction that the ML model found on my columns (device, gender, age, location...) and tell google only to run my campaign in the best favorable conditions, I mean, only when I am pretty confident a conversion will be made. I can run my prediction algorithm on Google Ads and tell google every time I participate in an auction "hey google, according to my predictions, this person, using this device, at this time of the day... does not worth my bidding, so please dont show my ads to this person".
THERE IS CLEARLY a relationship between the columns/features (device, gender, age...) because if I analyze the features isolated there is no evident pattern that computer is worth more showing ads than smartphone, same is true to age, gender... There is no clear winner, sure I can see some pretty small fluctuations that some features are better than others, but mostly, it's not clear at all. So I am pretty sure the features are highly dependent on each other.
Do you have any idea on how I can extract some logic from the txt file in order to know which columsn/features are worth more?
I dont know if it will be of any help, but I am providing you my txt file, just so you can see what I am dealing with.
O:31:"Rubix\ML\Classifiers\NaiveBayes":6:{s:8:" * alpha";d:1;s:12:" * logPriors";a:2:{s:3:"sim";d:-1.8178620931306924;s:4:"não";d:-0.1771818088907544;}s:12:" * fitPriors";b:1;s:10:" * weights";a:2:{s:3:"sim";i:604;s:4:"não";i:3120;}s:9:" * counts";a:2:{s:3:"sim";a:68:{i:0;a:2:{i:1;i:241;i:0;i:363;}i:1;a:2:{i:1;i:108;i:0;i:496;}i:2;a:2:{i:0;i:366;i:1;i:238;}i:3;a:2:{i:1;i:359;i:0;i:245;}i:4;a:2:{i:1;i:71;i:0;i:533;}i:5;a:2:{i:0;i:567;i:1;i:37;}i:6;a:2:{i:0;i:241;i:1;i:363;}i:7;a:2:{i:0;i:567;i:1;i:37;}i:8;a:2:{i:0;i:578;i:1;i:26;}i:9;a:2:{i:0;i:581;i:1;i:23;}i:10;a:2:{i:0;i:346;i:1;i:258;}i:11;a:2:{i:0;i:523;i:1;i:81;}i:12;a:2:{i:0;i:442;i:1;i:162;}i:13;a:2:{i:0;i:482;i:1;i:122;}i:14;a:2:{i:0;i:591;i:1;i:13;}i:15;a:2:{i:1;i:24;i:0;i:580;}i:16;a:2:{i:0;i:566;i:1;i:38;}i:17;a:2:{i:0;i:567;i:1;i:37;}i:18;a:2:{i:0;i:564;i:1;i:40;}i:19;a:2:{i:0;i:579;i:1;i:25;}i:20;a:2:{i:0;i:517;i:1;i:87;}i:21;a:2:{i:0;i:596;i:1;i:8;}i:22;a:2:{i:0;i:569;i:1;i:35;}i:23;a:2:{i:0;i:560;i:1;i:44;}i:24;a:2:{i:0;i:563;i:1;i:41;}i:25;a:2:{i:0;i:592;i:1;i:12;}i:26;a:2:{i:0;i:567;i:1;i:37;}i:27;a:2:{i:0;i:561;i:1;i:43;}i:28;a:2:{i:0;i:576;i:1;i:28;}i:29;a:2:{i:0;i:561;i:1;i:43;}i:30;a:2:{i:0;i:575;i:1;i:29;}i:31;a:2:{i:0;i:562;i:1;i:42;}i:32;a:2:{i:0;i:593;i:1;i:11;}i:33;a:2:{i:0;i:599;i:1;i:5;}i:34;a:2:{i:0;i:499;i:1;i:105;}i:35;a:2:{i:0;i:593;i:1;i:11;}i:36;a:2:{i:0;i:555;i:1;i:49;}i:37;a:2:{i:0;i:577;i:1;i:27;}i:38;a:2:{i:0;i:492;i:1;i:112;}i:39;a:2:{i:0;i:506;i:1;i:98;}i:40;a:2:{i:0;i:549;i:1;i:55;}i:41;a:2:{i:0;i:599;i:1;i:5;}i:42;a:2:{i:0;i:564;i:1;i:40;}i:43;a:2:{i:1;i:108;i:0;i:496;}i:44;a:2:{i:0;i:599;i:1;i:5;}i:45;a:2:{i:0;i:472;i:1;i:132;}i:46;a:2:{i:0;i:601;i:1;i:3;}i:47;a:2:{i:0;i:591;i:1;i:13;}i:48;a:2:{i:0;i:580;i:1;i:24;}i:49;a:2:{i:0;i:602;i:1;i:2;}i:50;a:2:{i:0;i:595;i:1;i:9;}i:51;a:2:{i:0;i:600;i:1;i:4;}i:52;a:2:{i:0;i:602;i:1;i:2;}i:53;a:2:{i:0;i:600;i:1;i:4;}i:54;a:2:{i:0;i:596;i:1;i:8;}i:55;a:2:{i:0;i:598;i:1;i:6;}i:56;a:2:{i:0;i:598;i:1;i:6;}i:57;a:2:{i:0;i:602;i:1;i:2;}i:58;a:2:{i:0;i:602;i:1;i:2;}i:59;a:2:{i:0;i:603;i:1;i:1;}i:60;a:2:{i:0;i:599;i:1;i:5;}i:61;a:2:{i:0;i:601;i:1;i:3;}i:62;a:2:{i:0;i:596;i:1;i:8;}i:63;a:2:{i:0;i:602;i:1;i:2;}i:64;a:2:{i:0;i:601;i:1;i:3;}i:65;a:2:{i:0;i:602;i:1;i:2;}i:66;a:1:{i:0;i:604;}i:67;a:1:{i:0;i:604;}}s:4:"não";a:68:{i:0;a:2:{i:0;i:2059;i:1;i:1061;}i:1;a:2:{i:0;i:2600;i:1;i:520;}i:2;a:1:{i:1;i:3120;}i:3;a:1:{i:1;i:3120;}i:4;a:1:{i:1;i:3120;}i:5;a:2:{i:1;i:212;i:0;i:2908;}i:6;a:2:{i:1;i:2059;i:0;i:1061;}i:7;a:2:{i:0;i:2921;i:1;i:199;}i:8;a:2:{i:0;i:2981;i:1;i:139;}i:9;a:2:{i:0;i:2980;i:1;i:140;}i:10;a:1:{i:0;i:3120;}i:11;a:1:{i:0;i:3120;}i:12;a:1:{i:0;i:3120;}i:13;a:2:{i:0;i:2591;i:1;i:529;}i:14;a:2:{i:0;i:3084;i:1;i:36;}i:15;a:2:{i:0;i:3010;i:1;i:110;}i:16;a:2:{i:0;i:2895;i:1;i:225;}i:17;a:2:{i:0;i:2966;i:1;i:154;}i:18;a:2:{i:0;i:2956;i:1;i:164;}i:19;a:2:{i:0;i:2923;i:1;i:197;}i:20;a:2:{i:0;i:2675;i:1;i:445;}i:21;a:2:{i:0;i:3087;i:1;i:33;}i:22;a:2:{i:0;i:2930;i:1;i:190;}i:23;a:2:{i:0;i:2912;i:1;i:208;}i:24;a:2:{i:0;i:2889;i:1;i:231;}i:25;a:1:{i:0;i:3120;}i:26;a:1:{i:0;i:3120;}i:27;a:2:{i:0;i:2944;i:1;i:176;}i:28;a:2:{i:0;i:2876;i:1;i:244;}i:29;a:2:{i:0;i:2972;i:1;i:148;}i:30;a:2:{i:0;i:2958;i:1;i:162;}i:31;a:2:{i:0;i:2823;i:1;i:297;}i:32;a:2:{i:0;i:3039;i:1;i:81;}i:33;a:2:{i:0;i:3068;i:1;i:52;}i:34;a:2:{i:0;i:2586;i:1;i:534;}i:35;a:2:{i:0;i:3078;i:1;i:42;}i:36;a:1:{i:0;i:3120;}i:37;a:2:{i:0;i:2952;i:1;i:168;}i:38;a:2:{i:1;i:551;i:0;i:2569;}i:39;a:1:{i:0;i:3120;}i:40;a:1:{i:0;i:3120;}i:41;a:1:{i:0;i:3120;}i:42;a:1:{i:0;i:3120;}i:43;a:1:{i:0;i:3120;}i:44;a:1:{i:0;i:3120;}i:45;a:1:{i:0;i:3120;}i:46;a:2:{i:0;i:3104;i:1;i:16;}i:47;a:1:{i:0;i:3120;}i:48;a:1:{i:0;i:3120;}i:49;a:2:{i:0;i:3099;i:1;i:21;}i:50;a:1:{i:0;i:3120;}i:51;a:1:{i:0;i:3120;}i:52;a:2:{i:0;i:3104;i:1;i:16;}i:53;a:1:{i:0;i:3120;}i:54;a:1:{i:0;i:3120;}i:55;a:1:{i:0;i:3120;}i:56;a:1:{i:0;i:3120;}i:57;a:1:{i:0;i:3120;}i:58;a:1:{i:0;i:3120;}i:59;a:1:{i:0;i:3120;}i:60;a:1:{i:0;i:3120;}i:61;a:1:{i:0;i:3120;}i:62;a:1:{i:0;i:3120;}i:63;a:1:{i:0;i:3120;}i:64;a:1:{i:0;i:3120;}i:65;a:1:{i:0;i:3120;}i:66;a:1:{i:0;i:3120;}i:67;a:1:{i:0;i:3120;}}}s:8:" * probs";a:2:{s:3:"sim";a:68:{i:0;a:2:{i:1;d:-0.917942259912628;i:0;d:-0.5097261184325736;}i:1;a:2:{i:1;d:-1.7155321038401707;i:0;d:-0.19828995997268575;}i:2;a:2:{i:0;d:-0.5015181380147443;i:1;d:-0.9304164341378038;}i:3;a:2:{i:1;d:-0.5207759546191588;i:0;d:-0.9015484501369516;}i:4;a:2:{i:1;d:-2.1302138670532593;i:0;d:-0.1264841471091196;}i:5;a:2:{i:0;d:-0.06475856734816308;i:1;d:-2.7692938263429285;}i:6;a:2:{i:0;d:-0.917942259912628;i:1;d:-0.5097261184325736;}i:7;a:2:{i:0;d:-0.06475856734816308;i:1;d:-2.7692938263429285;}i:8;a:2:{i:0;d:-0.04557750849631925;i:1;d:-3.1110431200649855;}i:9;a:2:{i:0;d:-0.040409538337876666;i:1;d:-3.228826155721369;}i:10;a:2:{i:0;d:-0.5575552061224552;i:1;d:-0.8500519243697767;}i:11;a:2:{i:0;d:-0.14538830174827225;i:1;d:-2.0001607388050613;}i:12;a:2:{i:0;d:-0.3133102160241788;i:1;d:-1.313129785262552;}i:13;a:2:{i:0;d:-0.22686333241674173;i:1;d:-1.594695630696897;}i:14;a:2:{i:0;d:-0.023373351185308713;i:1;d:-3.767822656454056;}i:15;a:2:{i:1;d:-3.1880041612011136;i:0;d:-0.042129229217403225;}i:16;a:2:{i:0;d:-0.06652068234156232;i:1;d:-2.743318339939668;}i:17;a:2:{i:0;d:-0.06475856734816308;i:1;d:-2.7692938263429285;}i:18;a:2:{i:0;d:-0.0700542549228735;i:1;d:-2.6933079193650067;}i:19;a:2:{i:0;d:-0.0438518825288494;i:1;d:-3.1487834480478325;}i:20;a:2:{i:0;d:-0.15690474380983138;i:1;d:-1.929543171591108;}i:21;a:2:{i:0;d:-0.014962872676712377;i:1;d:-4.209655408733095;}i:22;a:2:{i:0;d:-0.06124362524071867;i:1;d:-2.8233610476132043;}i:23;a:2:{i:0;d:-0.07715908054661809;i:1;d:-2.6002174962989946;}i:24;a:2:{i:0;d:-0.0718257345712555;i:1;d:-2.6692103677859462;}i:25;a:2:{i:0;d:-0.02168558707158898;i:1;d:-3.841930628607778;}i:26;a:2:{i:0;d:-0.06475856734816308;i:1;d:-2.7692938263429285;}i:27;a:2:{i:0;d:-0.07537813617562336;i:1;d:-2.622690352151053;}i:28;a:2:{i:0;d:-0.04903771956121486;i:1;d:-3.0395841560828405;}i:29;a:2:{i:0;d:-0.07537813617562336;i:1;d:-2.622690352151053;}i:30;a:2:{i:0;d:-0.05077232537342326;i:1;d:-3.005682604407159;}i:31;a:2:{i:0;d:-0.07360035792962409;i:1;d:-2.6456798703757523;}i:32;a:2:{i:0;d:-0.020000666706669543;i:1;d:-3.9219733362813143;}i:33;a:2:{i:0;d:-0.009950330853168092;i:1;d:-4.61512051684126;}i:34;a:2:{i:0;d:-0.19227188764712272;i:1;d:-1.7434408919572473;}i:35;a:2:{i:0;d:-0.020000666706669543;i:1;d:-3.9219733362813143;}i:36;a:2:{i:0;d:-0.08611169181873207;i:1;d:-2.4948569806411682;}i:37;a:2:{i:0;d:-0.047306117396936985;i:1;d:-3.0746754758941104;}i:38;a:2:{i:0;d:-0.20637081202662433;i:1;d:-1.6794921673569738;}i:39;a:2:{i:0;d:-0.17836898247813132;i:1;d:-1.8117601359347244;}i:40;a:2:{i:0;d:-0.09696170784279785;i:1;d:-2.3815282953341654;}i:41;a:2:{i:0;d:-0.009950330853168092;i:1;d:-4.61512051684126;}i:42;a:2:{i:0;d:-0.0700542549228735;i:1;d:-2.6933079193650067;}i:43;a:2:{i:1;d:-1.7155321038401707;i:0;d:-0.19828995997268575;}i:44;a:2:{i:0;d:-0.009950330853168092;i:1;d:-4.61512051684126;}i:45;a:2:{i:0;d:-0.24778459757738155;i:1;d:-1.5165308578475607;}i:46;a:2:{i:0;d:-0.006622540760493382;i:1;d:-5.020585624949423;}i:47;a:2:{i:0;d:-0.023373351185308713;i:1;d:-3.767822656454056;}i:48;a:2:{i:0;d:-0.042129229217403225;i:1;d:-3.1880041612011136;}i:49;a:2:{i:0;d:-0.004962789342129014;i:1;d:-5.308267697401205;}i:50;a:2:{i:0;d:-0.01663931900396467;i:1;d:-4.104294893075269;}i:51;a:2:{i:0;d:-0.008285051534106917;i:1;d:-4.797442073635215;}i:52;a:2:{i:0;d:-0.004962789342129014;i:1;d:-5.308267697401205;}i:53;a:2:{i:0;d:-0.008285051534106917;i:1;d:-4.797442073635215;}i:54;a:2:{i:0;d:-0.014962872676712377;i:1;d:-4.209655408733095;}i:55;a:2:{i:0;d:-0.011618387953865076;i:1;d:-4.460969837014002;}i:56;a:2:{i:0;d:-0.011618387953865076;i:1;d:-4.460969837014002;}i:57;a:2:{i:0;d:-0.004962789342129014;i:1;d:-5.308267697401205;}i:58;a:2:{i:0;d:-0.004962789342129014;i:1;d:-5.308267697401205;}i:59;a:2:{i:0;d:-0.003305788134499544;i:1;d:-5.713732805509369;}i:60;a:2:{i:0;d:-0.009950330853168092;i:1;d:-4.61512051684126;}i:61;a:2:{i:0;d:-0.006622540760493382;i:1;d:-5.020585624949423;}i:62;a:2:{i:0;d:-0.014962872676712377;i:1;d:-4.209655408733095;}i:63;a:2:{i:0;d:-0.004962789342129014;i:1;d:-5.308267697401205;}i:64;a:2:{i:0;d:-0.006622540760493382;i:1;d:-5.020585624949423;}i:65;a:2:{i:0;d:-0.004962789342129014;i:1;d:-5.308267697401205;}i:66;a:1:{i:0;d:0;}i:67;a:1:{i:0;d:0;}}s:4:"não";a:68:{i:0;a:2:{i:0;d:-0.41576783929175054;i:1;d:-1.0783198992734933;}i:1;a:2:{i:0;d:-0.1825778356267258;i:1;d:-1.7904790593220103;}i:2;a:1:{i:1;d:0;}i:3;a:1:{i:1;d:0;}i:4;a:1:{i:1;d:0;}i:5;a:2:{i:1;d:-2.6849369353659522;i:0;d:-0.07066444258017576;}i:6;a:2:{i:1;d:-0.41576783929175054;i:0;d:-1.0783198992734933;}i:7;a:2:{i:0;d:-0.0662055087647326;i:1;d:-2.7479117345273405;}i:8;a:2:{i:0;d:-0.045879605750693664;i:1;d:-3.104586678466073;}i:9;a:2:{i:0;d:-0.04621500739730597;i:1;d:-3.0974692106972093;}i:10;a:1:{i:0;d:0;}i:11;a:1:{i:0;d:0;}i:12;a:1:{i:0;d:0;}i:13;a:2:{i:0;d:-0.18604404360321208;i:1;d:-1.7733520945292098;}i:14;a:2:{i:0;d:-0.011922164735889139;i:1;d:-4.435311188431153;}i:15;a:2:{i:0;d:-0.03620157259364352;i:1;d:-3.3366988997630433;}i:16;a:2:{i:0;d:-0.07514334756977041;i:1;d:-2.6256941018030915;}i:17;a:2:{i:0;d:-0.05092248078455562;i:1;d:-3.002803984156131;}i:18;a:2:{i:0;d:-0.05429858122290015;i:1;d:-2.940283627174797;}i:19;a:2:{i:0;d:-0.06552128020570824;i:1;d:-2.757962070380842;}i:20;a:2:{i:0;d:-0.15415067982725836;i:1;d:-1.9459101490553135;}i:21;a:2:{i:0;d:-0.0109501899307106;i:1;d:-4.519868576459216;}i:22;a:2:{i:0;d:-0.06313016036448493;i:1;d:-2.7939556730287474;}i:23;a:2:{i:0;d:-0.06929034411594272;i:1;d:-2.7038948491105663;}i:24;a:2:{i:0;d:-0.07721731996889954;i:1;d:-2.5994917294090674;}i:25;a:1:{i:0;d:0;}i:26;a:1:{i:0;d:0;}i:27;a:2:{i:0;d:-0.058365004989690265;i:1;d:-2.8700793685015484;}i:28;a:2:{i:0;d:-0.08172573752382947;i:1;d:-2.5449708905306503;}i:29;a:2:{i:0;d:-0.048902278077279634;i:1;d:-3.042282795129918;}i:30;a:2:{i:0;d:-0.05362244867516768;i:1;d:-2.952478900268615;}i:31;a:2:{i:0;d:-0.10031950246224468;i:1;d:-2.3491356145699727;}i:32;a:2:{i:0;d:-0.026616306675110037;i:1;d:-3.6395098538111244;}i:33;a:2:{i:0;d:-0.0171220464556412;i:1;d:-4.075937187523255;}i:34;a:2:{i:0;d:-0.18797491888934822;i:1;d:-1.763962354179371;}i:35;a:2:{i:0;d:-0.013868953150876944;i:1;d:-4.285028985381815;}i:36;a:1:{i:0;d:0;}i:37;a:2:{i:0;d:-0.05565221933145465;i:1;d:-2.9163303861523038;}i:38;a:2:{i:1;d:-1.732681054798282;i:0;d:-0.19456792318611196;}i:39;a:1:{i:0;d:0;}i:40;a:1:{i:0;d:0;}i:41;a:1:{i:0;d:0;}i:42;a:1:{i:0;d:0;}i:43;a:1:{i:0;d:0;}i:44;a:1:{i:0;d:0;}i:45;a:1:{i:0;d:0;}i:46;a:2:{i:0;d:-0.005460106707798186;i:1;d:-5.2130157570191615;}i:47;a:1:{i:0;d:0;}i:48;a:1:{i:0;d:0;}i:49;a:2:{i:0;d:-0.007071710602139796;i:1;d:-4.955186647717062;}i:50;a:1:{i:0;d:0;}i:51;a:1:{i:0;d:0;}i:52;a:2:{i:0;d:-0.005460106707798186;i:1;d:-5.2130157570191615;}i:53;a:1:{i:0;d:0;}i:54;a:1:{i:0;d:0;}i:55;a:1:{i:0;d:0;}i:56;a:1:{i:0;d:0;}i:57;a:1:{i:0;d:0;}i:58;a:1:{i:0;d:0;}i:59;a:1:{i:0;d:0;}i:60;a:1:{i:0;d:0;}i:61;a:1:{i:0;d:0;}i:62;a:1:{i:0;d:0;}i:63;a:1:{i:0;d:0;}i:64;a:1:{i:0;d:0;}i:65;a:1:{i:0;d:0;}i:66;a:1:{i:0;d:0;}i:67;a:1:{i:0;d:0;}}}}

As I understand, when a user logs into your site, with his/her details, and you want to show your specific ads (eventually not showing any). According to your server technology, you develop a web component that displays your contents according to your predictions. These contents (pictures/text) would be linked to the actual marketing page, including your site as referer. Then you would be rewarded if clicked.
Maybe you want to show specific Google Ads, ones that you favor. That is Google Ads' job to select ads, I doubt if Google allows your choice. Google has its own prediction algorithms based on the (same) user's actions while browsing on Chrome.

Related

API to push data to HealthKit

My ultimate goal: I want to automatically log my weight to healthkit on my phone every time I step on the scale.
Secondary goal: I don't want to spend much money, but I do want to learn. I'm a computer engineer and enjoy building hardware, but I don't just want to buy an off-the-shelf smart scale and install their app. Part of this comes down to data security: I don't like my information (especially health information) being in somebody else's hands.
Tertiary goal: I don't want to need an apple developer account (e.g., to roll my own on-phone app or something) but if I have to compromise here I will.
I want this to be as painless a process as possible - I've seen solutions that involve setting up a shortcut to ask for your current weight, etc, and I don't love that: less user interaction is better.
I'm usually wearing my apple watch when I weight myself, but might forget my phone (it's often right after a workout before I shower), if that helps.
I've seen a lot of questions on here talking about querying data, and I don't care about that: I'll use the phone to look at historical data, but I want to enter it automatically/painlessly so I have some data to look at.
For instance: I could set up an NFC sticker to open a shortcut, and maybe the process of scanning the sticker holds my phone in a specific place to read a QR code output by the scale? I honestly don't know if scanning a QR is possible in a shortcut, but this is just an example. The downside here is that I would need my phone on me.
The most promising solution from what I can tell is to build my scale to send the weight to google fit's API, and then install the google fit app on my phone to sync automatically. The downside is exposing my info to another service (google fit) rather than just keeping it in HealthKit, which I'd prefer.
Is there an auto-magic URL format that could trigger an iOS behavior to enter the data?
Is there an API through iCloud to just submit the data and not query it?
Is there a bluetooth option to talk to my watch and sync data there?
I see a lot of questions for querying/reading HealthKit data, but very little on submitting/saving it - so I'm not sure what's possible.
Suggestions appreciated!

How to implement something like Amazon's "Customers who viewed also viewed..."?

This may sound very newbie, but I was wondering if there's a simple way to achieve something like Amazon's "Customers who viewed this also viewed..".
Theoretically I know you can do clustering, data mining, etc. to do something like this but I am just working on a ruby-on-rails app and want to incorporate something like this to my already existing app (which uses pgsql), and kind of lost.
I'm not looking for a super-sophisticated solution but just want something simple I can just quickly employ.
Any pointers would be appreciated. Thank you!
Amazon is able to pull this off because they have millions of users and a huge inventory which results in billions of data points. They crunch these data to make sense[user profiles, product profiles, likes, dislikes] and build a recommendation engine to help users discover products and drive sales. It makes sense to them.
Since you're not looking into data science and I have no idea of what all data you collect, you could start off by showing other products purchased by users who bought the specific product. Experiment and A/B test to see what works and what doesn't. Iterate on this, to show products bought by others users matching current users age, gender,nationality etc.
This will not be the recommendation engine that you are expecting but might drive some sales.

A/B testing(show new feature only for 50% of users)

I'am creating a new feature for my iOS app. After I publish the app I wants to show the new feature only for 50% of the users, so I can do some testing which version makes more orders. I have no idea how to do it without using some third parties like Optimizely.
Also is it possible to do this using Google Tag Manager(GTM).
So can someone please help me to figure this out.
Thank you very much for your time.:)
It’s hard to do it on your own, though not impossible of course: Optimizelys of the world are just programs. You’ll need to solve these problems:
Targeting: Some algorithm that will assign user session to either control or (one of) treatment(s). This has to be random, of course, or you may as well stop there.
Routing: Send sessios to the targeted experience.
Logging: You’ll need to intelligently log events from sessions as they traverse their targeted experience. These may be many, so be careful not to add latency to your app path. Your statistical analysis will be based on these.
Experience stability: how do you ensure (if you do) that a returning user sees the same experience he’s already seen.
Note as well, that Optimizely will only help you if all your changes are on the device and not on the server. If you need to instrument server changes as well, you’ll have to look into Sitespect or Variant.
I finally figured out how to do the A/B testing with 'Google Tag Manager'(GTM).
In GTM you can create a variable called 'Google Analytics Content Experiment'. With this variable you can select how many percentage of users going to see each Variation(your experiments). You can create up to 10 variations for single experiment.
GTM is so cool and powerful. GTM contains so many features that could save lot of time and I totally recommend it for anyone who is going to do A/B testing.

shazam for voice recognition on iphone

I am trying to build an app that allows the user to record individual people speaking, and then save the recordings on the device and tag each record with the name of the person who spoke. Then there is the detection mode, in which i record someone and can tell whats his name if he is in the local database.
First of all - is this possible at all? I am very new to iOS development and not so familiar with the available APIs.
More importantly, which API should I use (ideally free) to correlate between the incoming voice and the records I have in the local db? This should behave something like Shazam, but much more simple since the database I am looking for a match against is much smaller.
If you're new to iOS development, I'd start with the core app to record the audio and let people manually choose a profile/name to attach it to and worry about the speaker recognition part later.
You obviously have two options for the recognition side of things: You can either tie in someone else's speech authentication/speaker recognition library (which will probably be in C or C++), or you can try to write your own.
How many people are going to use your app? You might be able to create something basic yourself: If it's the difference between a man and a woman you could probably figure that out by doing an FFT spectral analysis of the audio and figure out where the frequency peaks are. Obviously the frequencies used to enunciate different phonemes are going to vary somewhat, so solving the general case for two people who sound fairly similar is probably hard. You'll need to train the system with a bunch of text and build some kind of model of frequency distributions. You could try to do clustering or something, but you're going to run into a fair bit of maths fairly quickly (gaussian mixture models, et al). There are libraries/projects that'll do this. You might be able to port this from matlab, for example: https://github.com/codyaray/speaker-recognition
If you want to take something off-the-shelf, I'd go with a straight C library like mistral, as it should be relatively easy to call into from Objective-C.
The SpeakHere sample code should get you started for audio recording and playback.
Also, it may well take longer for the user to train your app to recognise them than it's worth in time-saving from just picking their name from a list. Unless you're intending their voice to be some kind of security passport type thing, it might just not be worth bothering with.

About data mining by using twitter data

I plan to write a thesis about using sentiment information to enhance the predictivity of some financial trading model for currency.
The sentiment data should be twitter threads including some keyword, like "EUR.USD". And I will filter out some sentiment words to identify the sentiment. Simple idea. Then we try to see whether here is any relation between the degree of sentiment and the movement of EUR.USD.
My big concern is on twitter data. As we all know that the twitter set up the limit to see the history data. You could only browser back for like 5 days. It is not enough since our strategy based on daily sentiment.
I noticed that google have some fantastic thing like timeline about the twitter updates: http://www.readwriteweb.com/archives/googles_twitter_timeline_lets_you_explore_the_past.php
But first of all, I am in Switzerland and seems I have no such function on my google which is too smart to identify my location and may block some US google version function like this. Secondly, even I could see some fancy interactive google timeline control on my firefox, How could I dig out data from my query and save them? Does google supply such api?
The Google service you mentioned has shut down recently so you won't be able to use it. (http://www.searchenginejournal.com/google-realtime-shuts-down-as-twitter-deal-expires/31007/)
If you need a longer timespan of data to analyze I see the following options:
pay for historical data :) (https://dev.twitter.com/docs/twitter-data-providers)
if you don't want to pay, you need to fetch tweets containing EUR/USD whatever else (you could use the streaming API for this) and store them somehow. Run this service for a while (if possible) and you'll have more than just 5 days of data.

Resources