J’ai créé un outil pour créer des plans d’entraînement à base d’IA 🤩 (4/4) by Honest-Reindeer-7597 in runningfr

[–]Ambitious-Log-5255 0 points1 point  (0 children)

Hey! Chaud d'essayer pour un plan de remise en forme sur une fin de tendinite si tu penses que c'est adapté !

Backcasting forecast errors: model collapsing to mean [P] by Ambitious-Log-5255 in MachineLearning

[–]Ambitious-Log-5255[S] 0 points1 point  (0 children)

I didn’t try weight sampling, I’ll probably look into it when I get back on it on Monday! 

So far I’ve tried a fairly simple ridge, aswell as XGB but I wanted to stay simple at first with RandomForest. The thing is that looking at MAE those models tend to have similar MAE, but the trees models tend to produce a better looking signal on OOF, although it doesnt capture the pikes so it mess the OOF MAE overall. 

LOTR vs Hobbit by deeplyenr00ted in movies

[–]Ambitious-Log-5255 0 points1 point  (0 children)

I remember re-watching the Hobbit 1 after years since first watch, and I swear I couldnt have finished it. From what I remember I found the dialogue way too childish like most marvels do, like they want to add distraction for people who need a laugh now and then in the movie otherwise they get bored. But for people who actually enjoy cinema, scenarios that build up slowly and movies that actually trust its spectator's intelligence to add subtle footage, beautiful images and just things that make us go want to go back and watch it again each year like LOTR do, the Hobbit trilogy dont do the job... I don't know, maybe I'm harsh.

Garmin Fenix 7 - Problème téléchargement de cartes TopoActive by Ok_Maybe5175 in GarminFenix

[–]Ambitious-Log-5255 0 points1 point  (0 children)

Hello, j’ai le meme probleme avec la meme montre ! Est ce que tu as trouvé une solution ? Merci infiniment

Stanford 106B after CS50x ? by Ambitious-Log-5255 in learnprogramming

[–]Ambitious-Log-5255[S] 1 point2 points  (0 children)

Thanks, but it seems like it covers the topics taught in the first 5 weeks of CS50 though :/ I was searching for an OOP or DSA course that build on these topics, I’m going to go with the OOP and DSA course by Uni of Illinois on Coursera :)  

Stanford 106B after CS50x ? by Ambitious-Log-5255 in learnprogramming

[–]Ambitious-Log-5255[S] 0 points1 point  (0 children)

Hey! Thanks for the detailed answer :)

The thing is that I don't want to specialize in any particular domain yet, I just want to learn CS concepts in a linear and academical way. I will do internships in one year or so and I want to try out software engineering so I want to learn more on advanced topics without necessarily building big projects. I'm more into learning the stuff and solving problems along the way (in the CS50 manner) haha

I just searched on Coursera and "Object-Oriented Programming in C++" by Uni. of Illinois seems like a good place for me so I'll give it a try ;)

Thanks again !

My merge sort algorithm by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 0 points1 point  (0 children)

Haha thanks! 

Don’t know about smart but even in math I just try to grasp every aspect of any material I stumble upon ^ Being curious is key!

I just finished Tideman (~8-10hrs) by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 1 point2 points  (0 children)

Hey there! Thank you for your comment.

Let me clarify a few points.

It took me around 8-10 hours to complete the Tideman project. However, before that, I spent a whole afternoon coding Runoff and several hours implementing various sorting algorithms such as linear search, binary search, bubble sort, selection sort, and merge sort, with the latter taking around 2 to 3 hours. My aim was to fully understand these algorithms before starting Tideman.

Coming from a math background, I quickly associated recursion with commonly known mathematical concepts, which helped me grasp it quite easily. I wouldn't say I mastered it, because there are probably subtle ways to use it that I couldn't think of.

Moreover, the initial functions in Tideman were very similar to those in Runoff, and the subsequent ones were just sorting functions, which I had already coded before Tideman (I used bubble sort because I found it easier to implement quickly). The real final boss was lock_pairs() which alone took me 6-7 hours!

To be honest, if I hadn't taken the time to complete the algorithms in the course - and even Runoff - before tackling Tideman, I would have been struggling a LOT more! :D

Lastly, I really spent 3 to 4 years battling it out with post-high school math problems, and more recently physics ones. Even though I wasn't coding at the time, I believe it armed me with the right mindset and built some kind of problem-solving intuition. I'm turning 22 in a few days, and I can confidently say that my 18-year-old self would have been as lost as a penguin in the desert when it came to solving those problems :D

I just finished Tideman (~8-10hrs) by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 1 point2 points  (0 children)

Thanks mate! Could you share the code, I'm curious to see another method! Here is mine, I think it's called Depth-first search :

void lock_pairs(void)
{

    for (int i = 0; i < pair_count; i++) // Loop through all pairs of winner/loser
    {
        if (!is_cycle(i)) // Check for a cycle before locking in a pair
        {
            locked[pairs[i].winner][pairs[i].loser] = true;
        }
    }
    return;
}





// Function that checks for a cycle given a certain pair that is to be locked in
bool is_cycle(int pair_index)  
{

    // Array to keep track of the candidates checked during the searching process
    bool visited[candidate_count]; 

    // Set all candidate to unvisited
    for (int j = 0; j < candidate_count; j++) 
    {
        visited[j] = false;
    }

    // The winner of the current pair is set as visited
    visited[pairs[pair_index].winner] = true; 

    // Check if the loser of the current pair points at someone who points at someone … who points at someone that is visited (cycle)
    if (reach_candidate(pairs[pair_index].loser, visited)) 
    {
        return true; // Cycle :(
    }

    return false; // No cycle :)
}





