Which algorithms should I use for identifying similar characteristics between data points (the intersections)?

I am working with a dataset that has been coded and categorized, so that each datapoint has a set of coded characteristics. An example data point would be something like the following: Example Data Point: Quality Service & Support Price Each data point can have multiple codes associated with it. What I'm looking to do is identify the "intersections" between the data points so that I can answer questions like the following: When a data point has "Quality" as a …
Category: Data Science

Multiple pages protected by different passwords. Possible to track multiple passwords at a time?

I'm creating pages in a portal that are all available to the user but every page is password protected. The user will receive an email ea. month with the password for that months page to view the content. By default, Wordpress does the following (this is from their codex page): WordPress will only track one password at a time. Therefore, if two posts use two different passwords, entering the password for post A, then entering the password for post B …
Category: Web

Loss function when the output is a single probability

I have a regression problem where the output y is a single probability, i.e. real number that varies in the interval [0, 1] While using L1 or L2 loss will very likely work well, I feel that they are not the most appropriate options considering that the range [0, 1] is already well defined. Is Binary Cross Entropy (BCE Loss in pytorch) the most appropriate in this case?
Category: Data Science

Dealing with near duplicates using NLP

I have a dataframe like as shown below ID,Name,year,output 1,Test Level,2021,1 2,Test Lvele,2022,1 2,dummy Inc,2022,1 2,dummy Pvt Inc,2022,1 3,dasho Ltd,2022,1 4,dasho PVT Ltd,2021,0 5,delphi Ltd,2021,1 6,delphi pvt ltd,2021,1 df = pd.read_clipboard(sep=',') My objective is a) To replace near duplicate strings using a common string. For example - let's pick couple of strings from Name column. We have dummy Inc and dummy Pvt Inc. These both have to be replaced as dummy I manually prepared a mapping df map_df like as …
Category: Data Science

Linking form to user meta fields

I currently have my login page set up to allow sign up through google. Immediately after a successful sign up I'm looking to set up a redirect to a form where the user can enter additional details and these are saved within predefined user meta fields. I know how to set up the fields using ACF or Pods. Are there free plugins available which can link a form to the meta fields? I'm fairly new to developing hooks but if …
Category: Web

Low silhouette coefficient

I am doing a kmeans clustering on a dataset of selling values of articles. Each article has 52 selling values (one per week). I am trying to automatically calculate the optimum amount of clusters for any unkown dataset. I tried two criteria: The elbow method and the silhouette coefficient. For the silhouette coefficient I got for 1 to 20 clusters values from 0.059 to 0.117 which is (in my opinion) extremely low (heard about a normal of about 0.7). For …
Category: Data Science

How do I deal with non-IID data in gradient boosted random forest (for stock market)?

I am working on a stock market decision system. I have currently centered on gradient boosting as the likely best machine learning solution for the problem. However, I have 2 fundamental issues with my data owing to it being from the stock market having to do with it not being IID. First, because of the duration of average in some indicators use, some data-points are highly correlated. For example, the 2-year trailing return of a stock is not very different …
Category: Data Science

Query to Get All Users from wp_users With NO matching user_id In wp_usermeta

I'm currently trying to get all users from wp_users that have no matching ID entry in wp_usermeta (matching on user_id). I have a site with a very large user base that currently has thousands of spam users. The following query is returning no records: SELECT * FROM wp_users WHERE ID NOT IN ( SELECT user_id FROM wp_usermeta); I've already removed the bad records from the meta table which is why I need to query to find only the records with …
Category: Web

Accuracy after selftraining didn't change

I used Decisiton Tree Classifier which I trained with 50 000 samples. I have also set with unlabeled samples, so I decided to use self training algorithm. Unlabeled set has 10 000 samples. I would like to ask if it is normal, that after retrainig model with these 10 000 unlabeled samples, accuracy didn't chaned as well as confusion matrix has same values? I expected some changes (better or worse prediction). Thank you in advance.
Category: Data Science

experience replay memory: saving the next state required when state does not depend on action?

so, I am using an agent with a state-action-policy and I am trying to understand the concept of experience replay memory (ERM). As far as I learned until now, the ERM is basically a buffer that stores sets experiences: e_t = {s_t, a_t, r_t+1, s_t+1} Where s is the state, a the action and r the reward, as usual. Basically, in order to use a network that learns to predict the correct action from such experiences, the network's input should …
Category: Data Science

Creating post custom field text area

I want to make, I guess a custom field for my theme. I'm not sure is it the right way to do this with custom fields. I searched a lot, but could not find what I need. So I'm hoping that some one could give some pointers or links, since I dont know what exactly to search for my case. What I want to make is to add below post title bolded intro for the post. I know I could …
Category: Web

Need to add a post’s featured image to a section on the frontpage

