Lesson 1 - Official topic

i had to activate “workspace symbols” for cmd + t to work on my Mac. I guess its the same with windows.

also “ctags” has to be installed.

Thanks! It worked :slightly_smiling_face:

How do I post a question during the live course?

You will be able to post questions on the Lesson Official Topic. Most liked questions will be answered by Jeremy live. Other question will be likely get answered by community too.

1 Like

I took out the really and got positive:

2 Likes

same with the dit:

2 Likes

Most sentiment analysis tools are for classification for “pos” or “neg”, how to train a continuous sentiment value between -1 and 1, like Stanford Sentiment Analysis Tool, or Vador? Is there any useful datasets for the task except the data used for Stanford Sentiment Analysis Tool?

2 Likes

We can very simply get probabilities instead of labels. This should get covered in Lesson-3 (IMDB analysis) .

To get a pred such as pos, neg we simply take the maximum of the probabilities. What you want to do is skip this step and return raw probabilities.

2 Likes

I followed the steps outlined for the homework regarding the code running and I created a setup script that includes some of the dependencies missing on the repo. I’m currently using paperspace and I was able to successfully use the v4 repo but I still have issues when running the file uploader. either way here is a copy of the lines of code used to get all the dependencies up and running.

#Install dependencies and upgrade
!pip install nbdev --upgrade 
!pip install azure-cognitiveservices-search-imagesearch --upgrade
!pip install fastai2`

#Upgrade via conda packages
!conda install graphviz --yes
!conda install ipywidgets --yes

# Download Repo
!git clone https://github.com/fastai/course-v4.git
1 Like

What’s the issue with file uploader please?

Yeah, seems like an accuracy of 92.5% is generous…

@arora_aman here is what I get when running the cell:


AttributeError Traceback (most recent call last)
in
----> 1 uploader = widgets.FileUpload()
2 uploader

AttributeError: module ‘ipywidgets.widgets’ has no attribute ‘FileUpload’

I hope someone can lend me a hand it seems when I run the code for the tabular and this also happens on the collab cells. I’ve been hitting some issues with the cells that load the data set from csv here is a copy of the error I’ve been trying to find out what is the issue but I’m running around in circles at this point :confused:


TypeError Traceback (most recent call last)
in
5 cat_names = [‘workclass’, ‘education’, ‘marital-status’, ‘occupation’,‘relationship’, ‘race’],
6 cont_names = [‘age’, ‘fnlwgt’, ‘education-num’],
----> 7 procs = [Categorify, FillMissing, Normalize]
8 )
9

/opt/conda/envs/fastai/lib/python3.6/site-packages/fastai2/tabular/data.py in from_df(cls, df, path, procs, cat_names, cont_names, y_names, block_y, valid_idx, **kwargs)
17 if cont_names is None: cont_names = list(set(df)-set(cat_names)-set(y_names))
18 splits = RandomSplitter()(df) if valid_idx is None else IndexSplitter(valid_idx)(df)
—> 19 to = TabularPandas(df, procs, cat_names, cont_names, y_names, splits=splits, block_y=block_y)
20 return to.dataloaders(path=path, **kwargs)
21

/opt/conda/envs/fastai/lib/python3.6/site-packages/fastai2/tabular/core.py in init(self, df, procs, cat_names, cont_names, y_names, block_y, splits, do_setup, device)
113 if block_y is None and self.y_names:
114 # Make ys categorical if they’re not numeric
–> 115 ys = df[self.y_names]
116 if len(ys.select_dtypes(include=‘number’).columns)!=len(ys.columns): block_y = CategoryBlock()
117 else: block_y = RegressionBlock()

/opt/conda/envs/fastai/lib/python3.6/site-packages/pandas/core/frame.py in getitem(self, key)
2686 return self._getitem_multilevel(key)
2687 else:
-> 2688 return self._getitem_column(key)
2689
2690 def _getitem_column(self, key):

/opt/conda/envs/fastai/lib/python3.6/site-packages/pandas/core/frame.py in _getitem_column(self, key)
2693 # get column
2694 if self.columns.is_unique:
-> 2695 return self._get_item_cache(key)
2696
2697 # duplicate columns & possible reduce dimensionality

/opt/conda/envs/fastai/lib/python3.6/site-packages/pandas/core/generic.py in _get_item_cache(self, item)
2485 “”“Return the cached item, item represents a label indexer.”""
2486 cache = self._item_cache
-> 2487 res = cache.get(item)
2488 if res is None:
2489 values = self._data.get(item)

TypeError: unhashable type: ‘L’

Thanks if anyone can help me :slight_smile:

Hi @danaludwig – you can post a question on the chat during the live-streamed lecture.

Check your version of ipywidgets and update it to 7.5 or newer. FileUpload was introduced in that version.

What is the advantage of widgets? I.e. playing devil's advocate: why would I want to bother with them when Colab offers such a seamless interface? :japanese_ogre:

Hi @Jess Hope you are getting better. :palms_up_together:

1 Like

Oh good - though so many comments go by so fast, I wonder how Rachel can keep up with it :slight_smile:

1 Like

Well, it depends on the widget you’re using. For instance my widget Class Confusion is used for model explainability

thank you for sharing “class confusion”. Can this widget be used for “text classification” as well?.