Questions tagged [machine-learning]

Questions about machine learning functionality of Mathematica, for instance involving, but not restricted to, Predict, Classify, FindClusters and the various regression functions.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Properties of a decision tree generated by a classifier

A question regarding Classify using the method DecisionTree. From this post I learned how to access the structure of the ...
0
votes
0answers
20 views

Transfer learning with different input size

How to do transfer learning for the input of dimension (64x64x1)using Resnet-50, which has three-channel input (224x224x3)?
0
votes
0answers
32 views

Why LinearLayer does not equal w.x+b [closed]

Why if I define a linear layer: l1=LinearLayer[50, "Weights" -> wl1, "Biases" -> bl1] and calculate l1[x1]-wl1.x1+bl1 ...
1
vote
1answer
32 views

Chaining NetGraphs

I have two NetGraphs, each with 3 different input ports ("Input","Random1","Random2"), the first with 2 outputs ("Output" and "Loss") and the second with one output "Final_Out". All I want to do is "...
2
votes
1answer
47 views

Using GPU Computation in LearnDistribution

LearnDistribution has an option for RealNVP, which is directly training a neural network for the distribution. It also has an option for TargetDevice, however, it appears to do nothing. Take the ...
2
votes
0answers
45 views

How to generate names with a GAN?

I'd like a tutorial for text generation using GANs, specifically for names. I have a list of company names and would like the network to generate novel ones. This is one of the only few examples of ...
1
vote
0answers
40 views

ClassifierFunction output dependent on current $ContextPath

I'm trying to use Classify to predict heads in a Mathematica expression from the heads of its arguments, which may be functions whose heads are not on the current <...
0
votes
0answers
109 views

Use FacialFeatures in Python Web API?

Under the hood, FacialFeatures uses the net-model ResNet-101 Trained on Augmented Casia WebFace Data. I would like to see a tutorial-style answer on how one would ...
7
votes
0answers
80 views

Use of Mathematica for Machine Learning Course

I am interested in others' experience using Mathematica for machine learning and bioinformatics course curricula. Let me first say that I have been programming with MMA for almost 10 years now (out ...
6
votes
0answers
63 views

How can one train a Neural Network in Mathematica such as to recognise and count all occurrences of a certain custom category in an image?

I'm trying to use Mathematica for the following task: (1) Get an aereal view of a certain area in Mongolia (2) Count the number of plots that contain houses, and the number of plots that contain ...
3
votes
1answer
56 views

Error during training neural network: input is not an integer between 1 and 100 although it is

I imported my data from Matlab in matrix form and tried to use it in a neural network as given below but I get the error that says the input is not an integer between 1 and 100 although it is. <...
5
votes
1answer
194 views

How do I create & train a neural net to predict a stock closing price at T+5min using OHLC and other data?

I'm trying to create a neural network and train it to test predictability of short term stock price movements. I've collated a 1-min open, high, low, closing and volume dataset for a particular stock....
0
votes
0answers
45 views

LearnDistribution Vs FindDistribution?

How would you explain the difference between the new LearnDistribution function and the FindDistribution function? or perhaps the overall ML vs Find framework. I would think for a sample size of 1000 ...
0
votes
1answer
44 views

How can import more files simultaneously and clean them in Mathematica?

I would like to import three files in Mathematica (I am using the Import function[]) and try to clean them. I used ...
2
votes
0answers
80 views

Hessian of a loss function for a neural netwrok

