<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Ask Ghassem - Recent questions in Data Science</title>
<link>https://ask.ghassem.com/questions/data-science</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to analyse imbalanced categorical colum in dataset</title>
<link>https://ask.ghassem.com/1042/how-to-analyse-imbalanced-categorical-colum-in-dataset</link>
<description>Hello,&lt;br /&gt;
&lt;br /&gt;
I have a dataset with a categorical column that contains three categories. One of the categories represents 98% of the data, while the remaining 2% are distributed between the other two categories, with a few (maybe around 50) in each. It is worth mentioning that the output for these 50 rows is the same, which suggests that these data points may be important.&lt;br /&gt;
&lt;br /&gt;
However, the data is obviously imbalanced, and I am unable to perform any analysis. Should I drop the entire column, or perform a chi-square test on the data as-is?</description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/1042/how-to-analyse-imbalanced-categorical-colum-in-dataset</guid>
<pubDate>Sat, 24 Jun 2023 17:55:23 +0000</pubDate>
</item>
<item>
<title>Can you verify the validity of this chart comparing the review scores for Marvel Phase 4?</title>
<link>https://ask.ghassem.com/1030/verify-validity-chart-comparing-review-scores-marvel-phase</link>
<description>&lt;p&gt;I have some skepticism about the validity of the charts below comparing the critic and audience reviews for Phase 4 of the MCU to the previous 3 phases. There are over 18 movies and tv shows in Phase 4 compared to the 6 movies in Phases 1 &amp;amp; 2 and the 11 movies in Phase 3. Also, there are far fewer critic reviews for the Phase 4 tv shows than the Phase 4 movies. For example, on Rotten Tomatoes there are only 40 critic reviews for The Falcon and the Winter Soldier and 452 critic reviews for Black Widow. Could this uneven and inconsistent number of reviews between tv shows and movies in Phase 4 be inaccurately making the overall averages higher than they should be? Or do you agree with the conclusions presented in the charts?&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://cdn.discordapp.com/attachments/997145183172964435/1059948060194652230/image.png&quot;&gt;https://cdn.discordapp.com/attachments/997145183172964435/1059948060194652230/image.png&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://cdn.discordapp.com/attachments/997145183172964435/1049356020469739520/image.png&quot;&gt;https://cdn.discordapp.com/attachments/997145183172964435/1049356020469739520/image.png&lt;/a&gt;&lt;/p&gt;</description>
<category>Exploratory Data Analysis</category>
<guid isPermaLink="true">https://ask.ghassem.com/1030/verify-validity-chart-comparing-review-scores-marvel-phase</guid>
<pubDate>Mon, 09 Jan 2023 16:29:14 +0000</pubDate>
</item>
<item>
<title>How do I compare the count of a value in each year while having a different sanple size each year.</title>
<link>https://ask.ghassem.com/1025/compare-count-value-each-year-while-having-different-sanple</link>
<description>How do I accurately compare between the number of something a survey measure from my employees each year with a varying umber of survey engagement and employee size?&lt;br /&gt;
&lt;br /&gt;
If I was measuring the satisfaction of my employees over the years by collecting a survey from my them each year by asking them wether they are satisfied or not, and then comparing yes’s over the years but the number of employees who answer is not the same each year and the number of employees increases every year. How do I correctly compare this throughout each year?&lt;br /&gt;
&lt;br /&gt;
In other words, how do I remove the effect of the survey engagement rate when calculating the results?</description>
<category>general</category>
<guid isPermaLink="true">https://ask.ghassem.com/1025/compare-count-value-each-year-while-having-different-sanple</guid>
<pubDate>Wed, 08 Jun 2022 10:32:33 +0000</pubDate>
</item>
<item>
<title>Is it possible to make a forecast of a future value of Air Temperature using Fast Fourier Transform?</title>
<link>https://ask.ghassem.com/1024/possible-forecast-future-value-temperature-fourier-transform</link>
<description>Is it possible to make a forecast of a future value of Air Temperature using Fast Fourier Transform, if yes, what should be the process or how you&amp;#039;ll be able to do it. Thank you!</description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/1024/possible-forecast-future-value-temperature-fourier-transform</guid>
<pubDate>Thu, 02 Jun 2022 16:10:26 +0000</pubDate>
</item>
<item>
<title>forecast log transformed fitted values for 2 years using ARMA model</title>
<link>https://ask.ghassem.com/1023/forecast-transformed-fitted-values-years-using-arma-model</link>
<description>Input is a stock price in exponential transformation. We are asked to forecast using ARMA results for 2 years.</description>
<category>Exploratory Data Analysis</category>
<guid isPermaLink="true">https://ask.ghassem.com/1023/forecast-transformed-fitted-values-years-using-arma-model</guid>
<pubDate>Wed, 04 May 2022 20:31:44 +0000</pubDate>
</item>
<item>
<title>Battery data projects</title>
<link>https://ask.ghassem.com/1017/battery-data-projects</link>
<description>Where can I find projects related to battery data?</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/1017/battery-data-projects</guid>
<pubDate>Wed, 02 Mar 2022 18:11:57 +0000</pubDate>
</item>
<item>
<title>How can you build dynamic pricing model with data only from rigid pricing?</title>
<link>https://ask.ghassem.com/1016/build-dynamic-pricing-model-with-data-only-from-rigid-pricing</link>
<description>I want to build a dynamic pricing model which means if product is too expansive for a client and there is a risk that we might loose a client we lower the price for them but if client doesn&amp;#039;t care that much about the price we might increase price a little.&lt;br /&gt;
&lt;br /&gt;
All the articles I&amp;#039;ve seen describe some kind of A/B testing for the pricing and then create a model.&lt;br /&gt;
&lt;br /&gt;
I want to build a model only on the existing rigid pricing data. So I have prices offered to customers and I know who bought the product and who went to other company.&lt;br /&gt;
&lt;br /&gt;
How can I do the increasing price part?</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/1016/build-dynamic-pricing-model-with-data-only-from-rigid-pricing</guid>
<pubDate>Fri, 21 Jan 2022 06:44:31 +0000</pubDate>
</item>
<item>
<title>What analytical software would be good for a company to use?</title>
<link>https://ask.ghassem.com/1015/what-analytical-software-would-be-good-for-a-company-to-use</link>
<description>This would be for a company that is just now looking into using a software to track data for wine making.</description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/1015/what-analytical-software-would-be-good-for-a-company-to-use</guid>
<pubDate>Fri, 14 Jan 2022 16:46:38 +0000</pubDate>
</item>
<item>
<title>How do I know which encoder to use to convert from categorical variables to numerical?</title>
<link>https://ask.ghassem.com/1006/know-which-encoder-convert-categorical-variables-numerical</link>
<description>So say I have a column with categorical data like different styles of temperature: &amp;#039;Lukewarm&amp;#039;, &amp;#039;Hot&amp;#039;, &amp;#039;Scalding&amp;#039;, &amp;#039;Cold&amp;#039;, &amp;#039;Frostbite&amp;#039;,... etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I know that we can use pd.get_dummies to convert the column to numerical data within the dataframe, but I also know that there are other &amp;#039;converters&amp;#039; (not sure if that&amp;#039;s the correct terminology) that we can use, i.e. OneHotEncoder from Sk-learn (like I could use the pipeline module to make a nice pipeline and feed my dataframe through the pipeline to also get my categorical data encoded to numerical).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How do I know which to use? Does it matter? If it does matter, when does it matter the most (i.e. what types of problems? When there are lots of categorical variables, or few?) If anyone can give me any pointers on this type of stuff I&amp;#039;d greatly appreciate it.</description>
<category>Exploratory Data Analysis</category>
<guid isPermaLink="true">https://ask.ghassem.com/1006/know-which-encoder-convert-categorical-variables-numerical</guid>
<pubDate>Mon, 29 Nov 2021 04:09:06 +0000</pubDate>
</item>
<item>
<title>ValueError: Length mismatch: Expected axis has 60 elements, new values have 2935849 elements</title>
<link>https://ask.ghassem.com/1005/valueerror-length-mismatch-expected-elements-2935849-elements</link>
<description>&lt;p&gt;I&#039;m creating a new data frame&amp;nbsp;with the most used items grouped together. But I got the following error when grouping through ID and items.&amp;nbsp;ValueError: Length mismatch: Expected axis has 60 elements, new values have 2935849 elements.&lt;/p&gt;

