## optimization – Clustering sets by set difference

Suppose you have $$n$$ nonequal sets $$S_1, ldots, S_n$$ and some constant $$0 le k < n$$. The goal of set clustering is to find a partition of the set $$mathbf{S} = {S_1, ldots, S_n}$$ such that the sum of the total distance for each subset of $$mathbf{S}$$ is minimized and such that $$mathrm{cardinality}(mathbf{S}) = k$$ (in reality, this latter constraint is not quite so tight, but the size of $$mathbf{S}$$ must be less than $$k$$, and hopefully near it). The total distance $$d$$ of a set $$X in mathbf{S}$$ is $$d(X) = sum_{A, B in X} mathrm{cardinality}(A ominus B)$$ where $$ominus$$ is symmetric difference. Assume for the purposes of the problem that the sets consume $$O(1)$$ space (so symmetric difference can be computed in constant time).

Is there a good greedy linear(ithmic) heuristic for this problem? Is there any literature on this problem, or similar ones?

All I’ve come up with so far is an $$O(n^2 log n)$$ heuristic that looks like:

1. Set $$I = {1, ldots, n}$$
2. Choose some $$i in I$$
3. Emit a cluster $$C subset I$$ containing all $$m in I$$ such that $$mathrm{cardinality}(S_i ominus S_m) le d_mathrm{max}$$.
4. Set $$I = I – C$$
5. Go to step 2.

where this process occurs in each step of a binary search that finds the best value of $$d_mathrm{max}$$ for a given $$k$$.

I was thinking that if there were some way to sort the list of sets such that nearby sets in the list have small symmetric difference, then a linearithmic solution might be easy to write.

## Can I set up a Google Analytics view that filters out anyone with a user-id tagged on them?

If you are capturing the user-id and sending it as a user scoped custom dimension, then you will be able to apply a filter to a View to exclude the users assigned a value for that particular custom dimension.

In doing this, any data before they are assigned a user-id and have it applied as a custom dimension will remain in the reports.

## postgresql – wal_level set to replica at database level but i dont see that in configuration file

wal_level is commented in postgresql.conf and i dont see any entry in auto.conf either. but at the databsae level i see its set to REPLICA. Is there any other place whee it could have been set?

``````postgres@postgresqlmaster:/etc/postgresql/12/data\$ psql -p 5433
psql (12.3 (Ubuntu 12.3-1.pgdg18.04+1))
Type "help" for help.

postgres=# select name, setting, sourcefile, sourceline from pg_settings where name = 'wal_level';
name    | setting | sourcefile | sourceline
-----------+---------+------------+------------
wal_level | replica |            |
(1 row)

``````
``````postgres@postgresqlmaster:/etc/postgresql/12/data\$ cat /var/lib/postgresql/12/data/postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
shared_buffers = '200MB'
synchronous_standby_names = 'pgstandby_synch1'
``````

## How to generate a set of orthogonal polynomials with a special weight function

Regarding to $$e^{-ax-bx^2}$$ as the weight function , how can I generate a set of orthogonal polynomials? I just know the `Orthogonalize` command in Mathematica which seems that uses 1 as weight function by Gram-Schmidt method, other commands such as `HermiteH` and `LaguerreL` generate special polynomials. But I don’t know how to do my case.
Will it be reasonable to produce a basis as $$A={x^n e^{-ax-bx^2} :n in N}$$ and then orthogonalize it?

## lightning network – How to set up LndHub on top of RaspiBolt ir RaspiBlitz?

The RaspiBlitz is running LND. So, when you look at https://github.com/BlueWallet/LndHub, you will find that you only need to install Redis and then you can set up LndHub.io as in their documentation:

``````git clone git@github.com:BlueWallet/LndHub.git
cd LndHub
npm i
``````

Install `bitcoind`, `lnd` and `redis`. Edit `config.js` and set it up correctly. Copy `admin.macaroon` and `tls.cert` in root folder of LndHub.

You can do all of that via `ssh` on your RaspiBlitz.

## What’s an example of a set that’s not closed,open, or bounded?

Can’t think of an example of a set within the usual plane that isn’t closed,open, or bounded.

## Magento 2 product edit page featured product option value No set

I am a beginner in magento 2 , i would like to add featured product value "No" in product edit page through programmically

## How to set the screen size in Ubuntu to correctly fit your monitor so that there are no scroll bars on the bottom & right & no windows go out of view?

Pretty much what’s there in the question.
Following are the specs.
OS: Ubuntu 20.04 LTS
Monitor specs : 15.6"
Running on Oracle Virtual box

Thank you

## dataset – Type of data in a data set columns

How can I check the type of data in the columns of the dataset and count how many are of that data type?

Here is the data set I am working with:

``````Dataset[{
<|"speed" -> 4, "distance" -> 2.01|>,
<|"speed" -> 4, "distance" -> 10.03|>,
<|"speed" -> 7, "distance" -> 4.04|>,
<|"speed" -> 7, "distance" -> 22.8|>,
<|"speed" -> 8, "distance" -> 16.2|>,
<|"speed" -> 16, "distance" -> 10.1|>,
<|"speed" -> 8, "distance" -> 12.1|>,
<|"speed" -> 9, "distance" -> 22.1|>,
<|"speed" -> 11, "distance" -> 32.3|>,
<|"speed" -> 6, "distance" -> 11.12|>}
]
``````

## real analysis, in a metric space, what does a set inside both open and closed mean?

in a metric space, what does a set inside both open and closed mean? could you explain specifically? Just like the discrete metric.