Machine Learning tools
ML.py module
API reference
- pyphyschemtools.ML.categorizeY_2ohe(Ctot, y1, y2)[source]
one-hot-encodes a pandas column of categorical data
input:
Ctot is the reference pandas column, necessary to find all unique categories in this column
y1 and y2 are the actual pandas column that will be categorized. y1 and y2 are supposed to be the ytest and ytrain subsets of Ctot
output:
y1ohe and y2ohe are the numpy arrays returned by this routine