<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
error_reporting(0);
?> 
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	<meta http-equiv="Refresh" content="10; URL=HASIL KLASIFIKASI.php"> 
    <meta name="description" content="" />
    <meta name="author" content="" />
    <!--[if IE]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <![endif]-->
    <title> KLASIFIKASI STATUS EKONOMI</title>
    <!-- BOOTSTRAP CORE STYLE CSS -->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FONTAWESOME STYLE CSS -->
    <link href="assets/css/font-awesome.min.css" rel="stylesheet" />
    <!-- PRETTYPHOTO STYLE CSS -->
    <link href="assets/css/prettyPhoto.css" rel="stylesheet" />
    <!-- CUSTOM STYLE CSS -->
    <link href="assets/css/style.css" rel="stylesheet" />    
    <!-- GOOGLE FONT -->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />

</head>
<body >
    
    <div class="navbar navbar-inverse navbar-fixed-top" >
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">ZAMALUDIN ARSYAD</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="admin.php">BERANDA</a></li>
                     <li><a href="DATASET.PHP">DATASET</a></li>
                    <li><a href="ANALISA.PHP">ANALISA</a></li>
						<li><a href="ANALISA2.PHP">INPUT DATA</a></li>
                     <li><a href="nilai_k2.PHP">HASIL KLASIFIKASI</a></li>
                      <li><a href="index.PHP">LOG OUT</a></li>
                </ul>
            </div>
           
        </div>
    </div>
   <!--/.NAVBAR END-->
        
       
	    <section id="BERANDA" class="text-center">
         
                <div id="carousel-example" class="carousel slide" data-ride="carousel">

                    <div class="carousel-inner">
                        <div class="item active">

                            <img src="assets/img/1.jpg" alt="" />
                            <div class="carousel-caption" >
                                <h2 class="back-light">KLASIFIKASI STATUS EKONOMI MASYARAKAT DENGAN METODE K-NEAREST NEIGHBOR
 </div>
                        </div>
                        <div class="item">
                            <img src="assets/img/2.jpg" alt="" />
                            <div class="carousel-caption ">
                                <h2 class="back-light">KLASIFIKASI STATUS EKONOMI MASYARAKAT DENGAN METODE K-NEAREST NEIGHBOR </div>
                        </div>
                        <div class="item">
                            <img src="assets/img/3.jpg" alt="" />
                            <div class="carousel-caption ">
                                <h2 class="back-light">KLASIFIKASI STATUS EKONOMI MASYARAKAT DENGAN METODE K-NEAREST NEIGHBOR </div>
                        </div>
                    </div>

                    <ol class="carousel-indicators">
                        <li data-target="#carousel-example" data-slide-to="0" class="active"></li>
                        <li data-target="#carousel-example" data-slide-to="1"></li>
                        <li data-target="#carousel-example" data-slide-to="2"></li>
                    </ol>
                </div>
           
       </section>
	   
	   
    <!--/.HEADING END-->

<section id="port-sec">
       <div class="container">
           
           <div class="row pad-row" >
                               <div class="col-md-12 col-sm-12" > 
                    <ul class="ANALISA-items col-3"> 
                        
                       
                        <center> <li class="ANALISA-item">
                            <div class="item-main">
                                <div class="ANALISA-image">
                                     
                                    <div class="overlay">
                                       
                                    </div>
                                </div><center>
 <?php
include 'koneksi.php'; 
$queryTR = mysql_query("SELECT * FROM spek_data");
if(!$queryTR){
	die( mysql_error() );
}$i=1;
while($rowsTR = mysql_fetch_array($queryTR)){
	$tr=$rowsTR['tr'];
}
$sql2 = mysql_query("SELECT AVG(op) as jumlah2 FROM training");
	  while ($dt2 = mysql_fetch_array($sql2)) {
	  $jumlah2=$dt2['jumlah2'];
	
	}


$sql2 = mysql_query("SELECT * FROM training");
	  if(!$queryTR){
	die( mysql_error() );
}$i=1;
while($rowsTR = mysql_fetch_array($queryTR)){
	$op=$rowsTR['op'];
	//echo $op;
	}
