<commit_before>#!/bin/bash

# create directory
dir=evaluation_modification
cd $dir
#
# # global file to store the result
# global_results=latex_tables.txt

# sift parameters
rmse_sift=rmse_sift.txt
max_sift=max_sift.txt

# sift table
    echo "\\begin{table}"
    echo "\\begin{center}"
    echo "\\begin{tabular}{l|l|l|l|l|l|l|l}"
    echo "& $\\sigma = 0$ & $\\sigma = 3$ & $\\sigma = 5$ & $\\sigma = 10$ & $\\sigma = 20$ & $\\sigma = 30$ & $\\sigma = 50$  \\\\"
    echo "\\hline"

    # RMSE
    line2echo="RMSE"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $rmse_sift 0`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"

    # RMSE std
    line2echo="Std"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $rmse_sift 1`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"
    echo "\\hline"

    #Max
    line2echo="Max"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $max_sift 0`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"

    # RMSE std
    line2echo="Std"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $max_sift 1`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"
    echo "\\hline"

    echo "Time & v1 & v2 & v3 & v4 & v5 & v6 & v7"
    echo "\\end{tabular}"
    echo "\\caption{SIFT + RANSAC estimation}"
    echo "\\end{center}"
    echo "\\end{table}"

# ICA
    #NORMALIZATION=0 #useless to normalize
    SAVE=1          #saving with good precision is necessary
    for FIRST_SCALE in 0 1 2 3 4; do
        # loop over the noise level
        # echo "Starting the loop"
        for noise in 0 5 10 30; do
        #for noise in 0 3 5; do
            dir=noise$noise
            cd $dir
            echo ""
            echo "\\begin{table}"
            echo "\\begin{center}"
            echo "\\begin{tabular}{l|l|l|l|l|l|l|l|l|l|l|l}"<commit_msg>Noise latex<commit_after>#!/bin/bash

# create directory
dir=evaluation_modification
cd $dir
#
# # global file to store the result
# global_results=latex_tables.txt

# sift parameters
rmse_sift=rmse_sift.txt
max_sift=max_sift.txt

# sift table
    echo "\\begin{table}"
    echo "\\begin{center}"
    echo "\\begin{tabular}{l|l|l|l|l|l|l|l}"
    echo "& $\\sigma = 0$ & $\\sigma = 3$ & $\\sigma = 5$ & $\\sigma = 10$ & $\\sigma = 20$ & $\\sigma = 30$ & $\\sigma = 50$  \\\\"
    echo "\\hline"

    # RMSE
    line2echo="RMSE"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $rmse_sift 0`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"

    # RMSE std
    line2echo="Std"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $rmse_sift 1`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"
    echo "\\hline"

    #Max
    line2echo="Max"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $max_sift 0`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"

    # RMSE std
    line2echo="Std"
    for noise in 0 3 5 10 20 30 50; do
        dir=noise$noise
        cd $dir
        line2echo="$line2echo & `mean_and_std $max_sift 1`"
        cd ..
    done
    line2echo="$line2echo \\\\"
    echo "$line2echo"
    echo "\\hline"

    echo "Time & v1 & v2 & v3 & v4 & v5 & v6 & v7"
    echo "\\end{tabular}"
    echo "\\caption{SIFT + RANSAC estimation}"
    echo "\\end{center}"
    echo "\\end{table}"

# ICA
    #NORMALIZATION=0 #useless to normalize
    SAVE=1          #saving with good precision is necessary
    for FIRST_SCALE in 0 1 2 3 4; do
        # loop over the noise level
        # echo "Starting the loop"
        for noise in 0 3 5 10 20 30 50; do
        #for noise in 0 3 5; do
            dir=noise$noise
            cd $dir
            echo ""
            echo "\\begin{table}"
            echo "\\begin{center}"
            echo "\\begin{tabular}{l|l|l|l|l|l|l|l|l|l|l|l}"
{'fraction_non_alphanumeric': 0.14077448747152618, 'fraction_numerical': 0.04943052391799545, 'mean_word_length': 1.917607973421927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4659599', 'n_tokens_mistral': 1806, 'n_tokens_neox': 1581, 'n_words': 447}