Code Monkey home page Code Monkey logo

Comments (5)

8080labs avatar 8080labs commented on July 21, 2024

Hi Clement,

thank you for your suggestions.

  1. I think that makes sense and we should be able to add this easily to the API.
  2. I think we already saw a similar error which occurs when the value is a float but the task is a regression. this can also be fixed via changing the dtype of the series.
  3. That makes totally sense that the diagonal should be 1 and this should also be the case. In which example of yours was the diagonal not 1?

Thank you,
Florian

from ppscore.

clementpoiret avatar clementpoiret commented on July 21, 2024

Hi Florian,

Thanks for your answer. It's occuring when I use the pps on timeseries extracted from an fMRI.
But it's also occurring with the code in the original post, for example I just ran:

import numpy as np
import pandas as pd
import ppscore as pps

X = pd.DataFrame(np.random.randn(10,10))
pps.matrix(X, task='regression')

and it returned me the following matrix:

>>> pps.matrix(X, task='regression')
          0        1         2  3  4         5       6  7  8  9
0  0.000000  0.00000  0.000000  0  0  0.000000  0.0000  0  0  0
1  0.000000  0.00000  0.000000  0  0  0.000000  0.0000  0  0  0
2  0.000000  0.00000  0.000000  0  0  0.000000  0.0000  0  0  0
3  0.000000  0.00000  0.000000  0  0  0.000000  0.0000  0  0  0
4  0.000000  0.00000  0.000000  0  0  0.000000  0.0000  0  0  0
5  0.000000  0.00000  0.000000  0  0  0.000000  0.0000  0  0  0
6  0.000000  0.00000  0.000000  0  0  0.085524  0.0000  0  0  0
7  0.000000  0.29528  0.000000  0  0  0.000000  0.0422  0  0  0
8  0.255183  0.00000  0.000000  0  0  0.000000  0.0000  0  0  0
9  0.000000  0.00000  0.027208  0  0  0.000000  0.0000  0  0  0

from ppscore.

8080labs avatar 8080labs commented on July 21, 2024

Thank you for the example. When passing a task to the matrix, this bypasses the logic for the diagonal

I would love to see your example with the timeseries data in case that it is not under an NDA. If you want, we could have a quick video session about it

Florian

from ppscore.

clementpoiret avatar clementpoiret commented on July 21, 2024

Sorry for the delay,
I have some deadlines soon with the end of my MSc and the beginning of my PhD so I don't have a lot of free time, but I'd be happy to discuss about the potential benefits of the pps in neuroimaging!
If you want to take a look, here is the repo of the script where I added support for pps : https://github.com/clementpoiret/fmri_connectivity_measures

from ppscore.

FlorianWetschoreck avatar FlorianWetschoreck commented on July 21, 2024

To summarize this issue:

  • (DON'T) support numpy matrices - which we will not provide - fix is to convert it to a Dataframe with pd.DataFrame(matrix)
  • there shall be no error for numeric targets - this happened because the series was inferred as a classification task but the model expected a LabelEncoded series. This won't happen in the future because the task will be derived only based on the dtype.

If you want to discuss the pps in neuroimaging, please open a new issue :)

from ppscore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.