def __init__(self, X, Y, kernel=None, noise_var=<NUM_LIT:1.0>, kalman_filter_type = '<STR_LIT>', use_cython = False, balance=False, name='<STR_LIT>'):
super(StateSpace, self).__init__(name=name)<EOL>if len(X.shape) == <NUM_LIT:1>:<EOL><INDENT>X = np.atleast_2d(X).T<EOL><DEDENT>self.num_data, self.input_dim = X.shape<EOL>if len(Y.shape) == <NUM_LIT:1>:<EOL><INDENT>Y = np.atleast_2d(Y).T<EOL><DEDENT>assert self.input_dim==<NUM_LIT:1>, "<STR_LIT>"<EOL>if len(Y.shape)==<NUM_LIT:2>:<EOL><INDENT>num_data_Y, self.output_dim = Y.shape<EOL>ts_number = None<EOL><DEDENT>elif len(Y.shape)==<NUM_LIT:3>:<EOL><INDENT>num_data_Y, self.output_dim, ts_number = Y.shape<EOL><DEDENT>self.ts_number = ts_number<EOL>assert num_data_Y == self.num_data, "<STR_LIT>"<EOL>assert self.output_dim == <NUM_LIT:1>, "<STR_LIT>"<EOL>self.kalman_filter_type = kalman_filter_type<EOL>ss_setup.use_cython = use_cython<EOL>self.balance = balance<EOL>global ssm<EOL>if (ssm.cython_code_available) and (ssm.use_cython != ss_setup.use_cython):<EOL><INDENT>reload(ssm)<EOL><DEDENT>sort_index = np.argsort(X[:,<NUM_LIT:0>])<EOL>self.X = X[sort_index,:]<EOL>self.Y = Y[sort_index,:]<EOL>self.likelihood = likelihoods.Gaussian(variance=noise_var)<EOL>if kernel is None:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.kern = kernel<EOL><DEDENT>self.link_parameter(self.kern)<EOL>self.link_parameter(self.likelihood)<EOL>self.posterior = None<EOL>if not hasattr(self.kern, '<STR_LIT>'):<EOL><INDENT>raise NotImplementedError('<STR_LIT>')<EOL><DEDENT>
Inputs:
------------------

balance: bool
Whether to balance or not the model as a whole