test_dtree.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:tcsl 作者: machinelearningnanodegree 项目源码 文件源码
def selectFeatures(k_features=5, *args):
    """
    # Select k best features using the SelectKBest class in Sklearn.
    # Inputs: k=no. of features to select, args=(XTrain,yTrain)
    # returns: np array of k features.
    """
    X, y = args
    skb = SelectKBest(k=k_features)
    return skb.fit_transform(X, y)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号