Skip to content
New issue

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

Principal Curves #338

Merged
merged 8 commits into from
Feb 3, 2022
Merged

Principal Curves #338

merged 8 commits into from
Feb 3, 2022

Conversation

CaseyWeiner
Copy link
Collaborator

@CaseyWeiner CaseyWeiner commented Jan 28, 2022

Addresses part of #321

  • Adds function _pc_endpoints_from_coords_neighbors in brainlit/algorithms/generate_fragments/state_generation.py that estimates endpoints using Principal Curves (Hastie '89).
  • Adds pcurve.py file written by https://github.com/zsteve

@netlify
Copy link

netlify bot commented Jan 28, 2022

‼️ Deploy request for brainlit rejected.
Learn more about Netlify's sensitive variable policy

🔨 Explore the source changes: e67f279

Copy link
Member

@tathey1 tathey1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff.

Please add tests here and make sure the PR checks pass.

self.s_factor = s_factor

def project(self, X, p, s):
'''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please redo docs with Google documentation style

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs changed, satisfactory?

#Copyright 2020, zsteve
#Written entirely by https://github.com/zsteve
#https://github.com/zsteve/pcurvepy
#slightly modified by https://github.com/CaseyWeiner, 2022
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add sentence describing how you modified it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, sufficient?

@CaseyWeiner
Copy link
Collaborator Author

Test added, lmk if you want more

@CaseyWeiner
Copy link
Collaborator Author

@tathey1 Check fails due to brainlit/utils/tests/test_Neuron_trace.py - botocore.exceptions.ClientE...
Does this have to do with what I added?

@tathey1
Copy link
Member

tathey1 commented Jan 31, 2022

Hmm, maybe the AWS permissions don't work on forks... I'll try to test that.

In the meantime, some conflicts arose from my recent PR adding type hints (e.g. my new changes to state_generation). Please add these to your code too (shouldn't take long, and I think this will be the new standard for the package.

@CaseyWeiner
Copy link
Collaborator Author

CaseyWeiner commented Jan 31, 2022

Merged your typing changes into fork. Checks fail for same reason, but rest is good to go

@tathey1
Copy link
Member

tathey1 commented Jan 31, 2022

great, last thing can you add the type hints to the code you added?

@CaseyWeiner
Copy link
Collaborator Author

@tathey1 Do you mean me merging your type hints, or me adding type hints for the function I wrote, _pc_endpoints_from_coords_neighbors?

@tathey1
Copy link
Member

tathey1 commented Feb 1, 2022

@CaseyWeiner please add type hints to all the code you are contributing.

@tathey1
Copy link
Member

tathey1 commented Feb 1, 2022

Also, i believe the check error is due to this: #343. So for now, you're ok but in the future, let's do all your development from a branch in brainlit, rather than a fork.

tathey1
tathey1 previously approved these changes Feb 1, 2022
Copy link
Member

@tathey1 tathey1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@tathey1
Copy link
Member

tathey1 commented Feb 2, 2022

@CaseyWeiner thanks for your patience on this. Can you merge with my new changes on develop? I updated the circleci configuration so hopefully it skips the jobs that require credentials.

@CaseyWeiner
Copy link
Collaborator Author

I think you solved it @tathey1 ! The build_and_deploy check now passes. Let me know if I need to do anything else

Copy link
Member

@tathey1 tathey1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, although i think pcurve could be called _pcurve.py since it is for internal use.

@tathey1 tathey1 merged commit 7a69981 into neurodata:develop Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants