jSmile - learning network from multiple DataSet objects

The engine.
Post Reply
shashanka
Posts: 7
Joined: Tue Oct 07, 2014 8:59 pm

jSmile - learning network from multiple DataSet objects

Post by shashanka »

Hi,

I have several records from each day and I'm trying to learn a network from the past seven days of data. The goal is to perform inference on the 8-th day. However, every day the training window advances by one day. I don't want to recreate the DataSet object from scratch every time the training window changes - ideally it would be nice if I could delete the records from the first day from the training data and append records from the last day. The other option is to create separate DataSet objects for each day and learn a network from multiple DataSet objects. I appreciate any advice if I can do either of these.

Thanks!
MarcinK
Posts: 8
Joined: Thu Oct 16, 2014 3:11 pm

Re: jSmile - learning network from multiple DataSet objects

Post by MarcinK »

shashanka wrote:Hi,

I have several records from each day and I'm trying to learn a network from the past seven days of data. The goal is to perform inference on the 8-th day. However, every day the training window advances by one day. I don't want to recreate the DataSet object from scratch every time the training window changes - ideally it would be nice if I could delete the records from the first day from the training data and append records from the last day. The other option is to create separate DataSet objects for each day and learn a network from multiple DataSet objects. I appreciate any advice if I can do either of these.

Thanks!
In DSL_dataset class there is a method

Code: Select all

int RemoveRecord(int rec);
It is not described in the documentation, but it appears in header (dataset.h) file so it is available.

To add a record You can use the following:

Code: Select all

	void AddEmptyRecord();
//...
	void SetInt(int var, int rec, int value)
	{
		DS_VALIDATE_IDX(var, rec);
		assert(IsDiscrete(var));
		(*static_cast<std::vector<int> *>(data[var]))[RealIdx(rec)] = value;
	}

	void SetFloat(int var, int rec, float value)
	{
		DS_VALIDATE_IDX(var, rec);
		assert(!IsDiscrete(var));
		(*static_cast<std::vector<float> *>(data[var]))[RealIdx(rec)] = value;
	}
--Marcin
shashanka
Posts: 7
Joined: Tue Oct 07, 2014 8:59 pm

Re: jSmile - learning network from multiple DataSet objects

Post by shashanka »

Thanks Marcin!
shashanka
Posts: 7
Joined: Tue Oct 07, 2014 8:59 pm

Re: jSmile - learning network from multiple DataSet objects

Post by shashanka »

MarcinK wrote: In DSL_dataset class there is a method

Code: Select all

int RemoveRecord(int rec);
It is not described in the documentation, but it appears in header (dataset.h) file so it is available.
MarcinK,

I'm using jSmile and the method is not there.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: jSmile - learning network from multiple DataSet objects

Post by shooltz[BayesFusion] »

shashanka wrote:I'm using jSmile and the method is not there.
Unfortunately, we do not expose the RemoveRecord in jSMILE. If you want to run learning using a subset of rows from existing DataSet, your only option is to create new DataSet object and fill its content programatically.
shashanka
Posts: 7
Joined: Tue Oct 07, 2014 8:59 pm

Re: jSmile - learning network from multiple DataSet objects

Post by shashanka »

Thanks! Are there any future plans to expand the set of methods exposed in jSMILE?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: jSmile - learning network from multiple DataSet objects

Post by shooltz[BayesFusion] »

shashanka wrote:Thanks! Are there any future plans to expand the set of methods exposed in jSMILE?
There are plans, but we do not have any realistic time estimates at this point.
Post Reply