Napari sklearn decomposition

Overview

napari-sklearn-decomposition

License PyPI Python Version tests codecov napari hub

A simple plugin to use with napari


This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.

Installation

You can install napari-sklearn-decomposition via pip:

pip install napari-sklearn-decomposition

To install latest development version :

pip install git+https://github.com/jdeschamps/napari-sklearn-decomposition.git

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "napari-sklearn-decomposition" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Comments
  • Inquiry about future of the plugin

    Inquiry about future of the plugin

    Hi guys, I hope you are doing well!

    I have been working on a new plugin which relies a lot on sklearn-decomposition, but I am aiming it to be a more practical decomposition plugin, for example, introducing label layers and time plots.

    Since I intend on building it on top of the structure of this one, I wanted to know your opinion about it to make a decision. What would be more interesting for you? @jdeschamps @guiwitz @psobolewskiPhD

    1. Push changes here and modify this one (including its name)
    2. Keep this one as it is and fork it to work on a separate project

    In case of the second option, of course you are welcome to join if you like, just send me a message later đŸ˜ƒ

    Best, Marcelo

    question 
    opened by zoccoler 10
  • Choice of method after default (PCA) doesn't work (image greyed out)

    Choice of method after default (PCA) doesn't work (image greyed out)

    I mentioned this in the PR that's been merged and closed: https://github.com/jdeschamps/napari-sklearn-decomposition/pull/2 So posting as an issue so we don't lose track of it totally. Basically, if you try to change the decomposition method from the default (PCA at the moment) then the image dropdown is greyed out. Going back to PCA also doesn't work. But delete and reopen the sample Faces and the new choice works. So I guess when the new widget is appended it doesn't inherit the layers list and that list needs to be modified to trigger the magicgui magic that makes the list.

    opened by psobolewskiPhD 4
  • Add names and colormaps (via LayerDataTuple) to the output layers

    Add names and colormaps (via LayerDataTuple) to the output layers

    The plugin implements 3 different decompositions. Applying colormaps to the output decompositions makes them easier to interpret (and stand out more vs. the data). PCA and ICA return both positive and negative values, so it makes sense to visualize using a diverging colormap. napari implements PiYG, which is colorblind-safe, so that one is used by default. NMF specifically does not return negative values, so viridis a uniform, colorblind-safe colormap is used by default. Also, the layers are named explicitly.

    opened by psobolewskiPhD 1
  • Add tests for widget functionality

    Add tests for widget functionality

    Adding tests, to address https://github.com/jdeschamps/napari-sklearn-decomposition/issues/6 Hopefully with CI fixed, they will run! Currently it's just the most basic tests:

    1. that sample data is loaded correctly
    2. that a widget is created (Note: I commented out the example tests because they fail, but for now leaving them as a reference.)
    opened by psobolewskiPhD 1
  • Fix setup.cfg: include_package_data

    Fix setup.cfg: include_package_data

    This is needed according to @talley, see: https://napari.zulipchat.com/#narrow/stream/309872-plugins/topic/important.20info.20for.20npe2.20cookiecutter.20users image

    opened by psobolewskiPhD 1
  • Some small_tweaks

    Some small_tweaks

    I was reading the code and playing with the plugin to learn a bit more. Made some small tweaks:

    1. set default N_components to 6. It was zero, which made nothing happen on-run. 6 matches the example
    2. Set the viewer to first slice upon output. The layer sliders are linked, so when the source is in the middle slice (200) then the output is missing.
    3. cleaned up some unused imports
    4. tried to fix NMF This I failed. I noticed that when changing the mode the subsequent ones the image input was greyed out. I swapped the default from PCA to NMF and confirmed that NMF now works with defaults (I made minor tweak). But the issue remains: somehow the image is only passed to the default, "manual" call of _on_choice_change. I tried a few things, but couldn't figure it out—sorry!
    opened by psobolewskiPhD 1
  • Fix image data issue when changing method

    Fix image data issue when changing method

    Fix for Issue https://github.com/jdeschamps/napari-sklearn-decomposition/issues/4 where changing the decomposition method from the default (PCA at the moment) made the image dropdown non-functional: greyed out. As @jdeschamps suggested the fix is to just reset_choices and connect to the event, based on: https://github.com/pattonw/napari-affinities/blob/7d9eab9100daf607ce7351f8717bff37ad71acf0/src/napari_affinities/widget.py#L61

    opened by psobolewskiPhD 0
  • Use sample_data for faces

    Use sample_data for faces

    Ok, it works now. napari>File>Sample Data>napari-sklearn ....

    The returned data is wrong though: it's still the ravelled, rather than a stack. see: https://scikit-learn.org/stable/modules/generated/sklearn.datasets.fetch_olivetti_faces.html#sklearn.datasets.fetch_olivetti_faces

    opened by psobolewskiPhD 0
Owner
null
Machine learning template for projects based on sklearn library.

