In Electronic Commerce it is not easy for customers to find the best suitable goods as more and more information is placed on line. In order to provide information of high value a customized recommender system is required. One of the typical information retrieval techniques for recommendation systems in Electronic Commerce is collaborative filtering which is based on the ratings of other customers who have similar preferences. However, collaborative filtering may not provide high quality recommendation because it does not consider customer's preferences on the attributes of an item and the preference is calculated only between a pair of customers. In this paper we present an improved recommendation algorithm for collaborative filtering. The algorithm uses the K-Means Clustering method to reduce the search space. It then utilizes a graph approach to the best cluster with respect to a given test customer in selecting the neighbors with higher similarities as well as lower similarities. The graph approach allows us to exploit the transitivity of similarities. The algorithm also considers the attributes of each item. In the experiment the EachMovie dataset of the Digital Equipment Corporation has been used. The experimental results show that our algorithm provides better recommendation than other methods.