You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: learn_struct_gs_dtab.m
    path of file: ./repos/bnt/SLP/scoring/score_dag.c
    
    the code of the file until where you have to start completion: function [dag,best_score] =	learn_struct_gs_dtab(data, nodesizes, seeddag, varargin)
%
% LEARN_STRUCT_GS(data,seeddag)	learns a structure of Bayesian net by Greedy Search.
% dag =	learn_struct_gs(data, nodesizes, seeddag)
%
% dag: the final structurre	matrix
% Data : training data,	data(i,m) is the m obsevation of node i
% Nodesizes: the size array	of different nodes
% seeddag: given seed Dag for hill climbing, optional
%

    
function [dag,best_score] =	learn_struct_gs_dtab(data, nodesizes, seeddag, varargin)
%
% LEARN_STRUCT_GS(data,seeddag)	learns a structure of Bayesian net by Greedy Search.
% dag =	learn_struct_gs(data, nodesizes, seeddag)
%
% dag: the final structurre	matrix
% Data : training data,	data(i,m) is the m obsevation of node i
% Nodesizes: the size array	of different nodes
% seeddag: given seed Dag for hill climbing, optional
%
% by Gang Li @ Deakin University (gli73@hotmail.com)
%
% -----------------------------------------------------
%
% Modified from	learn_struct_gs (SLP 1.3)
% to learn structure of	BN with	tabular	nodes:
%
% 1) make use of score decomposibility 
% 2) still to do
%
% by Darima	<darrimma@yahoo.com>, 27/12/2005
%

[N ncases] = size(data);
if (nargin < 3 ) 
	seeddag	= zeros(N,N); %	mk_rnd_dag(N); %call BNT function
elseif ~acyclic(seeddag)
	seeddag	= mk_rnd_dag(N); %zeros(N,N);
end