Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #14

Merged
merged 11 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions app/docs/fisika/entropy/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# entropy

Rumus:

```
H(X) = -∑p(x)log(p(x))
```

Fungsi [sumber kode [disini](https://github.com/slowy07/OpenSeries/blob/b676b188a1d347c1552069cfa66673493b6999c1/OpenSeries/statistika.py#L6)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untuk linknya arahkan jangan ke fork tapi ke openseriesnya contoh disini

https://github.com/bellshade/OpenSeries/blob/b676b188a1d347c1552069cfa66673493b6999c1/OpenSeries/statistika.py#L6


```python
def entropy(
label: list[int], base: int = None
) -> Union[float, int, str]:
```

Contoh Kode

```python
from OpenSeries import statistika as statistika

# contoh dari entropy
label = [1, 1, 2, 2, 3, 3]
hasil_base_2 = statistika.entropy(label, base=2)
print(hasil_base_2)
```

## Coba Sekarang

<iframe src="https://replit.com/@ItsArul/entropy?embed=1&theme=light" className="aspect-video w-full" />
6 changes: 5 additions & 1 deletion constants/documentations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export const documentations = [
{
title: "Hukum Ohm",
href: "/docs/fisika/hukum-ohm"
}
},
{
title: "Hukum entropy",
href: "/docs/fisika/entropy"
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entropy tidak dalam fisika tapi buat kategori terbaru yang bernama Statistika

]
}
];
Loading