Causal discovery with ML
Project description
rosnet
๐ฐ๐ท โrosnetโ ์ ML์ ์ ์ฉํ causal discovery ํจํค์ง์ ๋๋ค. ์ ๊ฐ์ธ ์ฐ๊ตฌ๋ฅผ ์ํด ๋ง๋ค์์ง๋ง, ๋ค๋ฅธ ์ฌ๋๋ค๋ ์ต๋ํ ์ฌ์ฉํ๊ธฐ ์ฝ๋๋ก ์ค๊ณํ์ต๋๋ค. ๋ชจ๋ ์ฝ๋๋ ํผ์์ ์์ฑํ์ต๋๋ค. ๋ค๋ง, ์ด์ฉ์์ ํธ์๋ฅผ ์ํด ๋ค๋ฅธ ํจํค์ง์ API ์ค๊ณ๋ฅผ ๋ฐ๋ผํ๊ธด ํ์ต๋๋ค.
๐ โrosnetโ is causal discovery package applied ML . I made it for my personal study. But, it is designed to be used as easy for others as possible. I created all the codes by myself. However, for the user's convenience, I followed the API design of other packages.
๋ชฉ์ / Purpose
๐ฐ๐ท ์ด ํจํค์ง์ ๋ชฉ์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค :
- ML ์๊ณ ๋ฆฌ์ฆ์ Causal discovery์ ์ ์ฉ
- ํ ์ ๊ธฐ๋ฐ์ผ๋ก ๊ธฐ์กด ML ์๊ณ ๋ฆฌ์ฆ ์ฌ์ค๊ณ
๐ The purpose of this package is as follows :
- Applying ML algorithm to Causal discovery
- Re-engineering existing ML algorithm based on tensor
์ค์น / Installment
!pip install rosnet
๐ ์๊ตฌ ํจํค์ง / Required package
- numpy
์ฌ์ฉ๋ฒ / Manual
๐ฐ๐ท ์ด ํจํค์ง์ API๋ scikit-learn, keras ์ ๊ฑฐ์ ๋น์ทํฉ๋๋ค!
- ์ค์ง
fit
๊ณผpredict
, ๋ ๊ฐ์ ํจ์๋ง ์ฌ์ฉํ์๋ฉด ๋ฉ๋๋ค.
๐ API of this package is just like scikit-learn and keras!
- You only need to use two functions:
fit
andpredict
.
์์ / Example
# Multilayer Perceptron
# **Notice** : I made some ML algorithm as needed, but not all of them.
# If you just want to use ML algorithm itself,
# it is recommened to use other ML packages like scikit-learn, tensorflow ...
from rosnet.neural_network import layers
import rosnet.neural_network as network
X_train = # Your code, numpy.narray expected
y_train = # Your code, numpy.narray expected
def build_model():
model = network.Sequential([
layers.Dense(64, activation='relu', input_shape=(X_train.shape[1], )),
layers.Dense(64, activation='relu'),
layers.Dense(64, activation='relu'),
layers.Dense(64, activation='relu'),
layers.Dense(4)
])
optimizer = network.optimizers.SGD(0.001)
model.compile(loss='mse',
optimizer=optimizer,
metrics=['mae', 'mse'])
return model
model = build_model()
model.fit(X_train, y_train,
epochs=100,
batch_size = 1000,
validation_split = 0.2,
verbose = 0)
๊ฐ๋ฐ ๊ธฐ๋ก / Development log
0.0.1 - 22.03.26
- rosnet.neural_network
- rosnet.neural_network.Sequential add
- rosnet.neural_network.layers add
- rosnet.neural_network.optimizers add
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.