Instantly share code, notes, and snippets.

💭
Brainstorming with myself

# Serafeim Loukas seralouk

💭
Brainstorming with myself
Created April 24, 2024 14:11
A Movie Recommendation System in Python from Scratch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 mean_rating = ratings.groupby('movieId')[['rating']].mean() mean_rating = mean_rating.reset_index() mean_rating
Created March 9, 2020 12:35 — forked from fabianp/partial_corr.py
Partial Correlation in Python (clone of Matlab's partialcorr)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 """ Partial Correlation in Python (clone of Matlab's partialcorr) This uses the linear regression approach to compute the partial correlation (might be slow for a huge number of variables). The algorithm is detailed here: http://en.wikipedia.org/wiki/Partial_correlation#Using_linear_regression Taking X and Y two variables of interest and Z the matrix with all the variable minus {X, Y},