func DenseMatFromLibsvmFile(filename string, limit int, skipFirstColumn bool) (*DenseMat, error) {
	reader, err := os.Open(filename)
	if err != nil {
		return nil, fmt.Errorf("unable to open %s: %s", filename, err.Error())
	}
	defer reader.Close()
	mat, err := DenseMatFromLibsvm(bufio.NewReader(reader), limit, skipFirstColumn)
	return mat, err
}
DenseMatFromLibsvmFile reads dense matrix from libsvm file `filename`.
If `limit` > 0, reads only first limit `rows`. First colums is label,
and usually you should set `skipFirstColumn` = true
package mat
import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
	"strings"
)
type libsvmRecord struct {
	column int
	value  float64
}
type libsvmRowFunc func(records []libsvmRecord) error
func DenseMatFromLibsvm(reader *bufio.Reader, limit int, skipFirstColumn bool) (*DenseMat, error) {
	mat := &DenseMat{}
	f := func(records []libsvmRecord) error {
		return recordsToDenseMat(mat, records)
	}
	err := readFromLibsvm(reader, limit, skipFirstColumn, f)
	if err != nil {
		return nil, fmt.Errorf("unable to parse libsmv format to dense matrix: %s", err.Error())
	}
	return mat, nil
}