Class PolySolve
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Panel
-
- java.applet.Applet
-
- javax.swing.JApplet
-
- jhplot.math.polysolve.PolySolve
-
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer
public final class PolySolve extends javax.swing.JApplet
Polynomial Regression Data Fit. For a given data set of x,y pairs, a polynomial regression of this kind can be generated:f(x)=c0+c1x+c2x2+c3x3...
In which c0,c1,c2... represent coefficients created by a mathematical procedure described in detail here. In this regression method, the choice of degree and the evaluation of the fit's quality depend on judgments that are left up to the user. It is well known about this class of regression method that an effort to squeeze more correlation out of the algorithm than the data can support will sometimes produce an out-of-control function that, although it matches the data points, wanders wherever it pleases between those points. Therefore, a "good" (approaching 1.0) correlation coefficient is not enough to assure a well-behaved or meaningful function. Decisions about a result's appropriateness is more a matter of judgment than mathematics. A "perfect" fit (one in which all the data points are matched) can be gotten by setting the degree of the regression to the number of data pairs minus one. But, depending on the nature of the data set, this can also sometimes produce the pathological result described above in which the function wanders freely between data points in order to match the data exactly.
For those seeking a standard two-element linear regression, select polynomial degree 1 below, and for the standard form —
f(x)=mx+b
b corresponds to be the first parameter listed in the results window below, and m to the second.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description java.awt.Color
dataColor
javax.swing.JTextArea
dataTextArea
java.awt.Color
lineColor
java.awt.Color
zeroColor
-
Constructor Summary
Constructors Constructor and Description PolySolve()
Main method to start the regression fit.PolySolve(double[] xx, double[] yy)
Main class to start the regression fit.PolySolve(H1D input)
Main method to start the regression fit.PolySolve(P1D input)
Main method to start the regression fit.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
BuildPolySolve(double[] xx, double[] yy)
Main method to start the regression fit.void
close()
void
generateTable()
void
init()
Initializes the applet PolySolvestatic void
main(java.lang.String[] args)
void
process(boolean update)
-
Methods inherited from class javax.swing.JApplet
getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
-
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
zeroColor
public java.awt.Color zeroColor
-
lineColor
public java.awt.Color lineColor
-
dataColor
public java.awt.Color dataColor
-
dataTextArea
public javax.swing.JTextArea dataTextArea
-
-
Constructor Detail
-
PolySolve
public PolySolve()
Main method to start the regression fit.
-
PolySolve
public PolySolve(P1D input)
Main method to start the regression fit.
-
PolySolve
public PolySolve(H1D input)
Main method to start the regression fit.
-
PolySolve
public PolySolve(double[] xx, double[] yy)
Main class to start the regression fit.
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
close
public void close()
-
BuildPolySolve
public void BuildPolySolve(double[] xx, double[] yy)
Main method to start the regression fit.
-
init
public void init()
Initializes the applet PolySolve- Overrides:
init
in classjava.applet.Applet
-
process
public void process(boolean update)
-
generateTable
public void generateTable()
-
-
DMelt 3.0 © DataMelt by jWork.ORG