func (m *MultiLabelBinarizer) Fit(Xmatrix, Ymatrix mat.Matrix) base.Fiter {
	X, Y := base.ToDense(Xmatrix), base.ToDense(Ymatrix)
	m.Fit2(X, Y)
	return m
}
Fit for MultiLabelBinarizer ...
if Y is [][]string, use Fit2. this one is only to satisfy Transformer interface
package preprocessing
import (
	"math"
	"sort"
	"github.com/pa-m/sklearn/base"
	"gonum.org/v1/gonum/floats"
	"gonum.org/v1/gonum/mat"
)
type LabelBinarizer struct {
	NegLabel, PosLabel float64
	Classes            [][]float64
}
func NewLabelBinarizer(NegLabel, PosLabel float64) *LabelBinarizer {
	return &LabelBinarizer{NegLabel: NegLabel, PosLabel: PosLabel}
}
func (m *LabelBinarizer) TransformerClone() base.Transformer {
	clone := *m
	return &clone
}
func (m *LabelBinarizer) Fit(Xmatrix, Ymatrix mat.Matrix) base.Fiter {
	Y := base.ToDense(Ymatrix)
	if m.PosLabel == m.NegLabel {
		m.PosLabel += 1.
	}
	y := Y.RawMatrix()
	m.Classes = make([][]float64, y.Cols)
	for j := 0; j < y.Cols; j++ {
		cmap := make(map[float64]bool)
		for i, yi := 0, 0; i < y.Rows; i, yi = i+1, yi+y.Stride {
			yval := y.Data[yi+j]
			if _, present := cmap[yval]; present {
				continue
			}
			cmap[yval] = true
			m.Classes[j] = append(m.Classes[j], yval)
		}
		sort.Float64s(m.Classes[j])
	}
	return m
}
func (m *LabelBinarizer) Transform(X, Y mat.Matrix) (Xout, Yout *mat.Dense) {
	Xout = base.ToDense(X)
	NSamples, _ := Y.Dims()
	NOutputs := 0
	for _, classes := range m.Classes {
		NOutputs += len(classes)
	}
	Yout = mat.NewDense(NSamples, NOutputs, nil)
	y, yo := base.ToDense(Y).RawMatrix(), Yout.RawMatrix()
	baseCol := 0
	for j := 0; j < y.Cols; j++ {
		cmap := make(map[float64]int)
		for classNo, val := range m.Classes[j] {
			cmap[val] = classNo
		}
		for i, yi, yo0 := 0, 0, 0; i < y.Rows; i, yi, yo0 = i+1, yi+y.Stride, yo0+yo.Stride {
			val := y.Data[yi+j]
			if classNo, ok := cmap[val]; ok {
				yo.Data[yo0+baseCol+classNo] = m.PosLabel
			} else {
				yo.Data[yo0+baseCol+classNo] = m.NegLabel
			}
		}
		baseCol += len(m.Classes[j])
	}
	return
}
func (m *LabelBinarizer) FitTransform(X, Y mat.Matrix) (Xout, Yout *mat.Dense) {
	m.Fit(X, Y)
	return m.Transform(X, Y)
}
func (m *LabelBinarizer) InverseTransform(X, Y *mat.Dense) (Xout, Yout *mat.Dense) {
	Xout = X
	NSamples, _ := Y.Dims()
	NOutputs := len(m.Classes)
	Yout = mat.NewDense(NSamples, NOutputs, nil)
	y, yo := Y.RawMatrix(), Yout.RawMatrix()
	for j, baseCol := 0, 0; baseCol < y.Cols; j, baseCol = j+1, baseCol+len(m.Classes[j]) {
		for i, yi, yo0 := 0, 0, 0; i < y.Rows; i, yi, yo0 = i+1, yi+y.Stride, yo0+yo.Stride {
			classNo := floats.MaxIdx(y.Data[yi+baseCol : yi+baseCol+len(m.Classes[j])])
			yo.Data[yo0+j] = m.Classes[j][classNo]
		}
		baseCol += len(m.Classes[j])
	}
	return
}
type MultiLabelBinarizer struct {
	Classes []interface{}
	Less func(i, j int) bool
}
func NewMultiLabelBinarizer() *MultiLabelBinarizer { return &MultiLabelBinarizer{} }
func (m *MultiLabelBinarizer) TransformerClone() base.Transformer {
	clone := *m
	return &clone
}