Five steps to making the inevitable, or a cross-selling referral system

Stage 0: Beginning of the Way


In the realities of the modern world, when ubiquitous digitalization and accumulation of data about everything and everyone is conducted, a reasonable question arises, but how to use these data? Many, for sure, have already heard about recommendation systems in the areas of entertainment and sales. Investment companies do not stand aloof from current trends in the field of Data Science and recommender systems in particular. So let's look at what features and what stages one large investment company had to go through in order to develop its own recommendation system to increase cross-selling effectiveness and what happened in the end.



Stage 1: Denial


What is the difference between the sales process in an investment company and the similar process in other companies? Let's see what is in common.


  • / ( , ).
  • , ( ).

.


  • , .
  • , (, ) .
  • , , .
  • .

: , . , , , . - ( , ).


2:


-, , . , : , , , , -, , ( ). 100 , . , , .


7070 , ( ) . Pandas NumPy Python. 31, , , - . Python , . .


, , () :


  • ,
  • ,
  • ,
  • - .

3:


, ? – , .


, , . , , .


, . «» . :


  1. , .
  2. « », .. , , , .
  3. .

, « » , .. . , , , «» :


  • . = 1
  • . = 2

, . .


, , ?



«». , , . : , , , .


. 0 1, 0 – . , ...


4:


, Python « », :


dist_cosini = scipy.spatial.distance.cosine(user_one, user_two)

- , Python «», 30000 31- , . .


, , , «l1-» ( — ), «l2-» ( ).


manhattan = round(numpy.linalg.norm(user_one - user_two, ord = 1), 4)


euclidean = round(numpy.linalg.norm(user_one - user_two, ord = 2), 4)

. , . , , . , «l1-» - , «l2-» — . , , …


. , «» , . - .


?


.

, ?


  • «» «» .
  • GIL ( ), Python .

...



. :


  • ( — ).
  • .
  • - , .. , .
  • : 0 1, .

:



, ( B). , :


import numpy as np

CosD = round(1 - (np.sum((user_one * user_two)) / (np.sqrt(np.sum(user_one**2)) * np.sqrt(np.sum(user_two**2)))), 4)

, «l-», .



GIL (Global Interpreter Lock) . , «» GIL, «». , — . , ? Numba.


Python, Numba - . - Python , - . Numba - Python LLVM ( Python).


, :


import numpy as np
from numba import njit

@njit
def dist_cosini(user_one, all_user):
    user_point = []
    for q in range(len(all_user)): 
        user_two =  all_user[q]
        CosD = round(1 - (np.sum((user_one * user_two)) / np.sqrt(np.sum(user_one**2)) / np.sqrt(np.sum(user_two**2))), 4)
        user_point.append(CosD)
    return user_point

, Numba «» GIL . 60 .



5:


"" ( 13 ). .


, — . .


, «» . .


, , , .


. -. , CRM. « » .



:


  • ( ).
  • « » ( 13 ).

To this end, work has already begun to modify the system into one of the types of hybrid recommendation system. Work is also underway to deepen the work of the recommendation system with complex products.


All Articles