SparseMatrixRecommender


NameSparseMatrixRecommender JSON
Version 0.1.9 PyPI version JSON
download
home_pagehttps://github.com/antononcube/Python-packages/tree/main/SparseMatrixRecommender
SummarySparse Matrix Recommender package based on SSparseMatrix objects.
upload_time2023-10-20 13:33:20
maintainer
docs_urlNone
authorAnton Antonov
requires_python>=3.7
license
keywords sparse matrix recommender sparse matrix recommender linear algebra linear algebra recommendations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sparse Matrix Recommender (SMR) Python package

## Introduction

This Python package, `SparseMatrixRecommender`, has different functions for computations of recommendations
based on (user) profile or history using Sparse Linear Algebra (SLA). The package mirrors
the Mathematica implementation [AAp1]. 
(There is also a corresponding implementation in R; see [AAp2]). 

The package is based on a certain "standard" Information retrieval paradigm -- it utilizes 
Latent Semantic Indexing (LSI) functions like IDF, TF-IDF, etc. Hence, the package also has 
document-term matrix creation functions and LSI application functions. I included them in the 
package since I wanted to minimize the external package dependencies.

The package includes two data-sets `dfTitanic` and `dfMushroom` in order to make easier the
writing of introductory examples and unit tests.

For more theoretical description see the article 
["Mapping Sparse Matrix Recommender to Streams Blending Recommender"](https://github.com/antononcube/MathematicaForPrediction/blob/master/Documentation/MappingSMRtoSBR/Mapping-Sparse-Matrix-Recommender-to-Streams-Blending-Recommender.pdf)
, [AA1].

For detailed examples see the files
["SMR-experiments-large-data.py"](https://github.com/antononcube/Python-packages/blob/main/SparseMatrixRecommender/examples/SMR-experiments-large-data.py)
and
["SMR-creation-from-long-form.py"](https://github.com/antononcube/Python-packages/blob/main/SparseMatrixRecommender/examples/SMR-creation-from-long-form.py).

The list of features and its implementation status is given in the [org-mode](https://orgmode.org) file
["SparseMatrixRecommender-work-plan.org"](https://github.com/antononcube/Python-packages/blob/main/org/SparseMatrixRecommender-work-plan.org).

**Remark:** "SMR" stands for "Sparse Matrix Recommender". Most of the operations of this Python package
mirror the operations of the software monads "SMRMon-WL", "SMRMon-R", [AAp1, AAp2].

------

## Workflows 

Here is a diagram that encompasses the workflows this package supports (or will support):

[![SMR-workflows](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Sparse-Matrix-Recommender-workflows/SMR-workflows.jpeg)](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Sparse-Matrix-Recommender-workflows/SMR-workflows.pdf)

Here is narration of a certain workflow scenario:

1. Get a dataset.
2. Create contingency matrices for a given identifier column and a set of "tag type" columns.
3. Examine recommender matrix statistics.
4. If the assumptoins about the data hold apply LSI functions.
   - For example, the "usual trio" IDF, Frequency, Cosine.
5. Do (verify) example profile recommendations.
6. If satisfactory results are obtained use the recommender as a nearest neighbors classifier. 


------

## Monadic design

Here is a diagram of typical pipeline building using a `SparseMatrixRecommender` object:

![SMRMon-pipeline-Python](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Recommender-workflows/SMRMon-pipeline-Python.jpg)

**Remark:** The **monadic design** allows "pipelining" of the SMR operations -- see the usage example section.


------

## Installation

To install from GitHub use the shell command:

```shell
python -m pip install git+https://github.com/antononcube/Python-packages.git#egg=SparseMatrixRecommender\&subdirectory=SparseMatrixRecommender
```

To install from [PyPI](https://pypi.org/project/SparseMatrixRecommender/):

```shell
python -m pip install SparseMatrixRecommender
``` 

------

## Related Python packages

This package is based on the Python package 
[`SSparseMatrix`](https://github.com/antononcube/Python-packages/tree/main/SSparseMatrix), 
[AAp5].

The package 
[LatentSemanticAnalyzer](https://github.com/antononcube/Python-packages/tree/main/LatentSemanticAnalyzer), 
[AAp6], uses the cross tabulation and LSI functions of this package.

------

## Usage example

Here is an example of an SMR pipeline for creation of a recommender
over Titanic data and recommendations for the profile "passengerSex:male" and "passengerClass:1st":

```python
from SparseMatrixRecommender.SparseMatrixRecommender import *
from SparseMatrixRecommender.DataLoaders import *

dfTitanic = load_titanic_data_frame()

smrObj = (SparseMatrixRecommender()
          .create_from_wide_form(data = dfTitanic, 
                                 item_column_name="id", 
                                 columns=None, 
                                 add_tag_types_to_column_names=True, 
                                 tag_value_separator=":")
          .apply_term_weight_functions(global_weight_func = "IDF", 
                                       local_weight_func = "None", 
                                       normalizer_func = "Cosine")
          .recommend_by_profile(profile=["passengerSex:male", "passengerClass:1st"], 
                                nrecs=12)
          .join_across(data=dfTitanic, on="id")
          .echo_value())
```

**Remark:** More examples can be found the directory 
["./examples"](https://github.com/antononcube/Python-packages/tree/main/SparseMatrixRecommender/examples).

------

## Related Mathematica packages

The software monad Mathematica package 
["MonadicSparseMatrixRecommender.m"](https://github.com/antononcube/MathematicaForPrediction/blob/master/MonadicProgramming/MonadicSparseMatrixRecommender.m)
[AAp1], provides recommendation pipelines similar to the pipelines created with this package.

Here is a Mathematica monadic pipeline that corresponds to the Python pipeline above:

```mathematica
smrObj =
  SMRMonUnit[]⟹
   SMRMonCreate[dfTitanic, "id", 
                "AddTagTypesToColumnNames" -> True, 
                "TagValueSeparator" -> ":"]⟹
   SMRMonApplyTermWeightFunctions["IDF", "None", "Cosine"]⟹
   SMRMonRecommendByProfile[{"passengerSex:male", "passengerClass:1st"}, 12]⟹
   SMRMonJoinAcross[dfTitanic, "id"]⟹
   SMRMonEchoValue[];   
```

*(Compare the pipeline diagram above with the 
[corresponding diagram using Mathematica notation](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Recommender-workflows/SMRMon-pipeline.jpeg)
.)*

------

## Related R packages

The package 
[`SMRMon-R`](https://github.com/antononcube/R-packages/tree/master/SMRMon-R), 
[AAp2], implements a software monad for SMR workflows. 
Most of `SMRMon-R` functions delegate to `SparseMatrixRecommender`.

The package 
[`SparseMatrixRecommenderInterfaces`](https://github.com/antononcube/R-packages/tree/master/SparseMatrixRecommenderInterfaces), 
[AAp3], provides functions for interactive 
[Shiny](https://shiny.rstudio.com)
interfaces for the recommenders made with `SparseMatrixRecommender` and/or `SMRMon-R`.

The package 
[`LSAMon-R`](https://github.com/antononcube/R-packages/tree/master/LSAMon-R),
[AAp4], can be used to make matrices for `SparseMatrixRecommender` and/or `SMRMon-R`.

Here is the `SMRMon-R` pipeline that corresponds to the Python pipeline above:

```r
smrObj <-
  SMRMonCreate( data = dfTitanic, 
                itemColumnName = "id", 
                addTagTypesToColumnNamesQ = TRUE, 
                sep = ":") %>%
  SMRMonApplyTermWeightFunctions(globalWeightFunction = "IDF", 
                                 localWeightFunction = "None", 
                                 normalizerFunction = "Cosine") %>%
  SMRMonRecommendByProfile( profile = c("passengerSex:male", "passengerClass:1st"), 
                            nrecs = 12) %>%
  SMRMonJoinAcross( data = dfTitanic, by = "id") %>%
  SMRMonEchoValue
```

------

## Recommender comparison project

The project repository "Scalable Recommender Framework", [AAr1],
has documents, diagrams, tests, and benchmarks of a recommender system implemented in multiple programming languages.

This Python recommender package is a decisive winner in the comparison -- see the first 10 min of 
the video recording [AAv1] or the benchmarks at [AAr1].

------

## Code generation with natural language commands

### Using grammar-based interpreters

The project "Raku for Prediction", [AAr2, AAv2, AAp6], has a Domain Specific Language (DSL) grammar and interpreters 
that allow the generation of SMR code for corresponding Mathematica, Python, R, and Raku packages. 

Here is Command Line Interface (CLI) invocation example that generate code for this package:

```shell
> ToRecommenderWorkflowCode Python 'create with dfTitanic; apply the LSI functions IDF, None, Cosine;recommend by profile 1st and male' 
obj = SparseMatrixRecommender().create_from_wide_form(data = dfTitanic).apply_term_weight_functions(global_weight_func = "IDF", local_weight_func = "None", normalizer_func = "Cosine").recommend_by_profile( profile = ["1st", "male"])
```

### NLP Template Engine

Here is an example using the NLP Template Engine, [AAr2, AAv3]:

```mathematica
Concretize["create with dfTitanic; apply the LSI functions IDF, None, Cosine;recommend by profile 1st and male", 
 "TargetLanguage" -> "Python"]

(*
"smrObj = (SparseMatrixRecommender()
 .create_from_wide_form(data = None, item_column_name=\"id\", columns=None, add_tag_types_to_column_names=True, tag_value_separator=\":\")
 .apply_term_weight_functions(\"IDF\", \"None\", \"Cosine\")
 .recommend_by_profile(profile=[\"1st\", \"male\"], nrecs=profile)
 .join_across(data=None, on=\"id\")
 .echo_value())"
*)
```


------

## References

### Articles

[AA1] Anton Antonov,
["Mapping Sparse Matrix Recommender to Streams Blending Recommender"](https://github.com/antononcube/MathematicaForPrediction/blob/master/Documentation/MappingSMRtoSBR/Mapping-Sparse-Matrix-Recommender-to-Streams-Blending-Recommender.pdf)
(2017),
[MathematicaForPrediction at GitHub](https://github.com/antononcube/MathematicaForPrediction).

### Mathematica/WL and R packages 

[AAp1] Anton Antonov, 
[Monadic Sparse Matrix Recommender Mathematica package](https://github.com/antononcube/MathematicaForPrediction/blob/master/MonadicProgramming/MonadicSparseMatrixRecommender.m),
(2018),
[MathematicaForPrediction at GitHub](https://github.com/antononcube/MathematicaForPrediction).

[AAp2] Anton Antonov,
[Sparse Matrix Recommender Monad in R](https://github.com/antononcube/R-packages/tree/master/SMRMon-R)
(2019),
[R-packages at GitHub/antononcube](https://github.com/antononcube/R-packages).

[AAp3] Anton Antonov,
[Sparse Matrix Recommender framework interface functions](https://github.com/antononcube/R-packages/tree/master/SparseMatrixRecommenderInterfaces)
(2019),
[R-packages at GitHub/antononcube](https://github.com/antononcube/R-packages).

[AAp4] Anton Antonov,
[Latent Semantic Analysis Monad in R](https://github.com/antononcube/R-packages/tree/master/LSAMon-R)
(2019),
[R-packages at GitHub/antononcube](https://github.com/antononcube/R-packages).

### Python packages

[AAp5] Anton Antonov,
[SSparseMatrix package in Python](https://github.com/antononcube/Python-packages/tree/master/SSparseMatrix)
(2021),
[Python-packages at GitHub/antononcube](https://github.com/antononcube/Python-packages).

[AAp6] Anton Antonov,
[LatentSemanticAnalyzer package in Python](https://github.com/antononcube/Python-packages/tree/main/LatentSemanticAnalyzer)
(2021),
[Python-packages at GitHub/antononcube](https://github.com/antononcube/Python-packages).

### Raku packages

[AAp6] Anton Antonov,
[DSL::English::RecommenderWorkflows Raku package](ttps://github.com/antononcube/Raku-DSL-English-RecommenderWorkflows),
(2018-2022),
[GitHub/antononcube](https://github.com/antononcube/Raku-DSL-English-RecommenderWorkflows).
([At raku.land]((https://raku.land/zef:antononcube/DSL::English::RecommenderWorkflows))).

### Repositories

[AAr1] Anton Antonov,
[Scalable Recommender Framework project](https://github.com/antononcube/Scalable-Recommender-Framework-project),
(2022)
[GitHub/antononcube](https://github.com/antononcube).

[AAr2] Anton Antonov,
["Raku for Prediction" book project](https://github.com/antononcube/RakuForPrediction-book),
(2021-2022),
[GitHub/antononcube](https://github.com/antononcube).

### Videos

[AAv1] Anton Antonov,
["TRC 2022 Implementation of ML algorithms in Raku"](https://www.youtube.com/watch?v=efRHfjYebs4),
(2022),
[Anton A. Antonov's channel at YouTube](https://www.youtube.com/channel/UC5qMPIsJeztfARXWdIw3Xzw).

[AAv2] Anton Antonov,
["Raku for Prediction"](https://www.youtube.com/watch?v=frpCBjbQtnA),
(2021),
[The Raku Conference (TRC) at YouTube](https://www.youtube.com/channel/UCnKoF-TknjGtFIpU3Bc_jUA).

[AAv3] Anton Antonov,
["NLP Template Engine, Part 1"](https://www.youtube.com/watch?v=a6PvmZnvF9I),
(2021),
[Anton A. Antonov's channel at YouTube](https://www.youtube.com/channel/UC5qMPIsJeztfARXWdIw3Xzw).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/antononcube/Python-packages/tree/main/SparseMatrixRecommender",
    "name": "SparseMatrixRecommender",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "sparse,matrix,recommender,sparse matrix recommender,linear algebra,linear,algebra,recommendations",
    "author": "Anton Antonov",
    "author_email": "antononcube@posteo.net",
    "download_url": "https://files.pythonhosted.org/packages/89/ac/be47589cd33d4576e878dcf7d4dc6d314de5c98e1951e3bcd79c23e192d2/SparseMatrixRecommender-0.1.9.tar.gz",
    "platform": null,
    "description": "# Sparse Matrix Recommender (SMR) Python package\n\n## Introduction\n\nThis Python package, `SparseMatrixRecommender`, has different functions for computations of recommendations\nbased on (user) profile or history using Sparse Linear Algebra (SLA). The package mirrors\nthe Mathematica implementation [AAp1]. \n(There is also a corresponding implementation in R; see [AAp2]). \n\nThe package is based on a certain \"standard\" Information retrieval paradigm -- it utilizes \nLatent Semantic Indexing (LSI) functions like IDF, TF-IDF, etc. Hence, the package also has \ndocument-term matrix creation functions and LSI application functions. I included them in the \npackage since I wanted to minimize the external package dependencies.\n\nThe package includes two data-sets `dfTitanic` and `dfMushroom` in order to make easier the\nwriting of introductory examples and unit tests.\n\nFor more theoretical description see the article \n[\"Mapping Sparse Matrix Recommender to Streams Blending Recommender\"](https://github.com/antononcube/MathematicaForPrediction/blob/master/Documentation/MappingSMRtoSBR/Mapping-Sparse-Matrix-Recommender-to-Streams-Blending-Recommender.pdf)\n, [AA1].\n\nFor detailed examples see the files\n[\"SMR-experiments-large-data.py\"](https://github.com/antononcube/Python-packages/blob/main/SparseMatrixRecommender/examples/SMR-experiments-large-data.py)\nand\n[\"SMR-creation-from-long-form.py\"](https://github.com/antononcube/Python-packages/blob/main/SparseMatrixRecommender/examples/SMR-creation-from-long-form.py).\n\nThe list of features and its implementation status is given in the [org-mode](https://orgmode.org) file\n[\"SparseMatrixRecommender-work-plan.org\"](https://github.com/antononcube/Python-packages/blob/main/org/SparseMatrixRecommender-work-plan.org).\n\n**Remark:** \"SMR\" stands for \"Sparse Matrix Recommender\". Most of the operations of this Python package\nmirror the operations of the software monads \"SMRMon-WL\", \"SMRMon-R\", [AAp1, AAp2].\n\n------\n\n## Workflows \n\nHere is a diagram that encompasses the workflows this package supports (or will support):\n\n[![SMR-workflows](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Sparse-Matrix-Recommender-workflows/SMR-workflows.jpeg)](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Sparse-Matrix-Recommender-workflows/SMR-workflows.pdf)\n\nHere is narration of a certain workflow scenario:\n\n1. Get a dataset.\n2. Create contingency matrices for a given identifier column and a set of \"tag type\" columns.\n3. Examine recommender matrix statistics.\n4. If the assumptoins about the data hold apply LSI functions.\n   - For example, the \"usual trio\" IDF, Frequency, Cosine.\n5. Do (verify) example profile recommendations.\n6. If satisfactory results are obtained use the recommender as a nearest neighbors classifier. \n\n\n------\n\n## Monadic design\n\nHere is a diagram of typical pipeline building using a `SparseMatrixRecommender` object:\n\n![SMRMon-pipeline-Python](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Recommender-workflows/SMRMon-pipeline-Python.jpg)\n\n**Remark:** The **monadic design** allows \"pipelining\" of the SMR operations -- see the usage example section.\n\n\n------\n\n## Installation\n\nTo install from GitHub use the shell command:\n\n```shell\npython -m pip install git+https://github.com/antononcube/Python-packages.git#egg=SparseMatrixRecommender\\&subdirectory=SparseMatrixRecommender\n```\n\nTo install from [PyPI](https://pypi.org/project/SparseMatrixRecommender/):\n\n```shell\npython -m pip install SparseMatrixRecommender\n``` \n\n------\n\n## Related Python packages\n\nThis package is based on the Python package \n[`SSparseMatrix`](https://github.com/antononcube/Python-packages/tree/main/SSparseMatrix), \n[AAp5].\n\nThe package \n[LatentSemanticAnalyzer](https://github.com/antononcube/Python-packages/tree/main/LatentSemanticAnalyzer), \n[AAp6], uses the cross tabulation and LSI functions of this package.\n\n------\n\n## Usage example\n\nHere is an example of an SMR pipeline for creation of a recommender\nover Titanic data and recommendations for the profile \"passengerSex:male\" and \"passengerClass:1st\":\n\n```python\nfrom SparseMatrixRecommender.SparseMatrixRecommender import *\nfrom SparseMatrixRecommender.DataLoaders import *\n\ndfTitanic = load_titanic_data_frame()\n\nsmrObj = (SparseMatrixRecommender()\n          .create_from_wide_form(data = dfTitanic, \n                                 item_column_name=\"id\", \n                                 columns=None, \n                                 add_tag_types_to_column_names=True, \n                                 tag_value_separator=\":\")\n          .apply_term_weight_functions(global_weight_func = \"IDF\", \n                                       local_weight_func = \"None\", \n                                       normalizer_func = \"Cosine\")\n          .recommend_by_profile(profile=[\"passengerSex:male\", \"passengerClass:1st\"], \n                                nrecs=12)\n          .join_across(data=dfTitanic, on=\"id\")\n          .echo_value())\n```\n\n**Remark:** More examples can be found the directory \n[\"./examples\"](https://github.com/antononcube/Python-packages/tree/main/SparseMatrixRecommender/examples).\n\n------\n\n## Related Mathematica packages\n\nThe software monad Mathematica package \n[\"MonadicSparseMatrixRecommender.m\"](https://github.com/antononcube/MathematicaForPrediction/blob/master/MonadicProgramming/MonadicSparseMatrixRecommender.m)\n[AAp1], provides recommendation pipelines similar to the pipelines created with this package.\n\nHere is a Mathematica monadic pipeline that corresponds to the Python pipeline above:\n\n```mathematica\nsmrObj =\n  SMRMonUnit[]\u27f9\n   SMRMonCreate[dfTitanic, \"id\", \n                \"AddTagTypesToColumnNames\" -> True, \n                \"TagValueSeparator\" -> \":\"]\u27f9\n   SMRMonApplyTermWeightFunctions[\"IDF\", \"None\", \"Cosine\"]\u27f9\n   SMRMonRecommendByProfile[{\"passengerSex:male\", \"passengerClass:1st\"}, 12]\u27f9\n   SMRMonJoinAcross[dfTitanic, \"id\"]\u27f9\n   SMRMonEchoValue[];   \n```\n\n*(Compare the pipeline diagram above with the \n[corresponding diagram using Mathematica notation](https://github.com/antononcube/SimplifiedMachineLearningWorkflows-book/raw/master/Part-2-Monadic-Workflows/Diagrams/A-monad-for-Recommender-workflows/SMRMon-pipeline.jpeg)\n.)*\n\n------\n\n## Related R packages\n\nThe package \n[`SMRMon-R`](https://github.com/antononcube/R-packages/tree/master/SMRMon-R), \n[AAp2], implements a software monad for SMR workflows. \nMost of `SMRMon-R` functions delegate to `SparseMatrixRecommender`.\n\nThe package \n[`SparseMatrixRecommenderInterfaces`](https://github.com/antononcube/R-packages/tree/master/SparseMatrixRecommenderInterfaces), \n[AAp3], provides functions for interactive \n[Shiny](https://shiny.rstudio.com)\ninterfaces for the recommenders made with `SparseMatrixRecommender` and/or `SMRMon-R`.\n\nThe package \n[`LSAMon-R`](https://github.com/antononcube/R-packages/tree/master/LSAMon-R),\n[AAp4], can be used to make matrices for `SparseMatrixRecommender` and/or `SMRMon-R`.\n\nHere is the `SMRMon-R` pipeline that corresponds to the Python pipeline above:\n\n```r\nsmrObj <-\n  SMRMonCreate( data = dfTitanic, \n                itemColumnName = \"id\", \n                addTagTypesToColumnNamesQ = TRUE, \n                sep = \":\") %>%\n  SMRMonApplyTermWeightFunctions(globalWeightFunction = \"IDF\", \n                                 localWeightFunction = \"None\", \n                                 normalizerFunction = \"Cosine\") %>%\n  SMRMonRecommendByProfile( profile = c(\"passengerSex:male\", \"passengerClass:1st\"), \n                            nrecs = 12) %>%\n  SMRMonJoinAcross( data = dfTitanic, by = \"id\") %>%\n  SMRMonEchoValue\n```\n\n------\n\n## Recommender comparison project\n\nThe project repository \"Scalable Recommender Framework\", [AAr1],\nhas documents, diagrams, tests, and benchmarks of a recommender system implemented in multiple programming languages.\n\nThis Python recommender package is a decisive winner in the comparison -- see the first 10 min of \nthe video recording [AAv1] or the benchmarks at [AAr1].\n\n------\n\n## Code generation with natural language commands\n\n### Using grammar-based interpreters\n\nThe project \"Raku for Prediction\", [AAr2, AAv2, AAp6], has a Domain Specific Language (DSL) grammar and interpreters \nthat allow the generation of SMR code for corresponding Mathematica, Python, R, and Raku packages. \n\nHere is Command Line Interface (CLI) invocation example that generate code for this package:\n\n```shell\n> ToRecommenderWorkflowCode Python 'create with dfTitanic; apply the LSI functions IDF, None, Cosine;recommend by profile 1st and male' \nobj = SparseMatrixRecommender().create_from_wide_form(data = dfTitanic).apply_term_weight_functions(global_weight_func = \"IDF\", local_weight_func = \"None\", normalizer_func = \"Cosine\").recommend_by_profile( profile = [\"1st\", \"male\"])\n```\n\n### NLP Template Engine\n\nHere is an example using the NLP Template Engine, [AAr2, AAv3]:\n\n```mathematica\nConcretize[\"create with dfTitanic; apply the LSI functions IDF, None, Cosine;recommend by profile 1st and male\", \n \"TargetLanguage\" -> \"Python\"]\n\n(*\n\"smrObj = (SparseMatrixRecommender()\n .create_from_wide_form(data = None, item_column_name=\\\"id\\\", columns=None, add_tag_types_to_column_names=True, tag_value_separator=\\\":\\\")\n .apply_term_weight_functions(\\\"IDF\\\", \\\"None\\\", \\\"Cosine\\\")\n .recommend_by_profile(profile=[\\\"1st\\\", \\\"male\\\"], nrecs=profile)\n .join_across(data=None, on=\\\"id\\\")\n .echo_value())\"\n*)\n```\n\n\n------\n\n## References\n\n### Articles\n\n[AA1] Anton Antonov,\n[\"Mapping Sparse Matrix Recommender to Streams Blending Recommender\"](https://github.com/antononcube/MathematicaForPrediction/blob/master/Documentation/MappingSMRtoSBR/Mapping-Sparse-Matrix-Recommender-to-Streams-Blending-Recommender.pdf)\n(2017),\n[MathematicaForPrediction at GitHub](https://github.com/antononcube/MathematicaForPrediction).\n\n### Mathematica/WL and R packages \n\n[AAp1] Anton Antonov, \n[Monadic Sparse Matrix Recommender Mathematica package](https://github.com/antononcube/MathematicaForPrediction/blob/master/MonadicProgramming/MonadicSparseMatrixRecommender.m),\n(2018),\n[MathematicaForPrediction at GitHub](https://github.com/antononcube/MathematicaForPrediction).\n\n[AAp2] Anton Antonov,\n[Sparse Matrix Recommender Monad in R](https://github.com/antononcube/R-packages/tree/master/SMRMon-R)\n(2019),\n[R-packages at GitHub/antononcube](https://github.com/antononcube/R-packages).\n\n[AAp3] Anton Antonov,\n[Sparse Matrix Recommender framework interface functions](https://github.com/antononcube/R-packages/tree/master/SparseMatrixRecommenderInterfaces)\n(2019),\n[R-packages at GitHub/antononcube](https://github.com/antononcube/R-packages).\n\n[AAp4] Anton Antonov,\n[Latent Semantic Analysis Monad in R](https://github.com/antononcube/R-packages/tree/master/LSAMon-R)\n(2019),\n[R-packages at GitHub/antononcube](https://github.com/antononcube/R-packages).\n\n### Python packages\n\n[AAp5] Anton Antonov,\n[SSparseMatrix package in Python](https://github.com/antononcube/Python-packages/tree/master/SSparseMatrix)\n(2021),\n[Python-packages at GitHub/antononcube](https://github.com/antononcube/Python-packages).\n\n[AAp6] Anton Antonov,\n[LatentSemanticAnalyzer package in Python](https://github.com/antononcube/Python-packages/tree/main/LatentSemanticAnalyzer)\n(2021),\n[Python-packages at GitHub/antononcube](https://github.com/antononcube/Python-packages).\n\n### Raku packages\n\n[AAp6] Anton Antonov,\n[DSL::English::RecommenderWorkflows Raku package](ttps://github.com/antononcube/Raku-DSL-English-RecommenderWorkflows),\n(2018-2022),\n[GitHub/antononcube](https://github.com/antononcube/Raku-DSL-English-RecommenderWorkflows).\n([At raku.land]((https://raku.land/zef:antononcube/DSL::English::RecommenderWorkflows))).\n\n### Repositories\n\n[AAr1] Anton Antonov,\n[Scalable Recommender Framework project](https://github.com/antononcube/Scalable-Recommender-Framework-project),\n(2022)\n[GitHub/antononcube](https://github.com/antononcube).\n\n[AAr2] Anton Antonov,\n[\"Raku for Prediction\" book project](https://github.com/antononcube/RakuForPrediction-book),\n(2021-2022),\n[GitHub/antononcube](https://github.com/antononcube).\n\n### Videos\n\n[AAv1] Anton Antonov,\n[\"TRC 2022 Implementation of ML algorithms in Raku\"](https://www.youtube.com/watch?v=efRHfjYebs4),\n(2022),\n[Anton A. Antonov's channel at YouTube](https://www.youtube.com/channel/UC5qMPIsJeztfARXWdIw3Xzw).\n\n[AAv2] Anton Antonov,\n[\"Raku for Prediction\"](https://www.youtube.com/watch?v=frpCBjbQtnA),\n(2021),\n[The Raku Conference (TRC) at YouTube](https://www.youtube.com/channel/UCnKoF-TknjGtFIpU3Bc_jUA).\n\n[AAv3] Anton Antonov,\n[\"NLP Template Engine, Part 1\"](https://www.youtube.com/watch?v=a6PvmZnvF9I),\n(2021),\n[Anton A. Antonov's channel at YouTube](https://www.youtube.com/channel/UC5qMPIsJeztfARXWdIw3Xzw).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Sparse Matrix Recommender package based on SSparseMatrix objects.",
    "version": "0.1.9",
    "project_urls": {
        "Homepage": "https://github.com/antononcube/Python-packages/tree/main/SparseMatrixRecommender"
    },
    "split_keywords": [
        "sparse",
        "matrix",
        "recommender",
        "sparse matrix recommender",
        "linear algebra",
        "linear",
        "algebra",
        "recommendations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57998928c12a94be4371612f3af0db56b81cf4deeaf636d37cd6ed3ff2f9ea61",
                "md5": "706d231965338b1bfb85d87184b4ce8d",
                "sha256": "e52ee2bc1da1e29c8798e0f7ab4ceb4f11b270ecf3b24b5dd541a190ab4276d4"
            },
            "downloads": -1,
            "filename": "SparseMatrixRecommender-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "706d231965338b1bfb85d87184b4ce8d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 116692,
            "upload_time": "2023-10-20T13:33:18",
            "upload_time_iso_8601": "2023-10-20T13:33:18.482596Z",
            "url": "https://files.pythonhosted.org/packages/57/99/8928c12a94be4371612f3af0db56b81cf4deeaf636d37cd6ed3ff2f9ea61/SparseMatrixRecommender-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89acbe47589cd33d4576e878dcf7d4dc6d314de5c98e1951e3bcd79c23e192d2",
                "md5": "e6c5fdcac858aed9a423e5f037f809c2",
                "sha256": "fb1534cc674aaf4fe39d91169878d5d3384132370e0b4399812bdcbd6d81b93b"
            },
            "downloads": -1,
            "filename": "SparseMatrixRecommender-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "e6c5fdcac858aed9a423e5f037f809c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 121639,
            "upload_time": "2023-10-20T13:33:20",
            "upload_time_iso_8601": "2023-10-20T13:33:20.139478Z",
            "url": "https://files.pythonhosted.org/packages/89/ac/be47589cd33d4576e878dcf7d4dc6d314de5c98e1951e3bcd79c23e192d2/SparseMatrixRecommender-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-20 13:33:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "antononcube",
    "github_project": "Python-packages",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "sparsematrixrecommender"
}
        
Elapsed time: 0.14004s