You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working with your code, mostly with the implementation of TSVM, and I see some problems with it that, I think, I have solved.
On **lines 85-90, on the if, I see that your examples never enter there and therefore you got no errors, but the variables Y2 and Y3 are never declared nor used. Using this repository made by horcham as a guide, I suppose that: Y1=self._Y_l, Y2=self._Y_u, Y3=self._Y and X1=self._X_l, X2=self._X_u, X3=self._X. So, this is the solution that I propose:
...
if a > 0 and b > 0 and a + b > 2.0:
# Switch labels of a pair of unlabeled samples
self._Y_u[positive_max_id] = self._Y_u[positive_max_id] * -1
self._Y_u[negative_max_id] = self._Y_u[negative_max_id] * -1
self._Y=np.concatenate((self._Y_l, self._Y_u))
self._clf.fit(self._X, self._Y, sample_weight=sample_weight)
else:
break
...
On **lines 93-95, when you renew the weights of the unlabeled samples, I think that you should use self._X_l instead of self._X_u, as horcham does.
Except from that, I have found your work very usefull and I thank you for letting the comunity use it.
The text was updated successfully, but these errors were encountered:
I have been working with your code, mostly with the implementation of TSVM, and I see some problems with it that, I think, I have solved.
Except from that, I have found your work very usefull and I thank you for letting the comunity use it.
The text was updated successfully, but these errors were encountered: