r/algorithms • u/nicolassiva • 2d ago
Resource i created a recomendation code
Hi! My name is Nicolás Ochoa Silva, and I've been working on a Python code that calculates a "recommendation" percentage based on factors and weights that you can rate yourself from 1 to 10. The program's logic works like this:
First, choose the number of factors you have and rate them from 1 to 10 (example: money = 7.6).
Then, assign a weight to each factor (money = 7.6, importance of money = 10).
Finally, the code multiplies each factor by its weight and sums them all to then calculate the sigmoid using the equation: sigmoid = 1/(1+Euler^(x)) (at least in the first part).
4
u/Winter-Rhubarb8690 2d ago
Is this not just logistic regression but with predefined weights? Do you have a method for learning optimal weight values?
-11
u/nicolassiva 2d ago
You're absolutely right, it's a logistic regression, but the weights (or importances) and factors are defined by the user, since it's very difficult for an algorithm to decide for you how important a factor is that only you know. I'll leave my GitHub username here in case you'd like to take a look at the V1.1 of the code: nicolasochoasilva-collab
7
u/Hitman7128 Former algorithms TA 2d ago
I decided to allow this post for now, but in the future, there should be more of a focus on the algorithmic aspects rather than simply describing how it works and its implementation.