Question about supporting multi variable anomaly detection

question

#1

Hi HTM experts.

I’m a novice about HTM, this is first time, and I’ve been tested htm.java-example.

I’ve been used HTM studio, and I feel it’s great.
But it could analysis just single variable from my csv file.

I wonder it is possible that finding anomaly automatically from multiple(dependent) variable inputs, if I use htm.java.

It means,
if my input has 2 dependent variable (e.g. A and B) then HTM can learning their’s correlation itself, and detect anomaly.
Does anyone know about this?
If it possible, could you let me know any example code repository or API names.
Please help me :sob:

ex input)
timestamp,A,B
20:46:01,2,4
20:46:02,3,6
20:46:03,4,7
20:46:04,2,4

ex output)
score
0
0
0.25
0


#2

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](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.
    }

    
    
}