mcsorkun / Material-2-One-Hot-Vector

Converts list of materials from molecular formula to one hot vectors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Formula to One Hot Vector

This python script converts set of molecular formulas into the One Hot Vector.

It reads a CSV file that contains a column named "Formula" . (Example file: 2d-materials-list.csv )

Then it converts it into a One Hot Vector (actually it is a count vector: it contains number of elements).

Writes the result in to a CSV file (OneHotVector.csv).

This information can be used as a descriptors for machine learning processes.

Code also plots the occurence counts of each element:

alt text

About

Converts list of materials from molecular formula to one hot vectors


Languages

Language:Python 100.0%