&lt;pre class=&quot;prettyprint lang-python&quot; data-pbcklang=&quot;python&quot; data-pbcktabsize=&quot;4&quot;&gt;
df = sales_df[sales_df[&#039;shop_id&#039;].duplicated(keep=False)]
df[&#039;Grouped&#039;] = sales_df.groupby(&#039;shop_id&#039;)[&#039;item_name&#039;].transform(lambda x: &#039;,&#039;.join(x))
df2 = df[[&#039;shop_id&#039;, &#039;Grouped&#039;]].drop_duplicates()&lt;/pre&gt;

&lt;p&gt;In the aforementioned code, I&#039;m making a data frame with respect to shop id and then grouping through shop items. My objective here is to group items with similar ID.&lt;/p&gt;</description>
<category>Exploratory Data Analysis</category>
<guid isPermaLink="true">https://ask.ghassem.com/1005/valueerror-length-mismatch-expected-elements-2935849-elements</guid>
<pubDate>Fri, 26 Nov 2021 06:09:16 +0000</pubDate>
</item>
<item>
<title>Text Mining, Artificial Neural Networks, Speech Processing, Cloud Computing in DS? Essential for a good Data Scientist ?</title>
<link>https://ask.ghassem.com/1004/artificial-networks-processing-computing-essential-scientist</link>
<description></description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/1004/artificial-networks-processing-computing-essential-scientist</guid>
<pubDate>Wed, 27 Oct 2021 19:15:16 +0000</pubDate>
</item>
<item>
<title>Classification of data object might be incorrect</title>
<link>https://ask.ghassem.com/1003/classification-of-data-object-might-be-incorrect</link>
<description>&lt;p&gt;I am learning a new Salesforce product (Evergage) for the company I work for. In the program&#039;s documentation they have listed a set of data objects as an example. It appears to me that the classification might be incorrect. Their system makes a division between &#039;catalog objects&#039; and &#039;profile objects&#039; and the example they have given is a banking institution. They classified &lt;em&gt;Customer Credit Card &lt;/em&gt;as a &lt;em&gt;profile objec&lt;/em&gt;t and &lt;em&gt;Credit Card Level &lt;/em&gt;as a &lt;em&gt;catalog object. &lt;/em&gt;Seems to me that it should be the other way i.e &lt;em&gt;Customer Credit Card = catalog &lt;/em&gt;&lt;em&gt;object &lt;/em&gt;and &lt;em&gt;Credit Card Level &lt;/em&gt;=&amp;nbsp;&lt;em&gt;profile objec&lt;/em&gt;t. Maybe I am not reading the context correctly?&lt;/p&gt;

&lt;p&gt;here is a link to an image with the complete classification: &lt;a rel=&quot;nofollow&quot; href=&quot;https://drive.google.com/file/d/1nG4aX4Ty_NoHxm04AQo1Ow61m3MZ3pXm/view?usp=sharing&quot;&gt;https://drive.google.com/file/d/1nG4aX4Ty_NoHxm04AQo1Ow61m3MZ3pXm/view?usp=sharing&lt;/a&gt;&lt;/p&gt;</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/1003/classification-of-data-object-might-be-incorrect</guid>
<pubDate>Mon, 25 Oct 2021 15:26:46 +0000</pubDate>
</item>
<item>
<title>Can Data Science solve this problem?</title>
<link>https://ask.ghassem.com/1002/can-data-science-solve-this-problem</link>
<description>So, I live in Brazil, and I have a task for college that I don&amp;#039;t know what data science method to use, if at all, to solve it. My idea is the following: We Brazilians have Real (BRL) as currency, and we of course have the dollar quotation value to see &amp;quot;how many Reais a dollar is worth&amp;quot;. What I wanted to do was to make a research and see whether the Country News have any influence over this price. So for example, if Bolsonaro, our president, says some dumb stuff, the dollar got up in price, and vice versa. What I wanted to do was collect all dollar values and variance over a set time interval, and try and get webscraping to get the news over some economy sites. Here&amp;#039;s my question then: How can I correlate the news with the dollar variance over a set time? Can data science do that? How do I preprocess this, if at all? Do I need to use bag-of-words? At least I heard so... Please help and thank you for reading.</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/1002/can-data-science-solve-this-problem</guid>
<pubDate>Sun, 24 Oct 2021 15:43:11 +0000</pubDate>
</item>
<item>
<title>should i start as a data analyst then data science?</title>
<link>https://ask.ghassem.com/994/should-i-start-as-a-data-analyst-then-data-science</link>
<description>should I start as a data analyst then data science?&lt;br /&gt;
&lt;br /&gt;
I am a second-year Bachelor&amp;#039;s in Computer Science and wanted to pursue to be a Data Scientist.&lt;br /&gt;
&lt;br /&gt;
However, when I am trying to apply for internships/jobs, most of it requires a Masters&amp;#039;s/Ph.D.&lt;br /&gt;
&lt;br /&gt;
But, a Data Analyst has fewer requirements.&lt;br /&gt;
&lt;br /&gt;
Do you recommend starting off as a Data Analyst and then change to Data Science?</description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/994/should-i-start-as-a-data-analyst-then-data-science</guid>
<pubDate>Mon, 21 Jun 2021 20:31:04 +0000</pubDate>
</item>
<item>
<title>How best to ensure data quality?</title>
<link>https://ask.ghassem.com/990/how-best-to-ensure-data-quality</link>
<description></description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/990/how-best-to-ensure-data-quality</guid>
<pubDate>Tue, 08 Jun 2021 22:02:23 +0000</pubDate>
</item>
<item>
<title>Searching for movie dataset containing movie synopses/plots?</title>
<link>https://ask.ghassem.com/988/searching-for-movie-dataset-containing-movie-synopses-plots</link>
<description>Hello&lt;br /&gt;
To build a hybrid recommendation system, I used the movielens 1M dataset, for the collaborative filtering part. Now, I&amp;#039;m looking for a database/dataset that contains descriptions/summaries/details/synopses/plots of movies for the content-based recommendation.&lt;br /&gt;
Is there someone who could help me and tell me where I can find a such dataset?&lt;br /&gt;
thank you in advance.</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/988/searching-for-movie-dataset-containing-movie-synopses-plots</guid>
<pubDate>Thu, 27 May 2021 09:57:31 +0000</pubDate>
</item>
<item>
<title>How to calculate average with deviating sensors?</title>
<link>https://ask.ghassem.com/983/how-to-calculate-average-with-deviating-sensors</link>
<description>In case of 3 sensors reporting loads of values individually.. one sensor might be off. The average of the 2 trustworthy sensors is to be reported.. the third in need for recalibration is to be neglected. I&amp;#039;m in need of an (excel) formula looking at three columns which row-by-row detects a significant deviation compared to the others and calculate the average of the most trustworthy.&lt;br /&gt;
Example:&lt;br /&gt;
48.1 ; 45.2 ; 45.4 =&amp;gt; 45.3, as sensor 1 is way off....&lt;br /&gt;
36.0 ; 37;0 ; 45.0 =&amp;gt; 36.5, as sensor 3 is way off....&lt;br /&gt;
36.0 ; 36;5 ; 37.0 =&amp;gt; 36.5 as the deviation is too small to be considered an anomaly, so all values are valid to create the average.&lt;br /&gt;
&lt;br /&gt;
Working with long periods of time.. the readings might be trustworthy for a few weeks, but in defect from moment X up until now... so simply ruling out one sensor is not really an option either.. What is the best way forward?&lt;br /&gt;
Please help. Highly appreciated.</description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/983/how-to-calculate-average-with-deviating-sensors</guid>
<pubDate>Tue, 04 May 2021 14:39:14 +0000</pubDate>
</item>
<item>
<title>Terminology clarification in Spark</title>
<link>https://ask.ghassem.com/979/terminology-clarification-in-spark</link>
<description>&lt;p&gt;I have a hard time distinguishing&amp;nbsp;terminologies&amp;nbsp;of SparkSQL. While SparkSQL are quite flexible in terms of abstraction layers, its really difficult for beginner to navigate around those options.&lt;/p&gt;

&lt;p&gt;1. When we say &quot; using SparkSQL to perform .....&quot;, does it mean that we can use any API/abstraction layers such as Scala, Python, HiveQL to query? As long as the core dataframe is in spark, we should be fine?&lt;/p&gt;

&lt;p&gt;2. Can we manipulate data in both PySpark and Scala sequentially?&lt;/p&gt;

&lt;p&gt;For example, may I clean up the data in Scala, then perform follow up manipulation in PySpark, then go back to Scala?&lt;/p&gt;

&lt;p&gt;3. As demonstrated in the tutorial, we can query&amp;nbsp;with SQL command by using the api spark.sql(&quot;My SQL command&quot;). does it count as SQL or SPARK?&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;Image result for spark sql&quot; src=&quot;http://cdn.app.compendium.com/uploads/user/e7c690e8-6ff9-102a-ac6d-e4aebca50425/f4a5b21d-66fa-4885-92bf-c4e81c06d916/Image/753ace3c801b53535077d9474ecc5f1e/odi_spark_sql_databricks.jpg&quot;&gt;&lt;/p&gt;</description>
<category>Big Data Tools</category>
<guid isPermaLink="true">https://ask.ghassem.com/979/terminology-clarification-in-spark</guid>
<pubDate>Sat, 06 Feb 2021 18:03:32 +0000</pubDate>
</item>
<item>
<title>My GloVe word embeddings contain sentiment?</title>
<link>https://ask.ghassem.com/972/my-glove-word-embeddings-contain-sentiment</link>
<description>&lt;p&gt;I&#039;ve been researching sentiment analysis with word embeddings. I read papers that state that word embeddings ignore sentiment information of the words in the text. One paper states that among the top 10 words that are semantically similar, around 30 percent of words have opposite polarity e.g. happy - sad.&lt;/p&gt;

&lt;p&gt;So, I computed word embeddings on my dataset (Amazon reviews) with the GloVe algorithm in R. Then, I looked at the most similar words with cosine similarity and I found that actually every word is sentimentally similar. (E.g. beautiful - lovely - gorgeous - pretty - nice - love). Therefore, I was wondering how this is possible since I expected the opposite from reading several papers. What could be the reason for my findings?&lt;/p&gt;

&lt;p&gt;Two of the many papers I read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Yu, L. C., Wang, J., Lai, K. R. &amp;amp; Zhang, X. (2017). Refining Word Embeddings Using Intensity Scores for Sentiment Analysis. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 26(3), 671-681.&lt;/li&gt;
&lt;li&gt;Tang, D., Wei, F., Yang, N., Zhou, M., Liu, T. &amp;amp; Qin, B. (2014). Learning Sentiment-Specific Word Embedding for Twitter Sentiment Classification. Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, 1: Long Papers, 1555-1565&lt;/li&gt;
&lt;/ul&gt;</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/972/my-glove-word-embeddings-contain-sentiment</guid>
<pubDate>Sun, 03 Jan 2021 14:09:37 +0000</pubDate>
</item>
<item>
<title>is it possible to derive a new 95% CI from two separate 95% CIs?</title>
<link>https://ask.ghassem.com/961/is-it-possible-to-derive-a-new-95-ci-from-two-separate-95-cis</link>
<description>&lt;div id=&quot;i4c-draggable-container&quot; style=&quot;position: fixed; z-index: 1499; width: 0px; height: 0px;&quot;&gt;
&lt;div class=&quot;resolved&quot; data-reactroot=&quot;&quot; style=&quot;all: initial;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;

&lt;div style=&quot;position: fixed; z-index: 1499; width: 0px; height: 0px;&quot;&gt;
&lt;div style=&quot;all: initial;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;

&lt;div style=&quot;position: fixed; z-index: 1499; width: 0px; height: 0px;&quot;&gt;
&lt;div style=&quot;all: initial;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div id=&quot;i4c-dialogs-container&quot;&gt;&amp;nbsp;&lt;/div&gt;</description>
<category>Statistics</category>
<guid isPermaLink="true">https://ask.ghassem.com/961/is-it-possible-to-derive-a-new-95-ci-from-two-separate-95-cis</guid>
<pubDate>Mon, 23 Nov 2020 14:45:19 +0000</pubDate>
</item>
<item>
<title>Probability of a bus arrived in its destination based on weather condition</title>
<link>https://ask.ghassem.com/953/probability-arrived-destination-based-weather-condition</link>
<description>A bus is making its way to a destination. If the weather conditions are favorable today, the likelihood of delay is 3%. If the weather conditions are not favorable today, the likelihood of delay is 50%. The forecast predicts that it is 20% likely that the weather conditions will be favorable today.&lt;br /&gt;
&lt;br /&gt;
1. What is the likelihood that the bus will be delayed?&lt;br /&gt;
&lt;br /&gt;
2. The bus has arrived, but it was delayed. Given that the bus was delayed, what is the likelihood that the weather conditions were favorable?</description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/953/probability-arrived-destination-based-weather-condition</guid>
<pubDate>Mon, 09 Nov 2020 13:06:47 +0000</pubDate>
</item>
<item>
<title>How to remove unwanted Jupyter notebook kernels?</title>
<link>https://ask.ghassem.com/947/how-to-remove-unwanted-jupyter-notebook-kernels</link>
<description>Whener I run Jupyter notebook there are some kernels that do not exist on system and generate errors. How can I remove them?</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/947/how-to-remove-unwanted-jupyter-notebook-kernels</guid>
<pubDate>Fri, 30 Oct 2020 17:15:17 +0000</pubDate>
</item>
<item>
<title>How can this data be structured for mongodb</title>
<link>https://ask.ghassem.com/889/how-can-this-data-be-structured-for-mongodb</link>
<description>&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://prnt.sc/tkr2g7&quot;&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://prnt.sc/tkr2g7&quot; target=&quot;_blank&quot;&gt;https://prnt.sc/tkr2g7&lt;/a&gt; Hello I have a PFE about determining risks of pedestrians, and I have to make a simulator to generate data with something related to this, this is my first time working on this. I would like to know, the structure of data, I will be working with mangodb, so I would love to see an example on JSON&lt;/p&gt;</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/889/how-can-this-data-be-structured-for-mongodb</guid>
<pubDate>Sun, 19 Jul 2020 19:08:50 +0000</pubDate>
</item>
<item>
<title>guidance on sequencing data science courses below</title>
<link>https://ask.ghassem.com/844/guidance-on-sequencing-data-science-courses-below</link>
<description>Hello&lt;br /&gt;
my name is lutaaya mudathiru.&lt;br /&gt;
&lt;br /&gt;
I am planning to start data science online&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;professional courses at Harvard&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;University, but i don&amp;#039;t know which course &amp;nbsp;i should begin with . I request for help in sequencing these courses below so that i can&lt;br /&gt;
&lt;br /&gt;
benefitt more:&lt;br /&gt;
&lt;br /&gt;
1. Principles, Statistical and Computational Tools for Reproducible Science.&lt;br /&gt;
&lt;br /&gt;
2.Data Science: Inference and Modeling.&lt;br /&gt;
&lt;br /&gt;
3. Data Science: Productivity Tools&lt;br /&gt;
&lt;br /&gt;
4.Data Science: Wrangling&lt;br /&gt;
&lt;br /&gt;
5.Data Science: Linear Regression.&lt;br /&gt;
&lt;br /&gt;
6.Data Science: Machine Learning&lt;br /&gt;
&lt;br /&gt;
7.Data Science: Capstone&lt;br /&gt;
&lt;br /&gt;
8. Data Science: R Basics&lt;br /&gt;
&lt;br /&gt;
9.DataScience:Visualization&lt;br /&gt;
&lt;br /&gt;
10. DataScience:Probability.&lt;br /&gt;
&lt;br /&gt;
11. High-Dimensional Data Analysis&lt;br /&gt;
&lt;br /&gt;
12. Introduction to Linear Models and Matrix Algebra&lt;br /&gt;
&lt;br /&gt;
13. Data science:Statistics and R&lt;br /&gt;
&lt;br /&gt;
14. Fat Chance: Probability from the Ground Up&lt;br /&gt;
&lt;br /&gt;
15. Introduction to Probability (on edX)</description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/844/guidance-on-sequencing-data-science-courses-below</guid>
<pubDate>Fri, 20 Mar 2020 13:55:49 +0000</pubDate>
</item>
<item>
<title>What are the differences among Data Science, Artificial Intelligence and Machine Learning?</title>
<link>https://ask.ghassem.com/842/differences-science-artificial-intelligence-machine-learning</link>
<description>What are the differences among Data Science, Artificial Intelligence and Machine Learning?</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/842/differences-science-artificial-intelligence-machine-learning</guid>
<pubDate>Thu, 05 Mar 2020 03:02:31 +0000</pubDate>
</item>
<item>
<title>How to convert Jupyter Notebook or a webpage to PDF using Chrome?</title>
<link>https://ask.ghassem.com/840/how-to-convert-jupyter-notebook-or-webpage-pdf-using-chrome</link>
<description>Please show us how to print to pdf in Google Colab or any other webpages in Google Chrome?</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/840/how-to-convert-jupyter-notebook-or-webpage-pdf-using-chrome</guid>
<pubDate>Thu, 27 Feb 2020 18:39:19 +0000</pubDate>
</item>
<item>
<title>How to share a Jupyter Notebook document on Google Colab?</title>
<link>https://ask.ghassem.com/836/how-to-share-a-jupyter-notebook-document-on-google-colab</link>
<description>How can I give access to others to view, comment or edit my Jupyter Notebook on Google Colab?</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/836/how-to-share-a-jupyter-notebook-document-on-google-colab</guid>
<pubDate>Thu, 27 Feb 2020 16:17:13 +0000</pubDate>
</item>
<item>
<title>What are the most common data types in data science?</title>
<link>https://ask.ghassem.com/834/what-are-the-most-common-data-types-in-data-science</link>
<description>What are the main data types?</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/834/what-are-the-most-common-data-types-in-data-science</guid>
<pubDate>Wed, 19 Feb 2020 17:28:54 +0000</pubDate>
</item>
<item>
<title>How can I prove that following is a tautology (using laws of logical equivalences)</title>
<link>https://ask.ghassem.com/818/prove-that-following-tautology-using-logical-equivalences</link>
<description>$(p → q) ∧ (q → r) → (p → r)$&lt;br /&gt;
&lt;br /&gt;
Without Truth Tables!</description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/818/prove-that-following-tautology-using-logical-equivalences</guid>
<pubDate>Sat, 15 Feb 2020 17:54:02 +0000</pubDate>
</item>
<item>
<title>can someone send me an online link to discrete mathematics 8th edition textbook?</title>
<link>https://ask.ghassem.com/813/someone-send-online-discrete-mathematics-edition-textbook</link>
<description></description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/813/someone-send-online-discrete-mathematics-edition-textbook</guid>
<pubDate>Thu, 13 Feb 2020 00:22:28 +0000</pubDate>
</item>
<item>
<title>How to install Matplotlib</title>
<link>https://ask.ghassem.com/792/how-to-install-matplotlib</link>
<description>Hi Everyone,&lt;br /&gt;
&lt;br /&gt;
How to install Matplotlib in Python IDLE. 3.7.4&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m a student in Data Science and I want to do The Birthday Paradox and it requires me to import matplotlib.pyplot&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m using MAC and in the terminal, I tried to write:&lt;br /&gt;
&lt;br /&gt;
(base) MacBook-Pro:~ nasir$ sudo apt install python3-matplotlib&lt;br /&gt;
&lt;br /&gt;
Password: **************&lt;br /&gt;
&lt;br /&gt;
I then received the below error:&lt;br /&gt;
&lt;br /&gt;
Unable to locate an executable at &amp;quot;/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/apt&amp;quot; (-1)&lt;br /&gt;
&lt;br /&gt;
(base) MacBook-Pro:~ nasir$</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/792/how-to-install-matplotlib</guid>
<pubDate>Sun, 02 Feb 2020 21:30:41 +0000</pubDate>
</item>
<item>
<title>Understanding symbolic language of problem, quantificational  logic</title>
<link>https://ask.ghassem.com/786/understanding-symbolic-language-problem-quantificational</link>
<description>&lt;p&gt;Hi, i am having trouble interpreting the information contained in the relation &lt;strong&gt;R, &lt;/strong&gt;and how it should be applied to the Ps in this problem:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Consider the formula&amp;nbsp;&lt;/p&gt;

&lt;h3&gt;∃x∃y∃z(P(x,y)∧P(z,y)∧P(x,z)∧¬P(z,x))&lt;/h3&gt;

&lt;p&gt;Under each pf these interpretations, is this formula true? In each case, R is the relation corresponding to P.&lt;/p&gt;

&lt;p&gt;(a) U = N,&amp;nbsp; &amp;nbsp;&lt;strong&gt;R = {&amp;lt;x,y&amp;gt; : x&amp;lt;y}.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(b) U = N,&amp;nbsp; &amp;nbsp;&lt;strong&gt;R = {&amp;lt;x,x+1&amp;gt; : x≥0}.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Does &amp;lt;x,y&amp;gt; refer to the variables x,y or z in each P(a,b), and the :x&amp;lt;y refer to what the relation between these two should be?&lt;/p&gt;

&lt;p&gt;I tried something like this for (a) and got:&lt;/p&gt;

&lt;p&gt;∃x∃y∃z((x&amp;lt;y)∧(z&amp;lt;y)∧(x&amp;lt;z)∧¬(z&amp;lt;x))&lt;/p&gt;

&lt;p&gt;However I&#039;m not sure if this is correct, and I&#039;m not sure how I would do it for (b)&lt;/p&gt;</description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/786/understanding-symbolic-language-problem-quantificational</guid>
<pubDate>Sun, 26 Jan 2020 11:18:05 +0000</pubDate>
</item>
<item>
<title>What are the values stored in tc8 format for the following numbers?</title>
<link>https://ask.ghassem.com/782/what-are-the-values-stored-tc8-format-for-following-numbers</link>
<description>&lt;p&gt;Q1) Calculate tc8 of -117,&amp;nbsp;-127, 127, 0&lt;/p&gt;

&lt;p&gt;Q2) What values are stored in the following tc8 registers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;10010001&lt;/li&gt;
&lt;li&gt;00010001&lt;/li&gt;
&lt;li&gt;01111111&lt;/li&gt;
&lt;li&gt;0000000&lt;/li&gt;
&lt;li&gt;11111111&lt;/li&gt;
&lt;/ol&gt;</description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/782/what-are-the-values-stored-tc8-format-for-following-numbers</guid>
<pubDate>Thu, 23 Jan 2020 19:27:01 +0000</pubDate>
</item>
<item>
<title>How to calculate $g[h(3)]$ if $g(x)= 2x+3$ and $h(x) =4x+5$ ?</title>
<link>https://ask.ghassem.com/766/how-to-calculate-g-h-3-if-g-x-2x-3-and-h-x-4x-5</link>
<description>Need help solving this question</description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/766/how-to-calculate-g-h-3-if-g-x-2x-3-and-h-x-4x-5</guid>
<pubDate>Fri, 06 Dec 2019 00:47:26 +0000</pubDate>
</item>
<item>
<title>How do i find the inverse of the function?</title>
<link>https://ask.ghassem.com/763/how-do-i-find-the-inverse-of-the-function</link>
<description>If $h(x) =4x+5$, how do i find h inverse of x?</description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/763/how-do-i-find-the-inverse-of-the-function</guid>
<pubDate>Thu, 05 Dec 2019 23:10:55 +0000</pubDate>
</item>
<item>
<title>Can anyone please solve Q7 pg 329 in Induction?</title>
<link>https://ask.ghassem.com/761/can-anyone-please-solve-q7-pg-329-in-induction</link>
<description></description>
<category>Discrete Mathematics</category>
<guid isPermaLink="true">https://ask.ghassem.com/761/can-anyone-please-solve-q7-pg-329-in-induction</guid>
<pubDate>Thu, 05 Dec 2019 22:02:15 +0000</pubDate>
</item>
<item>
<title>Individual and group relative strength in a fixed pool of players: How to approach the problem?</title>
<link>https://ask.ghassem.com/751/individual-group-relative-strength-players-approach-problem</link>
<description>&lt;div&gt;I apologize in advance if my question sounds too basic to be worthy of anyone&#039;s time, but statistics are not part of my curriculum.&lt;/div&gt;

&lt;div&gt;
&lt;p&gt;I am developing a proof of concept of a web application modeling the contribution of individual soccer player with respect to the different teams they&#039;ve played with throughout their career. In particular, I am looking into a way of &lt;em&gt;ranking&lt;/em&gt; both individuals and groups of players as follows::&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;teammates relative strength&lt;/strong&gt;: the best/worst combinations of players when playing in the same team in the same matches;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;opponents relative strength&lt;/strong&gt;: the best/worst combinations of players when playing in opposite teams in the same matches, i.e. which tuples of teammates are the best/worst against which;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I must admit I don&#039;t quite know how to approach the problem (as I said I have no formal education in statistics or data science). I would be very grateful&amp;nbsp; if anyone could give me some directions. How should I frame this particular problem and what resources in statistics or machine learning (if indeed this is a task fit for machine learning, perhaps I am mistaken on this) would be appropriate to tackle it?&lt;/p&gt;

&lt;p&gt;I am eager to learn, so both practical examples or theoretical references (book chapters, online articles, etc) would be very welcome.&lt;/p&gt;

&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;/div&gt;</description>
<category>Statistics</category>
<guid isPermaLink="true">https://ask.ghassem.com/751/individual-group-relative-strength-players-approach-problem</guid>
<pubDate>Tue, 29 Oct 2019 20:00:28 +0000</pubDate>
</item>
<item>
<title>ideas and opinion on what kind of analyses needs to be done</title>
<link>https://ask.ghassem.com/713/ideas-and-opinion-on-what-kind-of-analyses-needs-to-be-done</link>
<description>Hello Guys,&lt;br /&gt;
&lt;br /&gt;
I have been given a task where I need to analyse the impact of all the products that were discontinued last year on the customers and sales? I work for a retail company which has 100s of stores in North America and my analyses needs to be &amp;quot;Qualitatively better than the regular BI&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I quote that because thats what I was asked to do. I am struggling to come up with ideas. What kind of hypothesis should I test. Or any Bayesian analyses that can be done. Any ideas within the realms of data science and machine learning is welcome.&lt;br /&gt;
&lt;br /&gt;
I generally do my analyses using Jupyter Notebook and my skill set consist of SQL, Python including ML libraries like sklearn</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/713/ideas-and-opinion-on-what-kind-of-analyses-needs-to-be-done</guid>
<pubDate>Fri, 26 Jul 2019 18:38:55 +0000</pubDate>
</item>
<item>
<title>What are the most important Python libraries for data science?</title>
<link>https://ask.ghassem.com/677/what-are-the-most-important-python-libraries-for-data-science</link>
<description></description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/677/what-are-the-most-important-python-libraries-for-data-science</guid>
<pubDate>Mon, 08 Jul 2019 04:42:28 +0000</pubDate>
</item>
<item>
<title>Using aggregate data to generate observation-level data statistically sound?</title>
<link>https://ask.ghassem.com/644/using-aggregate-generate-observation-level-statistically</link>
<description>&lt;p&gt;Context: In the realm of Paid Search Marketing. Current reporting does not provide event level data only aggregate totals with different segments.&amp;nbsp; Want to compare distributions/test statistical significance of A/B test results.&amp;nbsp; Did not want to assume that data followed normal distribution or know STDEV&amp;nbsp;for data so came with this approach.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;My Question: I am going to use the average &quot;CPA&quot; or &quot;CTR&quot; for a date range, and generate an observation for each conversion based off the average for a time range.&amp;nbsp; Is this statistically sound way if I want to generate raw data? Would I have wonky distributions because of the multiple averages?&amp;nbsp; Just want a gutcheck if I&#039;m completely off base.&amp;nbsp;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;My Aggregate data looks like below:&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th scope=&quot;col&quot;&gt;Day&lt;/th&gt;
&lt;th scope=&quot;col&quot;&gt;Cost&lt;/th&gt;
&lt;th scope=&quot;col&quot;&gt;Acquisition&lt;/th&gt;
&lt;th scope=&quot;col&quot;&gt;CPA or CTR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp;1&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 40&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp;2&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 75&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$25&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Observation data I generate looks like below:&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th scope=&quot;col&quot;&gt;Day&lt;/th&gt;
&lt;th scope=&quot;col&quot;&gt;Acquisition&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$25&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$25&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/td&gt;
&lt;td&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$25&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;I really appreciate your help with this question! An important project to me at work.&amp;nbsp;&amp;nbsp;&lt;/p&gt;</description>
<category>general</category>
<guid isPermaLink="true">https://ask.ghassem.com/644/using-aggregate-generate-observation-level-statistically</guid>
<pubDate>Tue, 11 Jun 2019 22:04:01 +0000</pubDate>
</item>
<item>
<title>What are the available libraries for continuous time hidden markov models ?</title>
<link>https://ask.ghassem.com/640/what-available-libraries-continuous-hidden-markov-models</link>
<description></description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/640/what-available-libraries-continuous-hidden-markov-models</guid>
<pubDate>Fri, 07 Jun 2019 13:27:05 +0000</pubDate>
</item>
<item>
<title>How to reshape in pandas dataframe?</title>
<link>https://ask.ghassem.com/608/how-to-reshape-in-pandas-dataframe</link>
<description>&lt;p&gt;Dataframe looks like below&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://user-images.githubusercontent.com/31833270/55626163-bb1edc80-57e5-11e9-9807-ebc69ff5915a.png&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;image&quot; src=&quot;https://user-images.githubusercontent.com/31833270/55626163-bb1edc80-57e5-11e9-9807-ebc69ff5915a.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have dataframe like above. which I want to a~t reshape&amp;nbsp;&lt;code&gt;(a~t, 1)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I want to reshape dataframe like below ( b~t column is go to under the a column)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;날짜 역번호 역명 구분 a &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2018-01-01 150 서울역 승차 379 &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2018-01-01 150 서울역 승차 287&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2018-01-01 150 서울역 승차 371 &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2018-01-01 150 서울역 승차 876 &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2018-01-01 150 서울역 승차 965&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.... &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2008-01-01 152 종각 승차 2920 &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2008-01-01 152 종각 승차 2290 &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2008-01-01 152 종각 승차 802 &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2008-01-01 152 종각 승차 1559&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;like&amp;nbsp;&lt;code&gt;df = df.reshape(len(data2)*a~t, 1)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;i tried pd.melt but It does not work well.&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;df2 = pd.melt(df, id_vars=[&quot;날짜&quot;, &quot;역번호&quot;, &quot;역명&quot;, &quot;구분&quot;], value_name=&quot;t&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;is remove b ~ t but i want insert b~t behind a&lt;/p&gt;

&lt;p&gt;dataset is&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://drive.google.com/file/d/1Upb5PgymkPB5TXuta_sg6SijwzUuEkfl/view?usp=sharing&quot;&gt;https://drive.google.com/file/d/1Upb5PgymkPB5TXuta_sg6SijwzUuEkfl/view?usp=sharing&lt;/a&gt;&lt;/p&gt;</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/608/how-to-reshape-in-pandas-dataframe</guid>
<pubDate>Fri, 05 Apr 2019 13:41:30 +0000</pubDate>
</item>
<item>
<title>Is digital marketing and marketing internships worth it for a data science student?</title>
<link>https://ask.ghassem.com/606/digital-marketing-marketing-internships-science-student</link>
<description>it&amp;#039;s about data science career</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/606/digital-marketing-marketing-internships-science-student</guid>
<pubDate>Thu, 04 Apr 2019 22:58:54 +0000</pubDate>
</item>
<item>
<title>How to open Jupyter notebook files on Windows or Mac without web browser?</title>
<link>https://ask.ghassem.com/585/how-open-jupyter-notebook-files-windows-mac-without-browser</link>
<description></description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/585/how-open-jupyter-notebook-files-windows-mac-without-browser</guid>
<pubDate>Sat, 16 Mar 2019 23:36:01 +0000</pubDate>
</item>
<item>
<title>Passing variable length sentences to Tensorflow LSTM</title>
<link>https://ask.ghassem.com/561/passing-variable-length-sentences-to-tensorflow-lstm</link>
<description>&lt;p&gt;I have a tensorflow LSTM model for predicting the sentiment. I build the model with the maximum sequence length 150. (Maximum number of words) While making predictions, i have written the code as below:&lt;/p&gt;

&lt;pre class=&quot;prettyprint lang-python&quot; data-pbcklang=&quot;python&quot; data-pbcktabsize=&quot;4&quot;&gt;
batchSize = 32
maxSeqLength = 150

def getSentenceMatrix(sentence):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arr = np.zeros([batchSize, maxSeqLength])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sentenceMatrix = np.zeros([batchSize,maxSeqLength], dtype=&#039;int32&#039;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cleanedSentence = cleanSentences(sentence)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cleanedSentence = &#039; &#039;.join(cleanedSentence.split()[:150])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;split = cleanedSentence.split()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for indexCounter,word in enumerate(split):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sentenceMatrix[0,indexCounter] = wordsList.index(word)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;except ValueError:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sentenceMatrix[0,indexCounter] = 399999 #Vector for unkown words
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return sentenceMatrix

input_text = &quot;example data&quot;
inputMatrix = getSentenceMatrix(input_text)&lt;/pre&gt;

&lt;p&gt;&lt;br&gt;
&lt;br&gt;
In the code i&#039;m truncating my input text to 150 words and ignoring remaining data.Due to this my predictions are wrong.&lt;/p&gt;

&lt;pre class=&quot;prettyprint lang-python&quot; data-pbcklang=&quot;python&quot; data-pbcktabsize=&quot;4&quot;&gt;
cleanedSentence = &#039; &#039;.join(cleanedSentence.split()[:150]) &lt;/pre&gt;

&lt;p&gt;&lt;br&gt;
I know that if we have lesser length than sequence length we can pad with zero&#039;s. What we need to do if we have more length. Can you suggest me the best way to do this. Thanks in advance.&lt;/p&gt;</description>
<category>General</category>
<guid isPermaLink="true">https://ask.ghassem.com/561/passing-variable-length-sentences-to-tensorflow-lstm</guid>
<pubDate>Mon, 11 Feb 2019 05:06:27 +0000</pubDate>
</item>
<item>
<title>What is the easiest way to distinguish whether to use a z value test or a t value test?</title>
<link>https://ask.ghassem.com/553/what-the-easiest-distinguish-whether-value-test-value-test</link>
<description></description>
<category>Data Science</category>
<guid isPermaLink="true">https://ask.ghassem.com/553/what-the-easiest-distinguish-whether-value-test-value-test</guid>
<pubDate>Tue, 18 Dec 2018 04:33:27 +0000</pubDate>
</item>
<item>
<title>nonpooled independent samples t-interval method</title>
<link>https://ask.ghassem.com/548/nonpooled-independent-samples-t-interval-method</link>
<description></description>
<category>Statistics</category>
<guid isPermaLink="true">https://ask.ghassem.com/548/nonpooled-independent-samples-t-interval-method</guid>
<pubDate>Fri, 07 Dec 2018 23:06:04 +0000</pubDate>
</item>
<item>
<title>Computing the Confidence Interval for a Difference Between Two Means</title>
<link>https://ask.ghassem.com/546/computing-the-confidence-interval-difference-between-means</link>
<description></description>
<category>Statistics</category>
<guid isPermaLink="true">https://ask.ghassem.com/546/computing-the-confidence-interval-difference-between-means</guid>
<pubDate>Fri, 07 Dec 2018 23:02:45 +0000</pubDate>
</item>
<item>
<title>How to find the strength of a P-value against a null hypothesis?</title>
<link>https://ask.ghassem.com/545/how-to-find-the-strength-of-a-p-value-against-null-hypothesis</link>
<description></description>
<category>Statistics</category>
<guid isPermaLink="true">https://ask.ghassem.com/545/how-to-find-the-strength-of-a-p-value-against-null-hypothesis</guid>
<pubDate>Fri, 07 Dec 2018 22:31:33 +0000</pubDate>
</item>
<item>
<title>What is degree of Freedom while calculating confidence interval?</title>
<link>https://ask.ghassem.com/544/what-degree-freedom-while-calculating-confidence-interval</link>
<description></description>
<category>Statistics</category>
<guid isPermaLink="true">https://ask.ghassem.com/544/what-degree-freedom-while-calculating-confidence-interval</guid>
<pubDate>Fri, 07 Dec 2018 22:27:27 +0000</pubDate>
</item>
</channel>
</rss>