필터 지우기
필터 지우기

Is it possible to obtain the script file for the fitlm function?

조회 수: 7 (최근 30일)
Gautam
Gautam 2014년 3월 18일
댓글: Shashank Prasanna 2014년 3월 20일
I need the script file for the fitlm, using the polyijk attribute, so that I can create my own modified function. Is that possible or should I necessarily use the one given by the Matlab statistics toolbox.

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 3월 20일
edit fitlm
And since fitlm is just a wrapper around LinearModel.fit:
edit LinearModel.fit

추가 답변 (1개)

Shashank Prasanna
Shashank Prasanna 2014년 3월 20일
편집: Shashank Prasanna 2014년 3월 20일
It is not entirely clear what you are requesting but if you have fit a linear model using fitlm as follows:
mdl = fitlm(...)
You can access the model function this way:
mdl.Formula.ModelFun
If you want to use an custom polynomial function you can type it out:
y ~ 1 + x1^2 ... so on
If you want to use an arbitrary function i recommend fitnlm :
  댓글 수: 2
Gautam
Gautam 2014년 3월 20일
Thanks for replying, but I was hoping to get the code for the function, not the function syntax.
Shashank Prasanna
Shashank Prasanna 2014년 3월 20일
Can you elaborate? its not very clear what you are asking for. What do you mean by code for the function? If it is code for fitlm, then see what Sean posted. If not please explain.

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

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by