# Prediction of Eudaimonic and Hedonic Orientation of Movie Watchers
## 3 Methods and Materials
### Machine-Learning Workflow
\begin{table}
\begin{tabular}{c c l l} \hline \hline
**Model** & **Scaled** & **Parameters** & **Tested Values** \\ \hline Ridge & ✓ & alpha (regularization parameter) & 0, 0, 0.001, 0.001, 0.1, 1, 5, 10 \\ \hline \multirow{4}{*}{SVC} & & Kernel & linear, rbf, poly \\ \cline{3-4}  & ✓ & C & 0.001, 0.01, 0.1, 10, 100, 100 \\ \cline{3-4}  & & gamma & 0.001, 0.01, 0.1, 1 \\ \hline \multirow{4}{*}{KNeighborsClassifier} & & n\_neighbors & 3, 5, 7, 9 \\ \cline{3-4}  & ✓ & weights & uniform, distance \\ \cline{3-4}  & & algorithm & ball\_tree, kd\_tree, brute \\ \cline{3-4}  & & p & 1, 2 \\ \hline \multirow{4}{*}{DecisionTreeClassifier} & & criterion & gini, entropy \\ \cline{3-4}  & & splitter & best, random \\ \cline{3-4}  & & max\_depth & 1, 3, 5, 7, 9, 11, 12 \\ \cline{3-4}  & & min\_weight\_fraction\_leaf & 0.1, 0.2, 0.3, 0.4, 0.5 \\ \cline{3-4}  & & max\_features & auto, log2, sqrt, None \\ \cline{3-4}  & & max\_leaf\_nodes & None, 10, 20, 30, 40, 50, 60, 70, 80, 90 \\ \hline \multirow{4}{*}{RandomForestClassifier} & & n\_estimators & 1, 5, 9, 13, 17, 20 \\ \cline{3-4}  & & max\_depth & 1, 5, 9, 13, 17, 20 \\ \cline{3-4}  & & min\_samples\_split & 2, 3, 4, 5, 10 \\ \cline{3-4}  & & min\_samples\_leaf & 1, 2, 4 \\ \cline{3-4}  & & bootstrap & True, False \\ \hline \multirow{4}{*}{XGBClassifier} & & max\_depth & 3, 4, 5, 6, 7, 8, 9, 10, 11 \\ \cline{3-4}  & & min\_child\_weight & 1, 2, 3, 4, 5, 6, 7 \\ \cline{1-1} \cline{3-4}  & & eta & 0.001, 0.01, 0.1, 0.2, 0.5, 0.3, 1 \\ \cline{1-1} \cline{3-4}  & & subsample & 0.7, 0.8, 0.9, 1.0 \\ \cline{1-1} \cline{3-4}  & & colsample\_bytes & 0.7, 0.8, 0.9, 1.0 \\ \cline{1-1} \cline{3-4}  & & objective & reg:squarederror \\ \hline \hline \end{tabular}
\end{table} 
Table 3: ML models and hyperparameters (classification problem). Except for XGBRegressor, Scikit-learn was used to implement all models ([[https://scikit-learn.org/stable/](https://scikit-learn.org/stable/)]([https://scikit-learn.org/stable/](https://scikit-learn.org/stable/)), accessed on 15 September 2022). Python’s xgboost library was used to implement XGBRegressor. ([[https://xgboost.readthedocs.io/en/stable/parameter.html](https://xgboost.readthedocs.io/en/stable/parameter.html)]([https://xgboost.readthedocs.io/en/stable/parameter.html](https://xgboost.readthedocs.io/en/stable/parameter.html)), accessed on 15 September 2022). We trained seven machine-learning algorithms to predict the EHO values of users: Lasso, Ridge, SVR, K-nearest neighbors, decision tree, random forest and gradient boosted trees (XGBoost). We selected these models to investigate a range of models, including linear and non-linear models. Given the fact that the choice of different hyper parameters may change the results considerably, we chose a varied range of values for different hyper parameters [30]. The list of machine-learning algorithms and the corresponding hyper parameters is provided in Table 2. In this paper, we also define two classification problems. One for predicting users' classes based on their eudaimonic orientation: (i) high eudaimonic oriented, (ii) low eudaimonic oriented; the other for predicting users' classes based on their hedonic orientation: (i) high hedonic oriented, (ii) low hedonic oriented. The list of machine-learning algorithms and the hyper parameters of the classification problem is provided in Table 3.