> ## Documentation Index
> Fetch the complete documentation index at: https://shapely.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Encoder

>  Encoder converts categorical (text-based) data into numerical values that machine learning algorithms can process. It transforms labels like "Residential", "Commercial", "Industrial" into numbers like " 0, 1, 2 " .

This is an essential preprocessing step because ML models only work with numerical inputs. 

<Note>
  Always use the Encoder **before** training a model if your data contains text-based categories. The encoded values must remain consistent between training and prediction.

  * **Label Encoder** : True
  * **One Hot Encoder** : False
</Note>

<a href="/images/ML/Encoder.png" target="_blank">
  <img src="https://mintcdn.com/shapely/asBiXHBRV0o--5dI/images/ML/Encoder.png?fit=max&auto=format&n=asBiXHBRV0o--5dI&q=85&s=5efd5812926311b97ddca5e2903f757c" className="pointer-events-none" style={{ borderRadius: '0.5rem', border: '1px solid rgba(0,0,0,0.1)' }} width="1901" height="850" data-path="images/ML/Encoder.png" />
</a>
