Item-based recommender using K-NN
You can define a custom distance metric using the metric parameter from sklearns KNeighborsClassifier where you can specify your callable function that gets called when calculating the distances from the algorithm. There you can weigh var_3 inversely proportional.