Skip to content

[ENH] Linear Discriminant Analysis: scripting part#2823

Merged
markotoplak merged 2 commits intobiolab:masterfrom
jerneju:lda
Jan 19, 2018
Merged

[ENH] Linear Discriminant Analysis: scripting part#2823
markotoplak merged 2 commits intobiolab:masterfrom
jerneju:lda

Conversation

@jerneju
Copy link
Contributor

@jerneju jerneju commented Dec 11, 2017

Issue

No Linear Discriminant Analysis projection scripting part.

Description of changes

Scripting part written like PCA or FreeViz.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Dec 12, 2017

Codecov Report

Merging #2823 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2823      +/-   ##
==========================================
- Coverage   82.09%   82.07%   -0.02%     
==========================================
  Files         327      328       +1     
  Lines       56166    56155      -11     
==========================================
- Hits        46107    46092      -15     
- Misses      10059    10063       +4

@jerneju jerneju added this to the 3.9 milestone Dec 13, 2017
@jerneju jerneju changed the title [WIP][ENH] Linear Discriminant Analysis: scripting part [ENH] Linear Discriminant Analysis: scripting part Dec 18, 2017
__all__ = ["LDA"]


class _FeatureScorerMixin(LearnerScorer):
Copy link
Member

Choose a reason for hiding this comment

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

Is this mixin exactly the same as with PCA? If so, why is a separate one used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

super().__init__(lda_transform)
self.projection = projection
self.feature = feature
self.transformed = None
Copy link
Member

Choose a reason for hiding this comment

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

Who uses "transformed" and "projection"? Why are these here?

compute_value=LDAProjector(self, i, lda_transform))
v.to_sql = LinearCombinationSql(
domain.attributes, self.components_[i, :],
getattr(self, 'mean_', None))
Copy link
Member

Choose a reason for hiding this comment

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

Did you test the sql variant?

@lanzagar
Copy link
Contributor

Also, needs a rebase before merging...

@classmethod
def setUpClass(cls):
cls.ionosphere = Table('ionosphere')
cls.iris = Table('iris')
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove unused files too? Sorry for not noticing this before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you!

@markotoplak markotoplak merged commit 0790842 into biolab:master Jan 19, 2018
@jerneju jerneju deleted the lda branch January 19, 2018 09:16
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.

4 participants