Skip to content

Commit b65f50f

Browse files
committed
rename repo mlmatrics -> ml-matrics
1 parent 3ddb232 commit b65f50f

26 files changed

+70
-70
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

mlmatrics/elements.py renamed to ml_matrics/elements.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from matplotlib.patches import Rectangle
1010
from pymatgen import Composition
1111

12-
from mlmatrics.utils import ROOT, annotate_bar_heights
12+
from ml_matrics.utils import ROOT, annotate_bar_heights
1313

1414

1515
def count_elements(formulas: list) -> pd.Series:
File renamed without changes.
File renamed without changes.

mlmatrics/parity.py renamed to ml_matrics/parity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from scipy.interpolate import interpn
1111
from sklearn.metrics import r2_score
1212

13-
from mlmatrics.utils import add_identity, with_hist
13+
from ml_matrics.utils import add_identity, with_hist
1414

1515

1616
def hist_density(

mlmatrics/quantile.py renamed to ml_matrics/quantile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from numpy import ndarray as Array
66
from scipy.stats import norm
77

8-
from mlmatrics.utils import add_identity
8+
from ml_matrics.utils import add_identity
99

1010

1111
def qq_gaussian(y_true: Array, y_pred: Array, y_std: Union[Array, dict]) -> None:
File renamed without changes.
File renamed without changes.
File renamed without changes.

readme.md

+51-51
Original file line numberDiff line numberDiff line change
@@ -4,114 +4,114 @@
44

55
A toolkit of metrics and visualizations for model performance in data-driven materials discovery.
66

7-
[![Tests](https://github.com/janosh/mlmatrics/workflows/Tests/badge.svg)](https://github.com/janosh/mlmatrics/actions)
8-
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/janosh/mlmatrics/master.svg)](https://results.pre-commit.ci/latest/github/janosh/mlmatrics/master)
9-
[![License](https://img.shields.io/github/license/janosh/mlmatrics?label=License)](/license)
10-
[![GitHub Repo Size](https://img.shields.io/github/repo-size/janosh/mlmatrics?label=Repo+Size)](https://github.com/janosh/mlmatrics/graphs/contributors)
7+
[![Tests](https://github.com/janosh/ml-matrics/workflows/Tests/badge.svg)](https://github.com/janosh/ml-matrics/actions)
8+
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/janosh/ml-matrics/master.svg)](https://results.pre-commit.ci/latest/github/janosh/ml-matrics/master)
9+
[![License](https://img.shields.io/github/license/janosh/ml-matrics?label=License)](/license)
10+
[![GitHub Repo Size](https://img.shields.io/github/repo-size/janosh/ml-matrics?label=Repo+Size)](https://github.com/janosh/ml-matrics/graphs/contributors)
1111
[![This project supports Python 3.8+](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://python.org/downloads)
1212

1313
</h4>
1414

1515
## Installation
1616

1717
```sh
18-
pip install -U git+https://github.com/janosh/mlmatrics
18+
pip install -U git+https://github.com/janosh/ml-matrics
1919
```
2020

2121
For a locally editable install, use
2222

2323
```sh
24-
git clone https://github.com/janosh/mlmatrics && pip install -e mlmatrics
24+
git clone https://github.com/janosh/ml-matrics && pip install -e ml-matrics
2525
```
2626

2727
To specify a dependence on this package in `requirements.txt`, use
2828

2929
```txt
3030
pandas==1.1.2
3131
numpy==1.20.1
32-
git+git://github.com/janosh/mlmatrics
32+
git+git://github.com/janosh/ml-matrics
3333
```
3434

3535
To specify a specific branch or commit, append its name or hash, e.g.
3636

3737
```txt
38-
git+git://github.com/janosh/mlmatrics@master # default
39-
git+git://github.com/janosh/mlmatrics@41b95ec
38+
git+git://github.com/janosh/ml-matrics@master # default
39+
git+git://github.com/janosh/ml-matrics@41b95ec
4040
```
4141

4242
## Parity Plots
4343

44-
See [`mlmatrics/parity.py`](mlmatrics/parity.py).
44+
See [`ml_matrics/parity.py`](ml_matrics/parity.py).
4545

46-
| [`density_scatter(xs, ys, ...)`](mlmatrics/parity.py) | [`density_scatter_with_hist(xs, ys, ...)`](mlmatrics/parity.py) |
47-
| :--------------------------------------------------------------: | :----------------------------------------------------------------: |
48-
| ![density_scatter](assets/density_scatter.svg) | ![density_scatter_with_hist](assets/density_scatter_with_hist.svg) |
49-
| [`density_hexbin(xs, ys, ...)`](mlmatrics/parity.py) | [`density_hexbin_with_hist(xs, ys, ...)`](mlmatrics/parity.py) |
50-
| ![density_hexbin](assets/density_hexbin.svg) | ![density_hexbin_with_hist](assets/density_hexbin_with_hist.svg) |
51-
| [`scatter_with_err_bar(xs, ys, yerr, ...)`](mlmatrics/parity.py) | [`residual_vs_actual(y_true, y_pred, ...)`](mlmatrics/parity.py) |
52-
| ![scatter_with_err_bar](assets/scatter_with_err_bar.svg) | ![residual_vs_actual](assets/residual_vs_actual.svg) |
46+
| [`density_scatter(xs, ys, ...)`](ml_matrics/parity.py) | [`density_scatter_with_hist(xs, ys, ...)`](ml_matrics/parity.py) |
47+
| :---------------------------------------------------------------: | :----------------------------------------------------------------: |
48+
| ![density_scatter](assets/density_scatter.svg) | ![density_scatter_with_hist](assets/density_scatter_with_hist.svg) |
49+
| [`density_hexbin(xs, ys, ...)`](ml_matrics/parity.py) | [`density_hexbin_with_hist(xs, ys, ...)`](ml_matrics/parity.py) |
50+
| ![density_hexbin](assets/density_hexbin.svg) | ![density_hexbin_with_hist](assets/density_hexbin_with_hist.svg) |
51+
| [`scatter_with_err_bar(xs, ys, yerr, ...)`](ml_matrics/parity.py) | [`residual_vs_actual(y_true, y_pred, ...)`](ml_matrics/parity.py) |
52+
| ![scatter_with_err_bar](assets/scatter_with_err_bar.svg) | ![residual_vs_actual](assets/residual_vs_actual.svg) |
5353

5454
## Elements
5555

56-
See [`mlmatrics/elements.py`](mlmatrics/elements.py).
56+
See [`ml_matrics/elements.py`](ml_matrics/elements.py).
5757

58-
| [`ptable_elemental_prevalence(compositions)`](mlmatrics/elements.py) | [`ptable_elemental_prevalence(compositions, log=True)`](mlmatrics/elements.py) |
59-
| :--------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: |
60-
| ![ptable_elemental_prevalence](assets/ptable_elemental_prevalence.svg) | ![ptable_elemental_prevalence_log](assets/ptable_elemental_prevalence_log.svg) |
61-
| [`hist_elemental_prevalence(compositions)`](mlmatrics/elements.py) | [`hist_elemental_prevalence(compositions, log=True, bar_values='count')`](mlmatrics/elements.py) |
62-
| ![hist_elemental_prevalence](assets/hist_elemental_prevalence.svg) | ![hist_elemental_prevalence_log_count](assets/hist_elemental_prevalence_log_count.svg) |
63-
| [`ptable_elemental_ratio(comps_a, comps_b)`](mlmatrics/elements.py) | [`ptable_elemental_ratio(comps_b, comps_a, log=True)`](mlmatrics/elements.py) |
64-
| ![ptable_elemental_ratio](assets/ptable_elemental_ratio.svg) | ![ptable_elemental_ratio_log](assets/ptable_elemental_ratio_log.svg) |
58+
| [`ptable_elemental_prevalence(compositions)`](ml_matrics/elements.py) | [`ptable_elemental_prevalence(compositions, log=True)`](ml_matrics/elements.py) |
59+
| :--------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------: |
60+
| ![ptable_elemental_prevalence](assets/ptable_elemental_prevalence.svg) | ![ptable_elemental_prevalence_log](assets/ptable_elemental_prevalence_log.svg) |
61+
| [`hist_elemental_prevalence(compositions)`](ml_matrics/elements.py) | [`hist_elemental_prevalence(compositions, log=True, bar_values='count')`](ml_matrics/elements.py) |
62+
| ![hist_elemental_prevalence](assets/hist_elemental_prevalence.svg) | ![hist_elemental_prevalence_log_count](assets/hist_elemental_prevalence_log_count.svg) |
63+
| [`ptable_elemental_ratio(comps_a, comps_b)`](ml_matrics/elements.py) | [`ptable_elemental_ratio(comps_b, comps_a, log=True)`](ml_matrics/elements.py) |
64+
| ![ptable_elemental_ratio](assets/ptable_elemental_ratio.svg) | ![ptable_elemental_ratio_log](assets/ptable_elemental_ratio_log.svg) |
6565

6666
## Uncertainty Calibration
6767

68-
See [`mlmatrics/quantile.py`](mlmatrics/quantile.py).
68+
See [`ml_matrics/quantile.py`](ml_matrics/quantile.py).
6969

70-
| [`qq_gaussian(y_true, y_pred, y_std)`](mlmatrics/quantile.py) | [`qq_gaussian(y_true, y_pred, y_std: dict)`](mlmatrics/quantile.py) |
71-
| :-----------------------------------------------------------: | :-----------------------------------------------------------------: |
72-
| ![normal_prob_plot](assets/normal_prob_plot.svg) | ![normal_prob_plot_multiple](assets/normal_prob_plot_multiple.svg) |
70+
| [`qq_gaussian(y_true, y_pred, y_std)`](ml_matrics/quantile.py) | [`qq_gaussian(y_true, y_pred, y_std: dict)`](ml_matrics/quantile.py) |
71+
| :------------------------------------------------------------: | :------------------------------------------------------------------: |
72+
| ![normal_prob_plot](assets/normal_prob_plot.svg) | ![normal_prob_plot_multiple](assets/normal_prob_plot_multiple.svg) |
7373

7474
## Ranking
7575

76-
See [`mlmatrics/ranking.py`](mlmatrics/ranking.py).
76+
See [`ml_matrics/ranking.py`](ml_matrics/ranking.py).
7777

78-
| [`err_decay(y_true, y_pred, y_std)`](mlmatrics/ranking.py) | [`err_decay(y_true, y_pred, y_std: dict)`](mlmatrics/ranking.py) |
79-
| :--------------------------------------------------------: | :--------------------------------------------------------------: |
80-
| ![err_decay](assets/err_decay.svg) | ![err_decay_multiple](assets/err_decay_multiple.svg) |
78+
| [`err_decay(y_true, y_pred, y_std)`](ml_matrics/ranking.py) | [`err_decay(y_true, y_pred, y_std: dict)`](ml_matrics/ranking.py) |
79+
| :---------------------------------------------------------: | :---------------------------------------------------------------: |
80+
| ![err_decay](assets/err_decay.svg) | ![err_decay_multiple](assets/err_decay_multiple.svg) |
8181

8282
## Cumulative Error and Residual
8383

84-
See [`mlmatrics/cumulative.py`](mlmatrics/cumulative.py).
84+
See [`ml_matrics/cumulative.py`](ml_matrics/cumulative.py).
8585

86-
| [`cum_err(preds, targets)`](mlmatrics/cumulative.py) | [`cum_res(preds, targets)`](mlmatrics/cumulative.py) |
87-
| :--------------------------------------------------: | :----------------------------------------------------: |
88-
| ![cumulative_error](assets/cumulative_error.svg) | ![cumulative_residual](assets/cumulative_residual.svg) |
86+
| [`cum_err(preds, targets)`](ml_matrics/cumulative.py) | [`cum_res(preds, targets)`](ml_matrics/cumulative.py) |
87+
| :---------------------------------------------------: | :----------------------------------------------------: |
88+
| ![cumulative_error](assets/cumulative_error.svg) | ![cumulative_residual](assets/cumulative_residual.svg) |
8989

9090
## Classification Metrics
9191

92-
See [`mlmatrics/relevance.py`](mlmatrics/relevance.py).
92+
See [`ml_matrics/relevance.py`](ml_matrics/relevance.py).
9393

94-
| [`roc_curve(targets, proba_pos)`](mlmatrics/relevance.py) | [`precision_recall_curve(targets, proba_pos)`](mlmatrics/relevance.py) |
95-
| :-------------------------------------------------------: | :--------------------------------------------------------------------: |
96-
| ![roc_curve](assets/roc_curve.svg) | ![precision_recall_curve](assets/precision_recall_curve.svg) |
94+
| [`roc_curve(targets, proba_pos)`](ml_matrics/relevance.py) | [`precision_recall_curve(targets, proba_pos)`](ml_matrics/relevance.py) |
95+
| :--------------------------------------------------------: | :---------------------------------------------------------------------: |
96+
| ![roc_curve](assets/roc_curve.svg) | ![precision_recall_curve](assets/precision_recall_curve.svg) |
9797

9898
## Correlation
9999

100-
See [`mlmatrics/correlation.py`](mlmatrics/correlation.py).
100+
See [`ml_matrics/correlation.py`](ml_matrics/correlation.py).
101101

102-
| [`marchenko_pastur(corr_mat, gamma=ncols/nrows)`](mlmatrics/correlation.py) | [`marchenko_pastur(corr_mat_significant_eval, gamma=ncols/nrows)`](mlmatrics/correlation.py) |
103-
| :-------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------: |
104-
| ![marchenko_pastur](assets/marchenko_pastur.svg) | ![marchenko_pastur_significant_eval](assets/marchenko_pastur_significant_eval.svg) |
102+
| [`marchenko_pastur(corr_mat, gamma=ncols/nrows)`](ml_matrics/correlation.py) | [`marchenko_pastur(corr_mat_significant_eval, gamma=ncols/nrows)`](ml_matrics/correlation.py) |
103+
| :--------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: |
104+
| ![marchenko_pastur](assets/marchenko_pastur.svg) | ![marchenko_pastur_significant_eval](assets/marchenko_pastur_significant_eval.svg) |
105105

106106
## Histograms
107107

108-
See [`mlmatrics/histograms.py`](mlmatrics/histograms.py).
108+
See [`ml_matrics/histograms.py`](ml_matrics/histograms.py).
109109

110-
| [`residual_hist(y_true, y_pred)`](mlmatrics/histograms.py) | [`true_pred_hist(y_true, y_pred, y_std)`](mlmatrics/histograms.py) |
111-
| :----------------------------------------------------------: | :----------------------------------------------------------------: |
112-
| ![residual_hist](assets/residual_hist.svg) | ![true_pred_hist](assets/true_pred_hist.svg) |
113-
| [`spacegroup_hist(y_true, y_pred)`](mlmatrics/histograms.py) | |
114-
| ![spacegroup_hist](assets/spacegroup_hist.svg) | |
110+
| [`residual_hist(y_true, y_pred)`](ml_matrics/histograms.py) | [`true_pred_hist(y_true, y_pred, y_std)`](ml_matrics/histograms.py) |
111+
| :-----------------------------------------------------------: | :-----------------------------------------------------------------: |
112+
| ![residual_hist](assets/residual_hist.svg) | ![true_pred_hist](assets/true_pred_hist.svg) |
113+
| [`spacegroup_hist(y_true, y_pred)`](ml_matrics/histograms.py) | |
114+
| ![spacegroup_hist](assets/spacegroup_hist.svg) | |
115115

116116
## Adding Assets
117117

scripts/fetch_mp_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from matminer.datasets import load_dataset
44
from pymatgen import MPRester
55

6-
from mlmatrics import ROOT
6+
from ml_matrics import ROOT
77

88
# %%
99
with MPRester(api_key="X2UaF2zkPMcFhpnMN") as mpr:

scripts/gen_rand_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import pandas as pd
33

4-
from mlmatrics import ROOT
4+
from ml_matrics import ROOT
55

66
xs = np.random.rand(100)
77
y_pred = xs + 0.1 * np.random.normal(size=100)

scripts/plot_all.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44
import pandas as pd
55

6-
from mlmatrics import (
6+
from ml_matrics import (
77
ROOT,
88
cum_err,
99
cum_res,

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from setuptools import find_namespace_packages, setup
22

33
setup(
4-
name="mlmatrics",
4+
name="ml-matrics",
55
version="0.0.1",
66
author="Janosh Riebesell",
77
author_email="[email protected]",
88
description="A collection of plots useful in data-driven materials science",
99
long_description=open("readme.md").read(),
1010
long_description_content_type="text/markdown",
11-
url="https://github.com/janosh/mlmatrics",
12-
packages=find_namespace_packages(include=["mlmatrics*"]),
11+
url="https://github.com/janosh/ml-matrics",
12+
packages=find_namespace_packages(include=["ml_matrics*"]),
1313
classifiers=[
1414
"Programming Language :: Python :: 3.8",
1515
"License :: OSI Approved :: MIT License",

tests/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pandas as pd
33
import pytest
44

5-
from mlmatrics import ROOT
5+
from ml_matrics import ROOT
66

77

88
@pytest.fixture(autouse=True)

tests/test_correlation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22

3-
from mlmatrics import marchenko_pastur
3+
from ml_matrics import marchenko_pastur
44

55

66
def test_marchenko_pastur():

tests/test_cumulative.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mlmatrics import cum_err, cum_res
1+
from ml_matrics import cum_err, cum_res
22

33
from . import y_pred, y_true
44

tests/test_elements.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pandas as pd
22

3-
from mlmatrics import (
3+
from ml_matrics import (
44
count_elements,
55
hist_elemental_prevalence,
66
ptable_elemental_prevalence,

tests/test_histograms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mlmatrics import residual_hist, spacegroup_hist, true_pred_hist
1+
from ml_matrics import residual_hist, spacegroup_hist, true_pred_hist
22

33
from . import y_pred, y_true
44

tests/test_metrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22

3-
from mlmatrics import classification_metrics, regression_metrics
3+
from ml_matrics import classification_metrics, regression_metrics
44

55
from . import y_binary, y_pred, y_proba, y_true
66

tests/test_parity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mlmatrics import (
1+
from ml_matrics import (
22
density_hexbin,
33
density_hexbin_with_hist,
44
density_scatter,

tests/test_quantile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mlmatrics import qq_gaussian
1+
from ml_matrics import qq_gaussian
22

33
from . import xs, y_pred
44

tests/test_ranking.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mlmatrics import err_decay
1+
from ml_matrics import err_decay
22

33
from . import y_pred, y_true
44

tests/test_relevance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from matplotlib.axes import Axes
22

3-
from mlmatrics import precision_recall_curve, roc_curve
3+
from ml_matrics import precision_recall_curve, roc_curve
44

55
from . import y_binary, y_proba
66

0 commit comments

Comments
 (0)