-
Notifications
You must be signed in to change notification settings - Fork 0
ISSUE-1: First pass on Vector and Vector Space #2
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
Open
DiegoPino
wants to merge
14
commits into
main
Choose a base branch
from
ISSUE-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…(only J,a,b for euclidean distance) static maps/files Original file is from https://github.com/jonathantneal/color-names/blob/master/color-names.json The cam16_ucs version will be used to allow an extra option -> naming/snapping extracted colors to a vocab. I will also allow a user to pass a structure if the complete set is just too extensive (useful for faceting, building web palettes) TODO: allow a composer level script to be used to regenerate this every time we change the original one and document it Note: cam16_ucs is based here on D65 whitepoint. Important if you are trying to "snap" ...
extends SplObjectStorage, using the extra data to keep track of frequency.
…in XYZ is annoying Updates the gamma correction values. The cam16ucsToCam16 is not ready (like actually wrong), also brings a lot of the weird setup math to ::cam16Helpers
All internal XYZ functions work on 1/100 so need to adapt. Also, i am assuming only [J][M][h] are passed to cam16toXYZ. I might want to implement when C or s are available.
…t a centroid after clustering with a new color not present in palette) Round trip HEX TO CAM16UCS and Back works perfectly. Some operations have too many floating point elements so i rounded on the cam16ucs to RGB back a bit @alliomeria just a tag so you know this was added
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #1
Not yet ready. Because this is math, I will add some tests + an example usage based on k-means clustering (with both per sample weights and per feature (means weighted vectors) too.
This code is based on php-ml code with some updates and architecture changes (e.g during clustering, each cluster will be a VectorSpace Object too + weight addition to vector)
I might refactor distance metric implementations into its own class with static methods *or not