We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在alphagen.data.expression
class Corr(PairRollingOperator): def _apply(self, lhs: Tensor, rhs: Tensor) -> Tensor: clhs = lhs - lhs.mean(dim=-1, keepdim=True) crhs = rhs - rhs.mean(dim=-1, keepdim=True) ncov = (clhs * crhs).sum(dim=-1) # 这里似乎少除了n - 1 nlvar = (clhs ** 2).sum(dim=-1) nrvar = (crhs ** 2).sum(dim=-1) stdmul = (nlvar * nrvar).sqrt() stdmul[(nlvar < 1e-6) | (nrvar < 1e-6)] = 1 return ncov / stdmul
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在alphagen.data.expression
The text was updated successfully, but these errors were encountered: