コード例 #1
0
ファイル: mcd.py プロジェクト: biochem-fan/dials
  def __init__(self, cols=["x_resid", "y_resid", "phi_resid"],
               min_num_obs=20,
               separate_experiments=True,
               separate_panels=True,
               alpha=0.5,
               max_n_groups=5,
               min_group_size=300,
               n_trials=500,
               k1=2,
               k2=2,
               k3=100,
               threshold_probability=0.975):

    CentroidOutlier.__init__(self,
      cols=cols,
      min_num_obs=min_num_obs,
      separate_experiments=separate_experiments,
      separate_panels=separate_panels)

    # Keep the FastMCD options here
    self._alpha = alpha
    self._max_n_groups = max_n_groups
    self._min_group_size = min_group_size
    self._n_trials = n_trials
    self._k1 = k1
    self._k2 = k2
    self._k3 = k3

    # Calculate Mahalanobis distance threshold
    df = len(cols)
    self._mahasq_cutoff = qchisq(threshold_probability, df)

    return
コード例 #2
0
ファイル: mcd.py プロジェクト: rjgildea/dials
    def __init__(
        self,
        cols=None,
        min_num_obs=20,
        separate_experiments=True,
        separate_panels=True,
        block_width=None,
        alpha=0.5,
        max_n_groups=5,
        min_group_size=300,
        n_trials=500,
        k1=2,
        k2=2,
        k3=100,
        threshold_probability=0.975,
    ):

        if cols is None:
            cols = ["x_resid", "y_resid", "phi_resid"]
        CentroidOutlier.__init__(
            self,
            cols=cols,
            min_num_obs=min_num_obs,
            separate_experiments=separate_experiments,
            separate_panels=separate_panels,
            block_width=block_width,
        )

        # Keep the FastMCD options here
        self._alpha = alpha
        self._max_n_groups = max_n_groups
        self._min_group_size = min_group_size
        self._n_trials = n_trials
        self._k1 = k1
        self._k2 = k2
        self._k3 = k3

        # Calculate Mahalanobis distance threshold
        df = len(cols)
        self._mahasq_cutoff = qchisq(threshold_probability, df)

        return