Is a way to calculate the Hessian of the loss function in Mathematica. It's easy to define a loss function for neural nets but I couldn't figure out how to calculate the Hessian(more precisely I ...
1
vote
0answers
32 views

Loss function for an unsupervised neural network

I am trying to use a neural network approach to fit a model based on two sets of data: the "before" set and the "after" set. The "after" set is the subset of "before" examples that have survived to a ...
0
votes
0answers
34 views

Splitting large matrix in neural network

I'm trying to make a neural network that takes a 16x100x100 matrix and splits it into each 100x100 part, puts each through a dense layer, and then puts them them together once again to form a 16x10x10 ...
2
votes
2answers
101 views

Find Probability that Image Is Text

I can find out whether an image is text: ImageInstanceQ[img,Entity["Concept", "TextualMatter::m7642"]] And if an image is most likely text, I can find out the ...
7
votes
1answer
128 views

NetTrain Freezes Computer

I have a neural network I am trying to train: ...
3
votes
1answer
98 views

How to create model for classification using SVM methods?

I have a matrix for diseases associated to their symptoms, the columns represent symptoms each row is a disease. the labels 1 and 0 in the matrix data sets represent when a disease i related to ...
6
votes
0answers
130 views

Export ImageCases to Python?

I’d like a tutorial on how to export a bounding box detector network to mxnet, (for bonus points: convert to Tensorflow), and then get it running correctly in python! Some related questions exist for ...
4
votes
2answers
191 views

Classifier training on a large data set

I am interested in binary classification and I have a huge set of training examples (around 4 millions). Each example is a $10 \times 2$ matrix. When I run the classification after two hour run the ...
2
votes
0answers
47 views

Concise way to set input directory

Got this Mathematica ResNet- 50 Code online and has been trying to make run it using the same data set but it seems my directories to the dataset were not correct, keep getting this error: ...
2
votes
1answer
63 views

Confusion about Predict Model NameAge

Predict["NameAge", "Claire"] 8 distribution = Predict["NameAge", "Claire", "Distribution"] dataRaw = distribution[[2]] <...
4
votes
0answers
84 views

Reverse Engineering of MMA `Classify[]` Output?

Update: as @AntonAntoniv rightly noticed in his comment the case of DecisionTree is already discussed. Now it would be great to also have an equivalent answer for LogisticRegression. MMA is really ...
4
votes
1answer
171 views

Two different results produced by Classify

...
2
votes
2answers
60 views

Setting the number of neighbors in NearestNeighbors algorithm

I am using Machine learning in Mathematica 11 for a specific set of data. When I use p=Predict[data] I get the output model by method of NearestNeighbors, which ...
2
votes
1answer
76 views

UtilityFunction for actual and predicted values (machine learning)

In machine learning, the utility function for a classifier assigns the utility value to an actual value v(act) and a predicted value v(pred), typically e.g. in form of ...
1
vote
1answer
40 views

How do I apply a NetChain element-wise during training?

I need to train a Neural network that models a function that takes a single real number, and outputs a real number. x -> y = f[x] However, in the training data, each data point doesn't link a single ...
3
votes
1answer
74 views

Reccurent neural network

I watched the this video on YouTube and copied the code. Why it does not work in M12? I mean net[inData] and ...
0
votes
0answers
22 views

Console Output to file corrupted

When i run WolframScript and write the output of a *.wls to a file and then modified the program slightly, i started getting these more exotic outputs. The function used is NetTrain. Does someone ...
0
votes
0answers
27 views

Unable to replicate Predict/NeuralNetwork example from Help Pages

I am trying to replicate an example right out of the help manual (ref/method/NeuralNetwork). This example compares the convolutional NN versus a fully-connected NN....
13
votes
0answers
166 views

Implementing Contextual Bandits in version 12

The multi-armed bandit problem (MAB) is a classic in Reinforcement learning. Now that mathematica version 12 finally has support for Reinforcement learning: Here's a nice "mnist example" for training ...
0
votes
0answers
38 views

TextContent does not work on my computer

TextContents does not work, returns `TextContents::wlnetcorr2: A required WLNet file is corrupted and could not be loaded. `TextContents::nlpnetmodel: An internal error occurred while loading ...
4
votes
0answers
86 views

Can I use Mathematica ML capability to translate an image of a formula?

If I am given a pdf image of a mathematical symbolic formula can I translate it into Mathematica syntax using ML? I tried using Classify, but I can only translate parts of the equation and I don't ...
3
votes
0answers
154 views

Bug in the classification optimization algorithm for large data sets

I believe that I encountered a bug in Mathematica 12. The Classify[] function throws errors when simultaneously: The training set has significantly above $10^5$ ...
0
votes
0answers
58 views

Predict the form of a function using machine learning

I have a function F[x_] := x^3/(e^x -1) I generate many data points i = 1,2,3,4, ... ...
5
votes
0answers
69 views

Can I extract symbolic expression of neural network loss function?

Once we create a neural network with NetChain in Mathematica, can we extract the loss function in the symbolic form for Mathematica to play with symbolic manipulations using Mathematica's built-in ...
3
votes
1answer
80 views

How do I create my own activation function in NetChain in Mathematica?

I want to have my own activation function, say a quadratic function, instead of Tanh, or Sigmoid etc. in Mathematica. How do I insert it in NetChain? e.g., how will the below code look for a new ...
0
votes
0answers
57 views

TargetDevice->“GPU” takes no effect in prediction of Classify and ClassifierMeasurements?

I can train the model with GPU via method->"NeuralNetwork" in Classify. I'm on Mathematica 12.0 and the problem also happens in 11.3. Is this a bug since 11.1 to 12.0? In training, GPU is faster ...
1
vote
0answers
49 views

Not able to use ImageIdentify

When I tried to use ImageIdentify (Trial version of Mathematica 12) on an image I clicked on my mobile I got this error message ImageIdentify::interr: An internal error occurred: An unexpected error ...
5
votes
0answers
78 views

How to extend ImageCases?

I was very excited to see ImageCases being documented in version 12. But I immediately desired a mechanism for adding more entities to ...
2
votes
1answer
168 views

Can I use machine learning to predict a functions behavior?

I want to use this as training data (1, sin(x)), (2, sin(2x)), (3, sin(3x)) and answer the question what is (20, ?). I ...
6
votes
1answer
76 views

Compute neural network loss over sliding windows?

I am trying to use the structural similarity index, which is defined in terms of a computation over sliding windows, as a neural network loss function. Obviously one can get a sliding mean using a <...
6
votes
1answer
122 views

Bug in EmbeddingLayer?

...
6
votes
1answer
121 views

How to load trained RNN in MXNet?

No problems with CNN ...
0
votes
2answers
103 views

How to Sample from a Probability Density Function

I've done a pretty good job working my way through and understanding the various ways to calculate the differences between probability distributions through Kullback Leibler Divergence and was happy ...
1
vote
1answer
64 views

What is the meaning of “Number of features” returned by ClassifierInformation?

I have set of 13 dimensional vectors split into three classes, and I'm building a classifier using supervised learning. After running c = Classify[..] on ...
3
votes
0answers
130 views

Physics based predictive model using Predict

Summary: The first order response of a block of metal quenching in a fluid (or a cold block heating in a warm environment) is well known. I am trying to create a physics based predictive model for ...
4
votes
0answers
95 views

Visualizing and Understanding CNN with Mathematica

The famous 2013 paper from Zeiler and Fergus "Visualizing and Understanding Convolutional Networks" proposes a method to understand the behavior of CNN using one (or more) DeConv networks coupled with ...