Definition of the problem:
- I am having some data with lets say 2 features but there not labeled.
- I manually create weights and label the data with a score
- I present the data to a user with order and the user gives his own score to some of the data.
- By the feedback of the user I want to update the weights, assign the new scores and give back the list in the new order.
- This should continue everytime the user give new labels
In a point of view is a pairwise online learning to rank problem.
A simple Illustration:
Assuming I am having the following data which are not labeled:
import numpy as np X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]])
I create manually weights and label the data (which doesnt mean that this weights are the 'correct' so we aren't sure that the labels are the correct one). With the mannually create weights the labels are the following:
Y = np.array([1, 1, 2, 2])
And I am training a
SGD stochastic gradient descent algorithm using
sklearn ,with ‘hinge’ loss which give linear SVM (used for 'learning to rank'):
from sklearn import linear_model clf = linear_model.SGDClassifier() clf.fit(X, Y)
After a period I am getting the correct labels of some of the previous data(name it
true_data and use
partial_fit to fit it in the previous model:
x_true_data = np.array([[-1,-1]]) y_true_data = np.array() clf.partial_fit(x_new,y_new)
This update the weights. Some concerns that I have gennerally:
- is there a way to 'reward' the previous algorithm if it predicted correctly the result or do the opposite if not of the
true_data? Something similar as adaboost works.
- How reliable this algorithm would be if the
true_datadata is not many ( between 5-20)
- Can i adjust the learning rate in order to give higher 'value' to the
- Which parameters of SGD should I consider in such a problem?
- Is there another way to think the problem? Should I consider other algorithms except SVM?
Some links that I fould usefull but didnt clear my mind if I sould continue in this path:
Any feedback is welcome.