Skip to content

confuse about the calculate of least_square #23

Description

@Rudin6

`def least_square(from_p, to_p, dim=-1):
to_p = to_p.float()

beta = (to_p * from_p).sum(dim=dim, keepdim=True) / (from_p **2).sum(dim=dim, keepdim=True)

return beta

`
Why use the product form (to_p and from_p) instead of the subtraction form?

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