text
stringlengths
83
79.5k
H: Word embeddings and punctuation symbols I have a decent understanding of word embeddings (at its core, one can think of a word being converted into a vector of, say, 100 dimensions, and each dimension given a particular value... this allows to do math with the words, also it makes the training sets to be non-sparse...
H: Comparative Analysis of two sets of data I have 2 sets of data which consist of marks of 60 students in a particular subject in year 1 and year 2 respectively. Year 1 : 86, 76, 87, 67, 89, 95.... so on (60 students) Year 2 : 82, 67, 99, 77, 65, 78.... so on (60 students) I want to compare these two sets of marks an...
H: How do I crop faces with a neural network? I am looking to build a facial recognition system and realized I could probably pump up accuracy by first cropping the faces. I know I can use a Haar Cascade classifier to do this but would prefer to use a deep learning approach, as that is my current area of focus. To do ...
H: Change values of consecutive repeating letters in pandas column I've got one Dataframe like: id value block 1 a 1 2 a 1 3 a 2 4 a 2 5 b 3 6 c 4 And I want to change the value column to the next value based where the series changes. Like below. The change must be defined by the block column. id value block 1 a 1 2...
H: Spliting keras model into multiple GPU's Dear fellow Data Scientists. I'm having a problem with splitting model into multiple GPU's. I have read something about "towering" in native tensorflow but my whole architecture is already written in keras (tensorflow backend of course). Keras as far as I know only supports ...
H: Accuracy differs between MATLAB and scikit-learn for a decision tree Is there any possibility to vary the accuracy of same data set in matlab and jupyter notebook by using python code ? For same data set, at first I applied it in matlab and get 96% accuracy for decision tree method, then I apply that same data set ...
H: Kmeans large dataset we are currently performing a K-MEANS under scikit-learn on a data set containing 236027 observations with 6 variables in double format (64 bits). According to our calculations, the complexity of the algorithm is O(n * k * v * i), with n the number of observations, k the number of clusters, v t...
H: Why is logistic regression not sigmoidal? The blue dots are the raw data and the line is my logistic regression. The line is quite straight and not sigmoidal as I would have expected. I suspect there is something wrong in my gradient descent equation but I don't understand the maths well enough to find the mistake....
H: Stop CNN model at high accuracy and low loss rate? I train my CNN model with a large number of epochs, with each epoch I print the training loss and accuracy, but there is a lot of high and low in these two metrics, I want to do early stopping with for example loss at 0.2 and accuracy at %95 or more because I get t...
H: Useful metrics to compare network-output image to true image? I'm designing a supervised network that would require to output an image. I'm wondering what are the best metrics to find similarity between the output and actual target image. So far, my best assumption is to calculate the distance of RGB values, and gi...
H: Multi-label classification for text messages (convert text to numeric vector) Given a dataset of messages which are labeled with 20 features, I want to predict the value of each feature for a new message. Dataset example: message feature1 feature2 feature3 feature3 feature4 ... 'hi' 1 0 1...
H: Machine learning algorithm to classify matrices I want to know what could be first choice for a machine learning algorithm to classify matrices. Each matrix belongs to either class A or class B. The classification problem is: To classify each matrix into either class A or class B (say signal matrix or noise matrix...
H: Is there a disadvantage to letting a model train for a large number of epochs? I created a model to solve a time series forecasting problem. I had a limited amount of time series with which I could train the model therefore I decided to augment the data. The data augmentation strategy I used is quite basic but ha...
H: Are Intersection over Union (IoU) scores preferring larger objects? According to the fcn model I implemented and the PASCAL VOC benchmark (here) I find that objects with larger sizes in an image receive better IoU or AP score in the test set. Why do the IoU scores have a bias towards larger scale objects? Can anyon...
H: In Pytorch, if I have a 2D tensor, how to iterate over this tensor to get every value changed I have a 2d Tensor, whose size is 1024x1024 and the values in the tensor is 0.3333, 0.6667, and 1.0000, so I would like to change all these values to 0,1,2. Could some one tell me how to iterate over this tensor. AI: Consi...
H: What model is suitable for classification of a small data set? I have a dataset that consists of 365 records, and I want to apply a classification model on it (binary classification). As an output, in addition to the classification labels, I want to retrieve the classification confidence for each instance. I don't ...
H: How does Gradient Descent and Backpropagation work together? Please forgive me as I am new to this. I have attached a diagram trying to model my understanding of neural network and Back-propagation? From videos on Coursera and resources online I formed the following understanding of how neural network works: Input...
H: how to update column in data frame based on condition How to update column IsLCap column in dataframe based on Lvalue column whether it is capitilized or not. df.loc[df.Lvalue.istitle(), 'IsLCap'] = 1 # need to be corrected getting an error -AttributeError: 'Series' object has no attribute 'istitle' AI: You access...
H: Why doesn't class weight resolve the imbalanced classification problem? I know that in imbalanced classification, the classifier tends to predict all the test labels as larger class label, but if we use class weight in loss function, it would be reasonable to expect the problem to be solved. So why we need some app...
H: Outliers handling I have a large dataset of >100 columns with nearly all types of data. I want to remove outliers from my dataset for which purpose I've decided to use IQR. Problem is even when I apply quantile of 0.25/0.75, I still get significant amount of outliers in columns like ClientTotalIncome, etc. Further ...
H: In linear regression, is there anything I can do if the coefficient for one of the features is unrealistic/inappropriate? I'm building a simple linear regression model that predicts Home Price using Square Footage, Number of Bed(s), and Number of Bathroom(s). After creating the model, I noticed that the coefficient...
H: Find all potential similar documents out of a list of documents using clustering I'm working with the quora question pairs csv file which I loaded into a pd dataframe and isolated the qid and question so my questions are in this form : 0 What is the step by step guide to invest in sh... 1 What is the...
H: What is the best way to predict multiple outcome from a single entity? Let's say i have three model: Facial recognition, Face landmark detection, Emotion recognition. Now if i want to predict those three feature from a single image. What should be my approach? Should i combined those three model? or Run three mod...
H: Calculate image width In this code below, a picture can be loaded into openCV and then the region of interest RIO can be created by just selecting a box around something with the mouse, then press enter. What I am trying to do is measure the apparent width in pixels of the ROI. I am going thru some of the theory in...
H: SAP HANA or Hadoop? this is a question regarding a career choice. I am a fresher and I recently joined an MNC in Data Engineering team. There I was offered training in either Hadoop or SAP HANA. I am in doubt as to which one should I choose. Can anyone help me make the right choice? Which of these two has better sc...
H: CV (Curriculum Vitae) Recommender System using Machine Learning, Python, Apache Solr(Back-end), AngularJS (Front-end) I am very new to Machine Learning. This is my college project. I want to develop web application of CV RECOMMENDER SYSTEM in Python. I have lots of CVs in the format of .txt. My questions are follow...
H: LabelEncoding a Dataframe I have a dataframe with integer and categorical variables. Should I label encode all variables (both integer and categorical) or should I encode only the categorical features? AI: You only need to label encode the categorical features. For e.g. if the first column contains categorical data...
H: How are weights calculated in a feed-forward neural network before they are summed up with bias? I have read a lot of papers and watched different videos, it seems like they explain how they are summed up with bias before entering the activation function. What I am trying to understand is the whole flow process of ...
H: K-Means clustering - What to do if a cluster has 0 elements? I'm writing code for k-means clustering. I have around 100000 vectors of size 128x1 (SIFT descriptors). I'm trying different initialization methods such as Forgy and Random Partition. What if suppose, no vectors are classified to a cluster (in one of the ...
H: Can ROC/AUC help model training or just be used for model chosing? if can be used to help for training?how? AI: Your answer would depend on the model you have in mind. For something like multi-variate linear regression, you would use it for factor reduction. For something like a neural network, you could use it whi...
H: Should unique vectors (SIFT descriptors) be used in K-Means Clustering? I'm doing image classification by extracting SIFT features, clustering them and then finding BOVW histogram and classifying. I have around 180 training images from which I'm extracting SIFT descriptors. I need to cluster these features using k-...
H: Keras decision threshold for Multiple Label prediction I'm training a Neural Network to predict multiple labels for a given input. My input is a 200 sized vector of integers and the output should be a boolean vector of size 28. My y has a 1 on the corresponding classes the example corresponds to, i.e. the y should ...
H: How to define a multi-dimensional neural network with keras I have implemented a simple neural network with keras that takes an input of 50 values and returns a classification of '0' or '1'. I believe the model is expecting an input shape of (50, 1). I'd like to add another 50 data values for each input, but I'd ...
H: ML technique to predict next year output based on text quantities I have a random data that I would like to predict how much a quantity will be in 2020. The data looks like this: year components total_components 2019 [Pen, Pencil, Books 4 Paper] 2018 [Pen, Penci...
H: Problem with Linear Regression and Gradient Descent import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') import numpy as np x = np.linspace(0, 10, 1000) points = np.genfromtxt("Dokumente/Salary.csv", delimiter=",") points2 = points[1:, :] def gradient_descent(current_b, current_m, learning_rate,...
H: Why Epochs take longer as learning proceeds? I am training a deep learning model in Tensorflow on GPU (Amazon AWS) and what I observe is that in the beginning each epoch takes only less than a second but let's say after 80 epochs one epoch takes more than 8 minutes. What could be a possible reason? AI: As the numbe...
H: How to predict correct text from incorrect text with machine learning? I have a dataframe like this: import pandas as pd df = pd.DataFrame({'incorrect': ['jak', 'mya', 'kfka'], 'correct': ['jack', 'maya', 'kafka']}) incorrect correct jak jack mya maya kfka kafka I want ...
H: What is the best way to predict time series data? I have monthly price data for tomatoes for the last 9 yrs for a particular town and I'm looking to predict the prices of tomatoes 6 months into the future. I had considered using Linear Regression in Tensorflow (something I learnt about a week ago), because there is...
H: Predicting of the function values There is a function: $f(t,x,y,z)$, where $t$- time, $x,y,z$- some arguments. The values of $f$ for $t\in [a,b]$ are known (100 samples). What is the most accurate way of predicting the value of $f$ for $t=b+1$, if the values of $x,y,z$ for $t\in [a,b+1]$ are known? May I implement...
H: The proper way to codify Na in a list in R I am trying to impute missing timeseries present in different dimentions, row by row, on the whole date set. I showed the type of return of na.kalman() and it happens to be a tribble, I am not so keen on R, so I thought converting it to a plain vector will do it, something...
H: Why is Local Outlier Factor classified as Unsupervised if it requires training data with no outliers? In Scikit-Learn, the Local Outlier Factor (LOF) algorithm is defined as an unsupervised anomaly detection method. So then I don't understand why this algorithm requires pre-filtered training data. Perhaps "training...
H: How do I add together multiple columns based on header names? Here's what my dataframe looks like Server Performance123 Performance456 server1 1024 0 server2 110 0 server3 0 1024 Here's what I want it to ultimately look lik...
H: Can I save prediction value in same csv file as a another column using panda python I have csv data file and I design LSTM model to predict values. Then I want to save that prediction value in same csv file. Can I do that? I tried using one code then in my csv file only had prediction values and delete other column...
H: How to compare two dataframes and put the counted unique values in a first dataframe's column? I have two different (geo)dataframes, one has 690 and the other has 1826 rows. The first one is a grouped based on the nearness (spatial near) of the second dataframe. Thus, they bound with FID_1 and NEAR_FID columns. Eve...
H: Production: TensorFlow and Keras I always here about TensorFlow is good because it is used for deploying and production. Does that mean that people don't use Keras for deploying models? If keras is now integrated into TensorFlow, does that mean that it can also be used for deployment and production? AI: Once model ...
H: Meaning of subscript in min max value function This possibly is a very stupid question, but i have not been able to find the answer on the internet and have got no clue which keywords to use while searching. What's the meaning of $\mathbb{E}_{x \sim p_{data}(h)} [...]$ Where ... is some function. in context like ...
H: Divide a column by itself with mutate_at dplyr Hi I'd like to turn each non zero value of my selected columns to a 1 using mutate_at() BRAND MEDIA_TYPE INV1 INV2 <chr> <chr> <dbl> <dbl> b1 newspapers 2 27 b1 magazines 3 0 b2 newspapers 0 0 ...
H: Cutting numbers into fixed buckets I am trying to put numeric data into fixed number of buckets using Python/R. I have data in key:value format {1 : 12.3, 2 : 4.7, 3 : 7.4, 4 : 15.9, ......, 50 : 24.1}, which is device_id:data_usages I need to bucket based on value into nine buckets (1,5,25,50,150,250,1000,5000,100...
H: Supervised or unsupervised learning for predicting energy consumption for new buildings I’m working on an model for auto dimensioning district heating pipes for new district heating areas (new customers). I have energy consumption data on hourly basis and describe data about these consumers (e.g. building year, ren...
H: In Machine Learning, what is the point of using stratified sampling in selecting test set data? I am currently learning machine learning via this book "Hands-On Machine Learning with Sci-kit learn and Tensorflow" by Aurelien Geron. In page 76 and 77, the author talks about using stratified sampling so that your te...
H: How to generate list with out for loop in python data frame S/N Type Number Capacity 1 Bike 2 5 2 Tempo 1 30 3 Truck-1 1 60 4 Truck-2 1 90 I would like to generate capacitylist = [5,5,30,60,90] Is it possible to do it with out for and using map function in python. Than...
H: How to find correlation between time-series of different units? I have 3 time-series data. NDVI(normalized difference vegetation index) mean Precipitation Temperature All of these have their own unit. Now I want to find similarity/correlation between NDVI and precipitation, NDVI and temperature. Basically, my ai...
H: How can I see a long string in my dataframe? I have a column in my dataframe in which there are sentences which are too long. I want to see them as a whole but every time I perform even a simple iloc operation i get output like 'i am going to...'. How can I remove the ... and see the whole sentence ? AI: At first, ...
H: What Machine Learning Algorithm could I use to determine some measure in a date? I am getting stuck with this problem. Let's say that we have the next information. CustomerID: 1, Date: 3/2/2018, Quantity: 3, Total: 390.78, Min: 130.26, Max: 130.26 We want to determine given a day, month and year what will be the t...
H: Is there any similarity function to compare two strings and give them a score like scipy cosine similarity for comparing arrays? I want to compare strings and give them score based on how similar the content is in them just like comparing two arrays in scipy cosine similarity. For example : string one : 'Pair of ...
H: What machine learning model should be used to predict coincidence factor I have coincidence factor for different sizes of groups and the associated attributes (e.g. building usage type and floor area) for each consumer in the group. I want to predict coincidence factor for new groups using the attribute for each ...
H: How to get accuracy, F1, precision and recall, for a keras model? I want to compute the precision, recall and F1-score for my binary KerasClassifier model, but don't find any solution. Here's my actual code: # Split dataset in train and test data X_train, X_test, Y_train, Y_test = train_test_split(normalized_X, ...
H: Do I classify all types if they are mutually exclusive I am trying to classify an image that can represents 3 states. Up, down or Middle. If the image does NOT represent Up or Down, then it is by default Middle. Should I train my CNN with a dataset including all three, or just Up and Down? Which would this make cla...
H: Data weight averaging say I have 2 datasets and need to get an average but with a weight based on the number of students. school 1 = 98.1 . (50 students) School 2 = 95.4 . (169 students) How would i get the average of both with a weighted average reflected the average of the student totals i think it would be ar...
H: imbalanced dataset in text classififaction I have a data set collected from Facebook consists of 10 class, each class have 2500 posts, but when count number of unique words in each class, they has different count as shown in the figure Is this an imbalanced problem due to word count , or balanced according number ...
H: How to learn irrelevant words in an information retrieval system? Right now my recommender system for information retrieval uses word embedding stogether with Tfidfs weights like written here: http://nadbordrozd.github.io/blog/2016/05/20/text-classification-with-word2vec/ Using Tfidf improves results. But I have th...
H: Using the validation data I'm unclear on the exact process of using the validation data. Let's say that I fit my neural network model and adjust hyperparameters using the training set and validation set. Do I then evaluate the test set on this model? Or do I recombine the validation and training sets and fit a fres...
H: Display a subset of classes in axes in ggplot I have the following plot, is there any way in ggplot to display just the numbers 1 to 10 instead of all of them? Numbers from 10 and after are not so important, but I need to display the ones before. Thank you AI: I used this kind of wor around, but if you have another...
H: Guys I am trying to create a application to create training data import os import cv2 import matplotlib.pyplot as plt from colorama import Fore import random import numpy as np import pickle training_data = [] def create_training_data(): path = os.getcwd() path_dataset = os.path.join(path,'dataset') categories = [...
H: Transfer learning - small database I am trying to use transfer learning in medical (ultrasound pictures). The problem is - I have very limited picture database = 400 (360+40). I am using resnet50 (I don't think this is important but maybe I'm wrong). Resnet as feature extractor + SVM is not great but normalized con...
H: unsupported operand type(s) for -: 'list' and 'list' using python Here I have a data file and I designed neural network to predict value. I have a three inputs. These three inputs affect to predict value bysubtarcting and adding. If my three inputs are x1,x2,x3 . X1 and X2 add together and that value will subtrac...
H: Can I use the Softmax function with a binary classification in deep learning? I want to create a deep learning model (CNN) for binary classification, can I used the softmax function instead of the sigmoid function in binary classification? Adding the classification layer to the model, will be like this model.add(De...
H: Intuitive Explanation of R-squared Here is a nice definition of R-squared that I have found on the internet. R-squared is a statistical measure of how close the data are to the fitted regression line. It is also known as the coefficient of determination, or the coefficient of multiple determination for multi...
H: Should I expect major performance improvements by scaling my features? I'm trying to decide whether I should scale my features & responses for training, and I'm in a situation where I can't just try both scaling and not scaling. My features currently have an std around 0.05, and the behavior of the timeseries I'm s...
H: How to put multiple features into RNN input vector I am trying to code a recurrent neural network (LSTM) to create music in python and was considering using multiple features instead of just the note pitch as an input into the network. Initially I had just the note pitch so it was fed into the network by one-hot en...
H: Generating image embedding using CNN I have a CNN model using cifar -10 dataset. The model was built using Keras (Tensorflow). Now based on this model, I have to generate an image embedding (vector). That means - an input image comes and I have to output the embedding vector of that image. I am not sure how to do...
H: What does the "Loss" value given by Keras mean? I setup my neural net to use mean square error as shown below. To my understanding (and from reading the documentation) this means that if the correct result of a row is 0.7 and the net predicts 0.8 the contribution to the loss by this entry is (0.8 - 0.7) squared = 0...
H: Dataframe has no column names. How to add a header? I am using a dataset to practice for building a decision tree classifier. Here is my code: import pandas as pd tdf = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/breast-cancer-wisconsin.data', sep = ',', header=0)...
H: Newbie question on restricted boltzmann machine I’m quite a newbie to RBMs so I’m trying to understand how do you feed real valued data to it given that all the visible and hidden units are binary? AI: Here is an answer which might help: https://www.quora.com/What-are-best-approaches-to-modeling-real-value-continuo...
H: How large of a value should a weight have in a neural network? If you're assigning random values to the weights in a neural network before back-propagation, is there a certain maximum or minimum value for each weight ( for example, 0 < w < 1000 ) or can weights take on any value? Could a network potentially have we...
H: Recognizing circled numbers on a piece of paper I've built a handful of CNN using tensorflow, keras, pytorch for recognizing text/number/objects in an image. What I'm trying to figure out how to do now is how to recognize numbers on a piece of paper that are circled by a pen or pencil. So on a piece of paper, there...
H: Numpy array from pandas dataframe I am new in using python for data science. What is the difference between selecting a a column with: df['name'].values and df.iloc[:,1].values and df.iloc[:,1:2].values they return differnt types of numpy vectors. why? AI: Not entirely sure what you mean by "numpy vectors" but am a...
H: What's the correct reasoning behind solving the vanishing/exploding gradient problem in deep neural networks.? I have read several blog posts where the solution to solve the vanishing/exploding gradient problem in a deep neural network is suggested to be using Relu activation function instead of tanH & sigmoid. But...
H: clustering with heterogeneous (quantitative and qualitative)data? I'm a Phd student and I have the results of some approaches (algorithms) that I would like to analyze. Data (results) are stored in csv files as follows: - the lines describe each algorithm with its parameters and the result obtained. - Some columns...
H: Least Squares optimization The cost function given as $\hat{\beta} = (Y - \beta X)^T (Y-\beta X)$ is used to evaluate the weights $\beta$. Here $X$ is the data and $Y$ is the output. On taking the derivative, we get the estimates of the weights. This is a Least Squares formulation. 1) Can Least Squares (LS) be used...
H: Does Gradient Boosting detect non-linear relationships? I wish to train some data using the the Gradient Boosting Regressor of Scikit-Learn. My questions are: 1) Is the algorithm able to capture non-linear relationships? For example, in the case of y=x^2, y increases as x approaches negative infinity and positive i...
H: Splitting image dataset with few subjects but many data I'm carrying out training/testing of a convolutional neural network for facial expression recognition with various datasets - all labelled by 7 emotion classes. For other datasets, there are a large number of mostly unique subjects so I randomly split. In this...
H: How to fill in missing value of the mean of the other columns? I had a movie dataset including 'budget' and 'genres' attributes. I'd like to fill in the missing value of budget with the mean budget of each genre. I first create two dataframes with or without budget. BudgetNull = data[data['budget'].isnull()] Budget...
H: How to turn linear regression into logistical regression I followed these articles to implement logistic regression. I'm confused however because after training the model and getting the weights for my variables I don't now how to use the one-hot vector to turn this into confidence scores for the different classes...
H: How to find what values are assigned to labels that where encoded using LabelEncoder? places = ['India','France','India','Australia','Australia','India','India','France'] Here places are the DataFrame Series, now how can I find that which label was encoded with values like India = 0 , Australia = 1 ,France = ...
H: Predicting Intent to do X with a confidence score or intent percentage score? I have a data set like: did_purchase action_1_30d action_2_20d action_2_10d .... False 10 20 100 True ....etc Where did_purchase shows whether the customer purchased or not, and the column...
H: Constant Learning Rate for Gradient Decent Given, we have a learning rate, $\alpha_n$ for the $n^{th}$ step of the gradient descent process. What would be the impact of using a constant value for $\alpha_n$ in gradient descent? AI: Intuitively, if $\alpha$ is too large you may "shoot over" your target and end up b...
H: How to use K.function with two inputs and a concatenate layer? In Keras, I try to compute use the K.function between some layers. But I get an error when I use a Concatenate layer. Here is a minimal code you can try yourself: import numpy as np from keras.layers import * from keras.models import Model def test_mode...
H: could not broadcast input array from shape (2,3) into shape (3) while using timestamp to build neural network in python Here I want predict value every 60 minutes. So I have data 540 with three inputs. so I wrote an code with time steps and it gave me this error. Can anyone help me to solve this problem? my code : ...
H: Is it possible to plot decision boundaries for only a subset of features? I have a sklearn Random Forest classifier with 59 features as input. I'd like to plot the decision boundaries of only two features at indices i1 i2. If I use the average/median values for the remaining features, the classifier ends up in a pa...
H: Keras input shape returning an error I am currently learning about Keras and have a problem with the input shape of a dense layer.I am currently trying to the mnist dataset.I understand that the input_shape for the train images is (60000,28,28) also i understand that keras ignores the first dimension as it is the b...
H: Neural Network Initialization - Every layer? Does every layer of a Neural Network require weight initialization or just the first? Does the first layer feed into the next layer and initialize itself? My intuition is that every layer needs its own initialization but I'm finding it hard to see that said explicitly. T...
H: Computing number of batches in one epoch I have been reading through Stanford's code examples for their Deep Learning course, and I see that they have computed num_steps = (params.train_size + params.batch_size - 1) // params.batch_size [github link]. Why isn't it num_steps = params.train_size // params.batch_size ...
H: Normally distribute occurence or counts I am creating a mock of sales data. One of the columns is salesperson_id where each id can occur more than once (a salesperson can have multiple sales). I want to generate this column in such a way that if I create a chart of distribution of sale count (not total sales) per s...
H: Product of dot products in neural network In a neural network, it is common to compute a dot product of the form $$\langle w, x \rangle = w_1 x_1 + w_2 x_2 + \ldots + w_n x_n$$ and use it as argument to some activation function. This is done for several different weights $w$ and activation functions (one per neuron...
H: Autoencoder doesn't learn to reduce dimesions I coded a neural network from scratch in Python. I tried it with the XOR problem and it learned correctly. So I tried to encode an Autoencoder with 3 inputs (and therefore with also 3 outputs) to reduce a color (r, g, b) in one dimension. I have normalized the data from...
H: What is the ideal database that allows fast cosine distance? I'm currently trying to store many feature vectors in a database so that, upon request, I can compare an incoming feature vector against many other (if not all) stored in the db. I would need to compute the Cosine Distance and only return, for example, th...
H: Where is my error in understanding gradient descent calculated two different ways? The gradient descent algorithm is, most simply, w'(i) = w(i)-r*dC/dw(i) where w(i) are the old weights, w'(i) are the new weights, C is the cost, r is the learning rate. I'm aware of the graphical justification for this. For one weig...
H: How to deal with overestimation of small values and underestimation of high values in XGBoost? I'm running XGBoost to predict prices on a cars dataset, I was wondering what alternatives are there for this kind of problem where smaller values are overestimated and higher prices underestimated. I tried applying log t...
H: what is difference between set() and word_tokenize()? from nltk.tokenize import sent_tokenize ,word_tokenize sentence = 'jainmiah I love you but you are not bothering about my request, please yaar consider me for the sake' word_tok = word_tokenize(sentence) print(word_tok) set_all = set(word_tokeniz...