Commit ea143895 by ana

### last text changes we_are_sentiment_thermometer.py

parent 879e84b7
 ... ... @@ -531,11 +531,11 @@ while True: ''' os.system('cls' if os.name == 'nt' else 'clear') print("\n") print("\t\tWe will now ", cyan("link each of the sentiment words and their coordinates to a label.\n")) print("\t\tWe will now ", cyan("link each of the sentiment words and their coordinates to a target and a label.\n")) #time.sleep(2) print("\t\tWe use label ", green("1"), " for positive word vectors, ", green("-1"), " for negative word vectors.\n") print("\t\tWe use target ", green("1"), " for positive word vectors, ", green("-1"), " for negative word vectors.\n") #time.sleep(2) print("\t\tTo keep track of which label relates to which word, we memorize their respective index numbers.\n") print("\t\tTo keep track of which target relates to which word, we memorize their respective index numbers as labels.\n") #time.sleep(2) vectors = pd.concat([pos_vectors, neg_vectors]) targets = np.array([1 for entry in pos_vectors.index] + [-1 for entry in neg_vectors.index]) ... ... @@ -801,17 +801,15 @@ while True: print("\n") print("\t\tAs a compass for the exploration Scikit Learn proposes ", red(" Stochastic Gradient Descent.\n")) #time.sleep(2) print(red("\t\tSGD "), "for friends, is a classifying algorithm.\n") print(red("\t\tSGD "), "for friends, tries to find minima or maxima by iteration.\n") #time.sleep(2) print("\t\tWith the positive and negative landmarks we know, she ", green("looks for patterns"), " in the landscape.\n") print("\t\tWith the positive and negative landmarks we know, she ", green("explores the terrain.\n")) #time.sleep(2) print("\t\tImagine a landscape of hills and valleys, and this in ", green("300 dimensions.\n")) print("\t\tHer assistent, the loss function, notes the miminum efforts to go from a peak to a valley.\n") #time.sleep(2) print("\t\tSDG explores, finds a word, guesses its sentiment.\n") print("\t\tShe creates ", green("patterns"), " in the landscape.\n") #time.sleep(2) print("\t\tIf the guess matches the fact, SDG draws and goes on.\n") #time.sleep(2) print("\t\tIn this landscape SGD teaches us the best possible paths.\n") print("\t\tThese are like paths in a landscape of hills and valleys, and this in ", green("300 dimensions.\n")) #time.sleep(2) print("\t\tWe get to ", green("learn a map"), " that allows us to predict whether the next landmark will be positive or negative.\n") #time.sleep(2) ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!