oneNeuron_pypi
oneNeuron_pypi
How to use this
- In the main file create DataFrame for any of the logic gate
- import Perceptron from oneNeuron.perceptron API
- import prepare_data,save_model and save_plot from utils.all_utils API
- There are loggong modules already present in the API's. So, paste the below code as it is in the start of main file
logging_str = "[%(asctime)s: %(levelname)s: %(module)s] %(message)s"
logs_dir = "logs"
os.makedirs(logs_dir, exist_ok=True)
logging.basicConfig(filename=os.path.join(logs_dir, "running_logs.log"),level=logging.INFO, format=logging_str
,filemode='a')
- The above logging code creates logs directory and do the logging in running_logs.log file
- Then train the model accordingly and include logging wherever needed in the main program
from oneNeuron.perceptron import Perceptron
## get X and y and then use below commands
model = Perceptron(eta=eta, epochs=epochs)
model.fit(X,y)