Machine learning template for projects based on sklearn library.

Janez Lapajne 17 Oct 28, 2022
Test symmetries with sklearn decision tree models

Test symmetries with sklearn decision tree models Setup Begin from an environment with a recent version of python 3. source setup.sh Leave the enviro

Rupert Tombs 2 Jul 19, 2022
In this Repo a simple Sklearn Model will be trained and pushed to MLFlow

SKlearn_to_MLFLow In this Repo a simple Sklearn Model will be trained and pushed to MLFlow Install This Repo is based on poetry python3 -m venv .venv

null 1 Dec 13, 2021
Contains an implementation (sklearn API) of the algorithm proposed in "GENDIS: GEnetic DIscovery of Shapelets" and code to reproduce all experiments.

GENDIS GENetic DIscovery of Shapelets In the time series classification domain, shapelets are small subseries that are discriminative for a certain cl

IDLab Services 90 Oct 28, 2022
Turning images into '9-pan' palettes using KMeans clustering from sklearn.

img2palette Turning images into '9-pan' palettes using KMeans clustering from sklearn. Requirements We require: Pillow, for opening and processing ima

Samuel Vidovich 2 Jan 1, 2022
Breast-Cancer-Classification - Using SKLearn breast cancer dataset which contains 569 examples and 32 features classifying has been made with 6 different algorithms

Breast-Cancer-Classification - Using SKLearn breast cancer dataset which contains 569 examples and 32 features classifying has been made with 6 different algorithms

Mert Sezer Ardal 1 Jan 31, 2022
Multiple Linear Regression using the LinearRegression class from sklearn.linear_model library

Multiple-Linear-Regression-master - A python program to implement Multiple Linear Regression using the LinearRegression class from sklearn.linear model library

Kushal Shingote 1 Feb 6, 2022
Napari 3D Ortho Viewer - an ortho viewer for napari for 3D images

napari-3d-ortho-viewer Napari 3D Ortho Viewer - an ortho viewer for napari for 3D images This napari plugin was generated with Cookiecutter using @nap

niklas netter 5 Nov 28, 2022
Code for Blind Image Decomposition (BID) and Blind Image Decomposition network (BIDeN).

arXiv, porject page, paper Blind Image Decomposition (BID) Blind Image Decomposition is a novel task. The task requires separating a superimposed imag

null 64 Dec 20, 2022
The windML framework provides an easy-to-use access to wind data sources within the Python world, building upon numpy, scipy, sklearn, and matplotlib. Renewable Wind Energy, Forecasting, Prediction

windml Build status : The importance of wind in smart grids with a large number of renewable energy resources is increasing. With the growing infrastr

Computational Intelligence Group 125 Dec 24, 2022
50% faster, 50% less RAM Machine Learning. Numba rewritten Sklearn. SVD, NNMF, PCA, LinearReg, RidgeReg, Randomized, Truncated SVD/PCA, CSR Matrices all 50+% faster

[Due to the time taken @ uni, work + hell breaking loose in my life, since things have calmed down a bit, will continue commiting!!!] [By the way, I'm

Daniel Han-Chen 1.4k Jan 1, 2023
Pandas integration with sklearn

Sklearn-pandas This module provides a bridge between Scikit-Learn's machine learning methods and pandas-style Data Frames. In particular, it provides

null 2.7k Dec 27, 2022
a feature engineering wrapper for sklearn

Few Few is a Feature Engineering Wrapper for scikit-learn. Few looks for a set of feature transformations that work best with a specified machine lear

William La Cava 47 Nov 18, 2022
A sklearn-compatible Python implementation of Multifactor Dimensionality Reduction (MDR) for feature construction.

Master status: Development status: Package information: MDR A scikit-learn-compatible Python implementation of Multifactor Dimensionality Reduction (M

Epistasis Lab at UPenn 122 Jul 6, 2022
Hyper-parameter optimization for sklearn

hyperopt-sklearn Hyperopt-sklearn is Hyperopt-based model selection among machine learning algorithms in scikit-learn. See how to use hyperopt-sklearn

null 1.4k Jan 1, 2023
A library of sklearn compatible categorical variable encoders

Categorical Encoding Methods A set of scikit-learn-style transformers for encoding categorical variables into numeric by means of different techniques

null 2.1k Jan 2, 2023
Machine learning template for projects based on sklearn library.

Machine learning template for projects based on sklearn library.

Janez Lapajne 17 Oct 28, 2022
Test symmetries with sklearn decision tree models

Test symmetries with sklearn decision tree models Setup Begin from an environment with a recent version of python 3. source setup.sh Leave the enviro

Rupert Tombs 2 Jul 19, 2022
In this Repo a simple Sklearn Model will be trained and pushed to MLFlow

SKlearn_to_MLFLow In this Repo a simple Sklearn Model will be trained and pushed to MLFlow Install This Repo is based on poetry python3 -m venv .venv

null 1 Dec 13, 2021