It looks like I will need to create custom PHP code for this and either add it to my includes directory within a custom PHP file, or to the functions.php file. I need the ability to use a featured image in a post and be able to also dynamically display that same image in a gallery on the frontpage. I am not a PHP master by any means, but I know a bit to get around. My guess is I …
Category: Web

PCA huge parts of missing data filling

I’m performing PCA on different time series’ and then using K Means clustering to try and group together common factors. The issue I’m facing is that some of the factors come in and out of the time series. For example I may have 12 years in total of data points, some factors may exist for the entire 12 years but some may dip in and out (active for the first two years, inactive for three years, active for the rest …
Category: Data Science

Manual garbage collection throwing KeyErrors using Python inside Azure Function

I have a python script that I push up to an Azure Function App (It's specifically a blob storage trigger). My function app is hitting memory caps every so often, and I thought it might be a good idea to manually garbage collect at the end of my script to see if that would help me from hitting the cap. Here is what I currently have at the end of my script. del blob_data_frame del processed_df if blob_data_frame1: del blob_data_frame1 …
Topic: python
Category: Data Science

jQuery UI Datepicker error

Somehow, the default jQuery UI Datepicker (loaded by domain/wp-includes/script-loader.php on line 214 in version 4.7 is giving javascript errors in the console. This is the line that loads in the file: $scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$dev_suffix.js", array('jquery-ui-core'), '1.11.4', 1 ); And here is the error: edit.php:81 GET http://jquery-ui.googlecode.com/svn/tags/latest/ui/i18n/jquery.ui.datepicker-nl.js?ver=4.7 It returns with an 404. How do I fix this error? I have searched within the wp-admin and wp-includes files, but I just can't figure out why this error is present. IMPORTANT: I don't …
Category: Web

Preserve colour in convolutional autoencoder

at the moment i work with convolutional autoencoder and now I'am looking for paper or methods that adresses a colour preversation. Most of the AE paper use grayscale images and loss functions such as SSIM that preserve the structure very well are also focused on grayscale images. My networks are good in preserving structure (with SSIM as loss) but have a hard time representing the right colour. I use a all convolution architecture without any pooling. my downsampling is derived …
Category: Data Science

Match between objective function and evaluation metric

Does the objective function for model fitting and the evaluation metric for model validation need to be identical throughout the hyperparameter search process? For example, can a XGBoost model be fitted with the Mean Squares Error (MSE) as the objective function (setting the 'objective' argument to reg:squarederror: regression with squared loss), while the cross validation process is evaluated based on a significantly different metric such as the gamma-deviance (residual deviance for gamma regression)? Or should the evaluation metric match the …
Category: Data Science

How to redirect custom post type posts to one url with htaccess?

I have a custom post type "products". I would like to redirect all posts from "products" to one url ex: http://example.com/page1 using htaccess. For example: http://example.com/products/post1, http://example.com/products/post2 and http://example.com/products/post3 to be on link click redirected to one page http://example.com/page1 Options +FollowSymLinks RewriteEngine On RewriteRule ^products/(.*)$ /http://example.com/page1 [R=301,L] I cant find this topic anywhere. Please help.
Category: Web

mySQL database size large, but tables size less

I have my site hosted with NetworkSolution, and they have a sql database size limit of 300MB. IF the size exceeds this limit we cannot access the wordpress admin dashboard. So currently its showing 441MB, and its overlimit. And they are force me to upgrade the database size to 1GB for 120$/yearly. But previously I had all tables size totaling to 45MB, but the database size was 321MB, and I had to request them to grant me access, so they …
Category: Web

Understanding dimensions of Keras LSTM target

I'm learning about Keras and LSTMs and came across this tutorial, but I don't understand the dimensions of the target variable. Quoting the article below: The training y data in this case is the input x words advanced one time step – in other words, at each time step the model is trying to predict the very next word in the sequence. However, it does this at every time step – hence the output layer has the same number of …
Category: Data Science

Show attribute description when filtering by that attribute

I’m setting up a woocommerce shop for my wife. In this shop, the brands mean a lot to us so we’ve added descriptions for each brand. A nice little story with an image and everything. Now when I click the brand-attribute from a single product page, I go to http://www.webshop.com/brand/brand-attribute which show the description above some products. Is there a way to make this work with filters as well? So I’m in the shop and when I filter on brand …
Category: Web

Multi-target regression tree with additional constraint

I have a regression problem where I need to predict three dependent variables ($y$) based on a set of independent variables ($x$): $$ (y_1,y_2,y_3) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_n x_n +u. $$ To solve this problem, I would prefer to use tree-based models (i.e. gradient boosting or random forest), since the independent variables ($x$) are correlated and the problem is non-linear with ex-ante unknown parameterization. I know that I could use sklearn's MultiOutputRegressor() …
Category: Data Science

How can the alt be added to this wooCommerce category image?

I am trying to get the alt to display as it is written within the media library, but the necessary code edit is beyond my comprehension. The code below was created to modify wooCommerce. The best I could do now is to narrow down here the edit needs to take place. This line is one that needs edited, but I am uncertain what to change: if ($image) echo '<img src="' . esc_url($image) .'" alt="EDIT HERE:plugins>woocommerce-CJD">'; Any help showing me how …
Category: Web

Time Series forecasting for 20,000 products using python

I am using timeseries forecasting(ARIMA) to forecast the future demands of products of a store handleing 20,000 variety of products. Currently different models are developed and used to forecast future demands of different products.To predict the future sales of 20,000 products it is taking around 4 hours. This does not seems to be the best way of predicting future sales of 20,000 products. Can a single model be developed which can handle all the 20,000 products? Can you please help …
Category: Data Science

Trying to change category of wp_query

I'm trying to change the category of the main loop, after printing posts from each category. The page shows: 3 most recent posts 3 posts from first category 3 posts from second category 3 posts from third category 3 posts from fourth category The category-specific posts can't be from the most recent. The category-specific posts aren't right, though. I see posts, but they're not from the right category! Here's my template. It uses blade, so slightly different syntax, but more …
Category: Web

Inference speed of ReLU networks

I'm fairly new in the topic, and I was wondering whether some of you can point to existing works in which the inference of deep neural networks with ReLU activation functions is tested on GPUs as a function of the number of hyperparameters. Just to have a rough idea on how fast those networks can give an answer back for, e.g., approximation/regression purposes.
Category: Data Science

Can clustering results based on probability be used for supervised learning?

I'm a beginner and I have a question. Can clustering results based on probability be used for supervised learning? Manufacturing data with 80000 rows. It is not labeled, but there is information that the defect rate is 7.2%. Can the result of clustering by adjusting hyperparameters based on the defect rate be applied to supervised learning? Is there a paper like this? Is this method a big problem from a data perspective? When using this method, what is the verification …
Category: Data Science

Is it possible to restore a deleted WordPress plugin I deleted from WordPress admin menu?

I know it is very, very stupid of me. But I deleted my plugin while I was coding my new plugin. I worked weeks, if not months, on it. I deleted it from the WordPress admin menu, by just clicking the 'delete' link. (So stupid, but I was trying if it was possible to delete the plugin and the database table that belongs to the plugin.) Are there any solutions to get my files back? Thanks in advance!
Category: Web

Can I restore a plugin that was accidentally deleted? (on localhost)

I did something really stupid and accidentally removed a plugin that I've been working on for weeks, with no backups. (I know! Learning moment!) Is there any way I can restore this plugin? It's not in my Windows recycle bin. I deleted it through the WordPress wp-admin interface. Going to Plugins and clicking Delete. Any help is greatly appreciated!
Category: Web

Clustering Using SOM Codebook

I've recently been using the aweSOM R package for cluster visualisation, https://cran.r-project.org/web/packages/aweSOM/vignettes/aweSOM.html. In particular, the aweSOM package entails using partitioning around medoids (pam) on the SOM codebook, as demonstrated below. However, one limitation of the aweSOM package is that it only allows for two cluster validation measures: "silhouette" and "elbow." Therefore, I wondered if someone was aware of how to generate other validation statistics (Dunn, Davies-Bouldin etc) using the output of pam clustering on the codebook? I've currently tried packages …
Topic: r clustering
Category: Data Science

Wordpress multi-domain with multiple sites with multiple languages

I'm looking to publish a multi-domains/multi-langages website, based on wordpress. I'm setting up multiple domain to publish oriented content for visitor, like this i can offer French, English, German, Spanish, Japanese contents websites. Each main language i have is associated to a main domain (.fr, .com, .de, .es, .jp), so far, WP multisite work well. My problem : I got secondary level domains, Belgium, Switzerland, United Kingdom (.be, .ch, .co.uk). This three secondary level domains are attached to a main …
Category: Web

How do i create a classifier on sensor data?

I am working on a indoor localization based on magnetometer. I have 9 separate time-series datasets of sensor readings taken from coordinates 00, 01, 02, 10, 11, and so on until 22. Basically I am using my own coordinate system and gathered data. The coordinate system looks like this: 0,0 | 0,1 | 0,2 1,0 | 1,1 | 1,2 2,0 | 2,1 | 2,2 The dataset has columns timestamp, X, Y, Z and Magnitude. Here's what all my dataset looks …
Category: Data Science

Adding custom column in User List with custom action

I want to add a custom column in the User list in the WordPress admin dashboard with a custom action to perform. It means in the custom column, I want to add a button for each user. While clicking the button, it will redirect to a new page link with user_id. How can I achieve this?
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.