Skip to content

Commit

Permalink
Merge branch 'release/v0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
evfro committed Mar 7, 2018
2 parents 5fd89db + 01ed51a commit c032604
Show file tree
Hide file tree
Showing 17 changed files with 326 additions and 637 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The framework also features efficient tensor-based implementation of an algorith


## Prerequisites
**Note:** Currently runs on python 2 only (python 3 support in plans).
Current version of Polara supports both Python 2 and Python 3 environments. Future versions are likely to drop support of Python 2 to make a better use of Python 3 features.

The framework heavily depends on `Pandas, Numpy, Scipy` and `Numba` packages. Better performance can be achieved with `mkl` (optional). It's also recommended to use `jupyter notebook` for experimentation. Visualization of results can be done with help of `matplotlib` and optionally `seaborn`. The easiest way to get all those at once is to use the latest [Anaconda distribution](https://www.continuum.io/downloads).

Expand All @@ -17,7 +17,7 @@ If you use a separate `conda` environment for testing, the following command can

Alternatively, a new conda environment with all required packages can be created by:

`conda create -n <your_environment_name> python=2.7 --file conda_req.txt`
`conda create -n <your_environment_name> python=3.6 --file conda_req.txt`


## Installation
Expand Down
30 changes: 16 additions & 14 deletions examples/Custom evaluation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"metadata": {},
"outputs": [],
"source": [
"from __future__ import print_function\n",
"import numpy as np\n",
"from polara.datasets.movielens import get_movielens_data"
]
Expand Down Expand Up @@ -176,7 +177,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Preparing data...\n"
"Preparing data...\n",
"Done.\n"
]
}
],
Expand Down Expand Up @@ -464,7 +466,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"PureSVD training time: 0.259858550909s\n"
"PureSVD training time: 0.0981479023320091s\n"
]
}
],
Expand Down Expand Up @@ -602,7 +604,7 @@
{
"data": {
"text/plain": [
"Relevance(precision=0.46719986760687032, recall=0.18790260795025798, fallout=0.058754565239814198, specifity=0.70752554180746507, miss_rate=0.7362722359391265)"
"Relevance(precision=0.4671998676068703, recall=0.18790260795025798, fallout=0.0587545652398142, specifity=0.7075255418074651, miss_rate=0.7362722359391265)"
]
},
"execution_count": 21,
Expand Down Expand Up @@ -682,7 +684,7 @@
{
"data": {
"text/plain": [
"(5L, 10L)"
"(5, 10)"
]
},
"execution_count": 24,
Expand All @@ -708,7 +710,7 @@
}
],
"source": [
"print (len(test_users), svd.topk)"
"print((len(test_users), svd.topk))"
]
},
{
Expand All @@ -732,7 +734,7 @@
}
],
"source": [
"print data_model.test.holdout"
"print(data_model.test.holdout)"
]
},
{
Expand Down Expand Up @@ -902,7 +904,7 @@
],
"source": [
"assert unseen_data.userid.nunique() == len(unseen_users)\n",
"print len(unseen_users)"
"print(len(unseen_users))"
]
},
{
Expand Down Expand Up @@ -971,7 +973,7 @@
{
"data": {
"text/plain": [
"(1208L, 10L)"
"(1208, 10)"
]
},
"execution_count": 33,
Expand Down Expand Up @@ -1642,7 +1644,7 @@
{
"data": {
"text/plain": [
"Relevance(precision=0.48771352650892064, recall=0.19621777241472779, fallout=0.058711254774068439, specifity=0.68088130501335409, miss_rate=0.741780456106087)"
"Relevance(precision=0.48771352650892064, recall=0.1962177724147278, fallout=0.05871125477406844, specifity=0.6808813050133541, miss_rate=0.741780456106087)"
]
},
"execution_count": 43,
Expand All @@ -1657,21 +1659,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2 [sc2]",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.14"
"pygments_lexer": "ipython3",
"version": "3.6.4"
},
"toc": {
"nav_menu": {},
Expand Down
Loading

0 comments on commit c032604

Please sign in to comment.