Skip to content

Commit

Permalink
closes #520 (#621) dataset -> data
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 authored and twiecki committed Sep 10, 2024
1 parent 0085a33 commit f9b310f
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 13 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/source/guide/benefits/model_deployment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
}
],
"source": [
"url = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/mmm_example.csv\"\n",
"url = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/mmm_example.csv\"\n",
"df = pd.read_csv(url)\n",
"\n",
"columns_to_keep = [\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ import pandas as pd
from pymc_marketing.mmm import DelayedSaturatedMMM


data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/mmm_example.csv"
data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/mmm_example.csv"
data = pd.read_csv(data_url, parse_dates=['date_week'])

mmm = DelayedSaturatedMMM(
Expand Down Expand Up @@ -140,7 +140,7 @@ import seaborn as sns
from pymc_marketing import clv


data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/clv_quickstart.csv"
data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/clv_quickstart.csv"
data = pd.read_csv(data_url)
data['customer_id'] = data.index

Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/clv/bg_nbd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
}
],
"source": [
"data_path = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/clv_quickstart.csv\"\n",
"data_path = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/clv_quickstart.csv\"\n",
"\n",
"df = pd.read_csv(data_path)\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/clv/clv_quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
}
],
"source": [
"raw_trans = pd.read_csv(\"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/cdnow_transactions.csv\")\n",
"raw_trans = pd.read_csv(\"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/cdnow_transactions.csv\")\n",
"\n",
"raw_trans.head(5)"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/clv/dev/pareto_nbd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
}
],
"source": [
"url_cdnow_rfm = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/clv_quickstart.csv\"\n",
"url_cdnow_rfm = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/clv_quickstart.csv\"\n",
"url_cdnow_trans = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/tests/clv/datasets/cdnow_transactions.csv\"\n",
"\n",
"df = pd.read_csv(url_cdnow_rfm)\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/clv/gamma_gamma.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
}
],
"source": [
"data_path = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/clv_quickstart.csv\"\n",
"data_path = \"https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/clv_quickstart.csv\"\n",
"\n",
"summary_with_money_value = pd.read_csv(data_path)\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
},
"outputs": [],
"source": [
"name = '/pymc-marketing/models/budget_optimizer_model_1.nc'\n",
"name = '/pymc-marketing/data/budget_optimizer_model.nc'\n",
"mmm = DelayedSaturatedMMM.load(name)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion pymc_marketing/mmm/delayed_saturated_mmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ class DelayedSaturatedMMM(

from pymc_marketing.mmm import DelayedSaturatedMMM

data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/datasets/mmm_example.csv"
data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/mmm_example.csv"
data = pd.read_csv(data_url, parse_dates=["date_week"])

mmm = DelayedSaturatedMMM(
Expand Down
6 changes: 3 additions & 3 deletions tests/clv/models/test_pareto_nbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def setup_class(cls):

# Use Quickstart dataset (the CDNOW_sample research data) for testing
# TODO: Create a pytest fixture for this
test_data = pd.read_csv("datasets/clv_quickstart.csv")
test_data = pd.read_csv("data/clv_quickstart.csv")
test_data["customer_id"] = test_data.index

cls.data = test_data
Expand Down Expand Up @@ -358,7 +358,7 @@ def test_posterior_distributions(self, fit_type) -> None:

def test_save_load_pareto_nbd(self):
# TODO: Create a pytest fixture for this
test_data = pd.read_csv("datasets/clv_quickstart.csv")
test_data = pd.read_csv("data/clv_quickstart.csv")
test_data["customer_id"] = test_data.index
model = ParetoNBDModel(
data=test_data,
Expand Down Expand Up @@ -394,7 +394,7 @@ def setup_class(cls):
dropout_coefficient=np.array([3.0]),
)

cls.data = data = pd.read_csv("datasets/clv_quickstart.csv").iloc[:500]
cls.data = data = pd.read_csv("data/clv_quickstart.csv").iloc[:500]
data["customer_id"] = data.index

# Create two purchase covariates and one dropout covariate
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def cdnow_trans() -> pd.DataFrame:

Data source: https://www.brucehardie.com/datasets/
"""
return pd.read_csv("datasets/cdnow_transactions.csv")
return pd.read_csv("data/cdnow_transactions.csv")


@pytest.fixture(scope="module")
Expand Down

0 comments on commit f9b310f

Please sign in to comment.