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...

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 understand that this statement isn't needed.

So we have    1 , 7 , 8
We know that 8 is on third place  so
_ _ 8
we have two solutions as:
1 7 8  and 7 1 8 
but first solution is marked as wrong cause in above the solution  there is statement 1 5 7 where 1 is correct number but wrong placed ,so
second solution is correct 7 1 8  

Popular posts from this blog

Math Problem -> Combinatorics: Foreign alphabet

Competitive Programming #29 : [LineUp]

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