1
$\begingroup$

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.

$\endgroup$

1 Answer 1

1
$\begingroup$

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/

$\endgroup$
7
  • $\begingroup$ so could i use a multi layer perceptron for this? $\endgroup$
    – Maths12
    Commented Feb 21, 2019 at 19:57
  • $\begingroup$ Yes, multi layer perceptron with a library like Keras (that makes i easier to define bespoke networks) should work. $\endgroup$ Commented Feb 22, 2019 at 4:27
  • 1
    $\begingroup$ 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) $\endgroup$ Commented Feb 22, 2019 at 4:28
  • $\begingroup$ 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 $\endgroup$
    – Maths12
    Commented Feb 22, 2019 at 12:09
  • $\begingroup$ Some implementation of collab predict "Item Attributes" instead of item themselves. In this example, "match" can do the job of rating. $\endgroup$ Commented Feb 22, 2019 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.