def loadRawData(self, fname):
        targetfile = open(fname.replace('data', 'targets'), 'r')
        x = []
        y = []
        for line in open(fname, 'r').readlines():
            if not line: break
            targline = targetfile.readline()
            targline = list(map(int, targline.split()))
            for i, v in enumerate(targline):
                if v:
                    label = i
                    break
            feat = list(map(float, line.split()))
            x.append(feat)
            y.append([float(label)])
            self.nSamples += 1
        self.nCls = len(targline)
        targetfile.close()
        self._setDataFields(x, y)
read svm sparse format from file 'fname' (with labels only)
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/svmdata.py/SVMData.loadRawData