Jointly L21-regularized and L01-constrained Multitask Lasso models package 
------------------------------------

Copyright (c) 2017 Liang Zhao
George Mason University


Please cite the following paper in any work that uses this material:

@article{zhao2017feature,
  title={Feature constrained multi-task learning models for spatiotemporal event forecasting},
  author={Zhao, Liang and Sun, Qian and Ye, Jieping and Chen, Feng and Lu, Chang-Tien and Ramakrishnan, Naren},
  journal={IEEE Transactions on Knowledge and Data Engineering},
  volume={29},
  number={5},
  pages={1059--1072},
  year={2017},
  publisher={IEEE}
}

The Multitask Lasso models package is a free software; you can 
redistribute it and/or modify it under the terms of the GNU General Public 
License as published by the Free Software Foundation; either current version of the 
License, or (at your option) any later version.

The Multitask Lasso models package is distributed in the hope that it will 
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
License for more details.

You should have received a copy of the GNU General Public License along 
with this software; if not, write to the Free Software Foundation, Inc., 
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

================================================================================

1. Introduction
---------------

This software package includes implementations of a Regularized MTFL model, described in the paper above. 
Please refer to the papers for an overview of the models. The command line 
parameters for this software will follow the notation from the papers.


2. Revision History
-------------------

v0.1:  Mar 6, 2019 - Initial release.


3. Environment Requirement
---------------

Matlab 2011 or newer version


4. Example Usage
--------

To run the code, run the following command lines:

% for training
>> load('data.mat')
>> [Ws,c2p_dict] = CMTFL_III_train(X_tr,Y_tr,5,6,1)
% for predicting
>> [pred_Ys] = CMTFL_III_predict(X_te,Y_te,Ws,6,locs)

5. Input Format of run_MTL
---------------

X_tr: a cell vector <1*t cell> denoting the inputs for t tasks on training set. Each cell is a matrix whose columns denote the features and rows denote the time intervals.
Y_tr: a cell vector <1*t cell> denoting the output t tasks on training set. Each cell is a matrix whose rows denote the time intervals. In the matrix, the value 0 and 1 denote nonexistent and existent of event on current time interval, respectively.
X_te: a cell vector <1*t cell> denoting the input t tasks on training set. Each cell is a matrix whose rows denote the time intervals.
Y_te: a cell vector <1*t cell> denoting the output t tasks on training set. Each cell is a matrix whose rows denote the time intervals. In the matrix, the value 0 and 1 denote nonexistent and existent of event on current time interval, respectively.
locs: a cell vector <1*t cell> denoting the names of the t tasks.
init: a boolean value denoting whether or not we update the initial parameters.
numD: number of features under L01 norm constraint (i.e., W_D in % Equation (6) in the paper.
conD: upper bound of the selected features under L01 norm % constraint (i.e., v in Euquation (6) in the paper.
lambda: regularization parameter for L21 norm.

6. Output Format
----------------
Ws: weights matrix for all the t tasks.
pred_Ys: predicted results for all the t tasks.



