With the expansion of IoT technologies, the number of devices deployed around the world as well as the number of services is increasing rapidly. Service selection is a process to choose services that meet the functional and non-functional properties for each user. Some of the features of the IoT environment make this process more complicated. For example, user's mobility constantly changes the connected service collections. Because the dynamic nature of the environment leads to changes in the QoS (quality of service), judging a service that satisfies the needs of users in the future is difficult based on previous QoS static values. Moreover, an IoT service relies on its device, which is affected by CPU processing power and battery capacity. Hence, long-term and stable service cannot be provided to users. In order to solve the above problems, we need a service selection method that can consider the quality of the service and reflect the service context in real time. In this paper, we propose a novel IoT service selection approach by using the linear reward inaction (LRI) algorithm to learn all subjective assessments from the latest user feedback and objective assessments of service. In addition, to reduce the effect of unreasonable feedback from users in different contexts, the similarity between users is considered in the LRI algorithm.