Package: prediction-sys
Explaining the main calssIn Machine Learning, there is an extended class of web applications that involve predicting user responses to options. Such an installation is called a recommender system.Recommendation systems are widely used today to recommend products to users based on their interests. A recommendation system is one of
the strongest systems for increasing profits by retaining more users in a very big competition. In the previous examples i showed u how
to build system Recommendation for multiple type of file (CSV , Json , MongoDB , SalAlchemy) and using different module (TFIDF and KNN)
using only one class(wraper) that can fit to all this type of files and modulesThe Recommendation system classThe classSysRecommenadtiontake only the Dataset as a parameterSysRecommenadtion(dataset_name)and different methode such as:The Build methode:build(model , SysRecMethode)Themodelwhich it is the model for recommendation we have builtand theSysRecMethodeits the type of algorithme we chouse (TFIDF or KNN) and if not chousen it will take the KNN algorithme as a default valueSo now if the KNN algorithme is chousen the methodefeaturesis gona be required so it can fit with the model using the KNN    algorithme it will make the build and get a list of the cousine simliarities which is gona be use in the prediction of the    Recommendation systemAnd now if the TFIDF algorithme is been used nothing is recuired but the model which is gona be the TFIDF matrix using theTfidfVectorizerand thetfidf.fit_transformto build and get a list of the cousine simliarities which is gona be use in the prediction of the Recommendation systemThe Prediction methode:When this function is called, we will have to pass the value (Movie title , restaurent name ....) to it. The model will try to find results based on the features. We’ll store those results that the system recommends in a list and return them at the end:predict(value, key, keys)The predict methode is gonna return a list of Recommendation based on thevaluegiven (Movie title , restaurent name ....) and thekeyis the column name you wan to show  (the title or the name for example) and if u wan to show multiple column at one use thekeysparameter and give it a list of the column to showpredict(value='Spice Elephant' ,keys=['cuisines','Mean Rating', 'cost'])First of all the key or the keys must be provided so it can do the prediction and get the list of Recommendation and then we hae two choices:Using the KNN algorithme:
We use the KNN algorithm to build our Recommendation system with Machine Learning using Python by getting the id from the source which have the same id's as the value given and return the list of results based on the value givenUsing the TFIDF algorithme:
We use the TFIDF algorithm to build our Recommendation system with Machine Learning using Python using the indice of the value given to get the similiaries result based on the value given by using the cosins similiarities and return the list of recomendationnote:Theindicesmethode must be provided for the TFIDF algorithme so its can do the predection and get the result listUse Thethresholdmethode to provide the number of the results u wan to show