How to improve plot

조회 수: 5 (최근 30일)
Shikhar Singh
Shikhar Singh 2022년 4월 22일
답변: Voss 2022년 4월 22일
I have ran logistic regression using gradient descent and obtained values for my cost function. Since I ran 100000 iterations, it computed 100000 values for my cost function which I am trying to plot against the number of iterations ran. I have plotted using the following code:
plot(1:length(cost),cost,'r.')
This resulted in the following plot:
Is there any better way to plot this, so that the minimisation can be better seen converging to a final value? Since there are 100000 data points for the x axis, MATLAB squeezes them all in to fit a smaller scale. Would there be any better way to modify this to present the information better?

답변 (1개)

Voss
Voss 2022년 4월 22일
semilogy comes to mind.

카테고리

Help CenterFile Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by