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

Final Tweaks #946

Merged
merged 12 commits into from
Aug 15, 2019
Merged

Conversation

naresh-bachwani
Copy link
Contributor

This PR is related to issue #874. It adds final and minor changes to the plots.

I have made the following changes:

  1. Removed few small bugs from Manifold.
  2. Removed tick labels from the main plot.
  3. Adjust the size of subplots in PCA.

@@ -589,10 +599,11 @@ def pca_decomposition(
# Fit and transform the visualizer (calls draw)
visualizer.fit(X, y)
visualizer.transform(X, y)
visualizer.poof()
visualizer.finalize()
Copy link
Member

Choose a reason for hiding this comment

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

This fixes a test warning about the agg backend.

@@ -120,7 +120,7 @@ def test_discrete(self):
"""
Test discrete target.
"""
colors = ["Y", "C0"]
colors = ["y", "C0"]
Copy link
Member

Choose a reason for hiding this comment

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

This was issuing a deprecation warning that upper case single letter colors are no longer allowed.

def test_manifold_no_transform(self):
"""
Test the exception when manifold doesn't implement transform.
"""
X, _ = make_s_curve(1000, random_state=888)
manifold = Manifold(manifold="lle", target="auto")
manifold = Manifold(manifold="lle", n_neighbors=5, target="auto")
Copy link
Member

Choose a reason for hiding this comment

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

removed n_neighbors warning

manifold = Manifold(manifold="lle", target="auto", projection=projection)
manifold = Manifold(
manifold="lle", target="auto", n_neighbors=5, projection=projection
)
Copy link
Member

Choose a reason for hiding this comment

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

removed n_neighbors warning

)
def test_manifold_algorithm_transform_fit(self, algorithm):
"""
Test manifold fit with algorithms having transform implemented
"""
X, y = make_s_curve(1000, random_state=94)
manifold = Manifold(manifold=algorithm, target="auto")
with pytest.warns(YellowbrickWarning):
manifold = Manifold(manifold=algorithm, target="auto")
Copy link
Member

Choose a reason for hiding this comment

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

removed n_neighbors warning

Copy link
Member

@bbengfort bbengfort left a comment

Choose a reason for hiding this comment

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

@naresh-bachwani thank you so much for making these final tweaks to the projection classes; you've definitely enhanced the style and interpretability of these plots with just a few simple changes. I'll take care of fixing the tests this morning and we'll get it merged in.

@bbengfort bbengfort merged commit 2c5f0e9 into DistrictDataLabs:develop Aug 15, 2019
@naresh-bachwani naresh-bachwani deleted the minor-changes branch August 22, 2019 16:15
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