Ejemplo n.º 1
0
def svmLinearLearner(train, protectedIndex, protectedValue):
    marginAnalyzer = svmLinearMarginAnalyzer(train, protectedIndex,
                                             protectedValue)
    shift = marginAnalyzer.optimalShift()
    print('best shift is: %r' % (shift, ))
    return marginAnalyzer.conditionalShiftClassifier(shift)
Ejemplo n.º 2
0
def svmLinearLearner(train, protectedIndex, protectedValue):
   marginAnalyzer = svmLinearMarginAnalyzer(train, protectedIndex, protectedValue)
   shift = marginAnalyzer.optimalShift()
   print('best shift is: %r' % (shift,))
   return marginAnalyzer.conditionalShiftClassifier(shift)