def loadDataSet(filename):
    """
    
    读取数据集

    Args:
        filename: 文件名
    Returns:
        dataMat: 数据样本矩阵
    """
    dataMat = []
    fr = open(filename)
    for line in fr.readlines():
        curLine = line.strip().split('\t')
        # 通过map函数批量转换
        #fitLine = map(float, curLine)#py3中改为
        fitLine =list(map(float, curLine))
        dataMat.append(fitLine)
    return dataMat