# Question about supporting multi variable anomaly detection

**URL:** <https://discourse.numenta.org/t/question-about-supporting-multi-variable-anomaly-detection/2655>\
**Category:** HTM.Java\
**Tags:** question\
**Created:** [August 8, 2017, 11:53am UTC](https://discourse.numenta.org/t/question-about-supporting-multi-variable-anomaly-detection/2655 "2017-08-08T11:53:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Matheus\_Araujo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/matheus_araujo/32/3137_2.png) [@Matheus\_Araujo](https://discourse.numenta.org/u/Matheus_Araujo)\
**Post date:** [September 19, 2018, 4:05pm UTC](https://discourse.numenta.org/t/question-about-supporting-multi-variable-anomaly-detection/2655/2 "2018-09-19T16:05:49Z")

</div>

I’m also new to HTM and I also intend to do the same.  
I think we should implement a custom encoder that takes the two varyables as input in order to do that. Take a look at the CoordinateEncoder and try to figure it out. In order to implement a custom Encoder you should inherit from Encoder class.

Found this topic on writing your own custom Encoder: [[Writing a custom encoder](https://discourse.numenta.org/t/writing-a-custom-encoder/759)]([http://Writing](http://Writing) a custom encoder)

Bellow is a scheleton of a custom Encoder automatically generated by Netbeans:

> ```
> /*
> * To change this license header, choose License Headers in Project Properties.
> * To change this template file, choose Tools | Templates
> * and open the template in the editor.
> */
> package org.numenta.nupic.examples.napi.hotgym;
> 
> import java.util.List;
> import org.numenta.nupic.encoders.Encoder;
> 
> /**
> *
> * @author My Self
> */
> public class MyCustomEncoder extends Encoder{
> 
> @Override
> public int getWidth() {
> throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
> }
> 
> @Override
> public boolean isDelta() {
> throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
> }
> 
> @Override
> public void encodeIntoArray(Object inputData, int[] output) {
> throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
> }
> 
> @Override
> public List getBucketValues(Class returnType) {
> throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
> }
> 
>     
>     
> }
> 
> ```

---

_[View the full topic](https://discourse.numenta.org/t/question-about-supporting-multi-variable-anomaly-detection/2655)._
