- 9
- 43 754
HysterResearch
United Kingdom
เข้าร่วมเมื่อ 4 พ.ค. 2020
Programming and coding tutorials for science based applications in Python and MATLAB.
Euler Angles - Explained with Code! (Matlab Demonstration)
In this video, we explore Euler Angles and break down rigid body rotations into the core components.
-------------------------------------------------------------------------------------------
Github Code:
github.com/hysterresearch/Euler_Angles
-------------------------------------------------------------------------------------------
Twitter:
HysterResearch
-------------------------------------------------------------------------------------------
Github Code:
github.com/hysterresearch/Euler_Angles
-------------------------------------------------------------------------------------------
Twitter:
HysterResearch
มุมมอง: 4 432
วีดีโอ
Finding the Intersect of Two Lines (Matlab)
มุมมอง 7Kปีที่แล้ว
This video demonstrates how to find the intersect of two lines analytically using Matlab. Github Code: github.com/hysterresearch/Line_Intersections
Optimisation (Python with Numba) Part 1: Bat Algorithm
มุมมอง 3.5K3 ปีที่แล้ว
In this video, the Bat Algorithm is implemented in Python to solve multi-objective optimisation problems. The implementation uses Numba, which is a Python-style compiling. Numba - numba.pydata.org OPTIMISATION IN MATLAB Part 1: Optimisation Test Functions (th-cam.com/video/5A0vKIIG36c/w-d-xo.html) Part 2: Bat Algorithm Optimisation (th-cam.com/video/aKdpdWwQ7aw/w-d-xo.html) Part 3: Particle Swa...
Sorting Algorithms: Selection Sort (MATLAB)
มุมมอง 2.1K4 ปีที่แล้ว
Sorting Algorithms: Selection Sort (MATLAB)
Sorting Algorithms: Insertion Sort (MATLAB)
มุมมอง 2.1K4 ปีที่แล้ว
This is an introduction and explanation to the insertion sorting algorithm and how this algorithm can be coded in Matlab
Sorting Algorithms: Bubble Sort (MATLAB)
มุมมอง 8K4 ปีที่แล้ว
This is an introduction and explanation on how to code the Bubble Sort Algorithm in Matlab.
Optimisation (MATLAB) Part 3: Particle Swarm Optimisation
มุมมอง 3.1K4 ปีที่แล้ว
Part 1: Optimisation Functions th-cam.com/video/5A0vKIIG36c/w-d-xo.html Part 2: Bat Algorithm th-cam.com/video/aKdpdWwQ7aw/w-d-xo.html In Part 3 we learn to code the Particle Swarm Optimisation (PSO). PSO is a very population optimisation technique which mimics the movement of birds and fish using inertia and acceleration components. If you aren't familiar with the concept have a look at the li...
Optimisation (MATLAB) Part 2: Bat Algorithm
มุมมอง 7K4 ปีที่แล้ว
Part 1: Coding Optimisation Functions th-cam.com/video/5A0vKIIG36c/w-d-xo.html In Part 2 we will be coding up a simple Bat Algorithm which is a hybrid meta-heuristic algorithm between Particle Swarm Optimisation and Harmony Search.
Optimisation (MATLAB) Part 1: Optimisation Functions
มุมมอง 7K4 ปีที่แล้ว
In part one we will code optimisation test functions in Matlab. These functions are artificial surfaces which are described by a single equation and are used to test the performance of optimisation algorithms. What is Optimisation? (Medium): www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=25&cad=rja&uact=8&ved=2ahUKEwiL4szmvZ_pAhXsURUIHffaD1oQFjAYegQIBxAB&url=https://medium.com/fintechexp...
From where these values/ formula for a1,a2,b1,b2 comes from??
might be my favourite channel on youtube
This didnt work for me
how can i contact with you ?
hey man are u here I have some questions if you are willing to help me
This is good.... just the captions are little weird and misleading... it says "Butt algorithm".... by the way, i liked this video. and the bat algorithm... i was studing the BAPSO(bat algo and particle swarm) and i landed here.. this is good
Will have to take a look at this, I am imagining the captions are auto-generated… just a shame they have faltered at that specific instance! Glad you liked the video regardless!
@@HysterResearch haha regardless it was a good video
Nice and clear and thank you for providing the source code. Just I don't quite get @12:55 why you multiple *yaw x pitch x roll* in that order. The Euler rotation sequence you choose should be Z-->Y-->X (or Psi-->Theta-->Phi) hence the first matrix-vector multiplication, should be *yaw x v*. The second rotation applies after the first rotation: *pitch x (yaw x v)*. So shouldn't the cosine matrix be *roll x pitch x yaw* instead? The first to last matrix transformation should go from right to left.
I need help programming an algorithm in MATLAB, can you help me?
amazing explanation . Thank you so much
Great video! Just had a question, I am new to matlab so wanted to ask, why did you define unit vectors as 3x2 matrices and not as single column matrices?
That’s a great question. In this scenario, you are right - it is not necessary and you could have them simply as 3x1 where each position is defined solely by the end point. However, for further problems in the future, we might have a system which has more than one reference frame where the origin of the unit vector coordinates are not zero values. So it’s just good house keeping to keep for the future
Can't see any use of the pulse rate?
Thanks for noticing! You’re absolutely right - it’s a mistake. On line 88 I check a random value against the loudness of the bat, this should be the pulse rate
Dear Sir/Madam, I need a technical support to implement Particle Swarm Optimization into my problem. I can pay money for your technical support. Would you like to help me? I am trying to use MATLAB toolbox for PSO. I have function file in MATLAB.
Marvelous
Do you work on brain storm optimization Algorithm?
I am not familiar with this optimisation algorithm, but I will check it out!
Could you please share this code ? thank a lot!
I would like to ask you something. If Numba is so good at optimizing, why i see little to no improvement over using just purely numpy? I have seen the "vectorization" (title: High-Performance Computing with Python: Numba Vectorize) video one day, which was about making the use of numba vectorize vs. numpy vectorize, but when i used just plain element-wise matmul, results were the same and it was pretty much on par with numba vectorized version Isn't it that i miss something?
For many applications, you won’t notice much difference. Conventional programming and the increase computationally speed we experienced over recent years has began leading to readable code over unnecessarily efficient code. Nevertheless, using Numba for this application does pose a speed advantage, but you have to jump through compatibility hurdles. Essentially, Numba generates C code for execution, meaning that the first run will require generation of the code and subsequent handle calls will have much faster execution. However, if you continue to re-run the compilation, you will not experience any benefit. I am unsure fully of your context, but just ensure you are not re-compiling the code during each call.
@@HysterResearch i was messing around with the possibilities numba offers and was checking how this particular feature worked from that video. What i wanted to use it for, is my implementation of neural network layers, based on different neuron types. The types i wanted to use were taken from the book of one of academic lecturers here in Poland. Those were: simple perceptron based layer (with bias, represented as simple list of variables in pure python), sigmoid based, and radial function neurons (same representation). However when i tried just simple matmul to calculate the impact of the backpropagation, as well as feedforward operations (my end goal and possible speed increase as i thought so) effects were underwhelming to say the least
However one of the challenges i posed to myself was to use numba without relying on the numpy, so in the mode where it would generate pure C code under the hood that is optimized differently and it failed miserably... So my alternative to using numpy still required the knowledge of numpy and the numpy itself which defied its purpose...
hello, nice to meet you, I saw your video of Optimization (MATLAB) Part 2: Bat Algorithm, could you pass me the code folder, please. It's an emergency.
Could you please share the code you have typed, for the part 1 and part 3
very useful❤
How does matlab 'know' when the array is fully sorted and the function can end? Wouldn't it iterate just once and leave it unsorted?
There's a nested loop, 1 inner loop with j and 1 outer loop with i which makes the program go through n element of the array n-1 time and fully sort it
HELP! need to debug this: clear n = 8; x = randperm(n) for i=1:n-1 for j=n:-1:i+1 if x(j-1) < x(j) swap( x(j-1), x(j) ); end end end x function swap( x, y) % swap_bug(x,y) temp = x; x = y; y = temp; THANKS IN ADVANCE
Very helpful! Thank you a lot.
Thank you sir for a great job, please my question: Q/ Is there any possibility to evaluate the performance of my proposed algorithm in sphere function or another benchmark function since I have a list of numbers as an (objective function) that has been optimized in the meta-heuristic algorithm?
Let's go thanks
How do i contact you please?
Great explanation Sir ! We are looking forward to watch an advance algorithm series such as NSGA-II, NSBAT-II
Thank you! What if I wanted to change your test optimization functions, and replace them (Beale, etc.) with a custom made f(x,y) while also changing the limit boundaries. I did change the 'z' within the Optimisation_Function but the plot was erroneous Any thoughts?
Interesting. Are you able to send the code and the error you received?
@@HysterResearch hello, thank you for replying. Would you please give your email, so i can attach other functions willed to be plotted, to be merged within your optimisation_function?
@@HysterResearch my destined function is a relation between two variables, of the form Y = X (not f(x, y)) where only plot(x, y) is needed as the output graph where onto the population will be distributed (unlike surf or contour))
@@HysterResearch if there is any obstacle with providing any email address, i can copy/paste the plot function, so you can modify Optimisation_Function accordingly
Feel free to contact me on codingforscience@gmail.com
Very nice presentation. Thank you. Looking forward for knapsack problem using BAT algorithm...
good explanation, how can i contact u sir, i need your help in programming a n objective function using DFO algorithm
I agree, there's not many good, a bit deeper numba (especially jitclass) examples with explanation on youtube. Tnx, looking forward to the next one..
Very clear presentation of jitclass coding, thank you. Looking forward to Part 2 👍🙏😊
Thanks for the tutorial, and I got two questions: 1. In line 47, your expression (population(ind,:)-population(bat,:)). The two terms are swapped from the paper. Is it correct or I got some misunderstandings? 2. In line 60, the "if condition" in the paper is related to the loudness but it is omitted here. What will happen if the loudness term is omitted?
Thank you for your questions. Question 1: In the paper the author specifies that the velocity is updated based on the previous velocity, to which the current populations position has the historic best population positions subtracted from it. I found that negating the previous velocity values provided better algorithm robustness and repeatability whilst also aided in convergence. However, by negating the previous velocity, this velocity value now becomes negative, and the bats diverge as opposed to converge. This was the reasoning for switching the position difference around. Questions 2: You are correct in your observation, I have omitted the update. In the paper the if statement has two conditions, if the fitness improves and if a random sample is lower than the loudness value of the bat. To me, this process seemed illogical. Not only does it add an additional stochastic element to the algorithm, it also neglects potential improvements to the global minima based on a randomly generated float relative to the loudness. For these reasons, I opted to neglect it. However, feel free to reverse these changes, and let me know if you have similar success when obtaining a solution.
excellent
you grate man
nice
Thanks for video. But it only works for 2D functions.Can you help me to make this code for multidimensional functions?
For demonstration purposes, this problem was conducted on a two-dimensional set of optimisation test functions as this would enable a three-dimensional visual output of the solution. If you have a higher dimension problem, you can increase the column vector of the population to correspond to each additional dimension. You will need to create a bespoke fitness function based around your specific application, and visualising the output is no longer easy or viable. The code itself should be easily adaptable, with the only real change being to the development of your own fitness function, replacing the optimisation test functions used during this demonstration.
@@HysterResearch I also hope u can help to educate me by making this code in multidimensional function. I have try but unsuccessful.
thanks for the video. I wonder why you dont add the previous velocity to current velocity just as stated in the paper you refer to.
I have asked myself this question multiple times as well. During the diagnostic period of developing this simulation, I found that using prior knowledge of the previous velocity values actually hindered accurate exploration. But you are correct in identifying that for this demonstration the previous velocity has been negated.
i really love your work, its very clear and usefull thankyou sir
th-cam.com/video/WluUkvVXbwg/w-d-xo.html 💐💐💐
How to compare with the PSO and BAT algorithm different ?
nice video.....you are solving like competitive programming problem😂😅.