Skip to content

Commit

Permalink
start a matbench related example woth tpot
Browse files Browse the repository at this point in the history
  • Loading branch information
albalu committed Jul 17, 2018
1 parent 9e89eef commit 7626441
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion matbench/automl/tpot_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from matbench.data.load import load_double_perovskites_gap
from matbench.featurize import Featurize
from matbench.preprocess import PreProcess
from matminer.featurizers.composition import ElementProperty, TMetalFraction
from tpot import TPOTClassifier
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
Expand Down Expand Up @@ -31,4 +35,18 @@
tpot.export('tpot_iris_pipeline.py')

# very good method for us; keeps track of the score of different algorithms:
print(tpot.evaluated_individuals_)
print(tpot.evaluated_individuals_)


# limit = 200
# df_init = load_double_perovskites_gap(return_lumo=False)[:limit]
#
# featzer = Featurize(df_init, ignore_cols=['a_1', 'b_1', 'a_2', 'b_2'])
# df_feats = featzer.featurize_formula(featurizers=[
# ElementProperty.from_preset(preset_name='matminer'), TMetalFraction()])
#
# prep = PreProcess(df_feats, target_col='gap gllbsc')
# df = prep.preprocess()
#
#
# print(df)

0 comments on commit 7626441

Please sign in to comment.