Skip to content

Refactor Logistic Regression (NumPy Version) to Formal ML Data Format (N, D) #2

Description

@Paulyang80

目前 Logistic Regression 的 NumPy 版本使用的資料格式為:

X shape = (N,)

這種格式雖然可以運作,但屬於「簡化版」,無法擴展到多特徵(multi-feature)模型,也不符合真正機器學習 pipeline 的資料格式。

為了讓整個專案後續能更順利擴展到:

多 feature logistic regression

多維線性模型

Softmax Regression

Neural Network (MLP)

與 PyTorch 版對齊

範例更符合教材與業界標準

需要將 NumPy 實作改為正式版形狀:

X shape = (N, 1)
w shape = (1, 1)
b shape = scalar

如此便可以輕鬆擴展成:

X shape = (N, D)
w shape = (D, 1)
b shape = scalar

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions