Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Daniel J. Rodriguez danieljoserodriguez

🎯
Focusing
Block or report user

Report or block danieljoserodriguez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danieljoserodriguez
danieljoserodriguez / nn_multiple_neurons_and_layers.py
Last active Aug 21, 2019
Neural Network - Python - Simplest Multiple Neurons and Layers - Feed Forward
View nn_multiple_neurons_and_layers.py
# Daniel J. Rodriguez
# https://github.com/danieljoserodriguez
# This Gist is for information purposes only to demonstrate how to perform the task at hand.
# I do not advise using this in a production environment - rather - for learning on your own
# multiple inputs and layers neural network
import numpy as np
# neuron layers
@danieljoserodriguez
danieljoserodriguez / nn_multiple_neurons.py
Last active Aug 21, 2019
Neural Network - Python - Simplest Multiple Neurons
View nn_multiple_neurons.py
# Daniel J. Rodriguez
# https://github.com/danieljoserodriguez
# This Gist is for information purposes only to demonstrate how to perform the task at hand.
# I do not advise using this in a production environment - rather - for learning on your own.
# simple multiple inputs neural network
########################################################################
# just python - no extra libraries
def sum_weights(inputs, weights):
@danieljoserodriguez
danieljoserodriguez / nn_single_neuron.py
Last active Aug 21, 2019
Neural Network - Python - Simplest Single Neuron
View nn_single_neuron.py
# Daniel J. Rodriguez
# https://github.com/danieljoserodriguez
# This Gist is for information purposes only to demonstrate how to perform the task at hand.
# I do not advise using this in a production environment - rather - for learning on your own.
# simplest neural network - single input / neuron
neuron_weight = 0.1
test_scores = [99, 75]
neuron_prediction = test_scores[0] * neuron_weight
@danieljoserodriguez
danieljoserodriguez / losses.py
Last active Aug 21, 2019
Machine Learning Loss Functions
View losses.py
# Daniel J. Rodriguez
# https://github.com/danieljoserodriguez
import numpy as np
# Cross-entropy loss, or log loss, measures the performance of a classification model whose output is a
# probability value between 0 and 1
def cross_entropy(y_hat, y):
return -np.log(y_hat) if y == 1 else -np.log(1 - y_hat)
@danieljoserodriguez
danieljoserodriguez / activations.py
Last active Aug 25, 2019
Machine Learning Activation Functions
View activations.py
# Daniel J. Rodriguez
# https://github.com/danieljoserodriguez
import numpy as np
# A straight line function where activation is proportional to input
# ( which is the weighted sum from neuron ).
# In mathematics, an identity function, also called an identity relation or
You can’t perform that action at this time.