{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"#Normalization refers to rescaling real-valued numeric attributes into a 00 to 11 range.\n#Data normalization is used in machine learning to make model training less sensitive to \n#the scale of features. This allows our model to converge to better weights and, in turn, leads to a more accurate model.\n#Python provides the preprocessing library, which contains the normalize function to normalize the data. \n#It takes an array in as an input and normalizes its values between 00 and 11. \n#It then returns an output array with the same dimensions as the input.\n\nfrom sklearn import preprocessing\nimport numpy as np\n\na = np.random.random((1, 4))\na = a*20\nprint(\"Data = \", a)\n\n# normalize the data attributes\nnormalized = preprocessing.normalize(a)\nprint(\"Normalized Data = \", normalized)","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2021-10-09T17:40:36.148024Z","iopub.execute_input":"2021-10-09T17:40:36.148964Z","iopub.status.idle":"2021-10-09T17:40:36.157509Z","shell.execute_reply.started":"2021-10-09T17:40:36.148911Z","shell.execute_reply":"2021-10-09T17:40:36.156288Z"},"trusted":true},"execution_count":null,"outputs":[]}]}