vujsa
Nov 6 2007, 02:33 PM
I recently got an idea for a project and one of the features I wanted the project to have was an automated suggestion service. If anyone has been to Amazon, it would work much like their recommended product feature. What I want to do is take several users lists of whatever but for this example, I'll use web links like from the browser history. I would want to suggest links to a user based on common links in many other users lists. User A: Amazon, Ebay, Excite, Google, Yahoo, MySpace, Walmart User B: Amazon, Ebay, Google, Yahoo, You Tube, MySpace, CVS User C: Amazon, Excite, Google, Yahoo, You Tube, MySpace, Home Depot The three users have similar lists and as a result, they probably have similar website preferences. So the script would recognize the similarities (All have Amazon, Google, and MySpace), eliminate the uncommon items (Walmart, CVS, Home Depot), and then suggest to each user what ever common link they are missing: User: Suggestion A: You Tube B: Excite C: Ebay This is a very simplified example but the theory would be the same except for the following: There will likely be more than one common pattern in a user's list like so: User A: Amazon, Ebay, Excite, Google, Yahoo, MySpace, Walmart User D: Google, Yahoo, Walmart, Applebees, Overstock, PayPal User E: Ebay, Google Yahoo, Walmart, PayPal, Circuit City, Best Buy All share Google, Walmart, and Yahoo so that is the pattern match. Ebay should be suggested to User D since User A and User E share that as well. PayPal should be suggested to User A since User D and User E have that in common. Best Buy, MySpace, and Overstock should not be considered. The script should be prepared to search hundreds or even thousands of user lists to find match patterns and make suggestions based on those matches. The script should be able to provide suggestions based on the best matches possible. Ideally, the script would work with nearly any kind of list such as books, links, songs, etc... So the question, does anyone know where I can find a similar script or have any suggestion on how to begin developing such a script. I had considered using a percentage comparison instead of a true pattern matching method. User A's list is compared to every other list in the database using a query that would return lists that are most like it. Using the top 5 or 10 similar lists (Based on how well it match percentage wise). This would use the same technique as the search engines do when they list search results by relevance and show how relevant it is by a percentage value. Then eliminating all of the completely uncommon items from the list, and then removing all of the completely common links would give a list of items that might be suitable to suggest to each of the lists mentioned as long as the suggestion wasn't already on that particular list. So, given that this is the much easier method, does anyone have suggestions for this? Thanks for any help. vujsa
Reply
altimit
Dec 31 2007, 07:09 PM
Hi vujsa, The key here is in addition to maintaining a list (in the database) of each user's (hereby referred to as "key") items (hereby referred to as "value"), maintain a separate "master list" of all values associated with all the keys, sorted by their occurence. Hence, whenever a suggestion is needed to be made for a particular key, find a value in the master list that is not present in the key's list of values with the highest occurence. Note that this is global, all keys are considered regardless of how high key X and key Y are related. To make the system more specific and tailored to each user, the existing system as described above needs to be slightly modified and extended, and will be described in detail below. Be forewarned that, if improperly designed, this will take a lot of database space since you are attempting to match every user against every user; that would be N^2 matches for N keys. To reduce complexity, maintain a highest relation list that contains two fields: the key A, and the other key B most associated with A. You would need to provide an algorithm that gives a proper association value for two keys; a suggestion would be to take the number of matching values, and subtract it with the number of non-matching values to give the assocativity rating. This is very simple and fast to compute, but may not give the desired and most exact behavior depending on your data. Once we have a highest relation list, we use the master list to be the arbitrator when we have to make a suggestion for key A. The system will suggest a value which has the highest occurence in the master list, and has to be a value for key B, and not a value for key A. If there are no matches (i.e. keys A and B have the exact same values), the system may suggest a new value depending on an algorithm; a suggestion would be to take the value with the highest occurence in the master list which are not values of both key A and B. In cases where a key has changed values, we must recompute the highest relation list. This is less costly than having to compute the relation of arbitrary groups of users; while it can be done, it is best employed with a very fast back-end with good processing power, and even then, it would not scale well. The proposed design here is simple and effective, without requiring extreme amounts of power and storage. What do you think?
Reply
vujsa
Jan 14 2008, 10:35 PM
Thank you for your reply. I think that I have a method to use for this idea. Since all of the date will be in a MySQL database, I can utilize some of the built in functions to some pattern matching. For example, if each user's record included a list (text list maybe comma separated), then using a FULL TEXT search of user A's list against the users database table would return the closest user matches to user A. Then a number of "matching" records can be used to make suggestions from. This along with manual pattern suggestions would offer the greatest probability of providing the user with suggestions they would be interested in. To make the system more complex, I think that providing the user with a wish list that could also be searched against would provide an even greater number of accurate product suggestions. So what I thought, since I will rely on MySQL to do most of the work is cycle through each "matching" list and eliminate any items that are the same in the query list. That would only leave items that might be suggested from the "matching" list. Then we store that list of possible suggestions and move to the next "matching" list. When done with each of the "matching" lists, we will have an array of suggested lists. We then eliminate any item in each list that is not found in any other list which provides us with a list of items that might be good suggestions. The key would be to focus the suggestions based on how relevant it is. For example, if the number of matching lists returned is quite high, they can be ordered by how closely they match and only the top 20 could be used. Then only add an item to the suggestions if it appears in 3 or more lists. Unfortunately, I have so many projects right now I can't start on the system. Not to mention, I still need to create a CMS to base future systems on. Seems like every time I think I have a chance to catch up, another freelance job comes up. vujsa
Reply
Similar Topics
Keywords : automated suggestion script user lists related items based matching- Basics Of Php For Beginners - Suggestion
- Help Needed For Project (5)
Hi all, I have a friend who, for his extended IT project is interested in making a website partly
out of php. When he asked for advice my first thought was here. I would like to know some good
websites, tutorials etc that he can use to introduce himself to php (he hasn't done much
before). He is interested in making a simple login/subscription service where you can signup and
then login to a 'members only' page. Any ideas and code samples that you have to share would
be greatly appreciated. /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" a...
Need Help With A PHP - MySQL Registration Script
- Wont INSERT into the database (13)
hey well can some one helpme make this code work it won't INSERT INTO THE DATABSE CODE
<?php # register1.php # common include file to MySQL include("DB.PHP");
$Username=$_POST['Username'];
$Password=$_POST['Password'];
$Name=$_POST['Name']; $Last=$_POST['Last'];
$Sex=$_POST['Sex']; $Month=$_POST['Month'];
$Day=$_POST['Day']; $Year=$_POST['Year&...
Myspacetv Download Php Script Help
- (6)
How To Reset The Server Variable Php_auth_user
- (9)
Hi, i'm developing a web application which obviously requires a log in/log out script that i
just implementing but i dont know why the log out script dont work fine. The problem is related
with the server variable $_SERVER which remains set even when in the log out script i unset it
with the unset() function. Does someone knows how can i reset or clear the server variable
$_SERVER ??? Best regards, ...
Php Login Script
- (0)
login script click the link to get your free php login script installer just follow the
instuctions the exe gives you and it will give you the script just place the code in the sever and
open index.html and follow on from there. what it has: it has reg page, login protection code ect.
it is simple to use and i think quite fun but im BORN TO BE WEIRD,you will need at least one working
mysql data base /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif"
/> hope you enjoy it. iknow i did from the alexmedia crew...
Script Request
- script request (2)
another script request i am looking for a file manger tutorial with edit delete search upload move
copy and a WYSIWYG(What You See Is What You Get) editer like on on freewebs.com and css editor plz
help! i need on badly vmkrightpoint Edit"i keep search google and msn and yahoo i can't
find on!! lol"...
Php Script To Download File From Another Site
- (9)
hi i need a php or java script code for downloading files from other sites to my site for example:
http://download.com/file.zip to http://mysite.com/file.zip thanks...
How To Create/edit/delete Ftp Accounts With Php
- Help me to create one php page to create FTP user accounts in Unix Ser (1)
Thanks /cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> ...
Extplorer
- A PHP -and JavaScript- based File Manager (7)
Browsing the ExtJS examples website i found this excellent web-based file manager called
eXtplorer . eXtplorer allows you to browse your webserver folders with an intuitive Layout which
makes working with files very easy, and thanks to the great ExtJS Javascript Library you can drag
& drop folders and files, filter directories and sort the file list using various criteria. You can
use eXtplorer to for example: browse directories & files on the server. edit, copy, move, delete
files. search, upload and download files. create and extract archives. create new fil...
Make A Script Run Even If No User Is Online
- (6)
Hey! Is there any way to make a script run, even if no user is online. Because at the moment, my
scripts run, only when a user is online. And another thing: How can i make the following: (this is
just an example) mysql_query"SELECT maxhp FROM users WHERE username = 'allusers'"; How can I
select all users maxhp, in the same query? Thanks //Feelay...
User Authentication Session Handling Problems
- Authorization server variables not staying across pages (14)
This is quite a bit of problem I am facing, and I cannot point exactly where I am going wrong. I
have been lurking around here at the Asta Host forums with regard to login and user authentication
scripts and I have got as far as this: - Starting a session - Registering a session variable -
Using the variable to check if the user is authenticated or not. - Authenticating the user through
MySQL database - Logging of the user, by setting the session variable to un-authenticated I have
been able to achive the following things too that I think is not related to this proble...
Writing And Testing My Own Login Script [solved]
- (20)
i have this error QUOTE Warning: session_start() : Cannot send session cache limiter - headers
already sent (output started at /home/eggie/public_html/race.php:2) in
/home/eggie/public_html/race.php on line 5 in every page i have with session start...what's
the problem?? CODE <title>Race</title> <?php
include("style.css"); include("config.php");
session_start(); if(!session_is_registered(myusername)){ echo 'Your
Session has Expired!'; exit;} //If you click race....
Login Script
- (8)
I have another question--- i downloaded script of a game and it worked until my server changed to
newer version of php after which it didn't work... the most probable reason is that globals are
not enabled... now i need someone who can tell me what to put instead of what to make it work...
this is my login.php script CODE <?php $title = "Login"; if
(!$user || !$pass) { include("head.php"); print
"Please fill out all fields."; include("foot.php"); exit; }
include...
Free Forum Hosting Type Script Help!
- Free forum hosting type script help!!! (2)
i want to make something like http://invisionfree.com/ that makes an dir with your phpbb 3 forum
in it with an admin CP plz help i really want to make something like it!! i was thinking
of coding my own with file handling but i'm not good at some of it like "when u click submit to
register a forums it will move the phpbb3 file that leads to the users dir then it will rename the
dir to your username so like my.site.com/username it might work" with the admin username and pass
and admin's email it will open the config.php then edit all the data but it...
What Would Make A Good Registration Script?
- (4)
I see newbies all the time looking for either a login script or after a little querying you find
they really would like to have a registration script. The first thing for such a script for a
members area would of course be a form and being kind of old fashioned I still like to format my
forms with a table but I do use inline CSS to make it a little nicer. I never did like forms that
had an asterick * by a field and then a Note: Fields marked with * are required. So what I do
instead is add a background color to those areas and then use a CSS background color statin...
Warning: Mysql_result(): Supplied Argument Is Not A Valid Mysql Result Resource In ...
- This Is for My attack Script. (4)
Hey. I am making a "Version 2.0" For my attack script, but I can't make it work. This is the
error I am gettin: Warning: mysql_result(): supplied argument is not a valid MySQL result resource
in And here is the code: CODE $dbQueryHealth = mysql_query("SELECT
temphealth FROM characters WHERE user =".
$_POST['atkuser'].""); $currentHealth =
mysql_result($dbQueryHealth, 0); $dbQueryExp =
mysql_query("SELECT exp FROM characters WHERE user = ".$...
Password Recovery Script
- (6)
While trying to make password recovery script for "bhupinunder" i run into a problem... i made this:
CODE <?php $dbh =
mysql_connect('localhost','jaskaran_gc','gc') or die
("Cannot Connect: " . mysql_error());
mysql_select_db('jaskaran_gc',$dbh); ?> <form method=post
action=restore.php?recover=answer> <?php
print"Email:</td><td><input type=text
name=email></td></tr>";?> <P><INPUT TYPE=submit VALU...
SQL Doesn't Connect In PHP Script
- I made some code updates now the script is broken. (19)
i have created a website and it is not working properly... i have had a website on sphosting.com and
everything worked fine till i got some errors(i got the errors because of the crappy host)...now the
fun part starts...they said they solved the problem but i got another one..i said them to repair it
again and they did...now i tried to login but as i entered the info it said the info isn't
correct...i checked the SQL and everything seemed fine..i tried again and again the error came...i
tried than to register,entered ALL info and when this was suppose to come out "Yo...
Php Script Help
- help with scripting of php (1)
Ok first a little back story of what happened and why I am asking for help. I have been playing text
based rpgs and found that I really like them. Well I have also found that most programers don't
want to listen to their clients in the sugestion box and when u make a content sughesstion they get
rude or make fun of your idea. So I decided I would sart my own and make it where the users had say
so in added content. Not saying all sugestions will get added but I will not make fun or get mad at
them. Any who when I bought the script I was under the impression it was fu...
Run A Script When Expires A Session
- (6)
For example, when a user logins to a page -with a login form- and after validating and verifying
it's credentials i store some information related to this user in session variables and a table
with his state -connected- is updated, then i use it in other pages, etc. When this user logouts
-by clicking a logout link- i release -unregister, destroy, etc- all the session variables stored
and the same table is updated with his state -disconnected-. All of this funcionality works very
well, the problem comes when the user do not click on the logout link and the session ...
Something Wrong With This Script?
- Unexpected T_SRING (9)
Here is the code that I have: CODE <?php $con =
mysql_connect("localhost","user","password"); if
(!$con) {die('<p>Could not connect: ' .
mysql_error() . '</p>');} mysql_select_db("database",
$con); $ip=$_SERVER['REMOTE_ADDR']; echo "Adding MXP
info..."; mysql_query (INSERT INTO mxp (date, user, victim, turns, side, gold, lost,
killed, mxp, points_b, points_a, type, power, ip) VALUES (...
Automatic/remote Php Script Execution
- (9)
Hi, I was wondering, is it possible to execute a PHP script when a user isn't on the page with
it? Say for example, have it so that a script checks that if a certain time has passed since a user
was last active, it logs them off? So that if they've closed the window, it doesn't keep
them marked as logged in. Also, is there any way, with PHP to alert a user when something changes,
as soon as it happens? Say that if they recieve a new message, a box pops up telling them? You could
do this with Ajax I suppose, but (correct me if I'm wrong) continually runni...
Trainable Anti-spam Filter Script
- Any clues howto write one/get one ? (3)
Hi all, Does anybody have ideas about writing trainable anti-spam mail filters - that you can
add onto any web-mail script ? Looking for something written in perl/php that'll allow me to
just check the checkboxes beside spam mails and click any button (say, "mark as spam") and the
script studies the mail headers and creates its own list of originating spammer domains/ips & blocks
out mails from 'em ? Thanks /smile.gif' border='0' style='vertical-align:middle'
alt='smile.gif' /> ...
Please Help (php Join Script)
- (5)
Ok as you all know by now I have been working on a php based game
to help me learn php. It has been going great and it is almost done. I got some very good help on is
sues here and along with sites like php.net. However I am stuck and can not find a solution to a
problem anywere. My Problem: I want users to join but I don't want some charicters to be in
there name (example I dont want Disallowed Charicters: , ', " I would array like: CODE
$string = array(<, >, ', "); This for some reason does not work for.
CODE if(st...
Login Script
- PHP Help #3 - Need help creating one (5)
It turns out that the authentication script that I copied from
http://www.php-mysql-tutorial.com/user-aut...on/database.php doesn't work even when it is left
unchanged. What a crappy piece of code. Now I am trying to build by own login script from scratch.
I already have a little knowledge on how to do this (connecting, echoing, retrieving) but I need
some more examples and/or tips. I know what I need and maybe this could help you out: Note: Green
items are fixed. No duplicate username in MySQL Database Authorized users only. I have to
authorize each...
Php - Browser Based Editor
- (3)
I'm trying to set up some tools for a number of developers to use in the creation of a
text-based MMORPG. I'd like to be able to show directory structure and allow them to easily see
which files are where - then to be able to edit the pages from their browser. It would also be a
neat feature that they could upload some files from their computer. Last time I needed this I built
it myself, but it was restricted to 2 directories only and I ended up storing the file structure in
text files. Anyways I'm debating rebuilding the entire thing but I can't help ...
Authentication Script
- PHP Help #2 -- I need help tweaking it - it won't work (1)
Okay, my first issue about the MySQL echo problem has been solved, thank you to those who helped.
/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Now I am focusing
on the login portion of my site, and I have this so far: CODE <?php // we must never forget
to start the session session_start(); $errorMessage = ''; if
(isset($_POST['username']) &&
isset($_POST['password'])) { $username =
$_POST['username']; &...
Proper Way To Grab User Data?
- (1)
I'm working on a script where there is a custom user profile and I was wondering if there was a
more efficient way to grab data stored in a database than this method: CODE $sql =
"SELECT * FROM users WHERE `access_name` = \"" .$active_user.
"\""; $row = mysql_fetch_array(mysql_query($sql)); //Link
the two tables together; grab the most common thing that is the *SAME* $user_id =
$row['id']; $sql2 = "SELECT * FROM content WHERE `cid` =
\...
Online Multiplayer Chess Script
- Online multiplayer chess script (2)
Do you have any script for this?or where can i find this script. I wait your replies. ok....
Backing Up User Forms As Static HTML
- (5)
System: Activity System for use in Universities Users: Faculty members Scenario: User fills out a
list of activites they participated in. Example: A faculty member attended a seminar about Object
Orientated Programming. They record that seminar into their records by filling out a form and
adding that activity into the database and identifying it with a designed term id. Spring terms are
different than fall terms etc etc. We want to create html snapshots of these forms that can be
included by a simple include('oldForm.html') into another form for review. ...
Looking for automated, product, suggestion, script, compare, user, lists, suggest, related, items, based, pattern, matching
|
|
Searching Video's for automated, product, suggestion, script, compare, user, lists, suggest, related, items, based, pattern, matching
|
advertisement
|
|