Questions tagged [hierarchical]

For issues relating to arranging data and/or resources in a hierarchy.

A hierarchy is an arrangement of items (objects, names, values, categories, resources, etc.) in which the items are represented as being "above," "below," or "at the same level as" one another. Abstractly, a hierarchy is simply an ordered set or an acyclic directed graph.

A hierarchy can link entities either directly or indirectly, and either vertically or horizontally. The only direct links in a hierarchy, insofar as they are hierarchical, are to one's immediate superior or to one of one's subordinates, although a system that is largely hierarchical can also incorporate alternative hierarchies. Indirect hierarchical links can extend "vertically" upwards or downwards via multiple links in the same direction, following a path. All parts of the hierarchy which are not linked vertically to one another nevertheless can be "horizontally" linked through a path by traveling up the hierarchy to find a common direct or indirect superior, and then down again.

568 questions
4
votes
1 answer

What's a good way to express hierarchical grouping of widgets in Python?

This is a Python style question -- my Python code works, I'm just looking for suggestions for a coding convention that would make the code easier to read/understand/debug. Specifically, I'm working on a Python class that lets the caller add widgets…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
4
votes
2 answers

Generate hierarchical data from pandas df to list

I have data in this form data = [ [2019, "July", 8, '1.2.0', 7.0, None, None, None], [2019, "July", 10, '1.2.0', 52.0, "Breaking", 6.0, 'Path Removed w/o Deprecation'], [2019, "July", 15, "0.1.0", 210.0, "Breaking", 57.0, 'Request…
4
votes
1 answer

How to convert a flat list of directory paths to hierarchical struct in Rust?

My input is a flat list of filesystem paths that are all sub-directories (or file therein) of a single top-level directory. My ultimate output should be: A textual hierarchical display of the paths, like that of unix tree command. A hierarchical…
danda
  • 485
  • 4
  • 13
4
votes
1 answer

vis.js network: hierarchical layout issue related to number of nodes

I'm facing a "strange" problem I'm not able to solve looking at vis.js documentation. I created a network with a fixed hierarchy defining a specific level for each node. Total number of nodes 51. This is the result: If I add another node at the…
neoben
  • 743
  • 12
  • 30
4
votes
1 answer

Scala: pattern matching on nested type hierarchies

Let's say I have sealed trait AlphaNumericChar sealed trait AlphaChar case object A extends AlphaNumericChar with AlphaChar case object B extends AlphaNumericChar with AlphaChar sealed trait NumericChar case object One extends AlphaNumericChar…
Maths noob
  • 1,684
  • 20
  • 42
4
votes
0 answers

Tensorflow hierarchical object detection

I'd like to train an object detection model with Tensorflow using MobileNet V2 SSD and have hierarchical classes. E.g. to have classes "animal" and it's sub classes "horse" and "donkey". I expect such model to also detect mule but then rather than…
Mikk L.
  • 161
  • 2
  • 9
4
votes
3 answers

Single hierachical query for both all ancestors/parents and children (DB2/SQLServer)

I have found the solution for Oracle using UNION ALL on two hierarchical CONNECT BY queries, one fetching the ancestors and another the children. I want to achieve the same for both DB2 and SQL Server. I know one element it could be a root, branch…
Mashimom
  • 447
  • 1
  • 7
  • 18
4
votes
5 answers

Make hierarchy in PHP array in cycle

I've been fighting for hours with such a problem. For speeding my web-page I request database to get all categories just one time and then want to sort the array using PHP. Array ( [0] => Array ( [id] => 1 [name]…
user597214
  • 41
  • 1
  • 3
4
votes
1 answer

glmer VS JAGS: different results in intercept-only hierarchical model

JAGS I have an intercept-only logistic model in JAGS, defined as follows: model{ for(i in 1:Ny){ y[i] ~ dbern(mu[s[i]]) } for(j in 1:Ns){ mu[j] <- ilogit(b0[j]) b0[j] ~ dnorm(0, sigma) } sigma ~ dunif(0, 100) } When I plot the…
Guilherme D. Garcia
  • 179
  • 1
  • 3
  • 11
4
votes
2 answers

How to make assignment to hierarchical column of pandas dataframe using boolean mask?

I have a dataframe like this: import pandas as pd df = pd.DataFrame({ "time": [1, 2, 1, 2], "site": ['a', 'a', 'b', 'b'], "val1": [11, 12, 21, 22], "val2": [101, 102, 201, 202] }) df.set_index(['time', 'site'], inplace=True,…
Matthias Fripp
  • 17,670
  • 5
  • 28
  • 45
4
votes
2 answers

VHDL - Port mapping - Map different ports of a component into different entities

I've been working on a VHDL project for a few weeks, and functionnality-wise everything's going very smoothly. I can simulate and program my DE0-nano FPGA devellopement board to check if what I'm doing is working, and it is. However, I'm starting to…
4
votes
2 answers

Is there a Hierarchical Test Runner for PHPUnit?

I've seen how Hierarchical Context Runner works in JUnit, and it's pretty awesome. It allows you to arrange multiple setups before groups of methods in a single test class. This is great when you are testing multiple scenarios; it feels more like…
Mollo
  • 723
  • 3
  • 7
  • 24
4
votes
1 answer

How to update hierarchical data in the same table

I have two tables. The first table contains some data changes by year and territory_id. territory_id year count_sth 430000000 2015 130 431000000 2015 15 433200000 2015 75 433600000 2015 40 431000000 …
di_diamond
  • 61
  • 3
4
votes
3 answers

hierarchical regex expression

Is it possible/practical to build a single regular expression that matches hierarchical data? For example:

Action

Title1

data1

Title2

data2

Adventure

Title3

data3
I…
Snives
  • 1,226
  • 11
  • 21
4
votes
1 answer

Hierarchical clustering from confusion matrix with python

Using on the following answer, I tried to code hierarchical class clustering based on confusion matrix. Confusion matrix is used to evaluate results of classification problem and isn't symmetric. Each row represents the instances in an actual class.…
Eric
  • 2,301
  • 3
  • 23
  • 30