# Weighing connections between two users using machine learning

Given this data set:

User 1: {'Artist': 1, 'Public Figure': 9, 'Film Director': 1, 'Education': 1, 'Musician/Band': 4, 'Musician': 1, 'Community': 1, 'Author': 4, 'Politician': 1, 'TV Show': 2, 'Entrepreneur': 1, 'Journalist': 4, 'Product/Service': 1, 'Defense Company': 1, 'Computer Company': 2, 'Nonprofit Organization': 3, 'Computers & Internet Website': 4, 'Media/News Company': 3, 'Podcast': 1, 'News & Media Website': 2, 'Charity Organization': 1, 'Government Organization': 1, 'Magazine': 1}
User 2: {'Nonprofit Organization': 1, 'Movie': 2, 'Musician/Band': 22, 'Public Figure': 2, 'Entrepreneur': 2, 'TV Show': 2, 'Medical Company': 1, 'American Restaurant': 1, 'Sports & Recreation': 1, 'Media/News Company': 2, 'Sports Team': 1, 'Artist': 3, 'Musician': 1, 'College & University': 1, 'Athlete': 1, 'Music': 1, 'App Page': 1, 'Comedian': 1, 'Interest': 2, 'Product/Service': 1, 'Book Series': 1


I believe I can draw conclusions that the strength of the connection is high or low based on the fact that they like or dislike the same categories of topics. What machine learning technique would be best to apply to these connection types, if I had, say, 500 users with categories and weights for each?

I would like to automatically apply varying weights, if most people have Musician/Band or like Movies, that should be less interesting than when people like "Defense Company" like in User 1.

• @DouglasDaseeco ,before all that i would request the OP to go through the community guide lines Artificial Intelligence.No need to rush. – quintumnia Jul 30 '17 at 11:06

The question might be improved so that the answer can be more specific by defining two things more rigorously.

• Strength of the connection
• What the automation must infer from that value

Learning, Correlation, Projection, and Maximizing Profitability

Guessing from the comments, it appears that the goal is to profile the user for business purposes. Two common applications of user profiling are

• To present buying options or
• To suggest friends in a social network.

Although it may appear that a learning program would serve both of these applications, they are actually two very different problems.

One is to optimize e-commerce profitability through increased sales per session. The other is to build a social network where there are some similarities and perhaps a few deliberate differences in the pairing of user profiles from which the friend suggestion comes.

The first of the two has to do with the projecting of the potential of a sale by matching the users and relying on the assumption that two people with like interests are more likely to mirror one another in purchasing patterns to some degree that could be projected with statistical analysis.

But approaching the project by immediately jumping to learning algorithms may not produce the best results after a month or a year of development.

One Reasonable Approach for Some Problems of This Type

Depending on the definitions of STRENGTH and AUTOMATICALLY in the question, it may be a simple application of a probability matrix or hypercube that will create a functional application of user profiling based on interests. To create a correlation between users via an ordered list of interests to place in one of the cells of the matrix or hypercube, the Spearman's Rank Order Correlation is a generalized yet effective method for such applications.

Learning Usually Begins With a Guess

First, you must determine what is (preferably in precise mathematical terms) what is a favorable product presentation or favorable potential friend introduction. After that is determined, one can develop a probability formula to project what would be favorable based on the correlation matrix or hypercube. Bayes's Theorem may be quite applicable in the development of a probability formula from the constraints and relationships of the application.