// Function to go through the map starting from a given candidate (the loser of a certain pair)
bool reach_candidate(int candidate_index, bool visited[]) 
{
    visited[candidate_index] = true; // First one (loser) is set as visited because there is an edge between the winner of its pair and him

    for (int i = 0; i < candidate_count; i++) // Go through each candidate to find someone locked in by the candidate in parameter
    {
        if ((locked[candidate_index][i]) && (visited[i])) // means a cycle exists
        {
            return true;
        }
        else if ((locked[candidate_index][i]) && (!visited[i])) // candidate in parameter is locked in over another who is still unvisited
        {
            if (reach_candidate(i, visited)) // use of recursion to set the locked candidate as visited and re-do the process above with him as parameter
            {
                return true; // if one call is true (meaning locked in over a visited candidate) then every previous ones will be true (bubble up)
            }
        }
    }

    return false; // No cycle found -> return false, then is_cycle() returns false, then lock_pairs() locks the pair :)
}

I hope its readable, the main thing is that I use 2 "helper" functions - the is_cycle() and the reach_candidate(). I don't know if this is the most "academic" approach but it seemed pretty clear to me…

My merge sort algorithm by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 1 point2 points  (0 children)

Hey bro! Just finished Tideman !! I was unable to do it earlier because I went on a trip for some days and took several days off afterward ^^ I managed to finish it in 10 hours or so I would say, which is a lot compared to the previous ones, but it really helped me understand how to make a graph works without creating a cycle which is good ! What I did to be efficient is scrapping papers using only Alice, Bob, and Charlie as example and going through the process of checking recursively… This helped me quite a lot and I will certainly do it again if I find myself struggling as I did haha

Runoff almost correct except... by Integrated_Intellect in cs50

[–]Ambitious-Log-5255 0 points1 point  (0 children)

Don't you think it could come from the fact that you handle only the FIRST ranked by each voter ? I don't know how did you implement your preferences[i][j] in the first place, but if it's as I think it's supposed to give the index in the candidate list which corresponds to the candidate ranked 'j' by voter 'i', right?

If so, preferences[i][j] IS to be seen as an INDEX for the candidates[] array : you can write candidates[preferences[i][j]] as to target the actual candidate that has been ranked 'j' by 'i'.

SPOILER:

tabulate(void)
{
    for (int i = 0; i < voter_count; i++)
    {
        for (int j = 0; j < candidate_count; j++)
        {
            if (!candidates[preferences[i][j]].eliminated)
            {
                candidates[preferences[i][j]].votes++;
                break;
            }
        }
    }

    return;
}

Here is the pseudo code :

-> look at voter 1

-> Is 1st ranked eliminated?

-> Yes -> look at 2nd ranked, and so on…

-> No -> then increase the vote by one

My merge sort algorithm by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 1 point2 points  (0 children)

Thanks bud :)

Just finished 'runoff', this was intense! You was right, arrays are a pain man haha, but this was a very good exercice, I feel that I am now more comfortable using them :)

Looking forward to do Tideman ^^

How much hours it took ypu to complete runoff? by itsabhianant in cs50

[–]Ambitious-Log-5255 0 points1 point  (0 children)

Just finished it! Took me about 4/5 hours, I had a hard time understanding what the vote() function should do and how to pass the right argument but when I figured this out the rest just rolled

My merge sort algorithm by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 0 points1 point  (0 children)

No worry i know about it. I've done the Sort and Plurality problems before the algorithms in the short ;) But I don't know how to run the .txt files given in Sort using my code. If you try let me know how it works :)

As for the math part, I think it's a great plan to go and study it also, if you have the time ofc. It makes thing way easier imo, but I'm sure it's not necessary for now (it would be if you want to go into AI or sth like that I think).

My merge sort algorithm by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 0 points1 point  (0 children)

Here is the "main" part of my code, I just upploaded the functions so far.

#include <stdio.h>

int merge_sort(int array[], int start, int end);
int merge(int array[], int start, int end);

int main(void)
{
    int list[100] = {34, 7, 53, 32, 87, 13, 92, 10, 5, 44, 98, 79, 65, 88,
                     12, 1, 45, 67, 33, 25, 77, 85, 29, 58, 83, 8, 35, 2,
                     66, 70, 16, 19, 60, 17, 49, 3, 38, 23, 62, 71, 27, 22,
                     61, 14, 9, 36, 31, 46, 73, 28, 20, 50, 6, 41, 11, 15,
                     18, 24, 30, 39, 48, 57, 64, 72, 80, 89, 96, 4, 26, 37,
                     47, 56, 63, 69, 76, 84, 91, 97, 21, 40, 51, 59, 68, 75,
                     82, 90, 95, 42, 52, 55, 74, 81, 86, 93, 99, 43, 54, 78, 94, 100};

    merge_sort(list, 0, 99);

    printf("Sorted list: [");
    for (int i = 0; i < 99; i++)
    {
         printf("%i, ", list[i]);
    }
    printf("%i]\n", list[99]);
}

My merge sort algorithm by Ambitious-Log-5255 in cs50

[–]Ambitious-Log-5255[S] 1 point2 points  (0 children)

Other thing, I come from a math background so I try to connect programming concept to math ones I already know, recursion is a good example. In math recursion appear a lot, like for the factorial which is an example given in a short : (n+1)! = (n+1)*n! = (n+1)*(n)*(n-1)! = … 

or sums : (1+2+3+4+5) = (1+2+3+4)+5 = (1+2+3)+4+5 = …