Skip to main content

New answers tagged

0 votes

Custom loss function in python

worried that the evaluation of the loss function won't capture the "anomaly-part" of the loss function as this would be lost in the aggregation? You're talking about weighting the minority ...
J_H's user avatar
  • 1,055
0 votes

Data binning for interval data

regression This is a regression problem, not a classification problem. So model it with a regressor. Your loss function can choose to discretize each prediction before scoring it, if that's what you ...
J_H's user avatar
  • 1,055
0 votes

Is it possible to extract mathematical expression of an trained ML Model?

They are all tree models, that can be represented by trees. You can then represent a tree with formulas, involving indicator functions. Typically for one node: $ y = 1_{x>x_0} * y_1 + 1_{x<=x_0} ...
Lucas Morin's user avatar
  • 2,196
0 votes

Difference between isna() and isnull() in pandas

isnull is an alias for isna, so they are the same. You can check the source code to confirm as much. Similarly, ...
cottontail's user avatar
0 votes

Build a Neural Network for Multi-output Regression

I see four potential solutions for you: think through your data - are all necessary input variable included? is output in the most convenient form to model? Maybe it should be in radians and not ...
Tomasz Witkowski's user avatar
1 vote

Anomaly detection on time series

We can use Local Outlier Factor (LOF) or Random Forest along with a month column. Train these algorithms with your timeseries data (the actual values column) plus on month column to handle the ...
Anirban's user avatar
  • 11
2 votes
Accepted

tf.keras.layers.LSTM: where did all these parameters came from?

You can look at the individual weights via: [i.shape for i in model.get_weights()] > [(1, 36), (9, 36), (36,)] Your LSTM has an input size of ...
Karl's user avatar
  • 671
0 votes

Understanding batching in pytorch models

I believe TransformerEncoder and TransformerDecoder expect a 3 dimensional tensor of shape ...
Lelouch's user avatar
  • 151
0 votes

Regression prediction for HVAC unit Best way to utilize available data?

use the cooling coils air handler fan power as the target, that is what you what to minimize/optimize and for the features use supply air temp, supply air setpoint, fan speed (if there is any), valve ...
ronjay s's user avatar
2 votes

Need inputs on logging Machine Learning models and their versions in logs for my application

I see two ways of doing that: Doing it with your bare hands - adding tables with information you need and programming infrastructure around and inside the model to store logs in the database. It ...
Tomasz Witkowski's user avatar
1 vote

Trying to convert a .txt file into .npy file to split and use for train/validation/test

import numpy as np file_path = 'data.txt' data = np.loadtxt(file_path)
Otobong Jerome's user avatar
0 votes

why is my svm taking much time to run what changes should i make in my code?

There are several possibilities to speed up your SVM training. Follow the steps mentioned in the answer SVC classifier taking too much time for training and SVM using scikit learn runs endlessly ...
Pluviophile's user avatar
  • 3,848
1 vote

What's wrong with my implementation of an MLP?

The issue with your implementation seems to be in the calculation of the gradient for the activation of the hidden layers in the backward propagation step of your neural network. ...
Pluviophile's user avatar
  • 3,848
0 votes

Generating synthetic data based off existing real data (in Python)

Why not work in the frequency domain? Take a Fourier transform of your real data and then independently perturb the resultant individual sine waves by increasing/decreasing the amplitudes by a small ...
babelproofreader's user avatar
0 votes

How to Balance Dataset extracted using image_dataset_from_directory

You can not do that directly with image_dataset_from_directory since this function is only designed to produce a dataset from your files. However, you can transform ...
picky_porpoise's user avatar
0 votes

How do feature selection on a sparse matrix?

Perhaps someone else can contribute since I'm an amateur, but here's what I would do. It sounds like you are interested in classification, so let's consider that. In general I don't think its ...
Shawn's user avatar
  • 33
0 votes
Accepted

Pytorch backward error

When you index into a tensor, you are actually creating a new data object. The new data object has a computational graph linking it to the weights tensor via the select operation, but they are not the ...
Karl's user avatar
  • 671
0 votes

English to "basic English" translation

Text simplification is not as popular as other generative tasks (e.g. summarization, translation). Nevertheless, you may try the approach of the Keep It Simple: Unsupervised Simplification of Multi-...
noe's user avatar
  • 26.7k
0 votes
Accepted

How bootstrapping works for prediction intervals?

1. Why are the PI outputs (gray lines) so different for certain setups like the below? As it is mentioned in the addressed referenced book by R. J Hyndman & G. Athanasopoulos in skforecast ...
Mario's user avatar
  • 400

Top 50 recent answers are included