# using neural networks to predict set of charactertics

Say i have a matrix with m rows and n features where m is the number of people on say an dating website such as tinder. So n could be age, sex, location,job... etc these kinds of features.

My output 'Y' would be a features vector containing features of a person they have previously liked/matched. So it would have m rows and x features(columns) ( x can be age, sex, job, etc...). I would like to predict/suggest a possible match given this training data of X and Y.

Is it possible to use any machine learning/neural networks to predict a SET of features so Y being a matrix rather than a single columned vector? I have seen examples where given some data X we can predict Y but Y is normally a classification such as 0/1 or some sort of wine classification from (1-3) for example. What if it was a set of features? is it possible.

Yes, you can generate multiple features as output of network.

In this example, network will have X outputs. 1 output will have most probable gender , another will have most probable age and so on.

Input_1= Input(shape=(n_features, ))

x = Dense(100, activation='relu')(Input_1)
x = Dense(100, activation='relu')(x)
x = Dense(100, activation='relu')(x)

out1 = Dense(1,  activation='linear')(x)
out2 = Dense(1,  activation='linear')(x)
out3 = Dense(1,  activation='linear')(x)
..
..
outX = Dense(1,  activation='linear')(x)

model = Model(inputs=Input_1, outputs=[out1,out2,out3,...,outX])
model.compile(optimizer = "rmsprop", loss = 'mse')


Complete example of this :

https://www.pyimagesearch.com/2018/06/04/keras-multiple-outputs-and-multiple-losses/

• so could i use a multi layer perceptron for this? – Maths12 Feb 21 '19 at 19:57
• Yes, multi layer perceptron with a library like Keras (that makes i easier to define bespoke networks) should work. – Shamit Verma Feb 22 '19 at 4:27
• Also look at recommendation systems like collaborative filtering. That can also be used for this specific problem (Like given a user, which kind of movies user is most likely to see next) – Shamit Verma Feb 22 '19 at 4:28
• Ah thanks, i have looked at collaborative filtering but would it be applicable here since there are many factors i'm trying to predict e.g. name,sex, job etc.. whereas some of the examples i have seen are just suggesting A movie not a set of features. Also alot of these movie suggestions are based on ratings.. i do not have ratings in my data.. sorry if i am getting confused – Maths12 Feb 22 '19 at 12:09
• Some implementation of collab predict "Item Attributes" instead of item themselves. In this example, "match" can do the job of rating. – Shamit Verma Feb 22 '19 at 12:32