Group Abstract Group Abstract

Message Boards Message Boards

[WSG20] New Machine Learning Basics Study Group begins Monday, November 16

A new study group covering the basics of machine learning begins Monday! This group will be led by Wolfram certified instructor @Abrita Chakravarty and meets daily, Monday to Friday for one week. Abrita will share the excellent short lesson videos created by @Jon McLoone for the Wolfram U course Zero to AI in 60 Minutes. Study group sessions include time for additional examples, exercises, discussion and Q&A. Certification of program completion is available. Sign up: https://wolfr.am/R2s6PERk

POSTED BY: Jamie Peterson
35 Replies

For the deployment aspect, I have tried two more independent product approachs, first one deployed at

http://vfvalue.com/ai/image.html

this page needs authentication to login,

it features chinese input, The following example the input is dog in chinese, and then the result return "True"

Starting from this, I also tried APIFunction[],and embed the api call in node.js at the server side, that way I can independent get total control of the front end look like and pave a path for independent commercial projects using web interface.

Form Interface

The result: result

POSTED BY: vincent feng

A final challenge

Create an deploy a simple machine learning app of your choice. Feel free to use one of our built-in classifiers or predictors.


To get you started, here is the example we looked at in the study group session:

CloudDeploy[
 FormPage[
  {{"myPicture", "Your picture"} -> "Image"},
  Module[{entity},
    entity = Classify["NotablePerson", #myPicture];
    Row[{#myPicture, Spacer[10], entity, Spacer[10], 
      entity["Image"]}]
    ] &,
  AppearanceRules -> <|
    "Title" -> "Which famous person do you look like?", 
    "Description" -> 
     "Enter your image and we'll show you your famous twin!!",
    "SubmitLabel" -> "Show me who"|>,
  PageTheme -> "Black"
  ],
 "FamousLookAlike",
 Permissions -> "Public"
 ]

Here's the simpler version for testing: https://wolfr.am/RddbHZR4

Posted 5 years ago

Detecting the oldest and youngest in a picture.

https://www.wolframcloud.com/obj/tsukisan/LookingForExtremes

POSTED BY: tsukisan

Thanks!!!! I totally didn't even look at the emails because I had the event saved in my calendar. My bad.

POSTED BY: Stephanie Meyer

Where do we find the quiz for the course? I haven't seen an email with a link or a file for it. I want to try it before our final Q and A class tomorrow.

POSTED BY: Stephanie Meyer

@Stephanie Meyer, please check your Study Group email reminder that was sent earlier today. It includes a link to the quiz.

POSTED BY: Jamie Peterson
POSTED BY: Mickaël Bouvier
Posted 5 years ago

Great. If I am not mistaken, the net model is used to create some kind of distance measurement for the featurePlot?? Is that correct?? thanks

POSTED BY: tsukisan

Right. The neural net model is being used to extract features from the words here and those features are used to place the words in the 2-dimensional feature space.

Posted 5 years ago

thanks

POSTED BY: tsukisan

Daily Challenge: Day 3

Today's challenge will lead nicely into tomorrow's topic "Neural Networks". Visit the GloVe 100-Dimensional Word Vectors Trained on Tweets available in the Wolfram Neural Net repository. Look at the example offered under "Feature Visualization". Try FeatureSpacePlot with FeatureExtractor set to this particular model to visualize a clustering of words in any text of your choice. Share any interesting results you find here.

Posted 5 years ago
Attachments:
POSTED BY: r t

Unfortunately it appears that PredictorMeasurements cannot deal with test data being in a Dataset. We will have to wrangle it into key-value pairs {feature1, feature2,...} -> target

For this specific dataset we can do the following:

modifiedTesting = Most[#] -> Last[#] & /@ Values[Normal[testing]]

which will set up the test data as: {date, text of address}-> age and allow you to use the PredictorMeasurements function.

POSTED BY: Mickaël Bouvier
Posted 5 years ago

Abrita, Values[Normal[...]] didn't work for me but interchanging them worked fine (at least there were no errors flagged by mma).I am somewhat confused by the results though.Based on my interpretation it appears that based on the test results, the prediction is always between 57 and 59 years. I got these results by running Predict with the Method set to "Neural Network" and Performance goal set to "Quality".
I had 163 records for the training set and 70 for the test set. Is Predict working properly? Is my interpretation correct? enter image description here

POSTED BY: rjehanathan

Predict is working. i think the conclusion is the date and text of the address is probably not very good at predicting the age. At least while we use the features as is.

Just to give context: My approach could just be naïve (I'm a beginner here, so pardon me in advance) but using the Classifier function to analyze the sentiment is throwing some weird results my way. I wanted to just use a few sentences before I approached with a larger text file.

Here is what I have:

enter image description here

I was wondering if the word 'extremely' had some weight to it that made the output different? Thanks for the help!

POSTED BY: Kevin Hawekotte
Posted 5 years ago

Kevin - While the algorithm in me desires to reply that "extremely" represents 75% or greater level of emphasis and could typically be interchanged with the term "high degree;" the human in me dictates need to break out the red felt tip pen, circling words "extremely low crime rate" and scribbling "AWK."

The truth is that English-speaking humans rarely speak like this. (ie high degree of low in something that is unpleasant) Instead, one would much more likely focus upon the positive (eg my city is safe)

Given numerous other tests haven't revealed the WL sentiment algorithm to be completely irrational (like say... perhaps some reddit automod gone awry) I consider it an intelligent resource. Perhaps a bit too eager to provide non-neutral responses, but intelligent nonetheless. Hope that helps.

Attachment

Attachments:
POSTED BY: C Ellis
POSTED BY: Kevin Hawekotte

I would attribute such results really to the training data. The performance of most classification algorithms is closely tied in with the quality and availability of the training data.

Daily Challenge: Day 2

The dataset at https://datarepository.wolframcloud.com/resources/State-of-the-Union-Addresses contains the complete text of State of the Union addresses from 1790 to 2019. Test the performance of a Predictor trained to predict the age of the president from the date and text of the address.

Here's my attempt at analyzing the sentiment of "Pride and Prejudice":

prideAndPrejudice = 
  TextCases[ResourceData["Pride and Prejudice"], "Sentence"];

sentiment = 
  Classify["Sentiment", prideAndPrejudice, 
   "Probability" -> "Positive"];

MovingAverage[sentiment, 500] // ListLinePlot

enter image description here

@ivang1 Perhaps the example in the attached notebook will help.

Attachments:
Posted 5 years ago
POSTED BY: Ivan G

This is being automatically done by the Classify or Predict function. You will observe it in the training progress panel as the training happens. You will see it is trying different algorithms.

Posted 5 years ago

Hi,

I'm confused about how to import excel files into the "{parameters}->label" format. My excel file looks like the picture below, with some of the data being blank.

Input Data Format in Excel

POSTED BY: Ivan G
Posted 5 years ago
Attachment

Attachments:
POSTED BY: C Ellis

Let's bring your question to Friday's Q&A session with the development team.

Posted 5 years ago
POSTED BY: C Ellis

The issue of precision is principally one of performance. While Wolfam Language can handle precise symbolic arithmetic and arbitrary levels of high-precision arithemetic, they are both much slower than floating point arithmetic which is effectively performed on the CPU while the others are in software. Since machine learning methods applied to big data are already very demanding and the difference between 10^-10 and 0 rarely makes a difference, the priorit goes to speed. Indeed some GPUs are designed to work at even lower "single" precision to enable more calculations per second.

There is also a second issue. Some of the training process is probabalistic, so you will acheive different results each time you run the training. For reproducibility one should control the random state with functions like SeedRandom (and some new tools coming in Wolfram Language 12.2) but since I didn't do this when I recorded the videos, we will likely never know how to reproduce the exact answer that I got.

POSTED BY: Jon McLoone

Here are a few stories which I applied the sentiment classifier and generated matrix plots. SCF's 1,2, and 3 are the various stories. P 1,2, and 3 are the resulting probabilities extracted from the association returns from SCF's.

Attachments:
POSTED BY: Brad Button

Daily Challenge: Day 1

Here is a challenge to celebrate NaNoWriMo. Write a short story (or select an extract from your favorite story - perhaps one for which the text is available in the public domain). Use the "Sentiment" classifier in the Wolfram Language to detect the sentiment of each sentence. Plot the probability of the sentiment of each sentence in the story being "positive", as the plot progresses.

If it's your own story, have fun tweaking the plot to see how the changes are reflected in the sentiment plot.

Posted 5 years ago
ListLinePlot[
 Classify["Sentiment", 
  TextSentences[ExampleData[{"Text", "AliceInWonderland"}]], 
  "Probability" -> "Positive"]]
POSTED BY: rjehanathan
Posted 5 years ago

Pretty fun. I have used The Picture of Dorian Gray. After taking off sentences of less than 3 words (arbitrary decision...) I have used a lowpassfilter with very low cuttoff. Funny part, the graphs showed a high probability of a neutral end (??). After reviewing the text I realized that the end of the text was license agreement. After removing that, the end of the book could be positive too.... In the images green is positive, red is negative and orange is neutral.

With license at the end With no license agreement at the end

POSTED BY: tsukisan

Looking forward to reviewing these topics along with you all. Please feel free to post any questions you may have, from the course or from the daily study group sessions, here. Also look out for the fun daily challenges to showcase your new machine learning skills.

See you on Monday.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard