Skip to content

MODNet for precalculated features and feature selection for a selected list of features #90

Answered by ppdebreuck
github-ML-fan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @github-ML-fan
Please find hereunder an example where I make custom features from two compounds (surface + particle), and also add some custom features. I hope this is more or less in line with your problem.
The important part is to play with the data.df_featurized dataframe and join() method to add features as desired. This dataframe is further used for feature selection and for fitting with e.g. model = ga.run(data).

from pymatgen.core import Composition
from modnet.preprocessing import MODData
from modnet.hyper_opt import FitGenetic
import pandas as pd
import numpy as np


def main():
    # define materials ids and composition, can also be structures !
    my_ids = ["id1", "id2", "…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ml-evs
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #88 on May 11, 2022 15:03.