csinva/imodels

github.com
Visit site

libraries Еще одна интересная библиотека. В этот раз со всякими интерпретируемыми ML моделями. imodels - sklearn-st

#libraries Еще одна интересная библиотека. В этот раз со всякими интерпретируемыми ML моделями. imodels - sklearn-style библиотека с целым зоопарком методов интерпетируемого ML (авторы обещают там SoTA методы). Набор методов выглядит внушительно (но надо бы поковыряться). Выглядит полезным тем, кто хочет поизвлекать правила из моделек или попробовать что-то более или менее современное из интерпретируемого ML. Пример кода для одного из методов (а на картинке визуализация метода) from sklearn.model_selection import train_test_split from imodels import get_clean_dataset, HSTreeClassifierCV # import any imodels model here # prepare data (a sample clinical dataset) X, y, feature_names = get_clean_dataset('csi_pecarn_pred') X_train, X_test, y_train, y_test = train_test_split( X, y, random_state=42) # fit the model model = HSTreeClassifierCV(max_leaf_nodes=4) # initialize a tree model and specify only 4 leaf nodes model.fit(X_train, y_train, feature_names=feature_names) # fit model preds = model.predict(X_test) # discrete predictions: shape is (n_test, 1) preds_proba = model.predict_proba(X_test) # predicted probabilities: shape is (n_test, n_classes) print(model) # print the model

Specs

Type Tool
SectionGitHub projects
Site languageen
GitHubcsinva/imodels

Hashtags

Source code

csinva/imodels

Found in sources

Similar in «GitHub projects»

Submit a site to the catalog

Just send the link — we will work out the rest.

We will review what you send and add it to the catalog if it fits.

Not sure how to implement it? We can help

Tell us about your task — we will pick the tools and suggest where to start.

0 / 5000
Verification code

Fields marked with an asterisk are required. Your data is used only to reply.