![]() The next thing to consider is why we usually use NumPy arrays over lists. I believe it covers more than one can possibly need. Numpy covers not only arrays manipulation but also many other routines such as binary operations, linear algebra, mathematical functions, and more. However, when it comes to NumPy as a whole. Therefore, there is nothing NumPy arrays do lists do not. So, we can say that NumPy arrays live under the lists’ umbrella. While Python lists store a collection of ordered, alterable data objects, NumPy arrays only store a single type of object. Originally known as ‘Numeric,’ NumPy sets the framework for many data science libraries like SciPy, Scikit-Learn, Panda, and more. It is open-source, easy to use, memory friendly, and lightning-fast. NumPy is the de-facto Python library for N-dimensional arrays manipulation and computational computing. Let us discuss the difference between NumPy arrays and lists, to begin with. That being said, in this post, I will walk you through the exact situation where lists ended up performing way better than NumPy arrays. Much to my surprise, the execution time didn’t shrink. Guess what happened after converting my list code to NumPy array code? I was storing data in lists, and since NumPy is super fast, I thought using it might be a viable option. One option was to boost my code in terms of data structure. Therefore, I decided to look for optimization rooms in my code.īecause I was using the pre-built machine learning algorithms residing in PyPi - Scikit-Learn and Tensorflow - very few subroutines were left to optimize. Yet, I wanted to try many other Convolutional Neural Network (CNN) architectures before sending in my code. I was satisfied with the accuracy of the model. I imagine if I had been working on a 1 million record dataset, I would have had to wait for the earth to do a complete rotation before the end of the training. All because of the overfitting parasite and my useless low-end hardware.įor each execution, my machine took approximately 15–20 min. Hyperparameter tuning took quite some time before I got the desired accuracy. I have been recently working on a digital image processing project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |