Posts

MeanNearestNeighbors (MNN) - algorithm for balancing dataset - In progress #1

Image
One of the challenges in classification problems are unbalanced datasets. I was Data Science Intern when the company that I worked for, assigned me such an interesting challenge where the dataset was unbalanced.  However, I realized this type of problem like unbalanced dataset is а common thing in real life. I tried most of the algorithms (undersampling, oversampling) like SMOTE, NearMiss, CondensedNearestNeighbors, RandomUnderSampler, RandomOverSampler,  KMeansSMOTЕ and rest of them. Anyway, they didn't help me in that case, on the contrary, they worsened my model.  I was like: "but, but, you should have been helpful in creating the predictive model" So, I'm trying to create another algorithm based on undersampling concept when it comes to balancing datasets. I called it Mean Nearest Neighbors (MNN). What's the initial idea: It's simple. Actually, the algorithm is just a modification of the other undersampling algorithms. In the data where target labe...

Intro to Quantum Computing: Што ќе ми треба ова сега? #1

Image
     Да, точно е дека сега нема да ти треба ова. Но, за едно 5-6 години ќе сфатиш дека ова е иднината. Ова ќе биде дел од футуристичката технологија. На Harvard, MIT веќе постојат курсеви и книги за квантно сметање. Веќе постои програмски јазик за квантно програмирање. Провери Q# од Microsoft. Веќе се развиваат квантни алгоритми... Различни области кои почнуваат со зборот Quantum. Еве неколку: AI, Machine Learning, Networking, Cryptography и многу повеќе.      Поразлична е од оваа класична технологија. Пример, ако знаеме дека во класичната технологија информацијата се претставува со два бита 0 и 1, во квантум се користат кјубита и еден кјубит може истовремено да биде 0 или 1. Чудно, нели? Тоа е магијата овде.      Како и да е, тоа не значи дека ќе се исфрли десктоп компјутер, или дека за џабе е се учење сега, ако знаеме дека за 15 години доаѓа технологија која ќе писка низ светов.     IBM, Google, Microsoft, Intel, HP, Alibaba даваа...

Math Problem -> Combinatorics: Foreign alphabet

You are given 12 letters in a foreign alphabet.  Eight of the letters are consonants while the remaining four are vowels.  You are asked to create only 5 letter words using these 12 letters.  Each word must contain exactly two vowels and no repetition of letters is allowed.  How many different arrangements can be made? . . . . . . . . . . . . . . . . . . Solution: C(5,2) * (4*3) * (8*7*6) C(5,2) -> 5 letter word , we find the number of words with two vowels. (4*3) - > 2-permutation of 4 vowels (8*7*6) - > 3-permutation of 8 consonants The final step we use rule product .

OOP Problem #a1b2

Image
Write a code which output will be the first N natural numbers in two sides (see the example below), but without using loops , recursion (including without goto instruction). INPUT               OUTPUT 5                         5 4 3 2 1 1 2 3 4 5 INPUT               OUTPUT 1                         1 1 Solution:

NVDIA GeForce RTX 2080 -> meaning of "ray tracing"

Image
When they were talking about "Ray tracing" I have no idea what that means, but today NVDIA GeForce channel published this video and it's very understandable . ......my reaction was.... Let's learn more on Wikipedia about Ray tracing 😁😁😁 https://en.wikipedia.org/wiki/Ray_tracing_(graphics) Ray Tracing can be implemented in 3D Computer Graphics environments. The Ray Tracing  scenes are described mathematically by programmer or virtual artist using intermediary tools. Interesting fact : First presentation of "Ray casting"(tracing later) was in 1968 by Arthur Appel. Yeah sure ... helped by AI and a lot of physics too

Competitive Programming #29 : [LineUp]

Image
To prepare his students for an upcoming game, the sports coach decides to try some new training drills. To begin with, he lines them up and starts with the following warm-up exercise: when the coach says  'L' , he instructs the students to turn to the left. Alternatively, when he says  'R' , they should turn to the right. Finally, when the coach says  'A' , the students should turn around. Unfortunately some students (not all of them, but at least one) can't tell left from right, meaning they always turn right when they hear  'L'  and left when they hear  'R' . The coach wants to know how many times the students end up facing the same direction. Given the list of commands the coach has given, count the number of such commands after which the students will be facing the same direction. Example For  commands = "LLARL" , the output should be lineUp(commands) = 3 . Let's say that there are  4  students, and the second one...

Puzzle #2: Decode

You have to find the code that fulfills the statеments below: 5 4 8     -  One number is correct and well placed 5 3 0    -  Nothing is correct 1 5 7     -  Two numbers are correct but wrong placed 8 0 6     -  One number is correct but wrong placed 6 4 7     -  One number is correct but wrong placed  Solution :  Okay , lets first sort the statements : 5 3 0 - Nothing is correct  1 5 7 - Two numbers are correct but wrong placed 6 4 7 - One number is correct but wrong placed 5 4 8 - One number is correct and well placed 8 0 6 - One number is correct but wrong placed  So  5 3 0  - nothing is correct , next 1 5 7 - 5 is not correct and (1,7) are correct but wrong placed   6 4 7 - we know  7 is correct and wrong placed , so 6 ,4 aren't correct 5 4 8 - 5 , 4 aren't correct and 8 is correct and well placed 8 0 6 - if you think more deeply , you will...