I was reading this article where I came across the following statement in the context of "Why do we use sigmoid activation function in Neural Nets?": The assumption of a dependent variable to follow a sigmoid function inherently assumes a Gaussian distribution for the independent variable which is a general distribution we see for a lot of randomly occurring events and this is a good generic distribution to start with. Could someone elaborate on this relationship between the two?
I'm trying to compute an inner product between tensors in numpy. I have a vector $x$ of shape (n,) and a tensor $y$ of shape d*(n,) with d > 1 and would like to compute $\langle y, x^{\otimes d} \rangle$. That is, I want to compute the sum $$\langle y, x^{\otimes d} \rangle= \sum_{i_1,\dots,i_d\in\{1,\dots,n\}}y[i_1, \dots, i_d]x[i_1]\dots x[i_d].$$ A working implementation I have uses a function to first compute $x^{\otimes d}$ and then uses np.tensordot: def d_fold_tensor_product(x, d) -> np.ndarray: """ …
I haven't used neural networks for many years, so excuse my ignorance. I was wondering what is the most appropriate way to train a LSTM model based on my dataset. I have 3 attributes as follows: Attribute 1: small int e.g., [123, 321, ...] Attribute 2: text sequence ['cgtaatta', 'ggcctaaat', ... ] Attribute 3: text sequence ['ttga', 'gattcgtt', ... ] Class label: binary [0, 1, ...] The length of each sample's attributes (2 or 3) is arbitrary; therefore I do …
I have a problem on a WP site. Website crashes because there is no more available disk space. Searching, i detect that wp_options table size is 12GB, but only have 1100 rows aprox: Any ideas? Thanks in advance [UPDATE 1] If i export wp_options table, drop and import, sizes reduces at 9,7mb: I had no opportunity to optimize the table with OPTIMIZE TABLE wp_options but I will try it if it happens again [UPDATE 2] Problem still here. I try …
When training a deep model for rare event detection (e.g. sound of an alarm in a home device audio stream), is it best to use a balanced validation set (50% alarm, 50% normal) to determine early stopping etc., or a validation set representative of reality? If an unbalanced, realistic validation set is used it may have to be huge to contain only a few positive event examples, so I'm wondering how this is typically dealt with. In the given example …
In the recent wordpress.org article outlining the new Query Loop block, it says the "Inherit query from template" option allows you to "customize the query that the loop relies upon ... WordPress will otherwise rely on the template being used to determine what posts appear". There appears to be no further guidance on this. What does this mean, and where does it find a query for these posts? If I have a custom taxonomy defined, how would I pull from …
I'd like to explore some interactions between my variables but they're on different measurement scales. Would for example the absolute value of the difference of them after scaling make sense? From what I understand having them scaled on a 1-0 range would heavily rely on their max and min values, from this assumption it seems to me that interaction within them would not make sense since their position in their own scale would heavily depend on the observation.
I have created a new role with the following code: add_role('sponsored_content', 'Sponsored Content', get_role('contributor')->capabilities); I have added users to this role. When viewing the users screen this Sponsored Content role does not display. Using the browser inspect tool the markup is present: <li class="sponsored_content"><a href="users.php?role=sponsored_content">Sponsored Content <span class="count">(6)</span></a> |</li> There is styling coming from a "constructed stylesheet" preventing it from displaying: .sponsored_content { display: none !important; } This is not styling that I have added and I do not know …
What is the technical name for a "batch element" in machine learning? Given a batch of data (size: batchSize*numberOfFeatures), what is the technical name used to refer to an element within the batch (data[batchElementIndex,:])?
How to UP Page Speed With Widget Defer? Is there a way to defer a widget in the footer? I have an external API in a footer widget which is slowing down my page. It is not needed until the page is loaded. The caching plugin I use (W3 Total Cache) gives me the option to defer other scripts, but not scripts directly coded into the widget. What is the best way to manually defer custom code API that is …
I'm trying to predict what's the expected LTV of a subscriber, since monthly revenue and costs are almost constant I need only to predict the survival function, where the terminal event would the subscription cancelation request. I proposed the following formula to estimate LTV: $LTV = (Membership - Cost)*mean\ residual\ life(x)$ where: $mean\ residual\ life(x)=E(X-x|X>x)= \frac{\int_{x}^{\infty}S(t)dt}{S(x)}$ In my case I have data of all subscribers over the last 10 years (more than 3 million data points where 1 million are …
I'm using the REST API to get datas from Wordpress within my React App. I've seen that you can filter the responses Wordpress returns by using the filter rest_prepare_{$this->post_type} documented here. I've also seen that you can use a context (view,edit) parameter when making a rest request; which will alter the responses. In the documentation about modifying responses, there is a note that says Adding fields is not dangerous, so if you need to modify data, it’s much better to …
I've got a Multisite network that looks something like this: Site A Site B Site C Site D Site E and have a set of Categories like this: Category A Category B Category C Category D Category E These Categories relate to the Sites. i.e. Category A is what Site A is all about. However there will be posts that may be relevant to multiple sites in which case you would select multiple Categories. So, each Site would list all …
i am using this code to build a model that recognizes emotions in speech, but i can't figure out how to use it after loading it in a new python file. this is what i have but the results are always the same no matter what sound file i use. model_audio = tf.keras.models.load_model("audio_emotion_classifier_tess.h5") path = "YAF_back_angry.wav" def extract_features(path): data, sample_rate = librosa.load(path, duration=2, offset=0.6, sr=8025) # ZCR result = np.array([]) zcr = np.mean(librosa.feature.zero_crossing_rate(y=data).T, axis=0) result=np.hstack((result, zcr)) # stacking horizontally # …
Say I have three classes $C_1$,$C_2$, $C_3$ and a model $M$ which outputs a score $P$ for the confidence of each class for a sample $X$ i.e $M(X)=[P(C_1),P(C_2),P(C_3)]$ (note, we only want to predict one class) Say I have created 3 one-vs-rest precision/recall plots and I decide that the optimal thresholds for each class are $T_1 = 0.6$ $T_2 = 0.7$ $T_3 = 0.5$ We can then create the logic of assigning $X$ to a class like so: If the …
TL;DR: Intuition behind the gradient flow in Siamese Network? How can 3 models share the same weights? And if 1 model is used, how Gradients are updated from 3 different paths? I am trying to build a Siamese Network and as far as I can know, if I have to build a Triplet Loss based Siamese, I have to use 3 different networks. So for simplicity, let us say that my architecture is something like: Please correct the architecture if …
I have an NLP model, for example, Sentiment Analysis. This model serves in production. I want to detect Data Drift, and specifically Covariate Shift for this model. I saw that Cosine Similarity may solve this issue, but I'm concerned about: The ability to calculate it - Cosine similarity can be calculated for vectors that are in the same vector space. Are all of the embeddings that a model produces live in the same space? The time complexity - If I …
I uploaded 7 files this morning but this afternoon all I get is the 'Could not insert post into the database' message. I am a novice at best to WordPress and I have no clue what to do.
I'm using supervised learning on monthly activity data to predict when a customer buys a particular product. This product is typically bought infrequently and at the moment my target variable is whether the customer buys the product in the next twelve months. Assume that for every customer I get a set of features every month, $x_1,x_2,\ldots,x_n$. The goal is to use these features to predict whether $y=0$ or $y=1$ ($y$ is 1 if the customer did buy the product in …
For my degree final project I have been working on a GAN to solve a certain image enhancement task. The problem I’m currently working on has an extremely limited number of datasets due to the physical constraints of taking such pictures, and for this reason I used a paired dataset for training and an unpaired dataset to see if the images generated from the unpaired dataset have the same distribution of the ground truth in the paired one, which turned …
I use Wordpress commment pagination as follows: paginated comments comments displayed with the newest comments at the top of each page 50 comments on each page first page displayed by default The problem is that I am trying to achieve YouTube like comments such as - newest comments on first page, first page being displayed by default, then older comments in order on page 2, 3 etc The problem is that Wordpress comments are structured in such way,that I cannot …
I've setup a polling script in js that sends an XMLHttpRequest to the server to wp-admin/admin-ajax.php (yes, legacy, I know) at a fixed interval of x seconds. The response returned by that request from the server corresponds to a simple and minimal JSON. It was all working good, until I've noticed the following: When I login to my platform (on the frontend) and access the profile page, the polling starts. It all works perfectly, BUT, as soon as I login …
I'm currently getting more into the topic of GANs and Generating Models. I've understood how the Generator and Discriminator work together in optimization to generate synthetic samples. Now I'm wondering how the model learns to reflect the occurance frequencies of the true entries in case of categorical data. As an example, lets say we have two columns of entries (1,A), (1, A), (2, A), (2, B) The model, when trained would not only try to output real combinations, so e.g. …
I wonder if a binary classification problem which will steer a business process really is binary. As you see steering means affecting the outcome of the business process. As such ground truth data will be different than it would have been without the model. What strategies are there to deal with this problem (besides a hold out group). Recently I read http://ieeexplore.ieee.org/document/7280527/ wich additionally incorporates early feedback. Is it suitable to assume that after initial launch of such a model …
I have a custom taxonomy, Events (“event”). Through ACF, this also has a Taxonomy field, “Topic”, linking it to a secondary taxonomy, Topic (“topic”). I want to get_terms() for all Events terms which bear the specific “Topic” term “Media”, which happens to have term ID 422. I know get_terms() can take meta_query, but I don’t understand how to properly get what I need. Both of these return no results… 'meta_query' => array( array( 'key' => 'Topic', 'value' => '422', ) …
According to Elementor documentation https://developers.elementor.com/custom-query-filter/#Multiple_Post_Types_in_Posts_Widget I need to display future posts including the post from today. We want to display places and dates where a rock band will be (we don't want to display posts with date before today) I am using this code: add_action( 'elementor/query/my_custom_filter', function( $query ) { $meta_query = $query->get( 'meta_query' ); $meta_query[] = [ 'post_status' => 'publish,future', 'order' => 'ASC', 'posts_per_page' => 3, 'date_query' => array( array( 'after' => date('Y-m-d'), 'inclusive' => true, ) ), ]; …
Say there're the top 10 most popular items among 100 sales products and about 100k users regularly purchase items on daily basis. A = has been purchased by 100k users. B = has been purchased by 30k users. C = has been purchased by 20k users. D = has been purchased by 18k users. E = has been purchased by 10k users. F = has been purchased by 8k users. G = has been purchased by 7k users. H = …
0 I would like to develop a time series classification algorithm to classify use a of parachute. My data consist of multiple recording files (around 5min at 100hz, length of the recording vary) with a timestamp column, sensors like accelerations altitude... and a colunm label with 0 : bad, +1 good. Exemple of data : time;x(g);y(g);z(g) 0,005;-0,048;0;1,056 0,006;0;0;1,104 0,007;-0,048;0;1,056 0,008;0;0,048;1,104 0,009;-0,048;0;1,056 0,01;-0,048;0;1,056 0,011;-0,048;0;1,008 In the litterature and in dataset database like timeseriesclassificaction.com and UCI, datasets used for deep learning algorithms …
I am using a custom WP_List_Table-Class in order to display a custom table with hotels in the dashboard. I can skip through the pages with the pagination on the top right as expected. The search form is also added with $my_list_table_instance->search_box( 'Search', 'search_id' ); and it is working fine, but only for the first page. Inside the form, I have the two hidden fields for the pagination: // List and form output $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRIPPED ); $paged …
A Tableau Workbook I'm working on has different users logging in to see the data for their company. In the dashboard I have created a dynamic image that shows the customer logo depending on who is logged in. I created this by going to the Map drop down and using Background Images. The field that controls which image is seen, is a customer dimension which lists all of the customers in the database. The issue I'm having is that some …
Apologies for the garbled title, I'd really need to know the answer to the question before I could phrase it properly... Let's imagine I've got a data set of football(soccer if you prefer) match results Let's further imagine that each result has the following attributes Date Venue Team Opponent Home Team Goals Away Team Goals Result Then let's consider a future match, for which we know some attributes but not all (obviously, because it hasn't happened yet) Date - W …
I'm looking for an algorithm that computes the similarity between two strings just like the levenshtein distance. However, I want to consider the following. The levenshtein distance gives me the same for these cases: distance("apple", "appli") #1 distance("apple", "appel") #1 distance("apple", "applr") #1 However, I want the second and third example to have a smaller distance because of the following reasons: second example: all the correct letters are used in the second word third example: r is much likely to …
I am looking for a function to add <body onload="prepareFrame('https://airtable embed URL here')"> to certain wordpress pages only. I know how to add a custom body class but not an onload statement. add_filter('body_class', 'custom_body_class'); function custom_body_class($classes) { global $post; if ($post->ID == 346) { $classes[] = 'services'; } return $classes; }
The xgboost classifier states the use of parameter scale_pos_weight for 2-class problems. I have a highly imbalanced dataset with 3 classes. Classes '1' and '-1' are very rare (~1% of dataset) and class '0' is very common. How do I set this scale_pos_weight parameter in the xgboost classifier correctly for my classification problem?
Suppose that I am doing a Federated Learning experiment using MNIST. As you know MNIST has 10 classes. Now, Federated Learning is useful especially in cases like hospitals, for collaborations, because one hospital can have samples from different classes wrt another hospital. So I want to reproduce this non-iidness. Suppose that I have 2 clients: the first client takes the first 5 digits of MNIST (0, 1, 2, 3 and 4) and the second client takes the last digits (5, …
I am trying to predict the overall age of an opportunity (creation date - closing date) this is my response variable lets say an opportunity passes through 3 stages to close For example: Opp x stayed in stage 1 : 30 days stage 2 : 10 days stage 3: 20 days At stage 3 I might close it same date or wait some time so if I waited some time to close, it will be createdon: 22/11/2018 & closedon:9/2/2019 There …