跳到内容

叶子节点数

此文件是 TPOT 库的一部分。

当前版本的 TPOT 由 Cedars-Sinai 开发,开发人员包括: - Pedro Henrique Ribeiro (https://github.com/perib, https://www.linkedin.com/in/pedro-ribeiro/) - Anil Saini (anil.saini@cshs.org) - Jose Hernandez (jgh9094@gmail.com) - Jay Moran (jay.moran@cshs.org) - Nicholas Matsumoto (nicholas.matsumoto@cshs.org) - Hyunjun Choi (hyunjun.choi@cshs.org) - Gabriel Ketron (gabriel.ketron@cshs.org) - Miguel E. Hernandez (miguel.e.hernandez@cshs.org) - Jason Moore (moorejh28@gmail.com)

TPOT 的原始版本主要由宾夕法尼亚大学开发,开发人员包括: - Randal S. Olson (rso@randalolson.com) - Weixuan Fu (weixuanf@upenn.edu) - Daniel Angell (dpa34@drexel.edu) - Jason Moore (moorejh28@gmail.com) - 以及更多慷慨的开源贡献者

TPOT 是自由软件:您可以根据自由软件基金会发布的 GNU 宽通用公共许可证(GNU Lesser General Public License)的条款,无论是许可证的第 3 版,还是(由您选择)任何后续版本,重新分发和/或修改它。

分发 TPOT 是希望它会有用,但没有任何担保;甚至不包括适销性或特定用途适用性的默示担保。更多详情请参阅 GNU 宽通用公共许可证。

您应该随 TPOT 一起收到一份 GNU 宽通用公共许可证的副本。如果没有,请参阅 https://gnu.ac.cn/licenses/

number_of_leaves_objective(est)

计算 GraphPipeline 中的叶子节点数(输入节点)

参数

名称 类型 描述 默认值
est

用于计算叶子节点数的流水线

必需
源代码位于 tpot/objectives/number_of_leaves.py
def number_of_leaves_objective(est):
    """
    Calculates the number of leaves (input nodes) in a GraphPipeline

    Parameters
    ----------
    est: GraphPipeline
        The pipeline to compute the number of leaves for
    """
    return len([v for v, d in est.graph.out_degree() if d == 0])