private void findCosineSimilarity(double[] activeUser) {          // Add Logic to check that not all elements are same otherwise Wau =0 
        for (int user = 0; user < totalUsers; user++) {

            double innerProduct = 0;
            double lengthOfActiveUser = 1;
            double lengthofUser = 1;
            for (int movie = 0; movie < totalMovies; movie++) {
                if (activeUser[movie] > 0 && ratings[user][movie] > 0) {  //(activeUser[movie] - activeUserAverage) add logic to rectify this to be 0
                    innerProduct += ((activeUser[movie]*IUF[movie]) - (activeUserAverage*IUF[movie]) )* ((ratings[user][movie]*IUF[movie]) - (averageOfUser[user]*IUF[movie]));
                    lengthOfActiveUser += Math.pow(((activeUser[movie]*IUF[movie]) - (activeUserAverage*IUF[movie])), 2);
                    lengthofUser += Math.pow(((ratings[user][movie]*IUF[movie]) - (averageOfUser[user]*IUF[movie])), 2);
                    
                   
                    
                    
                }
            }

            similarity[user] = innerProduct / (Math.sqrt(lengthOfActiveUser) * Math.sqrt(lengthofUser));
            if (similarity[user] == 0 && (isElementAverageInActiveUser(activeUser) || isElementAverage(user))) {                                
                similarity[user] = cosineSimilarity(user, activeUser);
                
            }
            similarity[user] = applyCaseAmplification(similarity[user]);

        }
        sortUsers();
    }