Partially hydrolyzed polyacrylamides (HPAM) are widely used to modulate the viscosity of formulations. The appropriate application of a viscosity model can facilitate the idealization of new macromolecules and contribute to a better understanding of the structure-property relationship. In the present study, machine learning approaches, Multiple Linear Regression (MLR) and Random Forest (RF), were compared to model the viscosifying effect of HPAM derivatives, based on their chemical composition and concentration in an aqueous solution. The evaluated data come from a previous experimental study, which explores a post-synthetic polymer modification methodology. The relative importance of the variables was investigated, determining the features with the greatest influence on viscosity, including variations in chemical composition, with emphasis on the more hydrophobic groups (C7 and C12). The accuracy of the models was evaluated using statistical criteria, the coefficient of determination (R2) and the Root Mean Square Error (RMSE). The Random Forest approach outperformed Multiple Linear Regression, with values of 0.97 and 0.30 for R2 and RMSE, respectively, compared to 0.83 and 0.67 for Multiple Linear Regression. Applying the Random Forest model, it was possible to generate a set of hypothetical macromolecules, with potential viscosifying effects. These macromolecules were idealized focusing on mixed compositions of C7 and C12 with a maximum structural variation of 10 mol%. Additionally, this structural mapping provided insights for designing promising polymers by inserting cyclic structures, such as CYCLOPROP, which could overcome the solubility limitation observed in the literature.