和顺 / 衡律 返回所属 Agent
7.4

组合方法的约束

原能力

核对组合方法的类型、目标、币种、期限及依赖,锁定试验数据和测试集。(合同附件 R7 7.4)

首选项目

CVXPY(Apache-2.0)。 CVXPY

匹配范围

求解约束与表格规则核币种、期限、字段。

源码

CVXPY · def quad_form(

cvxpy/atoms/quad_form.py · 290–303 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
def quad_form(x, P, assume_PSD: bool = False) -> Expression:
    """Alias for :math:`x^T P x`.

    Parameters
    ----------
    x : vector argument.
    P : matrix argument.
    assume_PSD : P is assumed to be PSD without checking.

    Notes
    -----
    When ``P`` is a ``Parameter`` declared PSD or NSD and the solver supports
    quadratic objectives, ``quad_form(x, P)`` can participate in a DPP solve,
    so repeated solves can reuse cached compilation data.
  • Copyright 2013 Steven Diamond, 2017 Robin Verschueren

Pandera · def validate(

pandera/api/pandas/container.py · 127–140 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    def validate(
        self,
        check_obj: pd.DataFrame,
        head: int | None = None,
        tail: int | None = None,
        sample: int | None = None,
        random_state: int | None = None,
        lazy: bool = False,
        inplace: bool = False,
    ) -> pd.DataFrame:
        """Validate a DataFrame based on the schema specification.

        :param pd.DataFrame check_obj: the dataframe to be validated.
        :param head: validate the first n rows. Rows overlapping with `tail` or

实现与验收要点

原类型、业务目标、依赖、锁定试验与封存测试集。