Rohmad Hidayat's Blog

Icon

My Notes on Mobile Technology, Python GUI, Python Web Framework, Software Development, Database, Server, Embedded System, Mini Computer

Least Squares Fitting–Polynomial

Least Squares Fitting–Polynomial adalah metode untuk melakukan fitting data sehingga didapatkan pola grafik data. ada beberapa metode fitting, diantaranya adalah polynomial fitting dan linear regression. linier regression cocok untuk data yang berupa straight line/linier. informasi lebih lanjut bisa dibaca di http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html. untuk Linier dapat di lihat di http://mathworld.wolfram.com/LeastSquaresFitting.html. implementasi polynomial fiiting di python dapat dilakukan dg cara sbb:

>>x=[1,2,3,4,5]
>>y=[1, 5.5, 7, 12, 28]
>>polc=scipy.polifit(x,y,2)
>>poly=scipy.polyval(polc,x)
>>pylab.plot(x,y,’bo’)
>>pylab.plot(x,poly,’r’)
>>pylab.show()

tampilan grafis dapat dilihat secara langsung

Advertisements

Filed under: Programming, Python

One Response

  1. otri says:

    thanks bro, ini sangat membantu, btw ada yang buat IDL gimana ya??

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: