{"id":15043606,"url":"https://github.com/subhash3/neural_net_using_numpy","last_synced_at":"2025-04-14T23:11:11.118Z","repository":{"id":47213828,"uuid":"258428209","full_name":"Subhash3/Neural_Net_Using_NumPy","owner":"Subhash3","description":"Feed Forward Neural Networks using Numpy","archived":false,"fork":false,"pushed_at":"2023-02-08T01:55:57.000Z","size":241,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T11:11:46.604Z","etag":null,"topics":["feedforward-neural-network","from-scratch","neural-network","nicenet","numpy","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/nicenet","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Subhash3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-24T06:39:01.000Z","updated_at":"2022-04-16T15:01:50.000Z","dependencies_parsed_at":"2024-09-25T01:50:01.161Z","dependency_job_id":"825ee32f-9c44-4f91-bc3a-4b78a4d36d07","html_url":"https://github.com/Subhash3/Neural_Net_Using_NumPy","commit_stats":{"total_commits":188,"total_committers":5,"mean_commits":37.6,"dds":0.02659574468085102,"last_synced_commit":"1dbd7c3f7e7e08735d7e1ae38ac04b2ed1a8d447"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhash3%2FNeural_Net_Using_NumPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhash3%2FNeural_Net_Using_NumPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhash3%2FNeural_Net_Using_NumPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Subhash3%2FNeural_Net_Using_NumPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Subhash3","download_url":"https://codeload.github.com/Subhash3/Neural_Net_Using_NumPy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975316,"owners_count":21192210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["feedforward-neural-network","from-scratch","neural-network","nicenet","numpy","python3"],"created_at":"2024-09-24T20:49:19.962Z","updated_at":"2025-04-14T23:11:11.099Z","avatar_url":"https://github.com/Subhash3.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feed Forward Neural Networks using NumPy\nThis library is a modification of my previous one. [Click Here](https://github.com/Subhash3/Neural-Networks/tree/master/Feed_Forward_Networks) to check my previous library.\n\n\n## Installation  \n```bash\n$ [sudo] pip3 install nicenet\n``` \n\n## Development Installation\n```bash\n$ git clone https://github.com/Subhash3/Neural_Net_Using_NumPy.git\n```\n\n## Usage\n\n```python3\n\u003e\u003e\u003e from nicenet import NeuralNetwork\n```\n### Creating a Neural Network\n```python3\ninputs = 2\noutputs = 1\nnetwork = NeuralNetwork(inputs, outputs, cost=\"mse\")\n\n# Add 2 hidden layers with 16 neurons each and activation function 'tanh'\nnetwork.add_layer(16, activation_function=\"tanh\") \nnetwork.add_layer(16, activation_function=\"tanh\")\n\n# Finish the neural network by adding the output layer with sigmoid activation function.\nnetwork.compile(activation_function=\"sigmoid\")\n```\n### Building a dataset\nThe package contains a Dataset class to create a dataset.\n\n```python3\n\u003e\u003e\u003e from nicenet import Dataset\n```\n\nMake sure you have inputs and target values in seperate files in csv format.\n\n```python3\ninput_file = \"inputs.csv\"\ntarget_file = \"targets.csv\"\n\n# Create a dataset object with the same inputs and outputs defined for the network.\ndataset_handler = Dataset(inputs, outputs)\ndataset_handler.make_dataset(input_file, target_file)\ndata, size = dataset_handler.get_raw_data()\n```\n\nIf you want to manually make a dataset, follow these rules:\n- Dataset must be a list of data samples.\n- A data sample is a tuple containing inputs and target values.\n- Input and target values are column vector of size (inputs x 1) and (outputs x 1) respectively.\n\nFor eg, a typical XOR data set looks something like :\n```python3\n\u003e\u003e\u003e XOR_data = [\n    (\n        np.array([[0], [0]]),\n        np.array([[0]])\n    ),\n    (\n        np.array([[0], [1]]),\n        np.array([[1]])\n    ),\n    (\n        np.array([[1], [0]]),\n        np.array([[1]])\n    ),\n    (\n        np.array([[1], [1]]),\n        np.array([[0]])\n    )\n]\n\u003e\u003e\u003e size = 4\n```\n\n### Training The network\nThe library provides a *Train* function which accepts the dataset, dataset size, and two optional parameters epochs, and logging.\n```python3\ndef Train(self, dataset: T_Dataset, size, epochs=100, logging=False, epoch_logging=True, prediction_evaulator=None):\n\t....\n\t....\n```\nFor Eg: If you want to train your network for 1000 epochs.\n```python3\n\u003e\u003e\u003e network.Train(data, size, epochs=1000)\n```\nNotice that I didn't change the value of `logging` as I want the output to be printed for each epoch.\n\n\n### Debugging\nPlot a nice epoch vs error graph\n```python3\n\u003e\u003e\u003e network.epoch_vs_error()\n```\n\nKnow how well the model performed.\n```python3\n\u003e\u003e\u003e network.evaluate()\n```\n\nTo take a look at all the layers' info\n```python3\n\u003e\u003e\u003e network.display()\n```\n\nSometimes, learning rate might have to be altered for better convergence.\n```python3\n\u003e\u003e\u003e network.set_learning_rate(0.1)\n```\n\n### Exporting Model\nYou can export a trained model to a json file which can be loaded and used for predictions in the future.\n```python3\nfilename = \"model.json\"\nnetwork.export_model(filename)\n```\n\n### Load Model\nTo load a model from an exported model (json) file.\nload\\_model is a static function, so you must not call this on a NeuralNetwork object!.\n```python3\nfilename = \"model.json\"\nnetwork = NeuralNetwork.load_model(filename)\n```\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## API\n#### [`NeuralNetwork`](https://github.com/Subhash3/Neural_Net_Using_NumPy/blob/master/docs/markdown/NeuralNetwork.md)\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef __init__(self, I, O, cost=\"mse\"):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef __init__(self, I, O, cost=\"mse\"):\n        \"\"\"\n        Creates a Feed Forward Neural Network.\n\n        Parameters\n        ----------\n        I : int\n            Number of inputs to the network\n\n        O : int\n            Number of outputs from the network\n\n        [cost]: string\n            The cost/loss function used by the neural network.\n            Default value is 'mse' which stands for Mean Squared Error.\n\n            Available options:\n                mse =\u003e Mean Squared Error\n                ce =\u003e Cross Entropy\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef set_learning_rate(self, lr):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef set_learning_rate(self, lr):\n        \"\"\"\n        Modifies the learning rate of the network.\n\n        Parameters\n        ----------\n        lr : float\n            New learning rate\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef add_layer(self, num_nodes, activation_function=\"sigmoid\"):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef add_layer(self, num_nodes, activation_function=\"sigmoid\"):\n        \"\"\"\n        Adds a layer to the network.\n\n        Parameters\n        ----------\n        num_nodes : int\n            Number of nodes in the hidden layer\n\n        [activation_function] :str\n            It is an optional parameter.\n            Specifies the activation function of the layer.\n            Default value is sigmoid.\n\n            Available options:\n                sigmoid,\n                tanh,\n                linear,\n                identity,\n                softmax\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef compile(self, activation_function=\"sigmoid\"):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef compile(self, activation_function=\"sigmoid\"):\n        \"\"\"\n        Basically, it just adds the output layer to the network.\n\n        Parameters\n        ----------\n        [activation_function] :str\n            It is an optional parameter.\n            Specifies the activation function of the layer.\n            Default value is sigmoid.\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef feedforward(self, input_array: T_Feature_Array):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef feedforward(self, input_array: T_Feature_Array):\n        \"\"\"\n        Feeds the given input throughout the network\n\n        Parameters\n        ----------\n        input_array : T_Feature_Array\n            Input to be fed to the network.\n            It is columnar vector of size Inputs x 1\n\n        Returns\n        -------\n        all_outputs : T_Output_Array\n            An array of all the outputs produced by each layer.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef backpropagate(self, target: T_Target_Array):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef backpropagate(self, target: T_Target_Array):\n        \"\"\"\n        Backpropagate the error throughout the network\n        This function is called inside the model only.\n\n        Parameters\n        ----------\n        target : np.array()\n            It is the ground truth value corresponding to the input.\n            It is columnar vector of size Outputs x 1\n\n        Returns\n        -------\n        Error : float\n            # Returns the Mean Squared Error of the particular output\n            Returns the error using the specified loss function.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef update_weights(self, input_array: T_Feature_Array):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef update_weights(self, input_array: T_Feature_Array):\n        \"\"\"\n        Update the weights of the network.\n        This function is called inside the model only.\n\n        Parameters\n        ----------\n        input_array : np.array()\n            It is the input fed to the network\n            It is columnar vector of size Inputs x 1\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef Train(self, dataset: T_Dataset, size, epochs=100, logging=False, epoch_logging=True, prediction_evaulator=None):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef Train(self, dataset: T_Dataset, size, epochs=100, logging=False, epoch_logging=True, prediction_evaulator=None):\n        \"\"\"\n        Trains the neural network using the given dataset.\n\n        Parameters\n        ----------\n        dataset : T_Dataset\n\n        size : int\n            Size of the dataset\n\n        [epochs] : int\n            An optional parameter.\n            Number of epochs to train the network. Default value is 5000\n\n        [logging] : bool\n            An optional parameter.\n            If its true, all outputs from the network will be logged out onto STDOUT for each epoch.\n\n        [epoch_logging] : bool\n            An optional parameter.\n            If it is true, Error in each epoch will be logged to STDOUT.\n\n        [prediction_evaulator]: (prediction: T_Output_Array, target: T_Output_Array) -\u003e bool\n            An optional parameter.\n            Used to evaluate the fed forward output with the actual target.\n            Default value is 'Utils.judge_prediction' function.\n\n        Returns\n        -------\n        Doesn't return anything.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef predict(self, input_array: T_Feature_Array):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef predict(self, input_array: T_Feature_Array):\n        \"\"\"\n        Predicts the output using a given input.\n\n        Parameters\n        ----------\n        input_array : np.array()\n            It is columnar vector of size Inputs x 1\n            It is the input fed to the network\n\n        Returns\n        -------\n        prediction : np.array()\n            Predicted value produced by the network.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef epoch_vs_error(self):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef epoch_vs_error(self):\n        \"\"\"\n        Plot error vs epoch graph\n\n        Parameters\n        ----------\n        Doesn't accept any parameters\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef evaluate(self):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef evaluate(self):\n        \"\"\"\n        Print the basic information about the network.\n        Like accuracy, error ..etc.\n\n        Parameters\n        ----------\n        Doesn't accept any parameters\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef display(self):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef display(self):\n        \"\"\"\n        Print the information of each layer of the network.\n        It can be used to debug the network!\n\n        Parameters\n        ----------\n        Doesn't accept any parameters\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef export_model(self, filename):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef export_model(self, filename):\n        \"\"\"\n        Export the model to a json file\n\n        Parameters\n        ----------\n        filename: str\n            File name to export model\n\n        Returns\n        -------\n        Doesn't return anything\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef load_model(filename):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef load_model(filename):\n        \"\"\"\n        Load model from an eported (json) model\n\n        Parameters\n        ----------\n        filename : str\n            Exported model (json) file\n\n        Returns\n        -------\n        brain : NeuralNetwork\n            NeuralNetwork object\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n#### [`Layer`](https://github.com/Subhash3/Neural_Net_Using_NumPy/blob/master/docs/markdown/Layer.md)\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef __init__(self, num_nodes, inputs, activation_function, loss_function):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef __init__(self, num_nodes, inputs, activation_function, loss_function):\n        \"\"\"\n            Layer constructor\n\n            Parameters\n            ----------\n            num_nodes : int\n                No. of nodes in the layer\n\n            inputs : int\n                No. of inputs to the layer\n\n            activation_function\n\n            Returns\n            -------\n            None\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef feed(self, input_array: T_Feature_Array) -\u003e T_Output_Array:\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef feed(self, input_array: T_Feature_Array) -\u003e T_Output_Array:\n        \"\"\"\n            Feeds the given input array to a particular layer.\n\n            Parameters\n            ----------\n            input_array: T_Feature_Array\n                Input array to be fed to the layer\n\n            Returns\n            -------\n            output_array: T_Output_Array\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef activate(self, x):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef activate(self, x):\n        \"\"\"\n            Passes the output array to an activation function.\n\n            Parameters\n            ----------\n            x\n                Output array from a layer\n\n            Returns\n            -------\n            Activated output\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef calculate_gradients(self, target_or_weights, layer_type, next_layer_deltas=None):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef calculate_gradients(self, target_or_weights, layer_type, next_layer_deltas=None):\n        \"\"\"\n            Calculates the gradients for each weight and bias\n\n            Parameters\n            ----------\n            target_or_weights\n                This is either targers array of weights matrix.\n                Specifically, it'll be the targets array while computing the gradients for the output layer\n                and weights matrix of the next layer.\n\n            layer_type\n                This will either be \"hidden\" or \"output\"\n\n            [next_layer_deltas]\n                This is (not exactly) an optional parameter.\n                This will be passed only while computing the gradients of a hidden layer.\n\n            Returns\n            -------\n                Doesn't return anything. But stores the gradients as a class attribute.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef update_weights(self, inputs, learning_rate):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef update_weights(self, inputs, learning_rate):\n        \"\"\"\n            Tweak the weights of the layer.\n\n            Parameters\n            ----------\n            inputs: T_Feature_Array\n                Input to this network\n\n            learning_rate: float\n                Learning rate of the entire network.\n\n            Returns\n            -------\n            Doesn't return anything.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef display(self):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef display(self):\n        \"\"\"\n            Display the metadata of the layer.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n#### [`Dataset`](https://github.com/Subhash3/Neural_Net_Using_NumPy/blob/master/docs/markdown/Dataset.md)\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef __init__(self, I, O):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef __init__(self, I, O):\n        \"\"\"\n            Dataset Constructor\n\n            Parameters\n            ----------\n            I: int\n                No of inputs\n            O: int\n                No of outputs\n\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef make_dataset(self, input_file, target_file):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef make_dataset(self, input_file, target_file):\n        \"\"\"\n            Creates a dataset\n\n            Parameters\n            ----------\n            input_file: str\n                csv file containing the features/inputs.\n            target_file: str\n                csv file containing the targets.\n\n            Returns\n            -------\n            Doesn't return anything.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef get_raw_data(self):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef get_raw_data(self):\n        \"\"\"\n            Returns the dataset which was made earlier in make_dataset method\n\n            Parameters\n            ----------\n            Doesn't accept anything\n\n            Returns\n            Tuple[T_Dataset, int]\n                Dataset and its size\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef display(self):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef display(self):\n        \"\"\"\n            Prints the dataset\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef open_file(filename):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef open_file(filename):\n        \"\"\"\n            Just a helper function to open a given file and handle errors if any.\n\n            Parameters\n            ----------\n            filename: str\n                Filename to be opened\n\n            Returns\n            -------\n            fhand\n                A filehandler corresponding to the given file.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef get_min_max_values(self, array: T_Dataset):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef get_min_max_values(self, array: T_Dataset):\n        \"\"\"\n            Computes the min and max of each feature, and each target label of the entire dataset.\n\n            Parameters\n            ----------\n            array : List[List[np.array]]\n                List of datasamples\n                datasample = [\n                    column vector of features,\n                    column vector of of targets\n                ]\n\n            Returns\n            -------\n            Tuple[List[float]]\n                min and max values of features and targets\n                (min_max_of_features, min_max_of_targets)\n                min_max_of_features = List[[min_of_ith_feature, max_of_ith_feature]]\n                min_max_of_targets = List[[min_of_ith_target, max_of_ith_target]]\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003ccode\u003edef scale_data(self, array: T_Dataset, size):\u003c/code\u003e\u003c/summary\u003e\n\u003cp\u003e\n\n```python\ndef scale_data(self, array: T_Dataset, size):\n        \"\"\"\n            Scales the data using min-max scaling method.\n\n            parameters\n            ----------\n            array: T_Dataset\n                Dataset to be scaled.\n\n            size: int\n                Size of the given dataset.\n\n            Returns\n            -------\n            array: T_Dataset\n                Scaled dataset.\n        \"\"\"\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n#### [`ActivationFunction`](https://github.com/Subhash3/Neural_Net_Using_NumPy/blob/master/docs/markdown/ActivationFunction.md)\n\n\n\u003cbr/\u003e\n\n#### [`LossFunctions`](https://github.com/Subhash3/Neural_Net_Using_NumPy/blob/master/docs/markdown/LossFunctions.md)\n\n\n\u003cbr/\u003e\n\n#### [`Utils`](https://github.com/Subhash3/Neural_Net_Using_NumPy/blob/master/docs/markdown/Utils.md)\n\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n### Todo\n    - [x] Generalize the gradient descent algorithm\n        - [x] Generalise the loss function =\u003e Write a separate class for it!\n    - [x] Implement Cross Entropy Loss\n    - [ ] Data scaling\n        - [x] Min Max scaler\n        - [ ] Data Standardization\n    - [x] Change the datasample type to a tuple instead of a list.\n    - [x] Show Progress bar if epoch_logging is False\n    - [x] Use a function as a parameter to Train method to compare predictions and actual targets.\n    - [x] convert all camel-cased vars to snake-case.\n\n    - [x] API docs\n        - [x] Add doc strings to all functions.\n        - [x] Make the class/function declarations' docs collapsable.\n        - [x] Merge API md files and embed them in Readme.\n        - [x] Create a section, API, in README to provide documentation for all prototypes.\n\n    - [ ] Implement Batch Training\n    - [ ] Write a separate class for Scalers as the scaling methods increase.\n    - [ ] Linear and Relu activation functions\n    - [ ] Ability to perform regression\n    - [ ] Separate out outputlayer from other layers. =\u003e Create a separate class for output layer which inherits Layer.\n\n\n    - [ ] Convolution Nets\n    - [ ] Recurrent Nets","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubhash3%2Fneural_net_using_numpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubhash3%2Fneural_net_using_numpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubhash3%2Fneural_net_using_numpy/lists"}