TUGAS_AKHIR
This commit is contained in:
commit
b17a085cad
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"require": {
|
||||
"guzzlehttp/guzzle": "*"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,616 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "4b55c7ef33235a0353c1b6b079f86964",
|
||||
"packages": [
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
|
||||
"reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^2.3",
|
||||
"guzzlehttp/psr7": "^2.8",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"symfony/deprecation-contracts": "^2.2 || ^3.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-client-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"ext-curl": "*",
|
||||
"guzzle/client-integration-tests": "3.0.2",
|
||||
"php-http/message-factory": "^1.1",
|
||||
"phpunit/phpunit": "^8.5.39 || ^9.6.20",
|
||||
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "Required for CURL handler support",
|
||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": false
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Jeremy Lindblom",
|
||||
"email": "jeremeamia@gmail.com",
|
||||
"homepage": "https://github.com/jeremeamia"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle is a PHP HTTP client library",
|
||||
"keywords": [
|
||||
"client",
|
||||
"curl",
|
||||
"framework",
|
||||
"http",
|
||||
"http client",
|
||||
"psr-18",
|
||||
"psr-7",
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.10.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-23T22:36:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "2.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "481557b130ef3790cf82b713667b43030dc9c957"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
|
||||
"reference": "481557b130ef3790cf82b713667b43030dc9c957",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"phpunit/phpunit": "^8.5.44 || ^9.6.25"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": false
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Promise\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle promises library",
|
||||
"keywords": [
|
||||
"promise"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/2.3.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-22T14:34:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "2.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/7d0ed42f28e42d61352a7a79de682e5e67fec884",
|
||||
"reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/http-message": "^1.1 || ^2.0",
|
||||
"ralouphie/getallheaders": "^3.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-factory-implementation": "1.0",
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"http-interop/http-factory-tests": "0.9.0",
|
||||
"jshttp/mime-db": "1.54.0.1",
|
||||
"phpunit/phpunit": "^8.5.44 || ^9.6.25"
|
||||
},
|
||||
"suggest": {
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": false
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Psr7\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://sagikazarmark.hu"
|
||||
}
|
||||
],
|
||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.9.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-03-10T16:41:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-client",
|
||||
"version": "1.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-client.git",
|
||||
"reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
|
||||
"reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0 || ^8.0",
|
||||
"psr/http-message": "^1.0 || ^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Client\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP clients",
|
||||
"homepage": "https://github.com/php-fig/http-client",
|
||||
"keywords": [
|
||||
"http",
|
||||
"http-client",
|
||||
"psr",
|
||||
"psr-18"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-client"
|
||||
},
|
||||
"time": "2023-09-23T14:17:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-factory",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-factory.git",
|
||||
"reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
|
||||
"reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"psr/http-message": "^1.0 || ^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
|
||||
"keywords": [
|
||||
"factory",
|
||||
"http",
|
||||
"message",
|
||||
"psr",
|
||||
"psr-17",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-factory"
|
||||
},
|
||||
"time": "2024-04-15T12:06:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
"homepage": "https://github.com/php-fig/http-message",
|
||||
"keywords": [
|
||||
"http",
|
||||
"http-message",
|
||||
"psr",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-message/tree/2.0"
|
||||
},
|
||||
"time": "2023-04-04T09:54:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
"version": "3.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ralouphie/getallheaders.git",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5 || ^6.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/getallheaders.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ralph Khattar",
|
||||
"email": "ralph.khattar@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders.",
|
||||
"support": {
|
||||
"issues": "https://github.com/ralouphie/getallheaders/issues",
|
||||
"source": "https://github.com/ralouphie/getallheaders/tree/develop"
|
||||
},
|
||||
"time": "2019-03-08T08:55:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v3.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
|
||||
"reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/contracts",
|
||||
"name": "symfony/contracts"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-main": "3.6-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"function.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-09-25T14:21:43+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a9df6f00050d406a45713ec2416d2c2a0207b20b
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
from flask import Flask, request, jsonify
|
||||
import joblib
|
||||
import json
|
||||
import numpy as np
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
model = joblib.load("../models/random_forest_stunting.pkl")
|
||||
with open("../models/label_mapping.json", "r") as f:
|
||||
label_mapping = json.load(f)
|
||||
|
||||
@app.route('/', methods=['GET'])
|
||||
def home():
|
||||
return jsonify({
|
||||
"message" : "API Deteksi Stunting",
|
||||
"version" : "1.0",
|
||||
"endpoint": "/predict"
|
||||
})
|
||||
|
||||
@app.route('/predict', methods=['POST'])
|
||||
def predict():
|
||||
try:
|
||||
data = request.get_json()
|
||||
# Ambil input
|
||||
jk = 0 if str(data['jenis_kelamin']).upper() == 'L' else 1
|
||||
usia = float(data['usia_bulan'])
|
||||
berat = float(data['berat_badan'])
|
||||
tinggi = float(data['tinggi_badan'])
|
||||
# Klasifikasi
|
||||
features = np.array([[jk, usia, berat, tinggi]])
|
||||
pred = model.predict(features)[0]
|
||||
prob = model.predict_proba(features)[0]
|
||||
label = label_mapping[str(pred)]
|
||||
|
||||
return jsonify({
|
||||
"status" : "success",
|
||||
"input" : {
|
||||
"jenis_kelamin": data['jenis_kelamin'],
|
||||
"usia_bulan" : usia,
|
||||
"berat_badan" : berat,
|
||||
"tinggi_badan" : tinggi
|
||||
},
|
||||
"prediksi" : label,
|
||||
"probabilitas" : {
|
||||
label_mapping[str(i)]: round(float(p), 4)
|
||||
for i, p in enumerate(prob)
|
||||
}
|
||||
})
|
||||
|
||||
except Exception as e:
|
||||
return jsonify({
|
||||
"status" : "error",
|
||||
"message": str(e)
|
||||
}), 400
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True, port=5000)
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
flask
|
||||
joblib
|
||||
numpy
|
||||
scikit-learn
|
||||
|
|
@ -0,0 +1,377 @@
|
|||
JK,Usia_Bulan,Berat,Tinggi,ZS_TBU
|
||||
0,8,6.3,64.0,-2.9922
|
||||
0,10,9.0,63.5,-4.2808
|
||||
1,56,11.7,95.0,-2.663
|
||||
1,52,11.6,91.6,-3.0153
|
||||
1,44,13.6,89.1,-2.7017
|
||||
0,36,9.7,84.0,-3.2597
|
||||
1,25,10.6,79.4,-2.1933
|
||||
1,31,9.5,81.0,-2.9185
|
||||
1,21,9.5,74.5,-2.9882
|
||||
0,42,12.2,90.0,-2.4846
|
||||
0,35,12.7,84.0,-3.1208
|
||||
1,16,7.5,71.0,-2.7217
|
||||
0,24,10.3,82.0,-1.6746
|
||||
0,39,12.8,90.0,-2.0847
|
||||
1,24,10.2,87.0,0.3982
|
||||
0,16,10.7,81.3,0.4213
|
||||
0,46,15.8,101.2,-0.2411
|
||||
1,16,8.0,71.0,-2.7217
|
||||
0,42,15.6,101.6,0.441
|
||||
1,44,11.6,90.0,-2.4847
|
||||
0,15,8.8,72.0,-2.8241
|
||||
1,47,12.3,90.0,-2.8433
|
||||
0,29,10.7,83.7,-2.2336
|
||||
0,14,11.0,68.0,-4.0567
|
||||
0,33,12.0,80.0,-3.9498
|
||||
0,31,11.8,85.1,-2.1864
|
||||
0,49,12.5,89.5,-3.4004
|
||||
0,18,9.5,76.0,-2.3204
|
||||
0,30,10.3,75.0,-4.9726
|
||||
0,8,6.8,67.0,-1.632
|
||||
1,48,15.2,91.2,-2.677
|
||||
1,31,9.0,73.0,-5.1543
|
||||
1,29,11.5,79.0,-3.1311
|
||||
1,51,12.2,90.0,-3.2738
|
||||
1,54,14.2,97.0,-2.0228
|
||||
0,6,7.7,64.0,-1.693
|
||||
0,10,9.2,65.0,-3.6243
|
||||
1,29,10.3,82.0,-2.2693
|
||||
0,16,8.0,75.0,-2.0164
|
||||
0,26,8.7,79.0,-3.088
|
||||
1,2,5.3,56.0,-0.5242
|
||||
1,27,10.3,78.2,-2.982
|
||||
1,46,15.9,104.3,0.6543
|
||||
0,38,9.0,78.0,-5.1019
|
||||
0,11,7.2,68.0,-2.8072
|
||||
0,11,8.2,77.0,1.0566
|
||||
1,27,8.6,80.0,-2.4497
|
||||
0,31,9.5,85.0,-2.2153
|
||||
1,51,17.0,106.5,0.4571
|
||||
1,58,18.7,111.2,0.6061
|
||||
0,17,9.0,74.0,-2.7451
|
||||
0,7,9.2,63.5,-2.6091
|
||||
0,43,15.5,94.8,-1.4108
|
||||
1,4,6.0,62.0,-0.0415
|
||||
1,23,9.2,81.0,-1.4243
|
||||
1,20,8.5,70.0,-4.2164
|
||||
1,24,12.3,84.0,-0.5317
|
||||
0,20,10.2,77.0,-2.5585
|
||||
0,39,10.9,87.0,-2.8658
|
||||
1,48,17.0,90.0,-2.9556
|
||||
0,2,4.7,57.0,-0.7123
|
||||
1,35,13.9,93.8,-0.147
|
||||
1,37,18.0,87.0,-2.2686
|
||||
1,47,12.2,91.5,-2.4919
|
||||
0,58,18.3,110.4,0.3356
|
||||
0,15,8.0,71.0,-3.2193
|
||||
1,27,12.3,88.2,-0.0245
|
||||
0,39,13.9,88.1,-2.5794
|
||||
0,38,18.1,101.0,0.9546
|
||||
1,30,13.2,91.7,0.289
|
||||
1,57,13.5,98.0,-2.1137
|
||||
0,42,11.2,91.0,-2.2324
|
||||
0,53,15.2,97.0,-2.0816
|
||||
0,7,7.5,62.4,-3.1157
|
||||
1,29,10.8,75.0,-4.2803
|
||||
1,3,4.4,51.0,-4.1818
|
||||
1,30,11.1,91.2,0.1474
|
||||
1,0,1.8,40.0,-4.911
|
||||
0,30,11.7,85.0,-2.0359
|
||||
1,12,6.0,68.0,-2.3359
|
||||
1,48,15.1,92.8,-2.3055
|
||||
0,26,10.0,82.0,-2.1433
|
||||
0,28,12.9,95.0,1.3933
|
||||
1,54,16.7,95.1,-2.4416
|
||||
0,36,13.9,96.3,0.0584
|
||||
1,43,12.1,86.2,-3.2822
|
||||
0,27,10.6,85.0,-1.4279
|
||||
0,60,14.8,100.0,-2.1502
|
||||
1,56,13.1,90.0,-3.7474
|
||||
1,32,11.0,86.0,-1.7073
|
||||
1,5,6.8,62.7,-0.5999
|
||||
0,9,8.9,69.0,-1.3234
|
||||
0,19,9.18,81.0,-0.8136
|
||||
0,22,10.7,75.0,-3.7651
|
||||
0,3,4.0,53.0,-4.1231
|
||||
1,37,9.9,84.0,-3.0473
|
||||
0,47,11.0,86.0,-4.0326
|
||||
1,10,7.0,65.0,-2.6268
|
||||
0,7,6.3,64.0,-2.3788
|
||||
0,41,16.9,94.5,-1.2094
|
||||
1,15,7.9,73.0,-1.6464
|
||||
0,21,12.0,74.0,-3.8741
|
||||
1,51,13.5,91.0,-3.0477
|
||||
0,3,4.0,54.0,-3.634
|
||||
1,24,6.8,72.8,-4.0031
|
||||
0,2,5.2,59.0,0.2875
|
||||
0,55,18.0,106.3,-0.2064
|
||||
0,7,7.4,64.0,-2.3788
|
||||
0,19,10.8,83.0,-0.0878
|
||||
0,53,16.1,97.2,-2.0359
|
||||
1,44,12.8,90.0,-2.4847
|
||||
0,37,12.4,93.0,-0.995
|
||||
0,1,3.5,51.0,-1.9133
|
||||
0,25,12.2,78.0,-3.2003
|
||||
1,43,11.4,91.9,-1.8943
|
||||
0,57,13.0,99.0,-2.0598
|
||||
1,9,8.5,71.6,0.6029
|
||||
1,3,4.2,54.0,-2.7566
|
||||
1,20,11.0,75.0,-2.5569
|
||||
1,7,8.7,71.0,1.6035
|
||||
0,19,10.9,80.0,-1.1766
|
||||
0,31,12.0,81.0,-3.3717
|
||||
0,27,13.2,80.3,-2.8807
|
||||
0,21,9.5,79.0,-2.1345
|
||||
1,51,12.5,97.0,-1.691
|
||||
1,59,18.9,109.2,0.0647
|
||||
0,45,14.4,93.5,-1.9894
|
||||
1,28,13.3,90.4,0.3788
|
||||
0,26,11.6,81.2,-2.3952
|
||||
0,42,12.1,94.7,-1.2992
|
||||
1,33,13.9,95.1,0.5926
|
||||
1,49,11.9,94.0,-2.1446
|
||||
0,60,19.1,112.7,0.5905
|
||||
0,15,7.5,69.0,-4.0097
|
||||
0,51,17.3,105.6,0.1384
|
||||
0,19,9.5,76.0,-2.6283
|
||||
0,1,3.6,50.5,-2.1702
|
||||
0,24,11.0,85.0,-0.6926
|
||||
0,24,9.4,80.0,-2.3292
|
||||
0,21,9.0,80.0,-1.7865
|
||||
1,3,5.1,55.0,-2.2816
|
||||
1,21,7.7,74.0,-3.1512
|
||||
1,35,10.5,83.0,-3.0165
|
||||
0,19,8.0,78.0,-1.9024
|
||||
0,18,8.8,76.0,-2.3204
|
||||
0,3,6.4,61.0,-0.2099
|
||||
0,33,10.5,77.0,-4.7919
|
||||
0,5,7.0,63.0,-1.3746
|
||||
1,15,8.3,76.0,-0.5512
|
||||
1,34,12.0,83.8,-2.6473
|
||||
1,8,6.7,63.0,-2.4312
|
||||
0,2,5.8,62.0,1.7871
|
||||
1,48,16.1,102.7,-0.0072
|
||||
0,53,12.5,89.0,-3.9088
|
||||
0,25,10.6,83.0,-1.5957
|
||||
0,43,11.5,88.0,-3.1091
|
||||
0,47,16.6,102.9,0.0331
|
||||
1,52,16.0,96.0,-2.0288
|
||||
1,26,12.4,87.8,0.1062
|
||||
0,33,10.7,86.5,-2.1252
|
||||
0,29,7.8,79.0,-3.6366
|
||||
1,54,17.9,108.2,0.4465
|
||||
0,53,15.4,94.0,-2.7668
|
||||
1,12,10.0,64.0,-3.8893
|
||||
1,54,15.0,97.0,-2.0228
|
||||
0,16,11.5,77.0,-1.2426
|
||||
1,43,15.7,98.7,-0.2385
|
||||
1,43,12.6,95.0,-1.1395
|
||||
0,27,11.0,80.2,-2.9116
|
||||
0,12,10.2,68.2,-3.1768
|
||||
0,12,9.6,76.8,0.4424
|
||||
1,51,16.4,101.0,-0.7866
|
||||
0,56,13.8,100.4,-1.6419
|
||||
0,28,12.9,89.6,-0.2466
|
||||
0,14,10.6,80.0,0.7873
|
||||
0,5,6.7,68.0,0.9933
|
||||
1,6,7.2,60.0,-2.5287
|
||||
0,25,12.9,89.0,0.3299
|
||||
1,32,11.8,81.3,-3.0036
|
||||
0,50,12.5,96.0,-1.9793
|
||||
0,48,14.4,99.0,-1.0318
|
||||
1,3,4.3,54.0,-2.7566
|
||||
1,52,11.2,94.5,-2.3651
|
||||
0,24,12.4,88.5,0.453
|
||||
0,13,9.9,71.0,-2.4396
|
||||
0,22,11.6,78.0,-2.7427
|
||||
0,39,9.8,88.0,-2.6055
|
||||
0,16,9.0,73.0,-2.7903
|
||||
0,20,8.6,78.0,-2.2032
|
||||
1,50,14.1,94.0,-2.2583
|
||||
0,38,14.3,95.8,-0.4147
|
||||
1,4,6.1,66.0,1.8065
|
||||
0,43,12.8,92.0,-2.1101
|
||||
0,50,13.0,93.0,-2.6823
|
||||
0,33,14.2,86.2,-2.2094
|
||||
0,38,12.6,90.0,-1.942
|
||||
0,19,11.0,75.0,-2.9912
|
||||
0,20,7.25,73.0,-3.98
|
||||
1,14,10.3,80.6,1.5716
|
||||
0,54,14.1,93.0,-3.0956
|
||||
0,57,16.2,92.0,-3.607
|
||||
0,38,11.2,90.0,-1.942
|
||||
0,11,7.8,68.2,-2.7213
|
||||
1,44,12.1,86.2,-3.4009
|
||||
0,59,18.5,110.0,0.1268
|
||||
1,34,13.9,94.2,0.1494
|
||||
0,20,9.9,78.5,-2.0255
|
||||
0,9,7.1,64.0,-3.5523
|
||||
1,19,9.6,78.0,-1.2569
|
||||
1,4,6.4,62.0,-0.0415
|
||||
1,44,12.0,83.0,-4.1724
|
||||
0,12,8.2,76.0,0.1057
|
||||
0,35,10.2,85.0,-2.8476
|
||||
1,19,8.4,74.0,-2.6091
|
||||
1,46,16.8,103.2,0.3941
|
||||
0,59,18.1,108.9,-0.1124
|
||||
0,20,9.1,76.0,-2.9139
|
||||
1,16,10.0,71.2,-2.6501
|
||||
0,53,14.2,96.0,-2.31
|
||||
0,23,9.6,79.0,-2.6513
|
||||
0,38,10.0,77.5,-5.2335
|
||||
0,9,7.0,66.0,-2.6607
|
||||
0,25,17.0,87.0,-0.3119
|
||||
0,55,14.7,97.0,-2.2955
|
||||
1,26,8.1,77.0,-3.137
|
||||
0,13,7.7,69.0,-3.264
|
||||
0,50,13.0,95.1,-2.1902
|
||||
0,27,10.0,82.0,-2.3552
|
||||
0,38,12.8,89.0,-2.2053
|
||||
0,34,13.9,96.3,0.4282
|
||||
0,17,8.2,73.0,-3.1238
|
||||
0,42,15.0,98.8,-0.2652
|
||||
1,3,5.1,57.0,-1.3315
|
||||
0,41,14.8,98.0,-0.3175
|
||||
0,43,13.0,90.0,-2.6096
|
||||
1,40,14.5,97.2,-0.138
|
||||
1,24,11.3,76.0,-3.0113
|
||||
0,48,10.0,83.5,-4.7275
|
||||
0,38,9.8,89.0,-2.2053
|
||||
1,47,11.1,88.0,-3.3119
|
||||
0,25,12.6,89.6,0.5225
|
||||
1,27,11.9,88.0,-0.0837
|
||||
0,44,12.0,86.0,-3.7189
|
||||
0,13,8.2,73.0,-1.6152
|
||||
0,17,11.5,75.0,-2.3664
|
||||
0,31,12.4,84.0,-2.5044
|
||||
1,29,11.8,79.0,-3.1311
|
||||
0,32,12.2,86.0,-2.1001
|
||||
0,53,10.5,94.5,-2.6526
|
||||
0,20,7.4,76.0,-2.9139
|
||||
0,36,12.7,88.1,-2.1537
|
||||
1,39,14.9,96.7,-0.0986
|
||||
0,30,13.6,91.3,-0.1858
|
||||
0,39,12.6,80.0,-4.6883
|
||||
1,5,4.5,56.0,-3.6215
|
||||
0,18,9.3,77.0,-1.9496
|
||||
1,25,9.4,79.5,-2.1628
|
||||
0,8,8.3,68.0,-1.1786
|
||||
0,3,5.9,60.0,-0.6991
|
||||
1,50,14.4,100.0,-0.8899
|
||||
1,5,7.2,63.0,-0.4646
|
||||
1,51,20.2,101.5,-0.6735
|
||||
0,30,13.8,91.3,-0.1858
|
||||
1,20,8.2,76.0,-2.225
|
||||
0,48,13.0,93.0,-2.4624
|
||||
1,27,9.9,78.2,-2.982
|
||||
0,24,12.2,87.8,0.2239
|
||||
0,15,9.2,73.0,-2.4289
|
||||
1,53,16.0,96.0,-2.1375
|
||||
1,43,11.6,89.0,-2.6004
|
||||
0,12,9.6,75.7,-0.0205
|
||||
1,17,8.2,74.5,-1.815
|
||||
0,25,8.8,70.0,-5.7677
|
||||
0,41,15.5,91.0,-2.1013
|
||||
1,49,14.3,94.0,-2.1446
|
||||
1,29,11.0,81.2,-2.4991
|
||||
1,56,13.1,98.0,-2.0124
|
||||
0,22,13.8,87.0,0.3245
|
||||
1,7,6.3,60.0,-3.1474
|
||||
0,7,6.6,66.0,-1.4576
|
||||
0,20,9.8,75.0,-3.2693
|
||||
1,39,11.9,91.0,-1.5457
|
||||
1,38,10.5,84.1,-3.1617
|
||||
0,46,13.6,99.0,-0.7752
|
||||
1,34,11.2,86.0,-2.0557
|
||||
1,26,12.1,87.0,-0.134
|
||||
0,17,9.5,76.0,-1.9877
|
||||
0,38,13.2,92.0,-1.4153
|
||||
1,14,10.3,74.0,-0.8874
|
||||
0,44,16.2,102.7,0.4112
|
||||
1,34,13.9,95.6,0.5259
|
||||
1,40,15.1,98.8,0.2639
|
||||
0,2,6.1,66.0,3.7867
|
||||
0,50,13.5,94.0,-2.448
|
||||
1,25,9.2,80.0,-2.0103
|
||||
0,52,13.1,99.0,-1.5108
|
||||
1,11,7.8,66.0,-2.6861
|
||||
0,3,4.3,51.0,-5.1014
|
||||
0,37,15.0,95.8,-0.2488
|
||||
1,48,13.8,94.0,-2.027
|
||||
0,20,12.2,76.2,-2.8428
|
||||
0,49,16.7,102.5,-0.3282
|
||||
1,46,15.9,103.4,0.4414
|
||||
1,45,12.0,83.0,-4.2795
|
||||
1,15,8.3,68.2,-3.3988
|
||||
1,4,4.0,51.0,-5.1236
|
||||
1,55,14.6,97.0,-2.1274
|
||||
1,21,12.6,81.0,-0.869
|
||||
1,34,11.5,85.0,-2.3246
|
||||
1,3,5.5,58.0,-0.8565
|
||||
0,11,7.6,67.0,-3.2365
|
||||
0,31,14.0,78.0,-4.239
|
||||
1,6,7.2,68.0,1.0011
|
||||
1,7,9.2,70.0,1.1716
|
||||
1,47,12.0,84.5,-4.1319
|
||||
0,20,10.0,78.0,-2.2032
|
||||
0,23,12.0,77.7,-3.0854
|
||||
0,34,12.7,93.0,-0.4854
|
||||
1,39,12.4,88.0,-2.3074
|
||||
1,30,13.6,88.3,-0.6741
|
||||
1,48,14.1,93.0,-2.2591
|
||||
0,23,9.1,73.0,-4.6546
|
||||
1,37,13.9,94.0,-0.4516
|
||||
1,34,11.3,86.4,-1.9481
|
||||
0,8,7.9,62.0,-3.899
|
||||
1,46,12.7,89.0,-2.9645
|
||||
0,54,15.2,97.0,-2.1896
|
||||
1,15,10.6,67.0,-3.8369
|
||||
1,4,7.2,63.0,0.4205
|
||||
1,13,8.2,72.0,-1.2236
|
||||
0,47,10.0,83.5,-4.634
|
||||
0,38,9.5,76.0,-5.6285
|
||||
1,34,11.0,85.6,-2.1633
|
||||
1,5,4.8,59.0,-2.2685
|
||||
0,18,12.5,73.0,-3.4326
|
||||
0,15,11.5,68.0,-4.4049
|
||||
0,38,12.5,83.0,-3.7852
|
||||
0,31,11.9,86.2,-1.8684
|
||||
1,6,6.6,64.0,-0.7638
|
||||
1,21,9.0,73.0,-3.4773
|
||||
1,24,9.8,76.1,-2.9803
|
||||
0,39,8.2,77.0,-5.4694
|
||||
1,51,12.4,94.0,-2.3693
|
||||
0,42,14.0,89.0,-2.7368
|
||||
0,9,7.0,63.0,-3.9981
|
||||
0,54,15.9,106.0,-0.151
|
||||
1,24,10.9,77.2,-2.6393
|
||||
1,3,4.3,52.0,-3.7067
|
||||
0,54,14.2,96.2,-2.3708
|
||||
1,6,5.9,62.0,-1.6463
|
||||
0,16,10.6,79.0,-0.4687
|
||||
1,13,7.6,71.0,-1.6039
|
||||
0,56,17.5,107.2,-0.1269
|
||||
1,14,9.1,72.0,-1.6325
|
||||
1,33,8.9,73.0,-5.4254
|
||||
0,54,15.4,95.2,-2.5973
|
||||
0,45,13.3,92.0,-2.3569
|
||||
1,45,15.0,93.0,-1.8919
|
||||
1,17,9.0,71.9,-2.7276
|
||||
0,9,8.6,74.0,0.9055
|
||||
1,14,7.7,72.0,-1.6325
|
||||
0,34,10.2,76.5,-5.0535
|
||||
0,26,11.2,80.1,-2.7416
|
||||
1,57,16.2,97.1,-2.3074
|
||||
0,23,8.2,79.0,-2.6513
|
||||
1,9,7.5,71.0,0.3545
|
||||
0,19,10.0,78.0,-1.9024
|
||||
0,47,16.1,102.0,-0.1834
|
||||
1,31,11.1,87.0,-1.2417
|
||||
0,38,10.1,82.5,-3.9169
|
||||
1,40,12.5,92.0,-1.4441
|
||||
0,21,10.4,82.0,-1.0907
|
||||
0,43,15.2,97.0,-0.8613
|
||||
0,35,10.7,88.0,-2.0281
|
||||
1,5,7.7,67.0,1.3394
|
||||
1,25,11.6,79.7,-2.1018
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,377 @@
|
|||
Status_Stunting_encoded
|
||||
2
|
||||
1
|
||||
2
|
||||
1
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
0
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
1
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
1
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
0
|
||||
2
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
0
|
||||
2
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
1
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
2
|
||||
0
|
||||
2
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,63 @@
|
|||
Month,L,M,S,SD,P01,P1,P3,P5,P10,P15,P25,P50,P75,P85,P90,P95,P97,P99,P999
|
||||
0,1,49.8842,0.03795,1.8931,44,45.5,46.3,46.8,47.5,47.9,48.6,49.9,51.2,51.8,52.3,53,53.4,54.3,55.7
|
||||
1,1,54.7244,0.03557,1.9465,48.7,50.2,51.1,51.5,52.2,52.7,53.4,54.7,56,56.7,57.2,57.9,58.4,59.3,60.7
|
||||
2,1,58.4249,0.03424,2.0005,52.2,53.8,54.7,55.1,55.9,56.4,57.1,58.4,59.8,60.5,61,61.7,62.2,63.1,64.6
|
||||
3,1,61.4292,0.03328,2.0444,55.1,56.7,57.6,58.1,58.8,59.3,60.1,61.4,62.8,63.5,64,64.8,65.3,66.2,67.7
|
||||
4,1,63.886,0.03257,2.0808,57.5,59,60,60.5,61.2,61.7,62.5,63.9,65.3,66,66.6,67.3,67.8,68.7,70.3
|
||||
5,1,65.9026,0.03204,2.1115,59.4,61,61.9,62.4,63.2,63.7,64.5,65.9,67.3,68.1,68.6,69.4,69.9,70.8,72.4
|
||||
6,1,67.6236,0.03165,2.1403,61,62.6,63.6,64.1,64.9,65.4,66.2,67.6,69.1,69.8,70.4,71.1,71.6,72.6,74.2
|
||||
7,1,69.1645,0.03139,2.1711,62.5,64.1,65.1,65.6,66.4,66.9,67.7,69.2,70.6,71.4,71.9,72.7,73.2,74.2,75.9
|
||||
8,1,70.5994,0.03124,2.2055,63.8,65.5,66.5,67,67.8,68.3,69.1,70.6,72.1,72.9,73.4,74.2,74.7,75.7,77.4
|
||||
9,1,71.9687,0.03117,2.2433,65,66.8,67.7,68.3,69.1,69.6,70.5,72,73.5,74.3,74.8,75.7,76.2,77.2,78.9
|
||||
10,1,73.2812,0.03118,2.2849,66.2,68,69,69.5,70.4,70.9,71.7,73.3,74.8,75.6,76.2,77,77.6,78.6,80.3
|
||||
11,1,74.5388,0.03125,2.3293,67.3,69.1,70.2,70.7,71.6,72.1,73,74.5,76.1,77,77.5,78.4,78.9,80,81.7
|
||||
12,1,75.7488,0.03137,2.3762,68.4,70.2,71.3,71.8,72.7,73.3,74.1,75.7,77.4,78.2,78.8,79.7,80.2,81.3,83.1
|
||||
13,1,76.9186,0.03154,2.426,69.4,71.3,72.4,72.9,73.8,74.4,75.3,76.9,78.6,79.4,80,80.9,81.5,82.6,84.4
|
||||
14,1,78.0497,0.03174,2.4773,70.4,72.3,73.4,74,74.9,75.5,76.4,78,79.7,80.6,81.2,82.1,82.7,83.8,85.7
|
||||
15,1,79.1458,0.03197,2.5303,71.3,73.3,74.4,75,75.9,76.5,77.4,79.1,80.9,81.8,82.4,83.3,83.9,85,87
|
||||
16,1,80.2113,0.03222,2.5844,72.2,74.2,75.4,76,76.9,77.5,78.5,80.2,82,82.9,83.5,84.5,85.1,86.2,88.2
|
||||
17,1,81.2487,0.0325,2.6406,73.1,75.1,76.3,76.9,77.9,78.5,79.5,81.2,83,84,84.6,85.6,86.2,87.4,89.4
|
||||
18,1,82.2587,0.03279,2.6973,73.9,76,77.2,77.8,78.8,79.5,80.4,82.3,84.1,85.1,85.7,86.7,87.3,88.5,90.6
|
||||
19,1,83.2418,0.0331,2.7553,74.7,76.8,78.1,78.7,79.7,80.4,81.4,83.2,85.1,86.1,86.8,87.8,88.4,89.7,91.8
|
||||
20,1,84.1996,0.03342,2.814,75.5,77.7,78.9,79.6,80.6,81.3,82.3,84.2,86.1,87.1,87.8,88.8,89.5,90.7,92.9
|
||||
21,1,85.1348,0.03376,2.8742,76.3,78.4,79.7,80.4,81.5,82.2,83.2,85.1,87.1,88.1,88.8,89.9,90.5,91.8,94
|
||||
22,1,86.0477,0.0341,2.9342,77,79.2,80.5,81.2,82.3,83,84.1,86,88,89.1,89.8,90.9,91.6,92.9,95.1
|
||||
23,1,86.941,0.03445,2.9951,77.7,80,81.3,82,83.1,83.8,84.9,86.9,89,90,90.8,91.9,92.6,93.9,96.2
|
||||
24,1,87.8161,0.03479,3.0551,78.4,80.7,82.1,82.8,83.9,84.6,85.8,87.8,89.9,91,91.7,92.8,93.6,94.9,97.3
|
||||
24,1,87.1161,0.03507,3.0551,77.7,80,81.4,82.1,83.2,83.9,85.1,87.1,89.2,90.3,91,92.1,92.9,94.2,96.6
|
||||
25,1,87.972,0.03542,3.116,78.3,80.7,82.1,82.8,84,84.7,85.9,88,90.1,91.2,92,93.1,93.8,95.2,97.6
|
||||
26,1,88.8065,0.03576,3.1757,79,81.4,82.8,83.6,84.7,85.5,86.7,88.8,90.9,92.1,92.9,94,94.8,96.2,98.6
|
||||
27,1,89.6197,0.0361,3.2353,79.6,82.1,83.5,84.3,85.5,86.3,87.4,89.6,91.8,93,93.8,94.9,95.7,97.1,99.6
|
||||
28,1,90.412,0.03642,3.2928,80.2,82.8,84.2,85,86.2,87,88.2,90.4,92.6,93.8,94.6,95.8,96.6,98.1,100.6
|
||||
29,1,91.1828,0.03674,3.3501,80.8,83.4,84.9,85.7,86.9,87.7,88.9,91.2,93.4,94.7,95.5,96.7,97.5,99,101.5
|
||||
30,1,91.9327,0.03704,3.4052,81.4,84,85.5,86.3,87.6,88.4,89.6,91.9,94.2,95.5,96.3,97.5,98.3,99.9,102.5
|
||||
31,1,92.6631,0.03733,3.4591,82,84.6,86.2,87,88.2,89.1,90.3,92.7,95,96.2,97.1,98.4,99.2,100.7,103.4
|
||||
32,1,93.3753,0.03761,3.5118,82.5,85.2,86.8,87.6,88.9,89.7,91,93.4,95.7,97,97.9,99.2,100,101.5,104.2
|
||||
33,1,94.0711,0.03787,3.5625,83.1,85.8,87.4,88.2,89.5,90.4,91.7,94.1,96.5,97.8,98.6,99.9,100.8,102.4,105.1
|
||||
34,1,94.7532,0.03812,3.612,83.6,86.4,88,88.8,90.1,91,92.3,94.8,97.2,98.5,99.4,100.7,101.5,103.2,105.9
|
||||
35,1,95.4236,0.03836,3.6604,84.1,86.9,88.5,89.4,90.7,91.6,93,95.4,97.9,99.2,100.1,101.4,102.3,103.9,106.7
|
||||
36,1,96.0835,0.03858,3.7069,84.6,87.5,89.1,90,91.3,92.2,93.6,96.1,98.6,99.9,100.8,102.2,103.1,104.7,107.5
|
||||
37,1,96.7337,0.03879,3.7523,85.1,88,89.7,90.6,91.9,92.8,94.2,96.7,99.3,100.6,101.5,102.9,103.8,105.5,108.3
|
||||
38,1,97.3749,0.039,3.7976,85.6,88.5,90.2,91.1,92.5,93.4,94.8,97.4,99.9,101.3,102.2,103.6,104.5,106.2,109.1
|
||||
39,1,98.0073,0.03919,3.8409,86.1,89.1,90.8,91.7,93.1,94,95.4,98,100.6,102,102.9,104.3,105.2,106.9,109.9
|
||||
40,1,98.631,0.03937,3.8831,86.6,89.6,91.3,92.2,93.7,94.6,96,98.6,101.3,102.7,103.6,105,105.9,107.7,110.6
|
||||
41,1,99.2459,0.03954,3.9242,87.1,90.1,91.9,92.8,94.2,95.2,96.6,99.2,101.9,103.3,104.3,105.7,106.6,108.4,111.4
|
||||
42,1,99.8515,0.03971,3.9651,87.6,90.6,92.4,93.3,94.8,95.7,97.2,99.9,102.5,104,104.9,106.4,107.3,109.1,112.1
|
||||
43,1,100.4485,0.03986,4.0039,88.1,91.1,92.9,93.9,95.3,96.3,97.7,100.4,103.1,104.6,105.6,107,108,109.8,112.8
|
||||
44,1,101.0374,0.04002,4.0435,88.5,91.6,93.4,94.4,95.9,96.8,98.3,101,103.8,105.2,106.2,107.7,108.6,110.4,113.5
|
||||
45,1,101.6186,0.04016,4.081,89,92.1,93.9,94.9,96.4,97.4,98.9,101.6,104.4,105.8,106.8,108.3,109.3,111.1,114.2
|
||||
46,1,102.1933,0.04031,4.1194,89.5,92.6,94.4,95.4,96.9,97.9,99.4,102.2,105,106.5,107.5,109,109.9,111.8,114.9
|
||||
47,1,102.7625,0.04045,4.1567,89.9,93.1,94.9,95.9,97.4,98.5,100,102.8,105.6,107.1,108.1,109.6,110.6,112.4,115.6
|
||||
48,1,103.3273,0.04059,4.1941,90.4,93.6,95.4,96.4,98,99,100.5,103.3,106.2,107.7,108.7,110.2,111.2,113.1,116.3
|
||||
49,1,103.8886,0.04073,4.2314,90.8,94,95.9,96.9,98.5,99.5,101,103.9,106.7,108.3,109.3,110.8,111.8,113.7,117
|
||||
50,1,104.4473,0.04086,4.2677,91.3,94.5,96.4,97.4,99,100,101.6,104.4,107.3,108.9,109.9,111.5,112.5,114.4,117.6
|
||||
51,1,105.0041,0.041,4.3052,91.7,95,96.9,97.9,99.5,100.5,102.1,105,107.9,109.5,110.5,112.1,113.1,115,118.3
|
||||
52,1,105.5596,0.04113,4.3417,92.1,95.5,97.4,98.4,100,101.1,102.6,105.6,108.5,110.1,111.1,112.7,113.7,115.7,119
|
||||
53,1,106.1138,0.04126,4.3783,92.6,95.9,97.9,98.9,100.5,101.6,103.2,106.1,109.1,110.7,111.7,113.3,114.3,116.3,119.6
|
||||
54,1,106.6668,0.04139,4.4149,93,96.4,98.4,99.4,101,102.1,103.7,106.7,109.6,111.2,112.3,113.9,115,116.9,120.3
|
||||
55,1,107.2188,0.04152,4.4517,93.5,96.9,98.8,99.9,101.5,102.6,104.2,107.2,110.2,111.8,112.9,114.5,115.6,117.6,121
|
||||
56,1,107.7697,0.04165,4.4886,93.9,97.3,99.3,100.4,102,103.1,104.7,107.8,110.8,112.4,113.5,115.2,116.2,118.2,121.6
|
||||
57,1,108.3198,0.04177,4.5245,94.3,97.8,99.8,100.9,102.5,103.6,105.3,108.3,111.4,113,114.1,115.8,116.8,118.8,122.3
|
||||
58,1,108.8689,0.0419,4.5616,94.8,98.3,100.3,101.4,103,104.1,105.8,108.9,111.9,113.6,114.7,116.4,117.4,119.5,123
|
||||
59,1,109.417,0.04202,4.5977,95.2,98.7,100.8,101.9,103.5,104.7,106.3,109.4,112.5,114.2,115.3,117,118.1,120.1,123.6
|
||||
60,1,109.9638,0.04214,4.6339,95.6,99.2,101.2,102.3,104,105.2,106.8,110,113.1,114.8,115.9,117.6,118.7,120.7,124.3
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
Month,L,M,S,SD,P01,P1,P3,P5,P10,P15,P25,P50,P75,P85,P90,P95,P97,P99,P999
|
||||
0,1,49.1477,0.0379,1.8627,43.4,44.8,45.6,46.1,46.8,47.2,47.9,49.1,50.4,51.1,51.5,52.2,52.7,53.5,54.9
|
||||
1,1,53.6872,0.0364,1.9542,47.6,49.1,50,50.5,51.2,51.7,52.4,53.7,55,55.7,56.2,56.9,57.4,58.2,59.7
|
||||
2,1,57.0673,0.03568,2.0362,50.8,52.3,53.2,53.7,54.5,55,55.7,57.1,58.4,59.2,59.7,60.4,60.9,61.8,63.4
|
||||
3,1,59.8029,0.0352,2.1051,53.3,54.9,55.8,56.3,57.1,57.6,58.4,59.8,61.2,62,62.5,63.3,63.8,64.7,66.3
|
||||
4,1,62.0899,0.03486,2.1645,55.4,57.1,58,58.5,59.3,59.8,60.6,62.1,63.5,64.3,64.9,65.7,66.2,67.1,68.8
|
||||
5,1,64.0301,0.03463,2.2174,57.2,58.9,59.9,60.4,61.2,61.7,62.5,64,65.5,66.3,66.9,67.7,68.2,69.2,70.9
|
||||
6,1,65.7311,0.03448,2.2664,58.7,60.5,61.5,62,62.8,63.4,64.2,65.7,67.3,68.1,68.6,69.5,70,71,72.7
|
||||
7,1,67.2873,0.03441,2.3154,60.1,61.9,62.9,63.5,64.3,64.9,65.7,67.3,68.8,69.7,70.3,71.1,71.6,72.7,74.4
|
||||
8,1,68.7498,0.0344,2.365,61.4,63.2,64.3,64.9,65.7,66.3,67.2,68.7,70.3,71.2,71.8,72.6,73.2,74.3,76.1
|
||||
9,1,70.1435,0.03444,2.4157,62.7,64.5,65.6,66.2,67,67.6,68.5,70.1,71.8,72.6,73.2,74.1,74.7,75.8,77.6
|
||||
10,1,71.4818,0.03452,2.4676,63.9,65.7,66.8,67.4,68.3,68.9,69.8,71.5,73.1,74,74.6,75.5,76.1,77.2,79.1
|
||||
11,1,72.771,0.03464,2.5208,65,66.9,68,68.6,69.5,70.2,71.1,72.8,74.5,75.4,76,76.9,77.5,78.6,80.6
|
||||
12,1,74.015,0.03479,2.575,66.1,68,69.2,69.8,70.7,71.3,72.3,74,75.8,76.7,77.3,78.3,78.9,80,82
|
||||
13,1,75.2176,0.03496,2.6296,67.1,69.1,70.3,70.9,71.8,72.5,73.4,75.2,77,77.9,78.6,79.5,80.2,81.3,83.3
|
||||
14,1,76.3817,0.03514,2.6841,68.1,70.1,71.3,72,72.9,73.6,74.6,76.4,78.2,79.2,79.8,80.8,81.4,82.6,84.7
|
||||
15,1,77.5099,0.03534,2.7392,69,71.1,72.4,73,74,74.7,75.7,77.5,79.4,80.3,81,82,82.7,83.9,86
|
||||
16,1,78.6055,0.03555,2.7944,70,72.1,73.3,74,75,75.7,76.7,78.6,80.5,81.5,82.2,83.2,83.9,85.1,87.2
|
||||
17,1,79.671,0.03576,2.849,70.9,73,74.3,75,76,76.7,77.7,79.7,81.6,82.6,83.3,84.4,85,86.3,88.5
|
||||
18,1,80.7079,0.03598,2.9039,71.7,74,75.2,75.9,77,77.7,78.7,80.7,82.7,83.7,84.4,85.5,86.2,87.5,89.7
|
||||
19,1,81.7182,0.0362,2.9582,72.6,74.8,76.2,76.9,77.9,78.7,79.7,81.7,83.7,84.8,85.5,86.6,87.3,88.6,90.9
|
||||
20,1,82.7036,0.03643,3.0129,73.4,75.7,77,77.7,78.8,79.6,80.7,82.7,84.7,85.8,86.6,87.7,88.4,89.7,92
|
||||
21,1,83.6654,0.03666,3.0672,74.2,76.5,77.9,78.6,79.7,80.5,81.6,83.7,85.7,86.8,87.6,88.7,89.4,90.8,93.1
|
||||
22,1,84.604,0.03688,3.1202,75,77.3,78.7,79.5,80.6,81.4,82.5,84.6,86.7,87.8,88.6,89.7,90.5,91.9,94.2
|
||||
23,1,85.5202,0.03711,3.1737,75.7,78.1,79.6,80.3,81.5,82.2,83.4,85.5,87.7,88.8,89.6,90.7,91.5,92.9,95.3
|
||||
24,1,86.4153,0.03734,3.2267,76.4,78.9,80.3,81.1,82.3,83.1,84.2,86.4,88.6,89.8,90.6,91.7,92.5,93.9,96.4
|
||||
24,1,85.7153,0.03764,3.2267,75.7,78.2,79.6,80.4,81.6,82.4,83.5,85.7,87.9,89.1,89.9,91,91.8,93.2,95.7
|
||||
25,1,86.5904,0.03786,3.2783,76.5,79,80.4,81.2,82.4,83.2,84.4,86.6,88.8,90,90.8,92,92.8,94.2,96.7
|
||||
26,1,87.4462,0.03808,3.33,77.2,79.7,81.2,82,83.2,84,85.2,87.4,89.7,90.9,91.7,92.9,93.7,95.2,97.7
|
||||
27,1,88.283,0.0383,3.3812,77.8,80.4,81.9,82.7,83.9,84.8,86,88.3,90.6,91.8,92.6,93.8,94.6,96.1,98.7
|
||||
28,1,89.1004,0.03851,3.4313,78.5,81.1,82.6,83.5,84.7,85.5,86.8,89.1,91.4,92.7,93.5,94.7,95.6,97.1,99.7
|
||||
29,1,89.8991,0.03872,3.4809,79.1,81.8,83.4,84.2,85.4,86.3,87.6,89.9,92.2,93.5,94.4,95.6,96.4,98,100.7
|
||||
30,1,90.6797,0.03893,3.5302,79.8,82.5,84,84.9,86.2,87,88.3,90.7,93.1,94.3,95.2,96.5,97.3,98.9,101.6
|
||||
31,1,91.443,0.03913,3.5782,80.4,83.1,84.7,85.6,86.9,87.7,89,91.4,93.9,95.2,96,97.3,98.2,99.8,102.5
|
||||
32,1,92.1906,0.03933,3.6259,81,83.8,85.4,86.2,87.5,88.4,89.7,92.2,94.6,95.9,96.8,98.2,99,100.6,103.4
|
||||
33,1,92.9239,0.03952,3.6724,81.6,84.4,86,86.9,88.2,89.1,90.4,92.9,95.4,96.7,97.6,99,99.8,101.5,104.3
|
||||
34,1,93.6444,0.03971,3.7186,82.2,85,86.7,87.5,88.9,89.8,91.1,93.6,96.2,97.5,98.4,99.8,100.6,102.3,105.1
|
||||
35,1,94.3533,0.03989,3.7638,82.7,85.6,87.3,88.2,89.5,90.5,91.8,94.4,96.9,98.3,99.2,100.5,101.4,103.1,106
|
||||
36,1,95.0515,0.04006,3.8078,83.3,86.2,87.9,88.8,90.2,91.1,92.5,95.1,97.6,99,99.9,101.3,102.2,103.9,106.8
|
||||
37,1,95.7399,0.04024,3.8526,83.8,86.8,88.5,89.4,90.8,91.7,93.1,95.7,98.3,99.7,100.7,102.1,103,104.7,107.6
|
||||
38,1,96.4187,0.04041,3.8963,84.4,87.4,89.1,90,91.4,92.4,93.8,96.4,99,100.5,101.4,102.8,103.7,105.5,108.5
|
||||
39,1,97.0885,0.04057,3.9389,84.9,87.9,89.7,90.6,92,93,94.4,97.1,99.7,101.2,102.1,103.6,104.5,106.3,109.3
|
||||
40,1,97.7493,0.04073,3.9813,85.4,88.5,90.3,91.2,92.6,93.6,95.1,97.7,100.4,101.9,102.9,104.3,105.2,107,110.1
|
||||
41,1,98.4015,0.04089,4.0236,86,89,90.8,91.8,93.2,94.2,95.7,98.4,101.1,102.6,103.6,105,106,107.8,110.8
|
||||
42,1,99.0448,0.04105,4.0658,86.5,89.6,91.4,92.4,93.8,94.8,96.3,99,101.8,103.3,104.3,105.7,106.7,108.5,111.6
|
||||
43,1,99.6795,0.0412,4.1068,87,90.1,92,92.9,94.4,95.4,96.9,99.7,102.4,103.9,104.9,106.4,107.4,109.2,112.4
|
||||
44,1,100.3058,0.04135,4.1476,87.5,90.7,92.5,93.5,95,96,97.5,100.3,103.1,104.6,105.6,107.1,108.1,110,113.1
|
||||
45,1,100.9238,0.0415,4.1883,88,91.2,93,94,95.6,96.6,98.1,100.9,103.7,105.3,106.3,107.8,108.8,110.7,113.9
|
||||
46,1,101.5337,0.04164,4.2279,88.5,91.7,93.6,94.6,96.1,97.2,98.7,101.5,104.4,105.9,107,108.5,109.5,111.4,114.6
|
||||
47,1,102.136,0.04179,4.2683,88.9,92.2,94.1,95.1,96.7,97.7,99.3,102.1,105,106.6,107.6,109.2,110.2,112.1,115.3
|
||||
48,1,102.7312,0.04193,4.3075,89.4,92.7,94.6,95.6,97.2,98.3,99.8,102.7,105.6,107.2,108.3,109.8,110.8,112.8,116
|
||||
49,1,103.3197,0.04206,4.3456,89.9,93.2,95.1,96.2,97.8,98.8,100.4,103.3,106.3,107.8,108.9,110.5,111.5,113.4,116.7
|
||||
50,1,103.9021,0.0422,4.3847,90.4,93.7,95.7,96.7,98.3,99.4,100.9,103.9,106.9,108.4,109.5,111.1,112.1,114.1,117.5
|
||||
51,1,104.4786,0.04233,4.4226,90.8,94.2,96.2,97.2,98.8,99.9,101.5,104.5,107.5,109.1,110.1,111.8,112.8,114.8,118.1
|
||||
52,1,105.0494,0.04246,4.4604,91.3,94.7,96.7,97.7,99.3,100.4,102,105,108.1,109.7,110.8,112.4,113.4,115.4,118.8
|
||||
53,1,105.6148,0.04259,4.4981,91.7,95.2,97.2,98.2,99.9,101,102.6,105.6,108.6,110.3,111.4,113,114.1,116.1,119.5
|
||||
54,1,106.1748,0.04272,4.5358,92.2,95.6,97.6,98.7,100.4,101.5,103.1,106.2,109.2,110.9,112,113.6,114.7,116.7,120.2
|
||||
55,1,106.7295,0.04285,4.5734,92.6,96.1,98.1,99.2,100.9,102,103.6,106.7,109.8,111.5,112.6,114.3,115.3,117.4,120.9
|
||||
56,1,107.2788,0.04298,4.6108,93,96.6,98.6,99.7,101.4,102.5,104.2,107.3,110.4,112.1,113.2,114.9,116,118,121.5
|
||||
57,1,107.8227,0.0431,4.6472,93.5,97,99.1,100.2,101.9,103,104.7,107.8,111,112.6,113.8,115.5,116.6,118.6,122.2
|
||||
58,1,108.3613,0.04322,4.6834,93.9,97.5,99.6,100.7,102.4,103.5,105.2,108.4,111.5,113.2,114.4,116.1,117.2,119.3,122.8
|
||||
59,1,108.8948,0.04334,4.7195,94.3,97.9,100,101.1,102.8,104,105.7,108.9,112.1,113.8,114.9,116.7,117.8,119.9,123.5
|
||||
60,1,109.4233,0.04347,4.7566,94.7,98.4,100.5,101.6,103.3,104.5,106.2,109.4,112.6,114.4,115.5,117.2,118.4,120.5,124.1
|
||||
|
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"max_depth": null,
|
||||
"max_features": "sqrt",
|
||||
"min_samples_leaf": 1,
|
||||
"min_samples_split": 2,
|
||||
"n_estimators": 300
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
|
|
@ -0,0 +1 @@
|
|||
{"0": "Normal", "1": "Severely Stunted", "2": "Stunted"}
|
||||
Binary file not shown.
|
|
@ -0,0 +1,149 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "394d05ff",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "b4f32ae4",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Data awal sebelum preprocessing : 1933 baris\n",
|
||||
"Data yang dihapus (missing values): 141 baris\n",
|
||||
"Data valid setelah preprocessing : 1792 baris\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Load dataset\n",
|
||||
"df_awal = pd.read_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/raw/stunting_final.csv\") # sesuaikan nama file kamu\n",
|
||||
"\n",
|
||||
"# Sebelum preprocessing\n",
|
||||
"jumlah_awal = len(df_awal)\n",
|
||||
"print(f\"Data awal sebelum preprocessing : {jumlah_awal} baris\")\n",
|
||||
"\n",
|
||||
"# Proses hapus missing values\n",
|
||||
"df_bersih = df_awal.dropna()\n",
|
||||
"\n",
|
||||
"# Setelah preprocessing\n",
|
||||
"jumlah_bersih = len(df_bersih)\n",
|
||||
"jumlah_dihapus = jumlah_awal - jumlah_bersih\n",
|
||||
"\n",
|
||||
"print(f\"Data yang dihapus (missing values): {jumlah_dihapus} baris\")\n",
|
||||
"print(f\"Data valid setelah preprocessing : {jumlah_bersih} baris\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "bfc03f1c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"DATA UNDERSTANDING\n",
|
||||
"=======================================================\n",
|
||||
"Jumlah data awal : 1933 baris\n",
|
||||
"Jumlah atribut : 12 kolom\n",
|
||||
"\n",
|
||||
"Atribut dataset :\n",
|
||||
"Nama str\n",
|
||||
"Nama Ortu str\n",
|
||||
"Tgl Lahir str\n",
|
||||
"Alamat str\n",
|
||||
"Berat float64\n",
|
||||
"Tinggi float64\n",
|
||||
"JK str\n",
|
||||
"Usia_Bulan int64\n",
|
||||
"ZS TB/U float64\n",
|
||||
"ZS BB/U float64\n",
|
||||
"Status Stunting str\n",
|
||||
"Status Gizi str\n",
|
||||
"dtype: object\n",
|
||||
"\n",
|
||||
"Missing values :\n",
|
||||
"Nama 0\n",
|
||||
"Nama Ortu 25\n",
|
||||
"Tgl Lahir 61\n",
|
||||
"Alamat 0\n",
|
||||
"Berat 4\n",
|
||||
"Tinggi 8\n",
|
||||
"JK 1\n",
|
||||
"Usia_Bulan 0\n",
|
||||
"ZS TB/U 50\n",
|
||||
"ZS BB/U 20\n",
|
||||
"Status Stunting 50\n",
|
||||
"Status Gizi 20\n",
|
||||
"dtype: int64\n",
|
||||
"\n",
|
||||
"Distribusi kelas :\n",
|
||||
"Status Stunting\n",
|
||||
"Normal 758\n",
|
||||
"Stunted 693\n",
|
||||
"Severely Stunted 432\n",
|
||||
"Name: count, dtype: int64\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"# DATA UNDERSTANDING\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"DATA UNDERSTANDING\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"df_raw = pd.read_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/raw/stunting_final.csv\")\n",
|
||||
"print(f\"Jumlah data awal : {df_raw.shape[0]} baris\")\n",
|
||||
"print(f\"Jumlah atribut : {df_raw.shape[1]} kolom\")\n",
|
||||
"print(f\"\\nAtribut dataset :\")\n",
|
||||
"print(df_raw.dtypes)\n",
|
||||
"print(f\"\\nMissing values :\")\n",
|
||||
"\n",
|
||||
"# Tambah ini supaya tidak terpotong\n",
|
||||
"import pandas as pd\n",
|
||||
"pd.set_option('display.max_rows', None)\n",
|
||||
"print(df_raw.isnull().sum())\n",
|
||||
"\n",
|
||||
"print(f\"\\nDistribusi kelas :\")\n",
|
||||
"print(df_raw['Status Stunting'].value_counts())"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
|
|
@ -0,0 +1,505 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 40,
|
||||
"id": "8285621d",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 1: LOAD DATA\n",
|
||||
"=======================================================\n",
|
||||
"Data berhasil dimuat: 1933 baris, 12 kolom\n",
|
||||
" Kolom: ['Nama', 'Nama Ortu', 'Tgl Lahir', 'Alamat', 'Berat', 'Tinggi', 'JK', 'Usia_Bulan', 'ZS TB/U', 'ZS BB/U', 'Status Stunting', 'Status Gizi']\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"import numpy as np\n",
|
||||
"from sklearn.preprocessing import LabelEncoder\n",
|
||||
"from sklearn.model_selection import train_test_split\n",
|
||||
"# TAHAP 1: LOAD DATA\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 1: LOAD DATA\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"df = pd.read_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/raw/stunting_final.csv\")\n",
|
||||
"print(f\"Data berhasil dimuat: {df.shape[0]} baris, {df.shape[1]} kolom\")\n",
|
||||
"print(f\" Kolom: {df.columns.tolist()}\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 41,
|
||||
"id": "fb99d360",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 2: DROP KOLOM TIDAK DIPERLUKAN\n",
|
||||
"=======================================================\n",
|
||||
"Kolom di-drop: ['Nama', 'Nama Ortu', 'Tgl Lahir', 'Alamat']\n",
|
||||
"Sisa kolom : ['Berat', 'Tinggi', 'JK', 'Usia_Bulan', 'ZS TB/U', 'ZS BB/U', 'Status Stunting', 'Status Gizi']\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 2: DROP KOLOM TIDAK DIPERLUKAN\n",
|
||||
"\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 2: DROP KOLOM TIDAK DIPERLUKAN\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"drop_cols = ['Nama', 'Nama Ortu', 'Tgl Lahir', 'Alamat']\n",
|
||||
"existing_drop = [c for c in drop_cols if c in df.columns]\n",
|
||||
"df.drop(columns=existing_drop, inplace=True)\n",
|
||||
"print(f\"Kolom di-drop: {existing_drop}\")\n",
|
||||
"print(f\"Sisa kolom : {df.columns.tolist()}\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 42,
|
||||
"id": "e2143fd2",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 3: RENAME & KONVERSI KOLOM\n",
|
||||
"=======================================================\n",
|
||||
"Kolom setelah rename: ['Berat', 'Tinggi', 'JK', 'Usia_Bulan', 'ZS TB/U', 'ZS BB/U', 'Status Stunting', 'Status Gizi']\n",
|
||||
"Distribusi JK : {'L': 1066, 'P': 866}\n",
|
||||
"Rentang Usia : 0 – 60 bulan\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 3: RENAME & KONVERSI KOLOM\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 3: RENAME & KONVERSI KOLOM\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"df.rename(columns={\n",
|
||||
" 'Jenis Kelamin': 'JK',\n",
|
||||
" 'Berat Badan' : 'Berat',\n",
|
||||
" 'Tinggi badan' : 'Tinggi',\n",
|
||||
" 'Usia' : 'Usia_Bulan'\n",
|
||||
"}, inplace=True)\n",
|
||||
"\n",
|
||||
"df['Usia_Bulan'] = pd.to_numeric(df['Usia_Bulan'], errors='coerce')\n",
|
||||
"df['Berat'] = pd.to_numeric(df['Berat'].astype(str).str.replace(',','.'), errors='coerce')\n",
|
||||
"df['Tinggi'] = pd.to_numeric(df['Tinggi'].astype(str).str.replace(',','.'), errors='coerce')\n",
|
||||
"df['JK'] = df['JK'].astype(str).str.strip().str.upper()\n",
|
||||
"df['JK'] = df['JK'].replace({'LAKI-LAKI':'L','LAKI':'L','PEREMPUAN':'P','NAN':np.nan})\n",
|
||||
"\n",
|
||||
"print(f\"Kolom setelah rename: {df.columns.tolist()}\")\n",
|
||||
"print(f\"Distribusi JK : {df['JK'].value_counts().to_dict()}\")\n",
|
||||
"print(f\"Rentang Usia : {df['Usia_Bulan'].min()} – {df['Usia_Bulan'].max()} bulan\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "e3fb2532",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 4: FILTER BALITA (USIA ≤ 60 BULAN)\n",
|
||||
"=======================================================\n",
|
||||
"Data sebelum filter : 1933 baris\n",
|
||||
"Data setelah filter : 1933 baris\n",
|
||||
" Dibuang : 0 baris\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 4: FILTER BALITA (USIA ≤ 60 BULAN)\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 4: FILTER BALITA (USIA ≤ 60 BULAN)\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"sebelum = len(df)\n",
|
||||
"df = df[df['Usia_Bulan'] <= 60].copy()\n",
|
||||
"sesudah = len(df)\n",
|
||||
"print(f\"Data sebelum filter : {sebelum} baris\")\n",
|
||||
"print(f\"Data setelah filter : {sesudah} baris\")\n",
|
||||
"print(f\" Dibuang : {sebelum - sesudah} baris\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 44,
|
||||
"id": "16927bd2",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 5: CEK STATUS STUNTING\n",
|
||||
"=======================================================\n",
|
||||
"Distribusi Status Stunting:\n",
|
||||
" Normal : 758 (40.3%)\n",
|
||||
" Stunted : 693 (36.8%)\n",
|
||||
" Severely Stunted : 432 (22.9%)\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 5: CEK STATUS STUNTING\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 5: CEK STATUS STUNTING\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"print(\"Distribusi Status Stunting:\")\n",
|
||||
"total = df['Status Stunting'].notna().sum()\n",
|
||||
"for label, count in df['Status Stunting'].value_counts().items():\n",
|
||||
" print(f\" {label:<20}: {count:>4} ({count/total*100:.1f}%)\")\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 45,
|
||||
"id": "21079aef",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 6: TANGANI MISSING VALUES\n",
|
||||
"=======================================================\n",
|
||||
"Missing values sebelum:\n",
|
||||
"Berat 4\n",
|
||||
"Tinggi 8\n",
|
||||
"JK 1\n",
|
||||
"ZS TB/U 50\n",
|
||||
"ZS BB/U 20\n",
|
||||
"Status Stunting 50\n",
|
||||
"Status Gizi 20\n",
|
||||
"\n",
|
||||
"Baris dibuang: 54\n",
|
||||
"Sisa data : 1879 baris\n",
|
||||
"\n",
|
||||
"Missing values setelah:\n",
|
||||
"ZS BB/U 2\n",
|
||||
"Status Gizi 2\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 6: TANGANI MISSING VALUES\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 6: TANGANI MISSING VALUES\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"print(\"Missing values sebelum:\")\n",
|
||||
"mv = df.isnull().sum()\n",
|
||||
"print(mv[mv > 0].to_string() if mv[mv > 0].any() else \"Tidak ada missing values\")\n",
|
||||
"print()\n",
|
||||
"\n",
|
||||
"sebelum = len(df)\n",
|
||||
"df.dropna(subset=['Status Stunting', 'ZS TB/U', 'Berat', 'Tinggi', 'JK'], inplace=True)\n",
|
||||
"sesudah = len(df)\n",
|
||||
"print(f\"Baris dibuang: {sebelum - sesudah}\")\n",
|
||||
"print(f\"Sisa data : {sesudah} baris\")\n",
|
||||
"\n",
|
||||
"print(f\"\\nMissing values setelah:\")\n",
|
||||
"mv = df.isnull().sum()\n",
|
||||
"print(mv[mv > 0].to_string() if mv[mv > 0].any() else \"Tidak ada missing values\")\n",
|
||||
"print()\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "8f0ed736",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 7: ENCODING VARIABEL KATEGORIKAL\n",
|
||||
"=======================================================\n",
|
||||
"JK encoded: L=0, P=1\n",
|
||||
"Status Stunting: {'Normal': np.int64(0), 'Severely Stunted': np.int64(1), 'Stunted': np.int64(2)}\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 7: ENCODING VARIABEL KATEGORIKAL\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 7: ENCODING VARIABEL KATEGORIKAL\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"df['JK_encoded'] = df['JK'].map({'L': 0, 'P': 1})\n",
|
||||
"print(\"JK encoded: L=0, P=1\")\n",
|
||||
"\n",
|
||||
"le_stunting = LabelEncoder()\n",
|
||||
"df['Status_Stunting_encoded'] = le_stunting.fit_transform(df['Status Stunting'])\n",
|
||||
"print(f\"Status Stunting: {dict(zip(le_stunting.classes_, le_stunting.transform(le_stunting.classes_)))}\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 47,
|
||||
"id": "fefd8bd8",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 8: SUSUN FITUR & TARGET\n",
|
||||
"=======================================================\n",
|
||||
"Shape X : (1879, 5)\n",
|
||||
"Fitur : ['JK', 'Usia_Bulan', 'Berat', 'Tinggi', 'ZS_TBU']\n",
|
||||
"Target : Status Stunting\n",
|
||||
"Kelas : ['Normal', 'Severely Stunted', 'Stunted']\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 8: SUSUN FITUR & TARGET\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 8: SUSUN FITUR & TARGET\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"feature_cols = ['JK_encoded', 'Usia_Bulan', 'Berat', 'Tinggi', 'ZS TB/U']\n",
|
||||
"X = df[feature_cols].copy()\n",
|
||||
"X.columns = ['JK', 'Usia_Bulan', 'Berat', 'Tinggi', 'ZS_TBU']\n",
|
||||
"y = df['Status_Stunting_encoded'].copy()\n",
|
||||
"\n",
|
||||
"print(f\"Shape X : {X.shape}\")\n",
|
||||
"print(f\"Fitur : {X.columns.tolist()}\")\n",
|
||||
"print(f\"Target : Status Stunting\")\n",
|
||||
"print(f\"Kelas : {le_stunting.classes_.tolist()}\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 48,
|
||||
"id": "45c24404",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 9: CEK CLASS BALANCE\n",
|
||||
"=======================================================\n",
|
||||
" Normal : 757 (40.3%) ████████████\n",
|
||||
" Stunted : 691 (36.8%) ███████████\n",
|
||||
" Severely Stunted : 431 (22.9%) ██████\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 9: CEK CLASS BALANCE\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 9: CEK CLASS BALANCE\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"for label, count in df['Status Stunting'].value_counts().items():\n",
|
||||
" rasio = '█' * int(count / len(df) * 30)\n",
|
||||
" print(f\" {label:<20}: {count:>4} ({count/len(df)*100:.1f}%) {rasio}\")\n",
|
||||
"print()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 49,
|
||||
"id": "577601af",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 10: SPLIT TRAIN & TEST (80:20 Stratified)\n",
|
||||
"=======================================================\n",
|
||||
"Train : 1503 baris\n",
|
||||
"Test : 376 baris\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 10: SPLIT TRAIN & TEST (80:20 Stratified)\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 10: SPLIT TRAIN & TEST (80:20 Stratified)\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"X_train, X_test, y_train, y_test = train_test_split(\n",
|
||||
" X, y, test_size=0.2, random_state=42, stratify=y\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"print(f\"Train : {X_train.shape[0]} baris\")\n",
|
||||
"print(f\"Test : {X_test.shape[0]} baris\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 50,
|
||||
"id": "210d6f53",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"TAHAP 11: SIMPAN FILE\n",
|
||||
"=======================================================\n",
|
||||
"File tersimpan:\n",
|
||||
" 📄 dataset_clean.csv\n",
|
||||
" 📄 X_train.csv | X_test.csv\n",
|
||||
" 📄 y_train.csv | y_test.csv\n",
|
||||
"\n",
|
||||
"Mapping label : {0: 'Normal', 1: 'Severely Stunted', 2: 'Stunted'}\n",
|
||||
"\n",
|
||||
"=======================================================\n",
|
||||
"DATA PREPARATION SELESAI — siap training!\n",
|
||||
"=======================================================\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# TAHAP 11: SIMPAN FILE\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"TAHAP 11: SIMPAN FILE\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"\n",
|
||||
"df_clean = df[feature_cols + ['Status Stunting']].copy()\n",
|
||||
"df_clean.columns = ['JK', 'Usia_Bulan', 'Berat', 'Tinggi', 'ZS_TBU', 'Status_Stunting']\n",
|
||||
"\n",
|
||||
"df_clean.to_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/processed/dataset_clean.csv\", index=False)\n",
|
||||
"X_train.to_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/processed/X_train.csv\", index=False)\n",
|
||||
"X_test.to_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/processed/X_test.csv\", index=False)\n",
|
||||
"y_train.to_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/processed/y_train.csv\", index=False, header=True)\n",
|
||||
"y_test.to_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/processed/y_test.csv\", index=False, header=True)\n",
|
||||
"\n",
|
||||
"print(\"File tersimpan:\")\n",
|
||||
"print(\" 📄 dataset_clean.csv\")\n",
|
||||
"print(\" 📄 X_train.csv | X_test.csv\")\n",
|
||||
"print(\" 📄 y_train.csv | y_test.csv\")\n",
|
||||
"\n",
|
||||
"mapping = dict(enumerate(le_stunting.classes_))\n",
|
||||
"print(f\"\\nMapping label : {mapping}\")\n",
|
||||
"print(\"\\n\" + \"=\" * 55)\n",
|
||||
"print(\"DATA PREPARATION SELESAI — siap training!\")\n",
|
||||
"print(\"=\" * 55)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 51,
|
||||
"id": "c4caf0c1",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Hitung ulang ringkasan dari df yang sudah ada\n",
|
||||
"jumlah_awal = len(pd.read_csv(\"C:/TUGAS_AKHIR/stunting_ml/data/raw/stunting_final.csv\"))\n",
|
||||
"jumlah_setelah_filter = len(df) + df['Status Stunting'].isna().sum()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 52,
|
||||
"id": "1587a64f",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=======================================================\n",
|
||||
"DATA PREPARATION SELESAI\n",
|
||||
"=======================================================\n",
|
||||
" Data awal : 1933 baris\n",
|
||||
" Dibuang (usia > 60) : 54 baris\n",
|
||||
" Dibuang (missing/null) : 0 baris\n",
|
||||
" Data final : 1879 baris\n",
|
||||
" Jumlah fitur : 5\n",
|
||||
" Fitur : ['JK', 'Usia_Bulan', 'Berat', 'Tinggi', 'ZS_TBU']\n",
|
||||
" Target model : Status Stunting\n",
|
||||
" Kelas : ['Normal', 'Severely Stunted', 'Stunted']\n",
|
||||
" Data train : 1503 baris\n",
|
||||
" Data test : 376 baris\n",
|
||||
"=======================================================\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# RINGKASAN AKHIR DATA PREPARATION\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(\"DATA PREPARATION SELESAI\")\n",
|
||||
"print(\"=\" * 55)\n",
|
||||
"print(f\" Data awal : {jumlah_awal} baris\")\n",
|
||||
"print(f\" Dibuang (usia > 60) : {jumlah_awal - jumlah_setelah_filter} baris\")\n",
|
||||
"print(f\" Dibuang (missing/null) : {jumlah_setelah_filter - len(df)} baris\")\n",
|
||||
"print(f\" Data final : {len(df)} baris\")\n",
|
||||
"print(f\" Jumlah fitur : {len(feature_cols)}\")\n",
|
||||
"print(f\" Fitur : {list(X_train.columns)}\")\n",
|
||||
"print(f\" Target model : Status Stunting\")\n",
|
||||
"print(f\" Kelas : {le_stunting.classes_.tolist()}\")\n",
|
||||
"print(f\" Data train : {X_train.shape[0]} baris\")\n",
|
||||
"print(f\" Data test : {X_test.shape[0]} baris\")\n",
|
||||
"print(\"=\" * 55)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue