Git Product home page Git Product logo

collinearity's People

Contributors

gianlucamalato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

collinearity's Issues

support for pandas dataframes

Hi @gianlucamalato , nice and clean little gem you have there. Wish I found it earlier, as I did something very similar but not so clean as your solution.
Anyway would like to suggest an enhancement for my use case. I'm using mainly pandas dataframes with some 3000-4000 columns.
As these result from joining several pivot statements the number of columns can vary, also the sequence can change. Also in a new dataset, new columns may appear and previously existing ones may be gone.
Currently if I use .values on my dataframe to fit the X, collinearity will plow through. However when I try to transform a new dataframe, there's no guarantee the mask is still going to be correct or even fit.
So I would propose to detect if X is a pd.DataFrame and if so, keep next to the mask, a list of column names that were selected.
That way, if you next try to transform a new dataframe, the column names can be used to correctly reduce the features. Also columns that are not available in the new data, can be added and filled with a default value. Doing so would allow me finally to have all the steps to create my model in a single pipeline

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.