Recently I have found an algorithm for learning DAG structure in bayesian network. The problem appears when I try to run the code and sen me the next issue: "Undefined function 'ConstructLGObj' for input arguments of type 'double'". This is the code of that function:
function LGObj = ConstructLGObj( OriginalSample )
LGObj.VarNumber = size( OriginalSample, 2);
LGObj.CaseLength = size( OriginalSample, 1);
LGObj.VarSample = OriginalSample;
[ LGObj.VarRange,LGObj.VarRangeLength ] = DimensionRangeValue( OriginalSample,1 : LGObj.VarNumber );
end
The Sample.mat file is a matrix of double. I have not found information about that data type (OriginalSample) and how can I solve this problem.

 채택된 답변

James Tursa
James Tursa 2015년 11월 18일

0 개 추천

The message you are getting indicates that MATLAB can't find the function. Check your path to see that this function is in a directory that can be seen from where you are running your code. Is this code in a file called ConstructLGObj.m? Or is this code maybe a subfunction of some other file that can only be seen by code in that file?

댓글 수: 1

Enrique Mote
Enrique Mote 2015년 11월 18일
편집: James Tursa 2015년 11월 18일
Thank you, the problem was the file's path. I changed it and the code worked!! Thank you so much :D

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

질문:

2015년 11월 18일

편집:

2015년 11월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by