Factor Investing, Dimensionality Reduction, Sklearn, Python.
but there’s a better option Instead of specifying the number of principle components we want to preserve, and set n_component. #Choosing the Right Number of Dimensions df_rank["Outperform"] = np.where(df_rank['Alpha'] > 0.75, 1, 0) X_train, y_train =