Giter Site home page Giter Site logo

Comments (4)

cosmic-cortex avatar cosmic-cortex commented on May 23, 2024

Unfortunately, modAL currently does not support pandas support for technical reasons. I have detailed the problem in #20, but the gist is, numpy arrays use row first indexing, while pandas DataFrames use column first by default. This led to tehcnical difficulties which I was unable to implement a proper solution. Of course there would be workarounds, but I did not come up with a robust solution.

from modal.

srowen avatar srowen commented on May 23, 2024

Oh I see, didn't realize as it happened to mostly work fine with DataFrames.
Isn't .iloc how you'd do row indexing in pandas? You could selectively calls this if it's a DataFrame.
For my use case numpy arrays would work fine too though.

from modal.

cosmic-cortex avatar cosmic-cortex commented on May 23, 2024

Yes, .iloc would work, but I didn't want to selectively call X[idx] or X.iloc[idx] based on the datatype. That solution would be very hard to extend for a third datatype. A possible solution would be to introduce a wrapper class modALinput which would handle all the supported datatypes.

from modal.

vidushi-chouksey avatar vidushi-chouksey commented on May 23, 2024

If I use .loc, then facing the error as stated below:
KeyError: "None of [Int64Index([ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,\n ...\n 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599],\n dtype='int64', name='', length=1440)] are in the [index]"

whereas; if I use .iloc, then facing the following error:
IndexError: positional indexers are out-of-bounds

Could you please let me know how to approach this.

from modal.

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.