yanwu2014 / swne

Similarity Weighted Nonnegative Embedding (SWNE), a method for visualizing high dimensional datasets
BSD 3-Clause "New" or "Revised" License
104 stars 20 forks source link

Change in behaviour (output) of FindNumFactors #8

Closed TomKellyGenetics closed 6 years ago

TomKellyGenetics commented 6 years ago

There a change in the output format of FindNumFactors. It is not longer a list nor does it compute a k value. This change has not been documented and the version number has not be incremented to indicate that there is a change. This has caused my existing pipeline which calls this function and the output k parameter to give an error an abort.

Please ensure that functions are backwards-compatible and produce the same output variables. To change the behaviour of a function drastically, please deprecate the existing version and create a function with a different name. This will cause less disruption for users with existing code that calls these functions.

yanwu2014 commented 6 years ago

Ah sorry I'll keep that in mind. Thanks for the heads up!

TomKellyGenetics commented 6 years ago

Sorry FindNumFactors now returns a list (as it did before) but it has an error if do.plot = TRUE. This change may have affected PlotFactorSelection.

yanwu2014 commented 6 years ago

No worries. I've updated FindNumFactors and PlotFactorSelection so that setting do.plot = T seems to work for me now. Let me know if you're still getting an error.

Also updated the method to automatically select k so that it's looking for the maximum k where the reconstruction error above random is still positive

yanwu2014 commented 6 years ago

Closing this thread if there are no more issues!