Code Monkey home page Code Monkey logo

csiml's Introduction

CSIML

CSIML is a "cost-sensitive and iterative machine-learning" method for small and imbalanced materials data sets.

Cite it

S Li, A Nakata*. CSIML: a cost-sensitive and iterative machine-learning method for small and imbalanced materials data sets[J]. Chemistry Letters, 2024, 53(5). [DOI]

Usage

Requirements

Here are some necessary environments for minimal main features:

Enviroment Name Version
Python >=3.10
zhonger/matminer >=0.7.8
scikit-learn >=1.1.1
mendeleev >=0.10.0
pandas >=1.4.3
numpy >=1.23.1
tqdm >=4.64.0

Besieds these, you can install others in requirements.txt for more features.

Build

pip3 install poetry
poetry build
pip3 install dist/*.whl

csiml's People

Contributors

zhonger avatar

Stargazers

 avatar

Watchers

 avatar  avatar

csiml's Issues

Feature Selection

Descriptors based on elements are too much if the dataset size is limited. It's essential to do feature selection.
The ways for feature selection:

  • LASSO algorithm
  • Pearson correlation of features and property
  • Random Forest (RF)
  • Recursive Feature Elimination (RFE)

v0.1.0

Optimization

  • Format string(using f"" to instead "%s")-> shorter and more readable
  • File writer (using with to instead pd.DataFrame.to_excel) -> safer
  • for loop (using enumrate(), item(), iter(), etc. to instead range()) -> more readable
  • Length of each line (no more than 80 chars) -> more readable and suit for small screens
  • Add docstrings for each class and method -> more readable and easier to generate docs in the future
  • File exists (using try...except to instead if os.path.exist()) -> safer and easier to traceback errors
  • Adjust vscode code highlight -> more readable
  • Function name (using low_underline to instead CaptialFun) -> more readable

Features

  • Support multiple nodes calculation (using mpi4py to instead joblib) -> more scalable
  • Add some examples -> more guide for users in the future

Hyperparameters optimization

Hyperparameter optimization can obtain the best performance of ML models. Especially for some limited datasets, it's vital.
For several hyperparameters situations, Grid Search would be the easiest way though time-consuming.
Considering only two hyperparameters (degree & C) here, we need to have some functions to support these features:

  • Efficient calculation for a mass of hyperparameter combinations (multiple nodes, multiple threads)
  • Collect necessary metrics from calculation results (for figures).
  • Plot figures from three views: Total RMSE, Trade-off RMSE, and Test RMSE.
  • Plot heatmaps for two hyperparameters with any metrics.
  • Big range for C (>5000)
  • Normalization for property

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.