Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Why are extrema needed for ContinuousTerm?

オープン
#222 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
julia
領域
performance

調査の方向性

Start by reading the schema implementation and the handling of ContinuousTerm, then reproduce the supplied benchmark and inspect where extrema is called for each term. Determine why those extrema are required and whether schema can avoid that work without changing its existing behavior; completion should include a benchmark or test showing the result.

索引モデルが issue の本文から書いたものです。

説明

As I was trying to improve the performances of FixedEffectModels.jl, I noted that schema accounted for a substantial amount of time:

N = 10_000_000
df = (y = rand(N), x1 = rand(N), x2 = rand(N))
@time StatsModels.schema(@formula(y~x1+x2), df)
#  0.151931 seconds (49 allocations: 3.625 KiB)

The reason is that schema calls extrema on each term in the formula:

@time extrema(df.y), extrema(df.x1), extrema(df.x2)
#   0.127862 seconds (23 allocations: 1.422 KiB, 5.44% compilation time)

Is there a way to avoid computing these extrema? Why are they needed to begin with? (btw, calling extrema is slower than calling separately minimum and maximum (see https://github.com/JuliaLang/julia/issues/31442)).

主要言語
Julia
スター
250
フォーク
35
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaStats/StatsModels.jl のほかの issue

JuliaStats/StatsModels.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。