Skip to main content

fishknn

K 최근접 이웃 알고리즘
어떤 데이터에 대한 답을 구할 때 
주위의 다른 데이터들(K)의 근접 거리(이웃범위)를 계산하여
다수를 차지하는 것을 정답으로 예측

배경

파이썬 ML scikit-learn 의 sklearn.neighbors.KNeighborsClassifier 모듈을 이용해 미리 학습된 모델을 이용해 분류(class) 예측이 가능 함을 살펴보았습니다.

프로그램 동작 방식

  • 학습된 모델이 없는 상태에서 출발합니다.
  • 사용자는 길이, 무게 데이터를 처음 입력하고 프로그램을 예측 값을 출력합니다 (도미, 빙어) 이때 프로그램을 학습 데이터가 없어 임의의 값을 예측합니다.
  • 사용자는 예측값의 정답 유무를 다시 입력합니다. ( 이때 프로그램을 예측 이후 정답인지 사용자에게 묻게 됩니다 )
  • 위의 과정을 반복하며 프로그램을 입력된 데이터(훈련데이터)와 정답(타켓) 데이터를 저장하고 있고 입력이 반복 되면 계속 모델을 진화 시켜 나갑니다.

Usage

$ predictor
🐟 물고기의 길이를 입력하세요 (cm): 18.5
🐟 물고기의 무게를 입력하세요  (g): 16
🐟 이 물고기는 빙어입니다.
🐟 예측이 맞습니까? (y/n): y
🐟 예측 성공🥳

Metadata

Release files for seokxkyu_fishknn 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seokxkyu_fishknn 1.0.1
File Size Uploaded Provenance Actions
seokxkyu_fishknn-1.0.1.tar.gz 3.0 kB Without provenance Details for seokxkyu_fishknn-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for seokxkyu_fishknn 1.0.1
File Interpreter ABI Platform Actions
seokxkyu_fishknn-1.0.1-py3-none-any.whl Python 3 none any Details for seokxkyu_fishknn-1.0.1-py3-none-any.whl

Total release size: 6.6 kB

Release files / seokxkyu_fishknn-1.0.1.tar.gz

Download URL seokxkyu_fishknn-1.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c74a87164905dcbda2e880f6a7522c60992e9f1ab55f83e82b6cc97cb81c4a5b
BLAKE2b-256 checksum
How to use checksums
df2a5d1c0ead5b55cb565553b30f0dc773adf06a1806f8060f943fd3ccc200c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.17.1 CPython/3.12.4 Linux/5.15.153.1-microsoft-standard-WSL2

Release files / seokxkyu_fishknn-1.0.1-py3-none-any.whl

Download URL seokxkyu_fishknn-1.0.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8115ea083c19687f4da77f01b4d7c680faa2350e42c93e3cb7f5522ce928c60c
BLAKE2b-256 checksum
How to use checksums
c437ab9fb55cf9cc354eda929f321507cdb1b63af45b616e65a5bac19a185793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.17.1 CPython/3.12.4 Linux/5.15.153.1-microsoft-standard-WSL2

Security for seokxkyu_fishknn 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page