> For the complete documentation index, see [llms.txt](https://mugdha-thanawala.gitbook.io/tkmt_package/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mugdha-thanawala.gitbook.io/tkmt_package/guides/ensemble-learning-techniques/voting-classifier.md).

# Voting Classifier

**Multiple models are used to make predictions for each data point. The predictions by each model are considered as a ‘vote’. The predictions obtained from the majority of the models are used as the final prediction.**

{% hint style="info" %}
`from tkmt_package.ensemble import votingClassifer`
{% endhint %}

Fitting the Model

Trains the input and output data.

{% hint style="info" %}
`votingClassifer.get_fit(X_train, y_train)`
{% endhint %}

```python
 Parameters
 ----------
 X_train: input training data
 y_train: output training data

 Example
---------
   >>> from tkmt_package.ensemble import votingClassifer
   >>> vc = votingClassifer()
   >>> vc.get_fit(X_train,y_train)
```

Making Predictions&#x20;

{% hint style="info" %}
`votingClassifer.get_predict(X_test)`
{% endhint %}

Tests the input and output data and makes predictions.&#x20;

```python
Parameters
----------
X_test: input testing data 
 
Example
---------
>>> from tkmt_package.ensemble import votingClassifer
>>> vc = votingClassifer()
>>> y_pred = vc.get_predict(X_test)
```
