3 Clustering
3 Clustering
ABSTRACT
1. INTRODUCTION
2. SYSTEM ANALYSIS
3. PROJECT DESCRIPTION
4. SYSTEM DESIGN
5. SYSTEM IMPLEMENTATION
6. CONCLUSION
7. REFERENCES
CLUSTERING-BASED COLLABORATIVE FILTERING USING
AN INCENTIVIZED/PENALIZED USER MODEL
Abstract
Giving or recommending appropriate content based on the quality of experience is the most
important and challenging issue in recommender systems. As collaborative filtering (CF) is one
of the most prominent and popular techniques used for recommender systems, we propose a new
clusteringbased CF (CBCF) method using an incentivized/penalized user (IPU) model only with
ratings given by users, which is thus easy to implement. We aim to design such a simple
clustering-based approach with no further prior information while improving the
recommendation accuracy. To be precise, the purpose of CBCF with the IPU model is to
improve recommendation performance such as precision, recall, and F1 score by carefully
exploiting different preferences among users. Specifically, we formulate a constrained
optimization problem, in which we aim to maximize the recall (or equivalently F1 score) for a
given precision. To this end, users are divided into several clusters based on the actual rating data
and Pearson correlation coefficient. Afterwards, we give each item an incentive/penalty
according to the preference tendency by users within the same cluster. Our experimental results
show a significant performance improvement over the baseline CF scheme without clustering in
terms of recall or F1 score for a given precision.
People are likely to have an increasing difficulty in finding their favorite content effectively
since extensive collections of video, audio, papers, art, etc. have been created both online and
offline. For example, over hundreds of feature films and hundreds of thousands of books have
been produced and published every year in the US. However, one person would read at most
about 10,000 books in his/her life, and then he/she must choose his/her favorite books among
them. On the one hand, recommender systems have been developed and used in diverse domains
(e.g., the movie industry, the music industry, and so on) by helping people to select appropriate
content based on individual preferences [1]. Especially, online commerce industries such as
Amazon.com and Netflix have successfully exploited how to increase customer loyalty. For
example, Amazon.com and Netflix have generated much of their sales by providing personalized
items through their own recommender systems [2], [3].
In addition, there have been many studies on the design of CF algorithms in terms of reducing
the mean absolute error (MAE) or root mean squared error (RMSE) of rating prediction [8].
However, recommender systems designed in the sense of minimizing the MAE or RMSE do not
inherently improve recommendation accuracy. We assume that there are two recommender
systems having the same MAE or RMSE of the rating prediction. We note that they may differ
from each other in terms of user experience (UX) since there is a possibility that one
recommender system recommends an item whereas the other does not. For example, suppose
that the real preference of a user on an item is 4.2 and two recommender systems predict the
preference as 3.8 and 4.6, respectively. Then, when items having the predicted preference of
more than 4.0 are assumed to be recommended, the MAEs of two recommender systems are the
same but only the latter one will recommend the item. In order to redeem the above case, some
performance metrics related to UX such as precision, recall, and F1 score have been widely used
in the literature.
On the other hand, several companies, e.g., Pandora Internet Radio, Netflix, and Artsy, have
developed their own clustering-based recommendation methods, called Music Genome Project,
Micro-Genres of Movies, and Art Genome Project, respectively. These clustering-based
recommendation methods have successfully led to satisfactory performance, but the processing
cost for clustering is very expensive. For example, it is widely known that each song tends to be
analyzed by a musician through a process that takes usually 20 to 30 minutes per song in the case
of Music Genome Project.
1.1PROBLEM STATEMENT
The contribution of our work is to make a proper decision with which items should be
recommended or not under the same MAE or RMSE in terms of improving UX. If a
recommender system only suggests items whose predicted preference, then above two items will
be dropped by the system. However, there may be some users who are satisfied with the items,
and thus UX will decrease in this case. In order to enhance the UX, we give each item an
incentive or penalty according to the preference tendency by users. We cluster users into some
groups and make a decision on which items are given the incentive/penalty based on a group that
users belong to.
2. SYSTEM ANALYSIS
Our proposed method is built upon a predicted rating matrix-based clustering that can drastically
reduce the processing overhead of clustering. In our CBCF method, we aim to select items to be
recommended for users along with clustering. To this end, users are divided into several clusters
based on the actual rating data and Pearson correlation coefficient. Then, items are regarded as
more important or less important depending on the clusters that the users belong to. Afterwards,
we give each item an incentive/penalty according to the preference tendency by users within the
same cluster. The main contributions of our work are summarized as follows.
An easy-to-implement CBCF method using the IPU model is proposed to further enhance the
performance related to UX.
To design our CBCF method, we first formulate a constrained optimization problem, in
which we aim to maximize the recall (or equivalently F1 score) for a given precision.
We numerically find the amount of incentive/penalty that is to be given to each item
according to the preference tendency by users within the same cluster.
We evaluate the performance of the proposed method via extensive experiments and
demonstrate that F1 score of
the CBCF method using the IPU model is improved compared with the baseline CF
method without clustering,
while recall for given (fixed) precision can be significantly improved by up to about 50%.
Advantages
Model-based approaches offer the benefits of prediction speed and scalability, they have
some practical challenges such as inflexibility and quality of predictions.
More specifically, building a model is often a time- and resource-consuming process; and
the quality of predictions depends heavily on the way that a model is built.
Hard Disk : 40 GB
Mouse : Logitech.
RAM : 256 MB
2.3.2 SOFTWARES REQUIRED
Server Side Programming : PHP.
PHP
PHP is a server-side scripting language designed for web development but also used as a
general-purpose programming language. Originally created by Rasmus Lerdorf in 1994,the PHP
reference implementation is now produced by The PHP Group.PHP originally stood for Personal
Home Page,but it now stands for the recursive backronym PHP: Hypertext Preprocessor.
PHP code may be embedded into HTML code, or it can be used in combination with
various web template systems, web content management system and web frameworks. PHP code
is usually processed by a PHP interpreter implemented as a module in the web server or as a
Common Gateway Interface (CGI) executable. The web server combines the results of the
interpreted and executed PHP code, which may be any type of data, including images, with the
generated web page. PHP code may also be executed with a command-line interface (CLI) and
can be used to implement standalone graphical applications.
The standard PHP interpreter, powered by the Zend Engine, is free software released
under the PHP License. PHP has been widely ported and can be deployed on most web servers
on almost every operating system and platform, free of charge.
The PHP language evolved without a written formal specification or standard until 2014,
leaving the canonical PHP interpreter as a de facto standard. Since 2014 work has gone on to
create a formal PHP specification
PHP started out as a small open source project that evolved as more and more people
found out how useful it was. Ramus Lerdorf unleashed the first version of PHP way back in
1994.
PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire ecommerce sites.
PHP is pleasingly zippy in its execution, especially when compiled as an Apache module on the
Unix side. The MySQL server, once started, executes even very complex queries with huge
result sets in record setting time.
PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4 added
support for Java and distributed object architectures (COM and CORBA), making n-tier
development a possibility for the first time.
In order to develop and run PHP Web pages, three vital components need to be installed
on your computer system.
WebServer- PHP will work with virtually all Web Server software, including Microsoft's
Internet Information Server (IIS) but then most often used is freely available Apache Server.
Download Apache for free here: http://httpd.apache.org/download.cg
Database- PHP will work with virtually all database software, including Oracle and Sybase but
most commonly used is freely available MySQL database. Download MySQL for free here:
http://www.mysql.com/downloads/index.html
PHP Parser- In order to process PHP script instructions, a parser must be installed to generate
HTML output that can be sent to the Web Browser. This tutorial will guide you how to install
PHP parser on your computer.
The PHP interpreter only executes PHP code within its delimiters. Anything outside its
delimiters is not processed by PHP, although non-PHP text is still subject to control structures
described in PHP code. The most common delimiters are <?php to open and ?> to close PHP
sections. The shortened form <? also exists. This short delimiter makes script files less portable,
since support for them can be disabled in the local PHP configuration and it is therefore
discouraged. However, there is no recommendation against the use of the echo short tag <?=.
Prior to PHP 5.4.0, this short syntax for echo() only works with the short_open_tag
configuration setting enabled, while for PHP 5.4.0 and later it is always available. The purpose
of all these delimiters is to separate PHP code from non-PHP content, such as JavaScript code or
HTML markup.
The first form of delimiters, <?php and ?>, in XHTML and other XML documents, creates
correctly formed XML processing instructions. This means that the resulting mixture of PHP
code and other markup in the server-side file is itself well-formed XML.
Variables are prefixed with a dollar symbol, and a type does not need to be specified in advance.
PHP 5 introduced type hinting that allows functions to force their parameters to be objects of a
specific class, arrays, interfaces or callback functions. However, before PHP 7.0, type hints could
not be used with scalar types such as integer or string.
Unlike function and class names, variable names are case sensitive. Both double-quoted ("") and
here doc strings provide the ability to interpolate a variable's value into the string. PHP treats
newlines as whitespace in the manner of a free-form language, and statements are terminated by
a semicolon. PHP has three types of comment syntax: /* */ marks block and inline comments; //
as well as # are used for one-line comments. The echo statement is one of several facilities PHP
provides to output text, e.g., to a web browser.
In terms of keywords and language syntax, PHP is similar to the C style syntax. if conditions, for
and while loops, and function returns are similar in syntax to languages such as C, C++, PHP,
Java and Perl.
Data types
PHP stores whole numbers in a platform-dependent range, either a 64-bit or 32-bit signed
integer equivalent to the C-language long type. Unsigned integers are converted to signed values
in certain situations; this behavior is different from other programming languages.Integer
variables can be assigned using decimal (positive and negative), octal, hexadecimal, and binary
notations.
Floating point numbers are also stored in a platform-specific range. They can be specified using
floating point notation, or two forms of scientific notation. PHP has a native Boolean type that is
similar to the native Boolean types in Java and C++. Using the Boolean type conversion rules,
non-zero values are interpreted as true and zero as false, as in Perl and C++.[
The null data type represents a variable that has no value; NULL is the only allowed value for
this data type.
Variables of the "resource" type represent references to resources from external sources.
These are typically created by functions from a particular extension, and can only be processed
by functions from the same extension; examples include file, image, and database resources.
Arrays can contain elements of any type that PHP can handle, including resources,
objects, and even other arrays. Order is preserved in lists of values and in hashes with both keys
and values, and the two can be intermingled. PHP also supports strings, which can be used with
single quotes, double quotes, nowdoc or heredoc syntax.
The Standard PHP Library (SPL) attempts to solve standard problems and implements
efficient data access interfaces and classes.
Functions
PHP defines a large array of functions in the core language and many are also available in
various extensions; these functions are well documented in the online PHP documentation.
However, the built-in library has a wide variety of naming conventions and associated
inconsistencies, as described under history above.
Until PHP 5.3, support for anonymous functions and closures did not exist in PHP. While
create_function() exists since PHP 4.0.1, it is merely a thin wrapper around eval() that allows
normal PHP functions to be created during program execution.PHP 5.3 added syntax to define an
anonymous function or "closure"which can capture variables from the surrounding scope:
function getAdder($x) {
return function($y) use ($x) {
return $x + $y;
};
}
$adder = getAdder(8);
echo $adder(2); // prints "10"
In the example above, getAdder() function creates a closure using passed argument $x (the
keyword use imports a variable from the lexical context), which takes an additional argument $y,
and returns the created closure to the caller. Such a function is a first-class object, meaning that it
can be stored in a variable, passed as a parameter to other functions, etc
Unusually for a dynamically typed language, PHP supports type declarations on function
parameters, which are enforced at runtime. This has been supported for classes and interfaces
since PHP 5.0, for arrays since PHP 5.1, for "callables" since PHP 5.4, and scalar (integer, float,
string and boolean) types since PHP 7.0.PHP 7.0 also has type declarations for function return
types, expressed by placing the type name after the list of parameters, preceded by a colon.For
example, the getAdder function from the earlier example could be annotated with types like so in
PHP 7:
By default, scalar type declarations follow weak typing principles. So, for example, if a
parameter's type is int, PHP would allow not only integers, but also convertible numeric strings,
floats or booleans to be passed to that function, and would convert them. However, PHP 7 has a
"strict typing" mode which, when used, disallows such conversions for function calls and returns
within a file.
Objects
PHP 5 introduced private and protected member variables and methods, along with
abstract classes, final classes, abstract methods, and final methods. It also introduced a standard
way of declaring constructors and destructors, similar to that of other object-oriented languages
such as C++, and a standard exception handling model. Furthermore, PHP 5 added interfaces and
allowed for multiple interfaces to be implemented. There are special interfaces that allow objects
to interact with the runtime system. Objects implementing Array Access can be used with array
syntax and objects implementing Iterator or Iterator Aggregate can be used with the foreach
language construct. There is no virtual table feature in the engine, so static variables are bound
with a name instead of a reference at compile time.
If the developer creates a copy of an object using the reserved word clone, the Zend
engine will check whether a __clone() method has been defined. If not, it will call a default
__clone() which will copy the object's properties. If a __clone() method is defined, then it will be
responsible for setting the necessary properties in the created object. For convenience, the engine
will supply a function that imports the properties of the source object, so the programmer can
start with a by-value replica of the source object and only override properties that need to be
changed.
class Person
{
public $firstName;
public $lastName;
The visibility of PHP properties and methods is defined using the keywords public,
private, and protected. The default is public, if only var is used; var is a synonym for public.
Items declared public can be accessed everywhere. protected limits access to inherited classes
(and to the class that defines the item). private limits visibility only to the class that defines the
item.Objects of the same type have access to each other's private and protected members even
though they are not the same instance. PHP's member visibility features have sometimes been
described as "highly useful." However, they have also sometimes been described as "at best
irrelevant and at worst positively harmful."
Implementations
The original, only complete and most widely used PHP implementation is powered by the Zend
Engine and known simply as PHP. To disambiguate it from other implementations, it is
sometimes unofficially referred to as "Zend PHP". The Zend Engine compiles PHP source code
on-the-fly into an internal format that it can execute, thus it works as an interpreter.It is also the
"reference implementation" of PHP, as PHP has no formal specification, and so the semantics of
Zend PHP define the semantics of PHP itself. Due to the complex and nuanced semantics of
PHP, defined by how Zend works, it is difficult for competing implementations to offer complete
compatibility.
PHP's single-request-per-script-execution model, and the fact the Zend Engine is an interpreter,
leads to inefficiency; as a result, various products have been developed to help improve PHP
performance. In order to speed up execution time and not have to compile the PHP source code
every time the web page is accessed, PHP scripts can also be deployed in the PHP engine's
internal format by using an opcode cache, which works by caching the compiled form of a PHP
script (opcodes) in shared memory to avoid the overhead of parsing and compiling the code
every time the script runs. An opcode cache, Zend Opcache, is built into PHP since version
5.5.Another example of a widely used opcode cache is the Alternative PHP Cache (APC), which
is available as a PECL extension.
While Zend PHP is still the most popular implementation, several other implementations
have been developed. Some of these are compilers or support JIT compilation, and hence offer
performance benefits over Zend PHP at the expense of lacking full PHP compatibility.
Alternative implementations include the following:
JAVASCRIPT
A scripting language developed by Netscape to enable Web authors to design interactive
sites. Although it shares many of the features and structures of the full Java language, it was
developed independently. JavaScript can interact with HTML source code, enabling Web authors
to spice up their sites with dynamic content. JavaScript is endorsed by a number of software
companies and is an open language that anyone can use without purchasing a license. It is
supported by recent browsers from Netscape and Microsoft, though Internet Explorer supports
only a subset, which Microsoft calls Jscript
What is JavaScript?
Uses of JavaScript
•Use it to add multimedia elements With JavaScript you can show, hide, change, resize images,
and create image rollovers. You can create scrolling text across the status bar.
•Create pages dynamically Based on the user's choices, the date, or otherexternal data, JavaScript
can produce pages that are customized to the user.
•Interact with the user It can do some processing of forms and can validate user input when the
user submits the form.
Writing JavaScript
JavaScript commands.
Implementing JavaScript
There are three ways to add JavaScript commands to your Web Pages.
•Embedding code
•Inline code
•External file
External File
You can use the SRC attribute of the <SCRIPT> tag to call JavaScript code from an
external text file. This is useful if you have a lot of code or you want to run it from several pages,
because any number of pages can call the same external JavaScript file. The text file itself
contains no HTML tags. It is call by the following tag:
<SCRIPT SRC="filename.js">
</SCRIPT>
Programming Basics
Programmers use variables to store values. A variable can hold several types of data. In
JavaScript you don't have to declare a variable's data type before using it. Any variable can hold
any JavaScript data type, including:
•String data
•Numbers
Variable Names
There are rules and conventions in naming variables in any programming language. It is
good practice to use descriptive names for variables. The following are the JavaScript rules:
•The variable name must start with a letter or an underscore. firstName or _myName
•You can use numbers in a variable name, but not as the first character.
name01 or tuition$
•You can't use space to separate characters. userName not user Name
•Capitalize the first letter of every word except the first salesTax or userFirstName.
Functions
With functions, you can give a name to a whole block of code, allowing you to reference it from
anywhere in yourprogram. JavaScript has built-in functions for several predefined operations.
Here are three some functions.
•alert("message")
•confirm("message")
•prompt("message")
User-Defined Functions
With user-defined functions, you can name a block of code and call it when
you need it. You define a function in the HEAD section of a web page. It is
defined with the functionkeyword, followed by the function name and any
arguments.
function functionName(argument)
statements
}
XAMPP
What is XAMPP?
Aside from being cross-platform, XAMPP is also a freeware. This means users on
different operating systems can download this server package free of charge. Not to mention that
there is no configuration necessary to setup the system. After downloading and extracting the
free application, users can immediately use XAMPP. Users also do not have to worry on
removing the application. If XAMPP is not needed by the user anymore, removing it should not
present any problem. One just needs to delete the XAMPP directory and all the files concerning
this server package will be deleted. Or if XAMPP was installed using the Windows installer
version, one just needs to go to the “uninstall” feature of the operating system to get rid of the
server package.
CSS
Apache is the most popular Web server software. It enables a computer to host one or
more websites that can be accessed over the Internet using a Web browser. The first version of
Apache was released in 1995 by the Apache Group. In 1999, the Apache Group became the
Apache Software Foundation, a non-profit organization that currently maintains the development
of the Apache Web server software.
Apache's popularity in the Web hosting market is largely because it is open source and
free to use. Therefore, Web hosting companies can offer Apache-based Web hosting solutions at
minimal costs. Other server software, such as Windows Server, requires a commercial license.
Apache also supports multiple platforms, including Linux, Windows, and Macintosh operating
systems. Since many Linux distributions are also open-source, the Linux/Apache combination
has become the most popular Web hosting configuration.
Apache can host static websites, as well as dynamic websites that use server-side
scripting languages, such as PHP, Python, or Perl. Support for these and other languages is
implemented through modules, or installation packages that are added to the standard Apache
installation. Apache also supports other modules, which offer advanced security options, file
management tools, and other features. Most Apache installations include a URL rewriting
module called "mod_rewrite," which has become a common way for webmasters to create
custom URLs.
While the Apache Web server software is commonly referred to as just "Apache," it is
technically called "Apache HTTP Server," since the software serves webpages over the
HTTP protocol. When Apache is running, its process name is "httpd," which is short for "HTTP
daemon."
MYSQL
MySQL, which was originally conceived by the Swedish company MySQL AB, was
acquired by Oracle in 2008. Developers can still use MySQL under the GNU General Public
License (GPL), but enterprises must obtain a commercial license from Oracle.
We can use SQL to create a database and then create tables in it according to the format we
want. Usually in a web application, database and respective data tables are created at installer
time. Then data is inserted, fetched, updated and deleted from data tables in the runtime of the
application.
Data Types
You can see five MySQL data types in the table definition above: int for integers,
varchar for short text, tinyint for short integers, date for dates, and text for long text. In
addition to these, MySQL provides some more data types. Choosing the correct data type for
each column is important foran optimal database.
Naming Conventions
There isn’t a standard naming convention for MySQL. Following are some common
conventions.
Database Operations
MySQL allows all four CRUD (Create, Read, Update, Delete) operations. Often you
would see these operations as Insert, Select, Update, and Delete relevant to their SQL statements.
Storage Engines
MySQL has several Storage Engines that enable different features on data tables. For
example, if you want to automatically delete all the corresponding records in employee
department table when an employee is deleted from the employee table, then you have to use
InnoDB storage engine (for defining constraints).
SQL Modes
MySQL has the ability to run in different SQL modes, enabling different restrictions. For
example, at default configuration, you can enter 0000-00-00 for a date field. But if you are
running in Traditional mode, MySQL will throw an error when you try to insert 0000-00-00
into a date field, since it’s not a valid date. You can set the SQL mode per session (generally for
the span of starting and stopping the MySQL server) or set it permanently by configuring the
MySQL configuration file (my.ini in Windows and my.cnf in Mac OS/Linux).
User Types
MySQL allows the creation of users and to assigning different privileges for defined
users. User credentials are needed when an application needs to make a connection with MySQL
and execute operations on a database. Allowing for different privileges makes operations on a
database safe. For example, for the same database, you can have one user with all the privileges
and another with only viewing privileges.
Executing Commands
All SQL commands you type at the MySQL prompt should have a semicolon (;) at their
ends. The commands will not run till you enter a semicolon (It’s possible to use \G instead of
semicolon as explained below).
In addition to the SQL commands, MySQL has its own set of commands. To see these
commands, type help at the MySQL prompt as below. These commands aren’t required to have
a semicolon at the end. After typing a command, hit Enter key to execute the command.
mysql> help
If you find the output of a certain SQL command difficult to read, try \G in place of the
semicolon
as shown in the following example. This will display the output in a vertical format and remove
In MySQL, you can create user accounts²⁵ with different privileges. Privileges can vary from
Root User
By default, MySQL has a super user called root that has all the privileges. You need to be
logged in as root to execute many MySQL administrative tasks, including managing users.
If you didn’t specifically set the root password when installing MySQL, most of the times it
would
be empty. If the root password is empty, make sure to reset it with a proper password for better
security.
In command-line, you can use the following command to change root password. Type your
preferred password in place of newpassword. After hitting the Enter key, it will ask you to enter
the current password. If the current password is empty, just hit the Enter key.
Logging as a User
Use the following command to log in as root user. For logging in as a different user, type that
username in place of root. After hitting the Enter key, it will ask you to enter the password.
After entering the correct password, you would see the MySQL prompt (mysql>) where you can
enter
MySQL commands.
mysql -u root -p
MySQL Extension
This was the first method PHP provided to interact with MySQL. This extension provides a set
of built-in functions for connecting and making database queries. If a PHP built-in function starts
with term mysql, it’s a function of this extension.
PDO is a built-in object-oriented database abstraction layer that is available from PHP
version 5. It abstracts specific database operations and provides a common interface for
interacting with all supported databases. That is, if you use PDO for database operations in your
PHP application, you can switch from MySQL to PostgreSQL³⁰ with minimal code changes.
mysqli_connect()
This function is used for connecting to MySQL. Before doing any database operation,
you need to connect to MySQL. On success, this function returns a link identifier that you can
use in other MySQLi functions. On failure, it will throw an error. Following is how a user named
robin with password robin123 needs to connect to a database called company_db at localhost.
User robin should have privileges to access company_db.
CASE Tools
Integration Framework
Portability Services
Operating System
Hardware Platform
Environment Architecture
The compilers, editors and debuggers those are available to support most
conventional programming languages. Web development tools include to the generation of
text, graphics, forms, scripts and other elements of a web page.
UML
User
Concern Details
Job Details
Maintaining
Exam Details
Report
Commands
3. PROJECT DESCRIPTION
MODULE DESCRIPTION
Login
This module is used by all the users to log into the account. The user is required to enter
his/her user name and password. The user will be prompted to enter the needed page provided
username and password are correct otherwise he/she will be asked to reenter password and
security authentication persevered. Technically a validation certificate is sent to the browser
client verify whether it is a secured session. Then only the web page is loaded into the browser
on any app. This is to avoid the software forgery attacks. After verification the login page is
loaded for user authentication. The password and username is transferred to the server after
encryption. After successful login user will be redirected to the user’s home page.
Data Collection
Data is a wider term that is used to describe the massive growth and availability of data, both
structured and unstructured. Data may be as important to business, society and the Internet. Data
is an all-encompassing term for any collection of data sets so complex that it becomes difficult to
process using traditional data processing applications. Data usually includes data sets with sizes
beyond the ability of commonly used software tools to capture, curate, manage, and process data
within a tolerable elapsed time.
4. SYSTEM DESIGN
SYSTEM ARCHITECTURE
USECASE DIAGRAM
register
login
add post
friend list
user
admin
friend request
search keyword
recommended to friend
review
logout
CLASS DIAGRAM
registration
friends
username login post
view request
password view post list
username search friends
mailid review
password send request
gender recomment to friends
send recommendation
address
signup()
view friends() search post()
signup()
Add post
Admin view review
name
name view all review
domain
password recommended to friends
description
admin login() view review()
update post list()
SEQUENCE DIAGRAM
user login view friends add search keyword review & admin
post&domain recommendation
authorization
reg&login
request&add friends
logout
logout
COLLABORATION DIAGRAM
9: logout
admin
INPUT DESIGN
The input design is the link between the information system and the user. It comprises the
developing specification and procedures for data preparation and those steps are necessary to put
transaction data in to a usable form for processing can be achieved by inspecting the computer to
read data from a written or printed document or it can occur by having people keying the data
directly into the system. The design of input focuses on controlling the amount of input required,
controlling the errors, avoiding delay, avoiding extra steps and keeping the process simple. The
input is designed in such a way so that it provides security and ease of use with retaining the
privacy. Input Design considered the following things:’
OBJECTIVES
1. Input Design is the process of converting a user-oriented description of the input into a
computer-based system. This design is important to avoid errors in the data input process and
show the correct direction to the management for getting correct information from the
computerized system.
2. It is achieved by creating user-friendly screens for the data entry to handle large volume of
data. The goal of designing input is to make data entry easier and to be free from errors. The data
entry screen is designed in such a way that all the data manipulates can be performed. It also
provides record viewing facilities.
3. When the data is entered it will check for its validity. Data can be entered with the help of
screens. Appropriate messages are provided as when needed so that the user will not be in maize
of instant. Thus the objective of input design is to create an input layout that is easy to follow.
OUTPUT DESIGN
A quality output is one, which meets the requirements of the end user and presents the
information clearly. In any system results of processing are communicated to the users and to
other system through outputs. In output design it is determined how the information is to be
displaced for immediate need and also the hard copy output. It is the most important and direct
source information to the user. Efficient and intelligent output design improves the system’s
relationship to help user decision-making.
1. Designing computer output should proceed in an organized, well thought out manner; the right
output must be developed while ensuring that each output element is designed so that people will
find the system can use easily and effectively. When analysis design computer output, they
should Identify the specific output that is needed to meet the requirements.
3. Create document, report, or other formats that contain information produced by the system.
The output form of an information system should accomplish one or more of the following
objectives.
SYSTEM STUDY
FEASIBILITY STUDY:
The feasibility of the project is analyzed in this phase and business proposal is put forth
with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.
Three key considerations involved in the feasibility analysis are
Economical feasibility
Technical feasibility
Social feasibility
ECONOMICAL FEASIBILITY:
This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.
TECHNICAL FEASIBILITY:
This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on the available
technical resources. This will lead to high demands on the available technical resources. This
will lead to high demands being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing this system.
SOCIAL FEASIBILITY:
The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity. The level of acceptance by the
users solely depends on the methods that are employed to educate the user about the system and
to make him familiar with it. His level of confidence must be raised so that he is also able to
make some constructive criticism, which is welcomed, as he is the final user of the system.
SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub assemblies, assemblies and/or a finished product It is the
process of exercising software with the intent of ensuring that the Software system meets its
requirements and user expectations and does not fail in an unacceptable manner. There are
various types of test. Each test type addresses a specific testing requirement.
TYPES OF TESTS:
Testing is the process of trying to discover every conceivable fault or weakness in a work
product. The different type of testing is given below:
UNIT TESTING:
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration.
This is a structural testing, that relies on knowledge of its construction and is invasive.
Unit tests perform basic tests at component level and test a specific business process, application,
and/or system configuration. Unit tests ensure that each unique path of a business process
performs accurately to the documented specifications and contains clearly defined inputs and
expected results.
INTEGRATION TESTING:
FUNCTIONAL TEST:
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
Output : identified classes of application outputs must be exercised.
Systems/ Procedures: interfacing systems or procedures must be invoked.
SYSTEM TEST:
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.
WHITE BOX TESTING:
White Box Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is purpose. It is
used to test areas that cannot be reached from a black box level.
BLACK BOX TESTING:
Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests,
must be written from a definitive source document, such as specification or requirements
document, such as specification or requirements document. It is a testing in which the software
under test is treated, as a black box .you cannot “see” into it. The test provides inputs and
responds to outputs without considering how the software works.
UNIT TESTING:
Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.
Test strategy and approach
Field testing will be performed manually and functional tests will be written in detail.
Test objectives
All field entries must work properly.
Pages must be activated from the identified link.
The entry screen, messages and responses must not be delayed.
Features to be tested
Verify that the entries are of the correct format
No duplicate entries should be allowed
All links should take the user to the correct page.
INTEGRATION TESTING:
Software integration testing is the incremental integration testing of two or more
integrated software components on a single platform to produce failures caused by interface
defects. The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level –
interact without error.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
ACCEPTANCE TESTING:
User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.
Test Results: All the test cases mentioned above passed successfully. No defects encountered.
5. SYSTEM IMPLEMENTATION
<?php
$user = $this->session->userdata('user');
extract($user);
?>
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#myInput").on("keyup", function() {
$("#myTable tr").filter(function() {
});
});
});
</script>
<script>
$(document).ready(function(){
$("#myInput1").on("keyup", function() {
$("#myTable1 tr").filter(function() {
});
});
});
</script>
<style>
body {
background-color:gray;
*{
box-sizing: border-box;
padding: 16px;
background-color: white;
input[type=text], input[type=password],textarea,input[type=date] {
width: 100%;
padding: 15px;
display: inline-block;
border: none;
background: #f1f1f1;
input[type=text]:focus, input[type=password]:focus {
background-color: #ddd;
outline: none;
margin-bottom: 25px;
.registerbtn {
background-color: #4CAF50;
color: white;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
.registerbtn:hover {
opacity: 1;
}
/* Add a blue text color to links */
a{
color: dodgerblue;
/* Set a grey background color and center the text of the "sign in" section */
.signin {
background-color: #f1f1f1;
text-align: center;
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<title>CodeIgniter Login</title>
</head>
<body>
<div class="container">
</h1>
<div class="container-fluid">
<div class="navbar-header">
</div>
</ul>
</ul>
</div>
</nav>
<div CLASS="container">
<th>ID</th>
<th>NAME</th>
<th>phone</th>
<th>email</th>
<th>send request</th>
</TR>
<?php
if($view)
foreach($view->result() as $row)
echo "<tr>";
?>
<td>
</form>
</td>
<?php
echo "</tr>";
echo" <tbody>";
else
echo "no";
?>
</table></B></div>
<TR class="bg-info">
<th>ID</th>
<th>email</th>
<th>phone</th>
<th>name</th>
<th>add friend</th>
</TR>
<?php
if($view1)
foreach($view1->result() as $row)
echo "<tr>";
echo "<td>";
?>
else
?>
"</td>";
?>
<?php
echo "</tr>";
}
else
echo "no";
?>
</table>
</div>
<TR class="bg-info">
<th>ID</th>
<th>email</th>
<th>status</th>
<th></th>
</TR>
<?php
echo $un;
$id=0;
if($view3)
foreach($view3->result() as $row)
$id++;
echo "<tr>";
echo "<td>".$id."</td>";
$from=$row ->from_email;
$to=$row ->to_email;
echo $from;
if(strcmp($un,$from)){
echo "<td>".$from."</td>";
else{
echo "<td>".$to."</td>";
echo "<td>";
else
echo "friend" ;
}"</td>";
?>
<?php
echo "</tr>";
else
echo "no";
?>
</table>
</div>
<h1 id="1">PRODUCTS</h1>
<TR class="bg-info">
<th>ID</th>
<th>name</th>
<th>description</th>
<th>category</th>
<th>rating(in per)</th>
<th>image</th>
<th>recommend to friend</th>
</TR>
<?php
if($view4)
{
foreach($view4->result() as $row)
echo "<tr>";
$per=($rate*5)/100;
echo "<td>".$per."%</td>";
?>
<td>
<?php
if($view3)
foreach($view3->result() as $row)
$from=$row ->from_email;
$to=$row ->to_email;
if($un==$from){
?>
<?php }
else{?>
<?php
}}}?> </select>
</form>
</td>
<?php
echo "</tr>";
echo" </tbody>";
}?>
</table>
</div>
<div class="container">
<table class="table">
<?php
$id=0;
if($view5)
foreach($view5->result() as $row)
echo"<tr>";
echo"</tr>";
?>
<?php
else
echo "no";
?>
</table>
</div>
<div class="container">
<h1 id="1">RATING</h1>
<?php
if($view4)
foreach($view4->result() as $row)
?>
</option>
<?php
?>
</select><br>
</form>
</div>
</body>
</html>
<?php
function __construct(){
parent::__construct();
$this->load->helper('url');
$this->load->model('users_model');
$this->load->library('session');
//restrict users to go back to login if session has been set
if($this->session->userdata('user')){
redirect('home');
else{
$this->load->view('login_page');
if(isset($_POST['reg']))
$data['name']=$this->input->post('name');
$data['phone']=$this->input->post('phone');
$data['email']=$this->input->post('email');
$data['pass']=$this->input->post('pass');
$data['conpass']=$this->input->post('conpass');
$tablename="reg";
if($data['pass']==$data['conpass'])
{
$this->load->model('users_model');
$status=$this->users_model->insert($data,$tablename);
if($status){
echo "ok";
redirect('/');
else{
header('location:'.base_url().$this->index());
$this->session->set_flashdata('error','not registered');
else{
header('location:'.base_url().$this->index());
$name=$this->input->post('name');
$discription=$this->input->post('discription');
$price=$this->input->post('price');
$rate=1;
$tablename="product";
$config= array(
'upload_path'=>'uploads/',
'allowed_types'=>'*',
'max_size'=>0,
'filename'=>url_title($this->input->post('images')),
'encrypt_name'=>true
);
$this->load->model('users_model');
$status=$this->users_model->insertfileup($name,$discription,$price,$config,
$rate,$tablename);
if($status){
redirect('user/admin');
}
else{
echo"some problem";
$this->load->library('session');
$user = $this->session->userdata('user');
extract($user);
$data['proid']=$this->input->post('proid');
$data['send']=$email;
$data['to']=$this->input->post('friend');
$tablename="prorec";
$this->load->model('users_model');
$status=$this->users_model->insert($data,$tablename);
if($status){
redirect('user/home');
else{
echo"some problem";
}
{{
$this->load->library('session');
$user = $this->session->userdata('user');
extract($user);
$data['to_email']=$this->input->post('to_email');
$data['from_email']=$email;
$tablename="frendrequest";
$this->load->model('users_model');
$status=$this->users_model->insert($data,$tablename);
if($status){
redirect('user/home');
}
else{
echo"some problem";
$pro=$this->input->post('pro');
$rate=$this->input->post('rate');
$tablename="product";
$this->load->model('users_model');
$status=$this->users_model->rate($pro,$rate,$tablename);
redirect('user/home');
$this->load->library('session');
$email = $_POST['email'];
$password = $_POST['password'];
$dbname="reg";
$data = $this->users_model->login($email,$password,$dbname);
if($data){
$this->session->set_userdata('user', $data);
redirect('user/home');
//echo "ok";
else{
header('location:'.base_url().$this->index());
//echo "no";
$this->load->library('session');
if(isset($_POST['admin']))
$email = $_POST['email'];
$password = $_POST['password'];
$dbname="admin";
if($data){
$this->session->set_userdata('user1', $data);
redirect('user/admin');
//$this->load->view('admin');
else{
//redirect('user/admin');
header('location:'.base_url().'index.php/user/admin');
//echo "no";
}
//else{
//$this->load->view('adminlogin');
//}
$this->load->library('session');
if($this->session->userdata('user')){
$this->load->model('users_model');
$data['view']=$this->users_model->reqsend('reg');
$data['view1']=$this->users_model->sendreq('reg','frendrequest');
$data['view3']=$this->users_model->yourfriend('reg','frendrequest');
$data['view4']=$this->users_model->viewp('product');
$data['view5']=$this->users_model->prorec('prorec','product');
$this->load->view('home',$data);
}
else{
redirect('/');
$this->load->library('session');
if($this->session->userdata('user1')){
$this->load->model('users_model');
$data['view']=$this->users_model->view('reg');
$data['view2']=$this->users_model->viewf('frendrequest');
$data['view4']=$this->users_model->viewp('product');
$this->load->view('admin',$data);
else{
$this->load->view('adminlogin');
//redirect('user/admin1');
$this->load->library('session');
$this->session->unset_userdata('user1');
$this->load->view('login_page');
//redirect('user/admin');
$this->load->library('session');
$this->session->unset_userdata('user');
redirect('/');
if(isset($_POST['add']))
$data['name']=$this->input->post('name');
$data['fees']=$this->input->post('fees');
$data['Duration']=$this->input->post('Duration');
$this->load->model('users_model');
//$tablename="course";
$status=$this->users_model->insert($data);
if($status){
redirect('user/admin');
else{
echo"no";
}
function del1($row_id)
$this->load->model('users_model');
$status=$this->users_model->delrow($row_id,reg);
if($status==true)
//echo "ok";
redirect('user/admin#');
else
echo "no";
}
function request($row_id)
$this->load->library('session');
$this->load->model('users_model');
$user1 = $this->session->userdata('user');
extract($user1);
$status=$this->users_model->fiend($row_id,'frendrequest');
if($status==true)
//echo "ok";
redirect('user/home');
else
echo "no";
function request1($row_id)
$this->load->library('session');
$this->load->model('users_model');
$user1 = $this->session->userdata('user');
extract($user1);
$status=$this->users_model->unfriend($row_id,frendrequest);
if($status==true)
//echo "ok";
redirect('user/home');
else
echo "no";
function accept($row_id)
$this->load->library('session');
$this->load->model('users_model');
$user1 = $this->session->userdata('user');
extract($user1);
$status=$this->users_model->accept($row_id,'request');
if($status==true)
//echo "ok";
redirect('user/home');
else
echo "no";
6. CONCLUSION
Proposed a CBCF method using the IPU model in recommender systems by carefully exploiting
different preferences among users along with clustering. Specifically, in the proposed CBCF
method, formulated a constrained optimization problem in terms of maximizing the recall (or
equivalently F1 score) for a given precision. To this end, clustering was applied so that not only
users are divided into several clusters based on the actual rating data and Pearson correlation
coefficient but also an incentive/penalty is given to each item according to the preference
tendency by users within a same cluster. As a main result, it was demonstrated that the proposed
CBCF method using the IPU model brings a remarkable gain in terms of recall or F1 score for a
given precision. A possible direction of future research in this area includes the design of a new
clustering-based CF method by exploiting the properties of model-based CF approaches (e.g.,
matrix factorization).
REFERENCES
[1] G. Adomavicius and A. Tuzhilin, “Toward the next generation of recommender systems: A
survey of the state-of-the-art and possible extensions,” IEEE Trans. Knowl. Data Eng., vol. 17,
no. 6, pp. 734–749, Jun. 2005.
[2] G. Linden, B. Smith, and J. York, “Amazon. com recommendations: Item-to-item
collaborative filtering,” IEEE Internet Comput., no. 1, pp. 76–80, Jan. 2003.
[3] Y. Koren, R. Bell, and C. Volinsky, “Matrix factorization techniques for recommender
systems,” Computer, no. 8, pp. 30–37, Aug. 2009.
[4] J. A. Konstan and J. Riedl, “Recommender systems: from algorithms to user experience,”
User Modeling and User-Adapted Interact., vol. 22, no. 1, pp. 101–123, Mar. 2012
[5] X. Su and T. M. Khoshgoftaar, “A survey of collaborative filtering techniques,” Adv. AI, no.
4, p. 2, Jan. 2009.
[6] Y. Zhou, D. Wilkinson, R. Schreiber, and R. Pan, “Large-scale parallel collaborative filtering
for the netflix prize,” in Proc. 4th Int. Conf. Algo. Asp. Inf. Manag. (AAIM ’08), Shanghai,
China, Jun. 2008, pp. 337–348.
[7] Y. Hu, Y. Koren, and C. Volinsky, “Collaborative filtering for implicit feedback datasets,” in
Proc. 8th IEEE Int. Conf. Data Mining (ICDM ’08), Pisa, Italy, Dec. 2008, pp. 263–272.
[8] Y. Cai, H.-F. Leung, Q. Li, H. Min, J. Tang, and J. Li, “Typicality-based collaborative
filtering recommendation,” IEEE Trans. Knowl. Data Eng., vol. 26, no. 3, pp. 766–779, Jan.
2014.
[9] G. Guo, J. Zhang, and D. Thalmann, “Merging trust in collaborative filtering to alleviate data
sparsity and cold start,” Knowledge-Based Syst., vol. 57, pp. 57–68, Feb. 2014.
[10] J. Bobadilla, F. Ortega, A. Hernando, and J. Bernal, “A collaborative filtering approach to
mitigate the new user cold start problem,” Knowledge-Based Syst., vol. 26, pp. 225–238, Feb.
2012.
[11] H. Sobhanam and A. K. Mariappan, “A hybrid approach to solve cold start problem in
recommender systems using association rules and clustering technique,” Int. J. Comput. Appl.,
vol. 74, no. 4, pp. 17–23, Jul. 2013.
[12] H. Liu, Z. Hu, A. Mian, H. Tian, and X. Zhu, “A new user similarity model to improve the
accuracy of collaborative filtering,” Knowledge-Based Syst., vol. 56, pp. 156–166, 2014.
[13] B.-H. Huang and B.-R. Dai, “A weighted distance similarity model to improve the accuracy
of collaborative recommender system,” in Proc. 16th IEEE Int. Conf. Mobile Data Manag.
(MDM), Pittsburgh, PA, 2015, pp. 104–109.
[14] Q. Lu, T. Chen, W. Zhang, D. Yang, and Y. Yu, “Serendipitous personalized ranking for
top-N recommendation,” in Proc. IEEE/WIC/ACM Int. Conf. Web Intell. and Intell. Agent
Technol. (WI-IAT ’12), Washington, DC, Dec. 2012, pp. 258–265.
[15] K. Oku and F. Hattori, “Fusion-based recommender system for improving serendipity,” in
Proc. ACM Workshop on Novelty Diversity Rec. Sys. (DiveRS), Chicago, IL, Oct. 2011, pp.
19–26.
[16] P. Adamopoulos and A. Tuzhilin, “On unexpectedness in recommender systems: Or how to
expect the unexpected,” in Proc. ACM Workshop on Novelty Diversity Rec. Sys. (DiveRS),
Chicago, IL, Oct. 2011, pp. 11–18.