UNPKG

js-polynomial-regression

Version:

A javascript library that predicts dependent variables using polynomial regression.

113 lines (100 loc) 2.96 kB
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF8"> <link href="css/nv.d3.css" rel="stylesheet" type="text/css"/> <style> .container { position: relative; display: block; width: 80%; margin-left: auto; margin-right: auto; top: 5px; -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.75); box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.75); } .header { position: relative; display: block; background: #303F9F; height: 40px; color: #fff; text-align: center; } .header>span { position: absolute; display: block; top: 50%; left: 50%; transform: translateY(-50%) translateX(-50%); -webkit-transform: translateY(-50%) translateX(-50%); -ms-transform: translateY(-50%) translateX(-50%); font-size: 20px; } .containInput { position: relative; display: block; background: #3F51B5; height: 50px; } .containInput>span { position: relative; display: inline-block; vertical-align: bottom; color: #eee; margin-left: 5px; bottom: -5px; } input[type=text] { position: relative; display: inline-block; height: 25px; width: 150px; font-size: 15px; border: none; border-bottom: 1px solid #fff; background-color: transparent; outline: none; bottom: -5px; text-align: center; color: #fff; } svg { position: relative; display: block; height: 320px !important; background: #eee; margin: 0 auto; width: 100%; } ::-webkit-input-placeholder { color: #eee; } :-moz-placeholder { /* Firefox 18- */ color: #eee; } ::-moz-placeholder { /* Firefox 19+ */ color: #eee; } :-ms-input-placeholder { color: #eee; } </style> </head> <body> <div class="container"> <div class="header"> <span>Polynomial Regression</span> </div> <div class="containInput"> <span>Select the degree of the polynomial function you want to use for regression (default is 3)</span> <input type="text" value="" placeholder="make sure it's an int!" /> </div> <svg></svg> </div> <script src="build/demo.js" type="text/javascript"></script> </body> </html>