<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[AIN311 Fall 2022 Projects - Medium]]></title>
        <description><![CDATA[Student projects for Fall 2022 semester - Medium]]></description>
        <link>https://medium.com/ain311-fall-2022-projects?source=rss----fd32dd7ec78c---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>AIN311 Fall 2022 Projects - Medium</title>
            <link>https://medium.com/ain311-fall-2022-projects?source=rss----fd32dd7ec78c---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 08:32:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ain311-fall-2022-projects" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Week 4 — Eye Tracking and Prior Knowledge]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-4-eye-tracking-and-prior-knowledge-45785971f4a8?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/45785971f4a8</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[naive-bayes]]></category>
            <category><![CDATA[prior-knowledge]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[eye-tracking]]></category>
            <dc:creator><![CDATA[Alper Özöner]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 06:10:51 GMT</pubDate>
            <atom:updated>2023-01-09T06:10:51.778Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 4 — Eye Tracking and Prior Knowledge</h3><p>Hello all, this week we put our bag of words representation to good use by combining it with a Naive Bayes implementation we hand-crafted specifically for our project.</p><p>Because our research question is “Is there a discernible relationship between prior knowledge and reading pattern?” the Bayesian nature of the algorithm fits well in the sense that algorithm will attempt to accurately classify the bag-of-words representation of each experiment (a.k.a. reading of the sample text). Which is to say that algorithm will be good at discerning whether if the subset of words on which the most eye fixations made upon are different between a person who is familiar with the knowledge presented in the text as opposed to a person who knows nothing about the topic of the presented sample text.</p><p>Another reason we chose to use Naive Bayes is that our number of data points will be low during the initial phase, as we plan to gather data from 20 people, corresponding to 60 data points in total. Accordingly, we have planned to use three sample paragraphs (each about 100 words long) that we gathered from Wikipedia. The texts we have chosen are the following: the French Revolution, Moai Statues, and the World Cup.</p><p>Our custom Naive Bayes implementation can be seen below:</p><pre>def NaiveBayes (bagOfexperiment, X_train, y_train):<br>    bagofBags = createBagofBags(X_train,y_train)<br>    total_unique_words = getTotalUniqueWords(X_train)<br>    outputDict = dict.fromkeys(bagOfbags.keys())<br>    N = len(X_train)<br>    for category in bagOfbags.keys():<br>        genreBag = bagOfbags[category]<br>        total_size_of_class = returnSizeofCategory(category, bagofBags) # count(c)<br>        N_c = returnNc(category, X_train)<br>        prior = np.log(float(N_c/N))<br>        for word in bagOfexperiment:<br>            try:<br>                word_count_in_class = genreBag[word] # count(w,c)<br>            except:<br>                word_count_in_class = 0<br>            for i in range(int(bagOfexperiment[word])):<br>                P_w_c = float(word_count_in_class + 1)/float(total_size_of_class + total_unique_words)<br>                prior += np.log(P_w_c)<br>        #print(&#39;Value for &#39;,genre,&#39;: &#39;,prior)<br>        outputDict[category] = prior<br>    max_key = max(outputDict, key=outputDict.get)<br>    return max_key</pre><p>What makes this implementation unique is that it uses a “bag of bags of words” representation we came up with. Basically, it is a nested python dictionary where bag of words of each experiment (see Week 3 for reference) is stored under their own respective classes, which is the prior knowledge level ranging from 1 to 5. This data will be collected from the subjects after they are done reading the sample text by asking the subjects to rank their knowledge on the subject of the text they have just read.</p><p>That’s it for now, see you next week where we talk about other ML models we will use in our project!</p><p><em>Edit: Weekly blog posts will be shared by Ali Utku Aydin from this point on. Here is the blog post of Week 5 written by him: </em><a href="https://medium.com/@aydinaliutku/week-5-eye-tracking-and-prior-knowledge-ef44bd93e4ef"><em>Week 5 — Eye Tracking and Prior Knowledge | by ali utku | Jan, 2023 | Medium</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45785971f4a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-4-eye-tracking-and-prior-knowledge-45785971f4a8">Week 4 — Eye Tracking and Prior Knowledge</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 5 — Eye Tracking and Prior Knowledge]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-5-eye-tracking-and-prior-knowledge-ef44bd93e4ef?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/ef44bd93e4ef</guid>
            <category><![CDATA[support-vector-machine]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[vectorization]]></category>
            <category><![CDATA[bag-of-words]]></category>
            <dc:creator><![CDATA[ali utku]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 06:10:50 GMT</pubDate>
            <atom:updated>2023-01-09T06:10:50.022Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 5 — Eye Tracking and Prior Knowledge</h3><p><em>by Alper Özöner and Ali Utku Aydın</em></p><p>This week we gathered data from our fellow students on campus and preprocessed that data for Support Vector Machines (SVM) Algorithm which is our second algorithm in our project.</p><p>At first, we tried fitting a SVM model from sci-kit learn library, but it failed hard as we found out that our 1-D vector format was incompatible with it. The problem was that we had varying sizes of vectors for each experiment as the 1-D vector format did not represent words with 0 fixations in it, as it was converted from a bag of words. After realizing this issue, we quickly went to work.</p><p>We decided that we need a fixed size vector representation. This problem arose as a result of situations where subject “A” had a fixation on a word, for example, “revolution”, but the subject “B” does not have any fixations on the word “revolution”. In order to solve this problem, we made sure that each 1-D vector included the entire vocabulary text of their respective sample text.</p><pre>#1<br>french_list = []<br>for bag_of_words in french_BoW_list: #Bag of words of each subject<br>    french_list += list(bag_of_words.keys()) #gather all words across different experiments&#39; bag_of_words<br>french_vocab_set = dict.fromkeys(set(french_list), 0) #initialize an empty dictionary with all counts as 0</pre><p>Afterwards we re-construct bag of words for empty words.</p><pre>#2<br>for bag_of_words in french_BoW_list: #looping each BoW for vector represantation<br>    for word in bag_of_words.keys():<br>        count = french_vocab_set[str(word)]<br>        count += 1<br>        french_vocab_set.update({str(word):count})</pre><p>And bag of words was ready. We constructed a vectorization function for SVM ML model.</p><pre>#3<br>def convertBoWtoVector(bag_of_words):<br>    vector = []<br>    for count in bag_of_words.values():<br>        vector.append(count) #Appending counts of each word to vector<br>    return vector</pre><p>And now we are ready for vectorization of french dataset.</p><pre>train_frenchNew=[]<br>idx=0<br>for bag_of_word in french_BoW_list:<br>    <br>    x=convertToAllDict(french_BoW_list,bag_of_word) #This function is basically merged version of thhese 2 code blocks above (#1, #2)<br>    x=sum(x) <br>    train_frenchNew.append([x,train_french[idx][1]] )#train_french[idx][1] is basically prior knowledge rate out of 5 of the subject&#39;s<br>    idx+=1</pre><p>So after we constructed <em>train_frenchNew</em>, we converted it to a pandas dataset. And now we are ready to try this on SVMs. Also, we need to mention that we have a few data by this reason we used Leave One Out Cross-Validation for our model:</p><pre><br>cv = LeaveOneOut() #Cross validation<br>svm=SVC()<br>X=dataset.loc[:, dataset.columns == &#39;X&#39;] #X is vector scores and  y is rates of each subjects (0-5)<br>y=dataset.loc[:, dataset.columns != &#39;X&#39;]<br>label_encoder = preprocessing.LabelEncoder()<br>X_transformed = label_encoder.fit_transform(X)<br>X=X_transformed.reshape(-1,1)<br><br>scores_svmacc = cross_val_score(svm, X, y, scoring=&#39;accuracy&#39;,<br>                         cv=cv, n_jobs=-1)</pre><p>As we predicted, it gave a relatively low score(0.06) but it gave us more motivation to get a concrete results in following weeks. We plan to use random forest and tf-idf algorithm next week. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef44bd93e4ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-5-eye-tracking-and-prior-knowledge-ef44bd93e4ef">Week 5 — Eye Tracking and Prior Knowledge</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 6— Eye Tracking and Prior Knowledge]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-6-eye-tracking-and-prior-knowledge-61ac0b6e7902?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/61ac0b6e7902</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[ali utku]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 06:10:48 GMT</pubDate>
            <atom:updated>2023-01-09T06:10:48.247Z</atom:updated>
            <content:encoded><![CDATA[<p><em>by Alper Özöner and Ali Utku Aydın</em></p><p>This week we made Tf-Idf algorithm to get better results for each algorithm and tried Random Forest algorithm in spite of “linearly inseparable” problem of SVMs.</p><p><strong>Tf-Idf Implementation</strong></p><p>After tried SVM prediction, our “score initialization according to word summation of each bag of words“ hadn’t go well, we decided to use tf-idf algorithm for score initialization.</p><pre>from math import log<br>def calculate_tf_idf(bow):<br>    # Total number of documents in the collection<br>    N = len(bow)<br>    # Calculate the tf-idf values for each word<br>    tf_idf = {}<br>    for word, count in bow.items():<br>        # Calculate the term frequency (tf)<br>        tf = count / sum(bow.values())<br>      # Calculate the inverse document frequency (idf)<br>        # idf is defined as log(N / n), where N is the total number of documents<br>        # and n is the number of documents that contain the word<br>        n = sum(1 for doc in bow if word in doc)<br>        idf = log(N / n)<br>        # Calculate the tf-idf value<br>        tf_idf[word] = tf * idf<br>    return tf_idf</pre><p>After having constructed the method, we modified the scores for each bag of words and formed a new pandas dataframe as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*3JiMAn2ohW7Z9uNewQLxtg.png" /><figcaption>Train set of world cup, X’s are tf-idf score y’s are the rate of each subject</figcaption></figure><p>It boosted accuracy rate of SVM to 0.20! Also our confidence too. Probably tf-idf will be our score initialization in future.</p><p><strong>Random Forest</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*sEH2Fld3WWsQRZOQ2xxnRA.png" /><figcaption>A Random Forest in Baden-Württemberg, Germany occupies over 2,000 square miles.</figcaption></figure><p>As we considered, SVM may give a huge error due to not separable data. So to advance, we searched new algorithms and decided on to use Random Forest(RF). Due to RF can be used both classification and regression problems and does not need hyperparameter tuning in beginning(consider that we are trying a hypothesis so finding hyperparameters could be hard) we choose RF for our problem.</p><p>We choose n_estimators as 50 because of we have low but dense datapoints. Method gave us 0.08 accuracy for french dataset however others were 0,06. It’s low compared to french dataset and we don’t know why this happened.</p><p>Nevertheless, now we have concrete results and way better solutions for our dataset. For future, our plan is finding best parameters for each algorithm, finding new subjects in campus and conclude our project for AIN311. Stay tuned see you in next week!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61ac0b6e7902" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-6-eye-tracking-and-prior-knowledge-61ac0b6e7902">Week 6— Eye Tracking and Prior Knowledge</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 7— Eye Tracking and Prior Knowledge]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-7-eye-tracking-and-prior-knowledge-e3b05150bff0?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/e3b05150bff0</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[hyperparameter-tuning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[ali utku]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 06:10:45 GMT</pubDate>
            <atom:updated>2023-01-09T06:10:45.872Z</atom:updated>
            <content:encoded><![CDATA[<p><em>by Alper Özöner and Ali Utku Aydın</em></p><p>In this week, we used the grid search algorithm for SVM and RF to find hyperparameters and conclude our work for AIN311 course.</p><h4>Grid Search for Hyperparameter Tuning</h4><p>To find best parameters we used grid search algorithm which iterates over our inputs as hyperparameters in models. As we are using LOOCV, this algorithm works; it uses 17 times for dataset because of data points and it takes as many combinations as the number of inputs, grid search algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*i3679TFlyV4ExaxvyHzpuA.png" /><figcaption>Tuning for SVM, Grid Search outputs of French Dataset</figcaption></figure><p>As seen above, with using that we found each parameter for Support Vector Machines (SVM) and Random Forest (RF). Our results are as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*idtaaumQ6Mx3bDO0n1BlZQ.png" /><figcaption>Best hyperparameters for each algorithm</figcaption></figure><p>Here are the new results after hyperparameter tuning :</p><pre><br>+===========================+================+=========+================+<br>|            Dataset        |  Naïve Bayes   |   SVM   | Random Forest  |<br>+===========================+================+=========+================+<br>|         French Dataset    |     0.55       |   0.17  |      0.12      |<br>+---------------------------+----------------+---------+----------------+<br>|         Moai Dataset      |     0.36       |   0.33  |      0.10      |<br>+---------------------------+----------------+---------+----------------+<br>|         World cup Dataset |     0.38       |   0.17  |      0.10      |<br>+---------------------------+----------------+---------+----------------+</pre><h4>Conclusion and Future Work</h4><p>The process of the project taught us a lot: Developing a hypothesis and taking a risk for it, as our hypothesis could be wrong, finding a data representation and collecting our own data by using our own tools, preparing the data with custom methods and functions etc. Despite these problems, we have motivation and hope like never before. We have confidence in the validity of this hypothesis and will continue to gather data, investigate various preprocessing techniques and approaches, and approach this project from a research-oriented perspective. Our future goal is to establish a solid theoretical foundation for our hypothesis through these efforts. Additionally, we are currently exploring the possibility of a correlation between eye movements and other factors such as interest in the topic or level of comprehension.</p><p>Thank you for giving your time to reading our project, and we hope that in future we achieve that finding correlation between eye movements and prior knowledge!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bHZUnMmW-X96QfJp3ydpYg.png" /><figcaption>Wanderer above the sea of fog by German Romantic painter Caspar David Friedrich.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3b05150bff0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-7-eye-tracking-and-prior-knowledge-e3b05150bff0">Week 7— Eye Tracking and Prior Knowledge</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week#7 Generate Questions With Custom Data]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-7-generate-questions-with-custom-data-1f4e94cc794d?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/1f4e94cc794d</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[text-generation]]></category>
            <category><![CDATA[question-generation]]></category>
            <dc:creator><![CDATA[Emre Çoban]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 09:44:13 GMT</pubDate>
            <atom:updated>2023-01-02T09:44:13.740Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone,</p><p>This is the final blog for our project. In this blog we want to give latest results and update about the things we were hoping to do last week.</p><p>As we had troubles to save our trained model we trained it again this week. The data for training consists of 200 questions of ours and around 250 questions from SQuAD[1]. We knew that for better results you need more and more data but still we wanted to see what a fine-tuned model can perform in this much data.</p><p>We used same arguments in the previous blog for training. The results we got were actually pretty good but one problem is that most questions are constructed around “what” for example lets take a look at this example.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>answer: Levi’s Stadium</p><p>context: Super Bowl 50 was an American football game to determine thechampion of the National Football League (NFL) for the 2015 season. The American Football Conference(AFC) champion Denver Broncos defeated the National Football Conference (NFC) champion CarolinaPanthers 24–10 to earn their third Super Bowl title. The game was played on February 7, 2016, atLevi’s Stadium in the San Francisco Bay Area at Santa Clara, California. As this was the 50th SuperBowl, the league emphasized the “golden anniversary” with various gold-themed initiatives, as wellas temporarily suspending the tradition of naming each Super Bowl game with Roman numerals (underwhich the game would have been known as “Super Bowl L”), so that the logo could prominently featurethe Arabic numerals 50.</p><p>Actual Question : Where was the Super Bowl 50 game played?</p><p>Predicted Question : What venue did Super Bowl 50 take place in?</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>As we can see the question has the same meaning but instead of using “where” it uses “what venue”.</p><p>This problem might be due to the questions for the training are mostly includes “what”. So it should be easy to overcome.</p><p>And also lets come to the main problem we discussed last week, if you want an question you need to give an answer specificaly which doesn not seem cool. So to overcome this issue we decided to use keyword extraction using the Scapy library.</p><p><strong>EXAMPLE RESULTS OF KEYWORDS EXTRACTION:</strong></p><p><strong>Context:</strong></p><p>Computer vision is an interdisciplinary scientific field that deals with how computers can gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to understand and automate tasks that the human visual system can do.</p><p><strong>Keywords Obtained:</strong></p><p>Videos, digital images, Computer vision, computers, the human visual system, high-level understanding, an interdisciplinary scientific field, engineering, the perspective, it.</p><p>Well we took top 5 of these keywords and generated questions with respect to them. And we tried to create an user friendly google colab user interface to generate questions.(Figure 1)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0DOX-wHz561Dw6CPMqLsw.jpeg" /><figcaption>Figure 1 : UI in google colab for generating questions</figcaption></figure><p><strong>Conclusion</strong></p><p>So to conclude all, we fine-tuned T5-base model with less data since these pretrained models already learned lots of features about language it is easy to fine-tune them with less data. And later on since our model takes an answer as input too we decided to use keywords extraction for finding possible answers and giving them to our model as answer and producing questions.</p><p>So this was all for our project. Nowadays we are trying to get ready for the project presentation and also preparing our final project paper.</p><p>Thank you all for reading.</p><blockquote><a href="https://medium.com/u/546b4e5bf0d4">Emre Çoban</a></blockquote><blockquote><a href="https://medium.com/u/5b04438401f3">Alihan Sağöz</a></blockquote><p><strong>References</strong></p><p>[1]Rajpurkar, P., Zhang, J., Lopyrev, K., &amp; Liang, P. (2016). SQuAD: 100, 000+ Questions for Machine Comprehension of Text. <em>CoRR</em>, <em>abs/1606.05250</em>. Retrieved from <a href="http://arxiv.org/abs/1606.05250">http://arxiv.org/abs/1606.05250</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f4e94cc794d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-7-generate-questions-with-custom-data-1f4e94cc794d">Week#7 Generate Questions With Custom Data</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Final Week — MOOC Recommendation]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/final-week-mooc-recommendation-2e0cc740de0f?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/2e0cc740de0f</guid>
            <category><![CDATA[collaborative-filtering]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <dc:creator><![CDATA[Arif Enes Aydın]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 09:44:09 GMT</pubDate>
            <atom:updated>2023-01-02T09:44:09.784Z</atom:updated>
            <content:encoded><![CDATA[<h3>Final Week — MOOC Recommendation</h3><p>Hello everyone. Welcome to the last blog about our course project. Last week, we preprocessed the data for comment analysis to make ratings out of them. This week, We finalized everything we have done so far and combined collaborative filtering and comment analysis.</p><p>To decide our final model for collaborative filtering, we tested different algorithms to see which was the best performing. These methods are the collection of techniques that is available on Surprise Scikit. Some of them are memory-based and some of them are model-based.</p><p>Here are the root-mean-squared-error values of the different methods we tested:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c5IVmRTK0w_kSF1A_PhbmA.png" /><figcaption>Performances</figcaption></figure><p>The best-performing ones are BaselineOnly, KNNWithBaseline, and SVD algorithms. We tried to fine-tune these three to see if we can improve their performance further. After parameter searching with GridSearchCV, the results showed us that we could not improve performances with different parameters. So we chose SVD as our final model.</p><p>The previous week, we preprocessed the data for the modeling. There are a few steps before the data is ready. Let’s deep dive in.</p><p>We decided to use sentiment analysis scores to predict the rating. So we used the <em>vaderSentiment </em>library to analyze the comments. <em>SentimentIntensityAnalyzer </em>function analyses the comments and returns a dict that contains scores such as:</p><ul><li><em>Negative(neg):</em> Negativity value of the comment</li><li><em>Neutral(neu):</em> Neutrality value of the comment</li><li><em>Positive(pos):</em> Positivity value of the comment</li><li><em>Compound(compound):</em> Compound score of the comment</li></ul><p>After the process, the data looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/0*Wyy4H1wwibmwAltK.png" /><figcaption>First 5 comments with sentiment scores and rates</figcaption></figure><p>Since all of the features turned into numeric, our solution must be a regression model. At first, we decided to use 4 different algorithms and select the best one by considering their RMSE scores. Also, we tried some variations such as normalization and standardization of the data, and evaluate the effects of these operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*D_M04ak29I4FRSr4.png" /><figcaption>Performances for each algorithm and scaling</figcaption></figure><p>As you may guess, we chose the SVR with no scaling. We initialized some values for three hyperparameters of SVR in a list. By using Grid-Search CV, optimal parameters are determined. After that, we fitted the new SVR model with tuned hyperparameters and the result was not impressive. RMSE score decreased by only 0,001.</p><p>After the disappointment with the result, we thought some things are wrong with the data. So we considered the sub-intervals separately and evaluate how the model predicts each sub-interval.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*LckNVEDMAT6-pa4u.png" /><figcaption>Average ratings of each sub-interval for actual and predicted values</figcaption></figure><ul><li>In 0–1 interval, the predictions are higher than the actual</li><li>In 4–5 interval, the predictions are lower than the actual</li><li>For other intervals, there are not so many differences</li></ul><p>Why our model is unsuccessful while predicting the 0–1 and 4–5 cases? We think users can be generous or ungenerous. In their comments, their behaviors imply that they are neutral but they can give a high or low rating. This situation affects the results significantly. So let’s detect these inconsistencies.</p><ul><li>Comments rated less than 3 with higher positive scores than negative scores must be considered an inconsistency</li><li>Comments rated higher than 3 with higher negative scores than positive scores must be considered as inconsistency as well</li></ul><p>After eliminating the inconsistent comments, we have seen that approximately 26% of the comments are inconsistent. 94% of the inconsistencies came from positive comments rated very low. RMSE score without inconsistent comments is <strong>0.853. </strong>This means further analysis decreased the RMSE score to 0.235. This improvement is quite high if we compare it with 0.001.</p><p>On our dataset, we applied comment analysis methods to get ratings different than the true ratings given by the user. With these ratings, we fitted our model to see if the results improved or worsened.</p><ul><li>With actual ratings, the RMSE score was ~0.70</li><li>With predicted ratings, we obtained the RMSE as ~0.95</li></ul><p>With the predicted ratings, the obtained results were worse than the true ratings. But it is still capable of making recommendations.</p><p>Finally, we built two demos to show example recommendations and comment analyses.</p><ul><li><a href="https://huggingface.co/spaces/ruvinya/ain311project">https://huggingface.co/spaces/ruvinya/ain311project</a></li><li><a href="https://huggingface.co/spaces/MAli7319/Comment_Analysis">https://huggingface.co/spaces/MAli7319/Comment_Analysis</a></li></ul><p>With this, we have come to an end for both our blog posts and our course project. We have learned many different things during this period. Thank you for your interest in our project journey and we wish you pleasant days.</p><p><strong>Contributors</strong>:</p><ul><li>Arif Enes Aydın</li><li><a href="https://medium.com/u/64a8f601f769">Muhammet Ali Şentürk</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e0cc740de0f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/final-week-mooc-recommendation-2e0cc740de0f">Final Week — MOOC Recommendation</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WEEK #7 Question Assistant Barlas]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-7-question-assistant-barlas-44c25ea725fb?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/44c25ea725fb</guid>
            <category><![CDATA[question-generation]]></category>
            <category><![CDATA[question-answering]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[natural-language-process]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Mehmet Berat Ersarı]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 09:43:24 GMT</pubDate>
            <atom:updated>2023-01-02T09:43:24.215Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey Folk,</p><p>That is the last week of our journey. In the last week, we tried to fine-tune our model on mBERT model. However, we can not examine how to do that. Because of that we just fine-tuned on different versions of mT5. These versions are:</p><p>Small and Base models</p><p>We tried to fine-tune Large, XL, and XXL models on our data. However, we have insufficient computational resources. These models have huge number of parameters. It didn’t fit on the GPU memory.</p><p>The results after 20 epochs on base model are given below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*K9amHrIlPPVPj2zDGYzhKw.png" /></figure><p>The results after 5 epochs on small model are given below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*wOA63fccs9hk7sImhkVSbg.png" /></figure><p>The results after 20 epochs on small model are given below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*P_42kKPeKQIBY7pEeSyCXw.png" /></figure><p>Rouge and BLEU scores just calculate the score with matched words but they uses different formulas. METEOR score also takes into account order of the words. Because of that, this score is not high as BLEU and ROUGE as. This is the end of our long long journey.</p><p>Don’t forget. If you need help, “Better Call Barlas’’.</p><p>By <a href="https://medium.com/u/d52734a32565">Mehmet Berat Ersarı</a> &amp; <a href="https://medium.com/u/a8c06a625704">Zeynep Hafsa Dilmaç</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44c25ea725fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-7-question-assistant-barlas-44c25ea725fb">WEEK #7 Question Assistant Barlas</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 8 ‘The End’ — Career Path Predictor]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-8-the-end-career-path-predictor-ffe927fa2861?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/ffe927fa2861</guid>
            <category><![CDATA[career-advice]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[career-path-planning]]></category>
            <dc:creator><![CDATA[Melike Nur Erdoğan]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 09:43:18 GMT</pubDate>
            <atom:updated>2023-01-02T09:43:18.766Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 8 ‘The End’ — Career Path Predictor</h3><p>Hello everyone from our last week in our project! While we are proud of completing our project, we are also experiencing the bitter pain of writing the last blog post of this project. Of course, we can’t wait to share the final version of the project with you, let’s take a look at what we did this week.</p><p>Although it was the Logistic Regression model that gave the highest result from the different algorithms we tried last week, considering that it gave a very close result with the Gradient Boosting model, we applied parameter selection with GridSearchCV for the Gradient Boosting model as well. And we observed that the optimal parameters we obtained from here gave better results than the Logistic Regression model. Thus, the model we will use in our main project has been finalized. Then, we observed the effects of oversampling and undersampling applications on the accuracy of the bo model. Although we tried with different strategies, we gave up on these applications when the accuracy values we obtained were lower.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eFVeIUSjSLeXfbA1.png" /></figure><p>In our other project, where we used a smaller dataset that will offer suggestions to our users in 3 different more specific areas, we chose the AdaBoost model. Although we tried other algorithms, the AdaBoost model gave the best results. We saved this model and made it ready to use in our main project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*HGR43LDRfddycWXo.jpg" /></figure><p>Then we moved on to the System Creating part, which is one of the most enjoyable parts of the project. Here, we ask our user 36 different questions and send the answers we get from these questions to both of our models. At the end of the test, we send the results returned from our models to our users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*Vnh5NO_nlbvrD_v-tY1FKA.png" /></figure><p>We had a lot of fun and learned during the whole project. I hope we were able to help everyone who showed interest in our project during this process, and we were able to make you have fun with us. Thank you for your interest and we wish you days with AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*cAxg77K1_5MyDKP8PQciOA.jpeg" /></figure><blockquote>- Melike Nur Dulkadir</blockquote><blockquote>- Sare Naz Ersoy</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffe927fa2861" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-8-the-end-career-path-predictor-ffe927fa2861">Week 8 ‘The End’ — Career Path Predictor</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Final Week —  Project LEAFS]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/final-week-project-leafs-a5a0ae46dbb0?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/a5a0ae46dbb0</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Baha Kırbaşoğlu]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 09:42:50 GMT</pubDate>
            <atom:updated>2023-01-02T09:42:50.131Z</atom:updated>
            <content:encoded><![CDATA[<h3>Final Week — Project LEAFS</h3><p>Hi everyone,</p><p><a href="https://medium.com/ain311-fall-2022-projects/week-6-project-leafs-a290f068257c">Last week</a>, we discussed the data augmentation method and provided more data to the model. Also, we discussed that we increased the epoch size but unfortunately, the model returned an early stopping response. This week, we will be discussing improving the model performance based on the experience of the previous versions. Also, we developed a GUI for our project to make user friendly.</p><h4>Improving the Model Performance</h4><p>As we mentioned in the previous week, we made arrangements for our data set such as relabeling images, adding classroom photos that we collect from our class and removing images which will make overfit the model. After that, we trained two models the first one contains 1892 images as the training set and 224 images as a validation set, and the other one contains 1954 images as the training set and 224 images as a validation set. Both of the models were set to train in 300 epochs but they returned early stopping at 184 and 284 respectively. The difference between these two data set is, the second one contains more classroom photos that we collected by hand from our class. We thought that adding more classroom photos will make our model more successful. As a result of these models, we chose our seventh model because of its good metrics as shown in Fig 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mw_S6bMyYMQlHVAB5rZbow.png" /><figcaption>Fig 1. Precision-Recall Curve of Our Seventh Model</figcaption></figure><h4>Assessment of Lecture Efficiency</h4><p>We developed a semi-theoretical formula for the assessment of lecture efficiency by giving weights to classes as 1 to positive classes and between 0–0.75 to negative classes such as sleeping = 0, yawning = 0.50, eating or drinking = 0.75 and playing with phone = 0. The reason that we are giving these weights is, we thought that a person who yawns and eats or drinks something is still listening to the lecture but, a bit distracted, a person who sleeps and plays with a phone is fully distracted from the lecture. In Fig 2 we simply showed how the efficiency of the lecture is calculated as a semi-theoretical formula.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*yDnfulswdfyX3J-qXhW_Zw.png" /><figcaption>Fig 2. Lecture Efficiency Formula</figcaption></figure><p>As an example calculation shown in Fig 3 for our formula, if we have 4 people in our class sleeping, listening, raising hand and yawning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*t4R_sbObDQCf8Gv7sP60yQ.png" /><figcaption>Fig 3. Example Calculation</figcaption></figure><h4>Project LEAFS GUI</h4><p>As a final task of our project, we created a Graphical User Interface(GUI) for the project. This GUI Contains the detections on the real-time camera frames, the number of class instances based on the real-time detections, and semi-theoretical lecture efficiency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*crtdOzPlJsynG5KSm02JrA.jpeg" /><figcaption>Fig 4. Testing 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VDBkPplYM7UJjggREZ51wQ.jpeg" /><figcaption>Fig 5. Testing 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uReGTBocJRlNfLAL7UUmA.jpeg" /><figcaption>Fig 6. Testing 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djrdqRmv5KvXhIvMm-RCEw.jpeg" /><figcaption>Fig 7. Testing 4</figcaption></figure><p>The images are shown above, as example testings of our project. Contains all different classes and calculates the efficiency according to these detections.</p><h4>Conclusion</h4><p>As a result of seven weeks, we finished our project after completing the steps:</p><ul><li>Data Collection with different techniques such as web scraping, data augmentation and taking images of our classroom by hand.</li><li>Labelling all of these images.</li><li>Training models with small changes on data sets.</li><li>Choosing a final model based on the results from all models.</li><li>Determining a semi-theoretical formula to assess lecture efficiency.</li><li>Creating GUI.</li></ul><p>Depending on these steps, our project is a comprehensive work of artificial intelligence. In other words, it is a work of Data Science, Data Mining, Computer Vision, Machine Learning, Deep Learning and GUI design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*2AwnMDpB09vMaijbCnpmZQ.png" /></figure><p>It has been a great journey for us. Thanks to everyone who followed the project LEAFS process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*tWEjjHZuE8kh_K8XuP4Npw.gif" /></figure><p>Our GitHub link: <a href="https://github.com/canatess/Project_LEAFS">https://github.com/canatess/Project_LEAFS</a></p><p>Contributors of the project:</p><p><a href="https://medium.com/u/97753b696114">Can Ali Ateş</a></p><p><a href="https://medium.com/u/eaef09cdb9d5">Abdullah Enes Ergün</a></p><p><a href="https://medium.com/u/5148e3154a0d">Bahakirbasoglu</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5a0ae46dbb0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/final-week-project-leafs-a5a0ae46dbb0">Final Week —  Project LEAFS</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 3 — Eye Tracking and Prior Knowledge]]></title>
            <link>https://medium.com/ain311-fall-2022-projects/week-3-eye-tracking-and-prior-knowledge-3aea4bb38159?source=rss----fd32dd7ec78c---4</link>
            <guid isPermaLink="false">https://medium.com/p/3aea4bb38159</guid>
            <dc:creator><![CDATA[Alper Özöner]]></dc:creator>
            <pubDate>Mon, 26 Dec 2022 08:37:43 GMT</pubDate>
            <atom:updated>2022-12-26T08:37:43.851Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 3 — Eye Tracking and Prior Knowledge</h3><p><em>by Alper Özöner and Ali Utku Aydın</em></p><p>It is almost the end of week 4, but it is better late than nothing. This week, we have finally got rid of the representation problem (bag of words vs. histogram) of the last week. By using PyTesseract, an optical character recognition (OCR) tool for Python, we were able to automatically extract the coordinates of the bounding boxes for any given screenshot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISbLhpxunOpD_ab_leFu9g.png" /><figcaption>Another sample text taken from Wikipedia about French Revolution. PyTesseract succesfully extracted all the text and their bounding boxes as seen above.</figcaption></figure><p>If you remember from last week, we have the coordinates of the fixations in (x, y) tuples so we wrote the following block of code to automatically store the fixations that are inside the bounding box in a bag of words format:</p><pre>insideCond = (eyeTrackdf[&quot;x&quot;] &gt;= x) &amp; (eyeTrackdf[&quot;x&quot;] &lt; x + w) &amp; (eyeTrackdf[&quot;y&quot;] &gt;= y) &amp; (eyeTrackdf[&quot;y&quot;] &lt; y + h)<br>boundFixations = eyeTrackdf[insideCond]<br>for fixation in boundFixations:<br>    try:<br>        count = bag_of_words[str(text)]<br>        count += 1<br>        bag_of_words.update({str(text):count})<br>    except:<br>        bag_of_words[str(text)] = 1</pre><p>Because we will represent each experiment run as a single bag of word, we have also implemented a cosine similarity function to calculate the similarity between different bag of words. This will enable us to give the model a metric to quantify the difference in reading patterns’ of our subjects, as they will each have unique “bag of words” depending on their prior knowledge of the topic at hand:</p><pre>def cosineSimilarity(dictA, dictB):<br>    intersection = dictA.keys() &amp; dictB.keys()<br>    dot_product = 0<br>    for word in intersection:<br>        dot_product += dictA[word]*dictB[word]<br>    return dot_product / (magnitudeOfVector(dictA.values())*magnitudeOfVector(dictB.values()))</pre><p>As expected, the cosine similarity of two identical bag of words will be 1.0:</p><pre>bag_of_words_1 = bag_of_words.copy()<br>cosineSimilarity(bag_of_words, bag_of_words_1)<br>&gt;&gt; 1.0</pre><p>After making small changes to the copy, the similarity score goes down:</p><pre>del bag_of_words_1[&quot;of&quot;]<br>del bag_of_words_1[&quot;which&quot;]<br>del bag_of_words_1[&quot;general&quot;]<br>bag_of_words_1[&quot;yeah&quot;] = 10<br>cosineSimilarity(bag_of_words, bag_of_words_1)<br>&gt;&gt; 0.8414888911456696</pre><p>All in all, this week comprised of fixing up the shortcomings of the previous week, but it should be said that we are more than excited to have laid the groundwork for finally starting our proof of concept experiments possibly during next week. Stay tuned for more!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3aea4bb38159" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ain311-fall-2022-projects/week-3-eye-tracking-and-prior-knowledge-3aea4bb38159">Week 3 — Eye Tracking and Prior Knowledge</a> was originally published in <a href="https://medium.com/ain311-fall-2022-projects">AIN311 Fall 2022 Projects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>