title: Choosing a multi-label classifier with high number of labels
body: <p>First of all, I'm very new to ML and I have this task:</p>
  <p>I need to build a ML model to give clients a list of 10 professions for each of them which best fit with their data: bachelor's degree type, favourite subjects, favourite professional sectors, etc...</p>
  <p>My team and I have alredy extracted info from an SQL database and created a dataframe with all the relevant information and One Hot Encoded it: this is the result:</p>
  <pre><code>df_all_dumm.shape
  (773, 1029)
  </code></pre>
  <p>So I have 773 clients and 1029 columns (a lot of them, but we thought it is necessary because all the columns were numeric categorical). Most of the columns are OHE professions columns (from 99 to 998), where there is &quot;1&quot; if the profession has been suggested to the client or &quot;0&quot; if not.</p>
  <p>I'm a bit lost about if this dataset approach is fine for multi-label classification, about what method to use (NN, RandomTrees classif, scikit multi-learn models...). I have alredy tried with some multi-learn models like MLkNN or BRkNNaClassifier but the results are very poor (F1 Score = 0.1 - 0.2).</p>
  <p>This is the dataset (it doesn't contain any private data, so I think there is no problem uploading it. Also, I don't know if this is the propper way to paste a link, sorry again)</p>
  <p><a href="https://drive.google.com/file/d/1nID4q7EfpoiNKdWz6N4FRUgIQEniwFRV/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1nID4q7EfpoiNKdWz6N4FRUgIQEniwFRV/view?usp=sharing</a></p>
  <p>EDIT:</p>
  <p>I have created a Sequential Keras model:</p>
  <pre><code># Slicing target columns from the rest of the df
  
  data = pd.read_csv('df_all_dumm.csv')
  data_c = data.copy()
  data_in = data_c.copy()
  data_c.iloc[:,99:999]
  data_out = data_c.iloc[:,99:999]
  data_in = data_in.drop(data_out.columns,1)
  data_in = data_in.drop(['id'],1)
  
  X_train, X_test, y_train, y_test = train_test_split(data_in,
                                                      data_out,
                                                      test_size = 0.3,
                                                      random_state = 42)
  
  print(&quot;{0:2.2f}% of data in train set&quot;.format(len(X_train)/len(data.index)*100))
  print(&quot;{0:2.2f}% of data in test set&quot;.format(len(X_test)/len(data.index)*100))
  
  # Dataframes to tensors
  
  X_train_tf = tf.convert_to_tensor(X_train.values)
  X_test_tf = tf.convert_to_tensor(X_test.values)
  y_train_tf = tf.convert_to_tensor(y_train.values)
  y_test_tf = tf.convert_to_tensor(y_test.values)
  
  from numpy import asarray
  from sklearn.datasets import make_multilabel_classification
  from keras.models import Sequential
  from keras.layers import Dense
  from keras.layers import Dropout
   
  
  # get the model
  def get_model(n_inputs, n_outputs):
      model = Sequential()
      model.add(Dense(512, input_dim=n_inputs, activation='relu'))
      model.add(Dropout(0.2))
      model.add(Dense(600, input_dim=n_inputs, activation='relu'))
      model.add(Dropout(0.1))
      model.add(Dense(700, input_dim=n_inputs, activation='relu'))
      model.add(Dense(900, input_dim=n_inputs, activation='relu'))
      model.add(Dense(n_outputs, activation='sigmoid'))
      model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
      return model
   
  # load dataset
  X, y = X_train_tf, y_train_tf
  n_inputs, n_outputs = X.shape[1], y.shape[1]
  # get model
  model = get_model(n_inputs, n_outputs)
  # fit the model on all data
  model.fit(X, y, validation_split=0.33, epochs=100, batch_size=10)
  
  
  prec = model.evaluate(X_test_tf, y_test_tf)[1]
  print(&quot;La precisión de la red es: {} %&quot;.format(round(prec*100,2)))
  
  La precisión de la red es: 4.74 %
  </code></pre>
  <p>So, this is the model we created. I think the main problem here is that we have 900 different output labels and our data input size is 500...</p>
  <p>We also thought about applying some clustering algorithm first to cluster the professions in, let's say 5 groups, train a NN for every group and then predict.</p>