I built a really cool Neural Network model with Tensorflow for cancer detection! #1358
vaipos
started this conversation in
Show and tell
Replies: 4 comments
|
I hope this was something worth while! |
0 replies
|
Thanks for sharing this! @vaipos , can you add more details like some document, test result etc. |
0 replies
|
Yes sure! I am just getting familiar with some cool graphing techniques from Tensorboard and Keras's data viz tools, so I can provide you with an analytical graph sometime soon! But for now, here is the accuracy of this model and the dataset that was used! |
0 replies
|
I have also built some Linear Regression and Logistics Regression models from SCRATCH (no scikit or tensorflow). This one has the dataset used, code, and graph based results! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
With the help of Kaggle and my current certification, I put some extra time into building this project. It has an accuracy rate of 85.67% and I would like to opensource it with y'all!
`import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from sklearn.preprocessing import MinMaxScaler
data = pd.read_csv('sample_data/breast-cancer.csv')
data['diagnosis'] = data['diagnosis'].map({'B':1,'M':0})
x_train = data.drop('diagnosis', axis = 1)
y_train = data['diagnosis']
model = Sequential([
Dense(units = 31, activation= 'relu'),
Dense(units = 25, activation= 'relu'),
Dense(units = 20, activation= 'relu'),
Dense(units = 1, activation= 'sigmoid')
])
model.compile(
loss=tf.keras.losses.BinaryCrossentropy(from_logits=True),
optimizer = tf.keras.optimizers.Adam(learning_rate=0.01),
)
model.fit(
x_train, y_train,
epochs=200,
)
accuracy = model.evaluate(x_train, y_train)
print(f'Accuracy: {accuracy * 100:.2f}%')`
All reactions