From 38b209fc7fa496dccc7e481d7b25c00d297726c0 Mon Sep 17 00:00:00 2001 From: Michael Ekstrand Date: Sat, 2 Mar 2024 18:46:33 -0500 Subject: [PATCH] add source headers --- conftest.py | 6 ++++++ docs/conf.py | 6 ++++++ lenskit/__init__.py | 6 ++++++ lenskit/algorithms/__init__.py | 6 ++++++ lenskit/algorithms/als.py | 6 ++++++ lenskit/algorithms/basic.py | 6 ++++++ lenskit/algorithms/bias.py | 6 ++++++ lenskit/algorithms/funksvd.py | 6 ++++++ lenskit/algorithms/item_knn.py | 6 ++++++ lenskit/algorithms/mf_common.py | 6 ++++++ lenskit/algorithms/ranking.py | 6 ++++++ lenskit/algorithms/svd.py | 6 ++++++ lenskit/algorithms/user_knn.py | 6 ++++++ lenskit/batch/__init__.py | 6 ++++++ lenskit/batch/_predict.py | 6 ++++++ lenskit/batch/_recommend.py | 6 ++++++ lenskit/batch/_train.py | 6 ++++++ lenskit/crossfold.py | 6 ++++++ lenskit/data/__init__.py | 6 ++++++ lenskit/data/matrix.py | 6 ++++++ lenskit/data/sampling.py | 6 ++++++ lenskit/datasets/__init__.py | 6 ++++++ lenskit/datasets/fetch.py | 6 ++++++ lenskit/datasets/movielens.py | 6 ++++++ lenskit/math/__init__.py | 6 ++++++ lenskit/math/solve.py | 6 ++++++ lenskit/metrics/__init__.py | 6 ++++++ lenskit/metrics/predict.py | 6 ++++++ lenskit/metrics/topn.py | 6 ++++++ lenskit/sharing/__init__.py | 6 ++++++ lenskit/sharing/binpickle.py | 6 ++++++ lenskit/sharing/shm.py | 6 ++++++ lenskit/topn.py | 6 ++++++ lenskit/util/__init__.py | 6 ++++++ lenskit/util/accum.py | 6 ++++++ lenskit/util/array.py | 6 ++++++ lenskit/util/debug.py | 6 ++++++ lenskit/util/log.py | 6 ++++++ lenskit/util/parallel.py | 6 ++++++ lenskit/util/random.py | 6 ++++++ lenskit/util/test.py | 6 ++++++ lenskit/util/timing.py | 6 ++++++ tasks.py | 6 ++++++ tests/test_als_explicit.py | 6 ++++++ tests/test_als_implicit.py | 6 ++++++ tests/test_batch_predict.py | 6 ++++++ tests/test_batch_recommend.py | 6 ++++++ tests/test_batch_train.py | 6 ++++++ tests/test_bias.py | 6 ++++++ tests/test_candidate_selector.py | 6 ++++++ tests/test_crossfold.py | 6 ++++++ tests/test_env_detect.py | 6 ++++++ tests/test_fallback.py | 6 ++++++ tests/test_funksvd.py | 6 ++++++ tests/test_knn_item_item.py | 6 ++++++ tests/test_knn_user_user.py | 6 ++++++ tests/test_math_solve.py | 6 ++++++ tests/test_matrix.py | 6 ++++++ tests/test_ml20m.py | 6 ++++++ tests/test_parallel.py | 6 ++++++ tests/test_popular.py | 6 ++++++ tests/test_predict_metrics.py | 6 ++++++ tests/test_rerank.py | 6 ++++++ tests/test_sharing.py | 6 ++++++ tests/test_svd.py | 6 ++++++ tests/test_topn_analysis.py | 6 ++++++ tests/test_topn_hit.py | 6 ++++++ tests/test_topn_mrr.py | 6 ++++++ tests/test_topn_ndcg.py | 6 ++++++ tests/test_topn_precision.py | 6 ++++++ tests/test_topn_rbp.py | 6 ++++++ tests/test_topn_recall.py | 6 ++++++ tests/test_topn_recs.py | 6 ++++++ tests/test_topn_utils.py | 6 ++++++ tests/test_util.py | 6 ++++++ tests/test_util_accum.py | 6 ++++++ tests/test_util_algos.py | 6 ++++++ utils/all-power.py | 6 ++++++ utils/rla-perf.py | 6 ++++++ 79 files changed, 474 insertions(+) diff --git a/conftest.py b/conftest.py index c94a921a9..f3a00a4fe 100644 --- a/conftest.py +++ b/conftest.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging from pytest import fixture diff --git a/docs/conf.py b/docs/conf.py index 9175e9b42..4a05e78bf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import os import sys sys.path.insert(0, os.path.abspath("..")) diff --git a/lenskit/__init__.py b/lenskit/__init__.py index 672546f93..c43368426 100644 --- a/lenskit/__init__.py +++ b/lenskit/__init__.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Toolkit for recommender systems research, teaching, and more. """ diff --git a/lenskit/algorithms/__init__.py b/lenskit/algorithms/__init__.py index 5c57cbb66..d503ac438 100644 --- a/lenskit/algorithms/__init__.py +++ b/lenskit/algorithms/__init__.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ LensKit algorithms. diff --git a/lenskit/algorithms/als.py b/lenskit/algorithms/als.py index 002525ac1..c3b7790ea 100644 --- a/lenskit/algorithms/als.py +++ b/lenskit/algorithms/als.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging from collections import namedtuple diff --git a/lenskit/algorithms/basic.py b/lenskit/algorithms/basic.py index 3ffec86bc..d66f0ffc3 100644 --- a/lenskit/algorithms/basic.py +++ b/lenskit/algorithms/basic.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Basic utility algorithms and combiners. """ diff --git a/lenskit/algorithms/bias.py b/lenskit/algorithms/bias.py index 09233a6a3..4a755097f 100644 --- a/lenskit/algorithms/bias.py +++ b/lenskit/algorithms/bias.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import pandas as pd diff --git a/lenskit/algorithms/funksvd.py b/lenskit/algorithms/funksvd.py index 7f60cc5ca..410cd9315 100644 --- a/lenskit/algorithms/funksvd.py +++ b/lenskit/algorithms/funksvd.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ FunkSVD (biased MF). """ diff --git a/lenskit/algorithms/item_knn.py b/lenskit/algorithms/item_knn.py index bca7616bb..e377175dd 100644 --- a/lenskit/algorithms/item_knn.py +++ b/lenskit/algorithms/item_knn.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Item-based k-NN collaborative filtering. """ diff --git a/lenskit/algorithms/mf_common.py b/lenskit/algorithms/mf_common.py index d7dcec646..8919b9fca 100644 --- a/lenskit/algorithms/mf_common.py +++ b/lenskit/algorithms/mf_common.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Common utilities & implementations for matrix factorization. """ diff --git a/lenskit/algorithms/ranking.py b/lenskit/algorithms/ranking.py index 7d8b3e515..a5ae9167d 100644 --- a/lenskit/algorithms/ranking.py +++ b/lenskit/algorithms/ranking.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Algorithms to rank items based on scores. """ diff --git a/lenskit/algorithms/svd.py b/lenskit/algorithms/svd.py index 26ca725d7..622f90747 100644 --- a/lenskit/algorithms/svd.py +++ b/lenskit/algorithms/svd.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import pandas as pd diff --git a/lenskit/algorithms/user_knn.py b/lenskit/algorithms/user_knn.py index 2793ab06f..e8e7dc104 100644 --- a/lenskit/algorithms/user_knn.py +++ b/lenskit/algorithms/user_knn.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ User-based k-NN collaborative filtering. """ diff --git a/lenskit/batch/__init__.py b/lenskit/batch/__init__.py index 310d70573..bbe7a1c07 100644 --- a/lenskit/batch/__init__.py +++ b/lenskit/batch/__init__.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Batch-run predictors and recommenders for evaluation. """ diff --git a/lenskit/batch/_predict.py b/lenskit/batch/_predict.py index e0e93cae6..dd780b83c 100644 --- a/lenskit/batch/_predict.py +++ b/lenskit/batch/_predict.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import warnings diff --git a/lenskit/batch/_recommend.py b/lenskit/batch/_recommend.py index 4d2667346..aa50924bf 100644 --- a/lenskit/batch/_recommend.py +++ b/lenskit/batch/_recommend.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import warnings diff --git a/lenskit/batch/_train.py b/lenskit/batch/_train.py index df6c78b40..346b96e8b 100644 --- a/lenskit/batch/_train.py +++ b/lenskit/batch/_train.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging from lenskit.sharing import persist, persist_binpickle diff --git a/lenskit/crossfold.py b/lenskit/crossfold.py index 353d1892e..0afa94c84 100644 --- a/lenskit/crossfold.py +++ b/lenskit/crossfold.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Data set cross-folding. """ diff --git a/lenskit/data/__init__.py b/lenskit/data/__init__.py index 81ff22674..bdf84d83b 100644 --- a/lenskit/data/__init__.py +++ b/lenskit/data/__init__.py @@ -1 +1,7 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from .matrix import RatingMatrix, sparse_ratings # noqa: F401 diff --git a/lenskit/data/matrix.py b/lenskit/data/matrix.py index 04567ffed..fed054ed3 100644 --- a/lenskit/data/matrix.py +++ b/lenskit/data/matrix.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Data manipulation routines. """ diff --git a/lenskit/data/sampling.py b/lenskit/data/sampling.py index e489b5a5a..a8106cf23 100644 --- a/lenskit/data/sampling.py +++ b/lenskit/data/sampling.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import numpy as np from numba import njit diff --git a/lenskit/datasets/__init__.py b/lenskit/datasets/__init__.py index f2fb2a9dc..8171dfcf8 100644 --- a/lenskit/datasets/__init__.py +++ b/lenskit/datasets/__init__.py @@ -1 +1,7 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from .movielens import * # noqa: F403 diff --git a/lenskit/datasets/fetch.py b/lenskit/datasets/fetch.py index ed8299bc8..68399904d 100644 --- a/lenskit/datasets/fetch.py +++ b/lenskit/datasets/fetch.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import sys from zipfile import ZipFile from urllib.request import urlopen diff --git a/lenskit/datasets/movielens.py b/lenskit/datasets/movielens.py index 5ba34556e..dd61c9ce6 100644 --- a/lenskit/datasets/movielens.py +++ b/lenskit/datasets/movielens.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Code to import commonly-used RecSys data sets into LensKit-compatible data frames. """ diff --git a/lenskit/math/__init__.py b/lenskit/math/__init__.py index 8c629602f..ac65def50 100644 --- a/lenskit/math/__init__.py +++ b/lenskit/math/__init__.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Mathematical helper routines. """ diff --git a/lenskit/math/solve.py b/lenskit/math/solve.py index 8f12ec364..75311732b 100644 --- a/lenskit/math/solve.py +++ b/lenskit/math/solve.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Efficient solver routines. """ diff --git a/lenskit/metrics/__init__.py b/lenskit/metrics/__init__.py index 27c464ae0..3238384d6 100644 --- a/lenskit/metrics/__init__.py +++ b/lenskit/metrics/__init__.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Metrics for evaluating recommendations. """ diff --git a/lenskit/metrics/predict.py b/lenskit/metrics/predict.py index 9f245b6dc..479da324d 100644 --- a/lenskit/metrics/predict.py +++ b/lenskit/metrics/predict.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Prediction accuracy metrics. """ diff --git a/lenskit/metrics/topn.py b/lenskit/metrics/topn.py index 5f66380de..f6f9988f4 100644 --- a/lenskit/metrics/topn.py +++ b/lenskit/metrics/topn.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Top-N evaluation metrics. """ diff --git a/lenskit/sharing/__init__.py b/lenskit/sharing/__init__.py index eb17ac946..9d795c92e 100644 --- a/lenskit/sharing/__init__.py +++ b/lenskit/sharing/__init__.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Support for sharing and saving models and data structures. """ diff --git a/lenskit/sharing/binpickle.py b/lenskit/sharing/binpickle.py index c3d850761..a17a72362 100644 --- a/lenskit/sharing/binpickle.py +++ b/lenskit/sharing/binpickle.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import os import pathlib import tempfile diff --git a/lenskit/sharing/shm.py b/lenskit/sharing/shm.py index 1409049b2..ecdc41df8 100644 --- a/lenskit/sharing/shm.py +++ b/lenskit/sharing/shm.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import sys import logging import pickle diff --git a/lenskit/topn.py b/lenskit/topn.py index 0ca22072b..6223b45d0 100644 --- a/lenskit/topn.py +++ b/lenskit/topn.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import functools as ft diff --git a/lenskit/util/__init__.py b/lenskit/util/__init__.py index 88f1466f0..01c14f704 100644 --- a/lenskit/util/__init__.py +++ b/lenskit/util/__init__.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Miscellaneous utility functions. """ diff --git a/lenskit/util/accum.py b/lenskit/util/accum.py index 060da81ae..1cc419cc5 100644 --- a/lenskit/util/accum.py +++ b/lenskit/util/accum.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Accumulator support. """ diff --git a/lenskit/util/array.py b/lenskit/util/array.py index faf2979a9..322e19010 100644 --- a/lenskit/util/array.py +++ b/lenskit/util/array.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Array utilities. """ diff --git a/lenskit/util/debug.py b/lenskit/util/debug.py index a34a83d2f..dd5d1ff42 100644 --- a/lenskit/util/debug.py +++ b/lenskit/util/debug.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Debugging utility code. Also runnable as a Python command. diff --git a/lenskit/util/log.py b/lenskit/util/log.py index 05b05672a..dade6fc27 100644 --- a/lenskit/util/log.py +++ b/lenskit/util/log.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Logging utilities. """ diff --git a/lenskit/util/parallel.py b/lenskit/util/parallel.py index 20f7823fa..f54c95278 100644 --- a/lenskit/util/parallel.py +++ b/lenskit/util/parallel.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Utilities for parallel processing. """ diff --git a/lenskit/util/random.py b/lenskit/util/random.py index b46cbd706..f27416575 100644 --- a/lenskit/util/random.py +++ b/lenskit/util/random.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Utilities to manage randomness in LensKit and LensKit experiments. """ diff --git a/lenskit/util/test.py b/lenskit/util/test.py index e008c0dae..703a7c940 100644 --- a/lenskit/util/test.py +++ b/lenskit/util/test.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Test utilities for LKPY tests. """ diff --git a/lenskit/util/timing.py b/lenskit/util/timing.py index 760dbd610..5e1dd5346 100644 --- a/lenskit/util/timing.py +++ b/lenskit/util/timing.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Timing support """ diff --git a/tasks.py b/tasks.py index 608021e3a..2a219b927 100644 --- a/tasks.py +++ b/tasks.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lkbuild.tasks import * diff --git a/tests/test_als_explicit.py b/tests/test_als_explicit.py index 4cce09e5f..66177c536 100644 --- a/tests/test_als_explicit.py +++ b/tests/test_als_explicit.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import pickle diff --git a/tests/test_als_implicit.py b/tests/test_als_implicit.py index 9ff0b8384..d291ac8de 100644 --- a/tests/test_als_implicit.py +++ b/tests/test_als_implicit.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging from lenskit import util diff --git a/tests/test_batch_predict.py b/tests/test_batch_predict.py index e176a6370..68ab5f4cb 100644 --- a/tests/test_batch_predict.py +++ b/tests/test_batch_predict.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import pytest import logging diff --git a/tests/test_batch_recommend.py b/tests/test_batch_recommend.py index 2d8a3d08b..6773c36f8 100644 --- a/tests/test_batch_recommend.py +++ b/tests/test_batch_recommend.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import pytest from collections import namedtuple diff --git a/tests/test_batch_train.py b/tests/test_batch_train.py index fbd1a4ca5..1be613f6e 100644 --- a/tests/test_batch_train.py +++ b/tests/test_batch_train.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.batch import train_isolated from lenskit.util.test import ml_test from lenskit.algorithms import Recommender diff --git a/tests/test_bias.py b/tests/test_bias.py index 275c71c26..50af8106a 100644 --- a/tests/test_bias.py +++ b/tests/test_bias.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms.bias import Bias from lenskit import util as lku diff --git a/tests/test_candidate_selector.py b/tests/test_candidate_selector.py index 0d614a0b2..99acbb4b8 100644 --- a/tests/test_candidate_selector.py +++ b/tests/test_candidate_selector.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms import basic import lenskit.util.test as lktu diff --git a/tests/test_crossfold.py b/tests/test_crossfold.py index aa660f2c3..4a1b38f48 100644 --- a/tests/test_crossfold.py +++ b/tests/test_crossfold.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import itertools as it import functools as ft import pytest diff --git a/tests/test_env_detect.py b/tests/test_env_detect.py index 267307c19..a46e77bc6 100644 --- a/tests/test_env_detect.py +++ b/tests/test_env_detect.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import numba import lenskit.util.debug as d diff --git a/tests/test_fallback.py b/tests/test_fallback.py index b2644b866..97e4f1104 100644 --- a/tests/test_fallback.py +++ b/tests/test_fallback.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms import basic from lenskit.algorithms.bias import Bias from lenskit import util as lku diff --git a/tests/test_funksvd.py b/tests/test_funksvd.py index ffcc2ac7f..f0ffcb33e 100644 --- a/tests/test_funksvd.py +++ b/tests/test_funksvd.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import pickle from pathlib import Path diff --git a/tests/test_knn_item_item.py b/tests/test_knn_item_item.py index e4a3f6097..bbd83a1aa 100644 --- a/tests/test_knn_item_item.py +++ b/tests/test_knn_item_item.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit import ConfigWarning, DataWarning from lenskit.algorithms import Recommender from lenskit.algorithms.basic import Fallback diff --git a/tests/test_knn_user_user.py b/tests/test_knn_user_user.py index 7fd2c90a3..c3a18f772 100644 --- a/tests/test_knn_user_user.py +++ b/tests/test_knn_user_user.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms import Recommender import lenskit.algorithms.user_knn as knn from lenskit.util import clone diff --git a/tests/test_math_solve.py b/tests/test_math_solve.py index cac54caa0..5b9778ff4 100644 --- a/tests/test_math_solve.py +++ b/tests/test_math_solve.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import numpy as np import scipy.linalg as sla diff --git a/tests/test_matrix.py b/tests/test_matrix.py index 408d7b3b3..8a447b8f8 100644 --- a/tests/test_matrix.py +++ b/tests/test_matrix.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import scipy.sparse as sps import pandas as pd diff --git a/tests/test_ml20m.py b/tests/test_ml20m.py index 95b7f0680..6e277e1e2 100644 --- a/tests/test_ml20m.py +++ b/tests/test_ml20m.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Tests on the ML-20M data set. """ diff --git a/tests/test_parallel.py b/tests/test_parallel.py index 35b8285fd..71285c862 100644 --- a/tests/test_parallel.py +++ b/tests/test_parallel.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import os import logging import multiprocessing as mp diff --git a/tests/test_popular.py b/tests/test_popular.py index 790bd98f5..1a85bf661 100644 --- a/tests/test_popular.py +++ b/tests/test_popular.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms import basic import pandas as pd diff --git a/tests/test_predict_metrics.py b/tests/test_predict_metrics.py index 461f250bc..5cac1a7ee 100644 --- a/tests/test_predict_metrics.py +++ b/tests/test_predict_metrics.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import numpy as np import pandas as pd import os.path diff --git a/tests/test_rerank.py b/tests/test_rerank.py index 004b08f9c..de21a61c4 100644 --- a/tests/test_rerank.py +++ b/tests/test_rerank.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import lenskit.util.test as lktu from lenskit.algorithms.basic import PopScore from lenskit.algorithms.bias import Bias diff --git a/tests/test_sharing.py b/tests/test_sharing.py index 8e1033029..1002770f6 100644 --- a/tests/test_sharing.py +++ b/tests/test_sharing.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import os import pickle diff --git a/tests/test_svd.py b/tests/test_svd.py index ee4d7653b..a297e9591 100644 --- a/tests/test_svd.py +++ b/tests/test_svd.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import pickle diff --git a/tests/test_topn_analysis.py b/tests/test_topn_analysis.py index 1253b8b0e..62277dc1d 100644 --- a/tests/test_topn_analysis.py +++ b/tests/test_topn_analysis.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from pathlib import Path import logging import numpy as np diff --git a/tests/test_topn_hit.py b/tests/test_topn_hit.py index b664023f6..34e568c82 100644 --- a/tests/test_topn_hit.py +++ b/tests/test_topn_hit.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import numpy as np import pandas as pd diff --git a/tests/test_topn_mrr.py b/tests/test_topn_mrr.py index bb2b73843..17d5cde8e 100644 --- a/tests/test_topn_mrr.py +++ b/tests/test_topn_mrr.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import numpy as np import pandas as pd diff --git a/tests/test_topn_ndcg.py b/tests/test_topn_ndcg.py index 830a4b8b6..804f78f93 100644 --- a/tests/test_topn_ndcg.py +++ b/tests/test_topn_ndcg.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import numpy as np import pandas as pd diff --git a/tests/test_topn_precision.py b/tests/test_topn_precision.py index 62df2bc1a..7e08e67ba 100644 --- a/tests/test_topn_precision.py +++ b/tests/test_topn_precision.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import numpy as np import pandas as pd diff --git a/tests/test_topn_rbp.py b/tests/test_topn_rbp.py index babe76dc3..304d7ea4f 100644 --- a/tests/test_topn_rbp.py +++ b/tests/test_topn_rbp.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import numpy as np import pandas as pd diff --git a/tests/test_topn_recall.py b/tests/test_topn_recall.py index 612acdf08..fc52d83d4 100644 --- a/tests/test_topn_recall.py +++ b/tests/test_topn_recall.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import logging import numpy as np import pandas as pd diff --git a/tests/test_topn_recs.py b/tests/test_topn_recs.py index e570f8c1f..09d12eeef 100644 --- a/tests/test_topn_recs.py +++ b/tests/test_topn_recs.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms import basic from lenskit.algorithms import bias diff --git a/tests/test_topn_utils.py b/tests/test_topn_utils.py index 25257c5df..3e0e875a2 100644 --- a/tests/test_topn_utils.py +++ b/tests/test_topn_utils.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms import CandidateSelector import pandas as pd diff --git a/tests/test_util.py b/tests/test_util.py index 6f134b0a2..18bf34630 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import time import re import pathlib diff --git a/tests/test_util_accum.py b/tests/test_util_accum.py index 48a876f8f..8e6cd4f35 100644 --- a/tests/test_util_accum.py +++ b/tests/test_util_accum.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + import numpy as np from lenskit.util.accum import kvp_minheap_insert, kvp_minheap_sort diff --git a/tests/test_util_algos.py b/tests/test_util_algos.py index 8437ebd35..1bf47c9b5 100644 --- a/tests/test_util_algos.py +++ b/tests/test_util_algos.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + from lenskit.algorithms import basic import pandas as pd diff --git a/utils/all-power.py b/utils/all-power.py index 7854a1779..6185b6ff7 100644 --- a/utils/all-power.py +++ b/utils/all-power.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Load all power consumption. diff --git a/utils/rla-perf.py b/utils/rla-perf.py index e3d43c43f..a248473ad 100644 --- a/utils/rla-perf.py +++ b/utils/rla-perf.py @@ -1,3 +1,9 @@ +# This file is part of LensKit. +# Copyright (C) 2018-2023 Boise State University +# Copyright (C) 2023-2024 Drexel University +# Licensed under the MIT license, see LICENSE.md for details. +# SPDX-License-Identifier: MIT + """ Little script to test RLA performance.