Giter Club home page Giter Club logo

Comments (12)

cod3licious avatar cod3licious commented on May 28, 2024 1

@meddulla The regular feature selection in the AutoFeatRegression model still works, but it's more likely that you'll get a numerical error (as described in #1 ); besides that the results should still be reasonable.

from autofeat.

cod3licious avatar cod3licious commented on May 28, 2024

for now you can use the model to generate additional features (using fit_transform), which you can then use together with a classification model of your choice. for native support for classification model you have to wait for the next version

from autofeat.

Sandy4321 avatar Sandy4321 commented on May 28, 2024

for now you can use the model to generate additional features (using fit_transform), which you can then use together with a classification model of your choice
Can you share example code to make it clear how to do this

from autofeat.

cod3licious avatar cod3licious commented on May 28, 2024

here you go:

# import the model
from autofeat import AutoFeatRegression
# create a model instance
model = AutoFeatRegression()
# call fit transform with your features and labels (y needs to be a vector)
df = model.fit_transform(X, y)
# df is a pandas dataframe with your original and the new features, 
# so you can use it with your classification model
clf = LogisticRegression()
clf.fit(df, y)  # new features instead of original X

from autofeat.

Sandy4321 avatar Sandy4321 commented on May 28, 2024

Great thank
And what is about features interaction
Is your code takes it to account or consider features as independent each from others?

from autofeat.

Sandy4321 avatar Sandy4321 commented on May 28, 2024

By the way did you compared with
https://github.com/aspremon/NaiveFeatureSelection

from autofeat.

cod3licious avatar cod3licious commented on May 28, 2024

thanks for the link. no, I did not compare against this (since I was mostly focused on regression problem so far) but I'll look into it.
and yeah, one of the biggest problems in the feature selection is that many of the newly created features are highly correlated, which is why the feature selection process has multiple steps to deal with this. if the features were all independent a simple L1-regularized model (like LASSO) would get pretty good results by itself already even if you have more features than data points, but with correlated features, this doesn't work.

from autofeat.

Sandy4321 avatar Sandy4321 commented on May 28, 2024

I glad you working on this
but in your code do you treat this problem of features correlation
for both categorical and continues features ?
and if yes
do you return not only features but also
group of correlated features ?

from autofeat.

cod3licious avatar cod3licious commented on May 28, 2024

categorical features are returned as one-hot encoded vectors if you specified the columns when initializing the model.
and no, correlated features are not grouped, however, generally if they are very correlated, only one of the features should be selected as a correlated one does not bring a lot of additional information.

from autofeat.

meddulla avatar meddulla commented on May 28, 2024

Can FeatureSelector be used in this instance or is it better to use another feature selector afterwards (like an SGDClassifier with RFECV)?

from autofeat.

meddulla avatar meddulla commented on May 28, 2024

Hadn't noticed that feature selection is already run on the generated features using Lasso.

from autofeat.

cod3licious avatar cod3licious commented on May 28, 2024

As of version 1.0.0, there are two autofeat models available, AutoFeatRegressor and AutoFeatClassifier for regression and classification problems respectively, so please update with pip install --upgrade autofeat and use these models instead. The arguments for the models are mostly the same so you shouldn't have to change your code much.

from autofeat.

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.