$sql2 = mysql_query("SELECT AVG(rt) as jumlah1 FROM rmse");
	  while ($dt2 = mysql_fetch_array($sql2)) {
	  $jumlah1=$dt2['jumlah1'];
	 $rmse1=($op-$jumlah1);
	   $rmse2=($rmse1*$rmse1);
	  $rmse3=($rmse2/$tr);
	    $rmse4=SQRT($rmse3);
		$rmse5=($rmse4*$tr)/100;
	  echo"<h1><font color='red'>NILAI RMSE</font>";
	  //echo number_format($rmse5,0);
	  echo"<br>Rp. ";
	 echo number_format($rmse4,0);
	  echo",-</h1>";
	}
		

$sql2 = mysql_query("SELECT sum(error) as jumlah FROM data1");
	  while ($dt2 = mysql_fetch_array($sql2)) {
	  $jumlah=$dt2['jumlah'];
	  $rmse=SQRT($jumlah/$tr);
	  echo"<h1>";
	 // echo number_format($rmse,0);
	  //echo"</h1>$rmse";
		}
 							
?>
</table></center>
		
								
								
								
                                 
                            </div>
                        </li>
                        <li class="ANALISA-item">
                            <div class="item-main">
                                <div class="ANALISA-image">
                                   NILAI AKURASI
                                    <div class="overlay">
                                       </div>
                             


 <?php
include'koneksi.php';
$sql2 = mysql_query("SELECT AVG( op ) as jumlah FROM training");
	  while ($dt2 = mysql_fetch_array($sql2)) {
	  $jumlah=$dt2['jumlah'];
	  $acr=$jumlah-$rmse;
	  $hasil=$acr*100;
	  $hasil2=$hasil/$jumlah;
	  echo"<h1>";
	  echo number_format($hasil2,2);echo "%";
	  echo"</h1>";
		}
 							
?>									   
                                    
                                </div>
                                <h5><center>NILAI AKURASI</center></h5>
                            </div>
                        </li>
                        
                    </ul>
                </div>
           </div>
       </div>
   </section>
     <!--/. END ANALISA SECTION-->
      <section  class="note-sec" >
         
               <div class="container">
           <div class="row text-center pad-row" >
            <div class="col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 ">
                 
               <p></center>
                             <MARQUEE> <H2> KLASIFIKASI STATUS EKONOMI MASYARAKAT DENGAN METODE K-NEAREST NEIGHBOR</H2> </MARQUEE>
                            </p>
                </div>
               </div>
            </div>   
           
       </section>
    <!--/.NOTE END-->
     <section id="clients"  >
        
                
            <div class="container">
           <div class="row text-RIGHT pad-bottom" >
            <div class="col-md-12">
                <P  ><h5> <strong>&copy; 2017 UNISAN FIKOM @Zamaludin Arsyad</strong> </h5></P>
            </div>
               
               </div>
        </div>
        </section>
     <!--/.CLIENTS END-->
    <section id="footer-sec" >
             
            
               <div class="col-md-4">
                   
                            <p>
                                
                            </p>
                   
            </div>
    </section>         
    <!--/.FOOTER END-->
    <!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <!-- CORE JQUERY  -->
    <script src="assets/plugins/jquery-1.10.2.js"></script>
    <!-- BOOTSTRAP SCRIPTS  -->
    <script src="assets/plugins/bootstrap.js"></script>
  <!-- CUSTOM SCRIPTS  -->
    <script src="assets/js/custom.js"></script>
</body>
</html>
    <!--/.NOTE END-->
      
     <!--/.CLIENTS END-->
      
           
    <!--/.FOOTER END-->
    <!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <!-- CORE JQUERY  -->
    <script src="assets/plugins/jquery-1.10.2.js"></script>
    <!-- BOOTSTRAP SCRIPTS  -->
    <script src="assets/plugins/bootstrap.js"></script>
    <!-- PRETTYPHOTO SCRIPTS  -->
    <script src="assets/plugins/jquery.prettyPhoto.js"></script>
  <!-- CUSTOM SCRIPTS  -->
    <script src="assets/js/custom.js"></script>
</body>
</html>
