The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
5
votes
0answers
81 views
+50

How to find multi-word synonyms?

I’m looking to write a semantic distance function for phrases (5 words or less) that can map multi-word synonyms together. Here are some examples: “Red shoes” would be close to “Orange sandals” “...
0
votes
0answers
9 views

Best approach to Save the BestValidationRound throughout training

I have a network that I would like to train.I would like at the end of training to be able to have the BestValidationRound, from all training Rounds. I would not want to have ...
2
votes
0answers
41 views

Net layer that replicates last element

I am trying to design a neural network layer that takes in an array of dimensions n x 100, and produces an array of dimensions ...
2
votes
0answers
30 views

How to get features for captioned images?

I have a lots of (image, text) pairs and would like to learn a feature extractor (or maybe a FeatureExtractorFunction) for a combined embedding. It seems that when given a list of these multimodal ...
0
votes
1answer
53 views

Using a neural net to make predictions

I want to use a neural net to give predictions, but I am not sure where to start. I do know that I don't want to use the high-level Predict function. So what I ...
1
vote
0answers
33 views

Can LearnDistribution Train and Generate Images Without Defaulting To 256x256?

In spite of anything I try it seems the ConformImages[] function nested in the LearnDistribution[] function resizes images to 256x256. If I convert an image into its "Data" representation before ...
29
votes
3answers
852 views

How to make a custom NN layer in Mathematica?

Is there a way to create our own custom layers for Neural Networks in Mathematica ? I suspect it should be possible, any pointers or directions on how to go about it? I am interested in ...
2
votes
1answer
50 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 "...
20
votes
0answers
292 views

Implementing Contextual Bandits

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 ...
5
votes
0answers
81 views

Recognising people from photos

I have a large number (probably 10000) of personal photos taken over the last few years, a good proportion of which contain family members. I'd like to put together a photo book of one family member,...
1
vote
1answer
38 views

Output of the trained neural network for a set of inputs

Sorry if this was too trivial but I want to get the output of the neural network I trained for the specific inputs that I feed. The notation I often saw was of TrainedNet[inp] kind. But when I use ...
1
vote
0answers
25 views

Strange result for decision-tree-classifier. Why?

I'm still in touch with DT-Classification and try to understand how the Mathematica algorithms works and what tree is generated (related: click). I just tested the well-known "playing tennis" (...
4
votes
1answer
89 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. <...
0
votes
0answers
43 views

Error Histogram of a Neural Network

Can you plot the error histogram of a trained network (with test, train and validation sets if possible but one would be enough)? Matlab Easily does that for you but I could not find a function that ...
0
votes
0answers
28 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 ...
6
votes
0answers
261 views

How to train a bounding box detection model?

Apparently, this still isn't possible in v12? I'd like to add a new class to one of the standard object detection architectures. Consider the YOLO v2 detector from the Neural Net Repo. ...
0
votes
0answers
22 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)?
2
votes
1answer
56 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 ...
0
votes
0answers
117 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 ...
2
votes
0answers
73 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
43 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 <...
3
votes
0answers
121 views

Backpropagation for manual neural network training [duplicate]

I need to train a neural network manually. Is there a simple way to get the derivatives of all of the learned parameters in the network (with respect to the output) via backpropagation, other than ...
7
votes
1answer
162 views

NetPortGradient output port restriction

The documentation for NetPortGradient says net[<|..., NetPortGradient[oport] -> ograd|>, NetPortGradient[iport]] can ...
3
votes
1answer
80 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 ...
5
votes
1answer
220 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....
7
votes
0answers
107 views

Use of Mathematica for Machine Learning Course [closed]

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 ...
5
votes
1answer
162 views

Custom Loss Layer to ignore ordering

I am trying to train a net that takes a sequence of numbers and gives a sequence of numbers. For example: ...
6
votes
0answers
67 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
99 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 ...
0
votes
1answer
46 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 ...
0
votes
0answers
48 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 ...
6
votes
0answers
135 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 ...
2
votes
0answers
86 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 ...
2
votes
2answers
103 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 ...
1
vote
0answers
40 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 ...
2
votes
1answer
78 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 ...
0
votes
0answers
37 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 ...
7
votes
1answer
130 views

NetTrain Freezes Computer

I have a neural network I am trying to train: ...
4
votes
2answers
199 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 ...
5
votes
1answer
1k views

Neural network: Line detection in Image

I am playing around with Mathematica's new Neural Network toolbox and am trying to teach a network to detect lines in quite noisy images. An example Input image would look like the following: The ...
4
votes
1answer
173 views

Two different results produced by Classify

...
2
votes
1answer
66 views

Confusion about Predict Model NameAge

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

How to ImageRestyle high-res images?

I’m running v12 now and ImageRestyle[] crashes for me on an image of size 1600 x 1200 pixels. All the examples in the documentation use images around 500 x 500 or ...
2
votes
0answers
50 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: ...
5
votes
0answers
90 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 ...
2
votes
2answers
61 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 ...
6
votes
1answer
92 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 <...
1
vote
1answer
42 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 ...
7
votes
0answers
464 views

Train your own CycleGAN style translator

I have a set of images (a few hundred) that represent a certain style and I would like to train an unpaired image to image translator with CycleGAN. I'm looking for a tutorial on how one would do ...
12
votes
2answers
825 views

t-SNE visualization

Is there an implementation of “t-SNE” for dimension reduction in mma? This technique visualizes high-dimensional data by giving each datapoint location in a two or three-dimensional map. It generally ...