machine learning: comparison of values ​​of importance of characteristics in logistic regression and random forest in scikitlearn

I am trying to classify the characteristics for binary classification, based on their importance using a set method combining the characteristics of the characteristics estimated by random forest and logistic regression. I know that logistic regression coefficients and impurities of random forest fetuses are different values ​​and I am looking for a method to make them comparable. This is what I have in mind:

X=features
y=lablels
rf=RandomForestClassifier()
rf.fit(X,y)
RFfitIMP=rf.feature_importances_/rf.feature_importances_.sum() #normalizing feature importances to sum up to 1
lr=LogisticRegression()
lr.fit(X,y)
lrfitIMP=np.absolute(lr.coef_)/np.absolute(lr.coef_).sum() #Taking absolute values and normalizing coefficient values to sum up to 1
ensembleFitIMP = np.mean((featIMPs for featIMPs in (RFfitIMP,lrfitIMP)), axis=0)

What I think the code does is take the relative importance of both models, normalize them and return the importance of the characteristics averaged in two models. I was wondering if it is a correct approach for this purpose or not.

test techniques: comparison tree to obtain a minimum number of comparisons to merge ordered lists

Suppose A it is an ordered list of length n Y B It is an ordered list of length 2. I am asked to find the minimum number of comparisons that any algorithm must make to merge these lists. They also give me an analysis of this that does not use a comparison tree, but combinatorially argues that the number of sheets should be $ binom {n + 1} {2} $ and that the height $ h $ must satisfy $ 2 ^ h geq binom {n + 1} {2} $.

However, I get a different answer when I really draw the comparison tree. As I reasoned, the comparison tree has two branches at the top, one corresponding to a1 < b1 and one corresponding to a1 > b1. If you follow the right branch again, this corresponds to a1 > b1 Y a1 > b2 and at this point the tree ends in a leaf. No more comparisons are needed because the merger can simply make each comparison, but the bs on the merger list and dump all the rest of as in later.

That is not the interesting part, but I hope it is a simple consideration that makes it clear how I am approaching this. The left branch, where you get a1 < b1 Y a2 < b1 and and an < b1 corresponds to go left and left and ... and left. exist n comparisons in this branch. In fact, I think you can get one more if instead of an < b1 In the end you go to the right and say an > b1 and so an < b2 (or an > b2 since it doesn't matter at this point, both sides are a sheet). So really the tree has height exactly n+1. Right? Or am I misinterpreting something?

Terminology: UI component or design pattern for juxtaposition of images for comparison

This was a design concept / pattern that I saw for the first time in use for an interactive on a website to display the images of before and after a natural disaster event.

Since then, I've seen it appear in a couple of different places, but it used to show before and after images in an interactive comparison from side to side. Below is an example that I saw on a website that shows the transformation of one type of image into another.

enter the description of the image here

Would this UI component be classified as a slider, an image interaction or something else?

This is the only implementation of the design pattern I have seen (with the slider in the center of the superimposed images), but if there are sightings of alternative designs, add them also to the answers.

Comparison of large exponents. (Method)

WRT Comparison of great exponents.

Here is my method with an example comparison $ 10375105 Y $ 7028887:

The symbol "?:" Means that no logical operator decided

enter the description of the image here

  • Pranav K

Comparison of cameras for astrophotography and portrait [closed]

I want to buy a camera that is good for both astrophotography and portrait photography, what are the specifications I should compare?

8 – Conditionally display the field based on the comparison with another field

I have a content type event that has a start date (field_eventdate) and an optional end date (field_eventend).
Although optional, users often complete the end date with the same date as the start date.
Therefore, I want to hide the end date if it is equal to the start date or show it on the same line as the start date when it is different.

e.g.

2020-02-02 10:00
Here comes more text for a single day event

Y

2020-02-02 10:00 - 2020-02-03 16:00
Here is more text for a multiday event

So far I managed to eliminate the final date of the representation matrix when it is the same:

function mytheme_preprocess_node__event(&$variables) {
  $startdate = $variables('content')('field_eventdate')(0)('#markup');
  $enddate = $variables('content')('field_eventend')(0)('#markup');

  if ($startdate === $enddate) {
    unset($variables('content')('field_eventend'));
  }
  else {
    // add an &em-dash; so the dates are nicely spaced
    $variables('content')('field_eventend')(0)('#markup') = " — " . $enddate;
    // add float-left to the start date so they end up on the same line
    // TODO: what goes here?
  }
}

But I can't find out how to notice on a twig template that I have a start date and an end date and therefore add css classes & # 39; floating & # 39; to put them online.

I tried adding a special attribute to the field & # 39; field_eventdate & # 39; and add a class & # 39; float-left & # 39; in the twig template for the field, but the custom attribute is lost somewhere.

How can i solve this problem?

Database reference comparison report – Exchange of database administrators stack

Context:

I am working on a chat application and I am researching in a database. To clarify beforehand, the search is not my requirement. My main requirement is a low reading latency. Writing latencies are a concern, but I am not very concerned about writing latencies, as I would be aggressively grouping chat records before continuing.

Question

Then, after reading many articles on which database would be sufficient for my requirements, I went down to ElasticSearch, Cassandra and ScyllaDB.
Now I wanted a comparative performance report of these databases. I searched a lot but couldn't find a comparison report. Then I tried to search for individual reference reports from these databases, but I couldn't find anything substantial. The reports do not have the details of the test system and some of the vendor reference reports seemed a bit counterfeit.

So I want to know if someone can give the references to these database reference reports or, please, tell me a good tool with which I can compare them myself. I would also be more than happy to receive comments to test other databases if you have my use case in mind.

Thanks in advance!!!

comparison – Should I use a Pentax K-r DLSR with 18-55mm lens or an iPhone 11 Pro for indoor photography?

Use both. Use whatever is fun right now.

Depending on the situation, one or the other will be better.

A DSLR tends to give results that are only photographic postprocessing + very basic and deterministic (you can process it later on a computer), while smart phone cameras try to be smart and sometimes false with postprocessing.

A DSLR is heavier to transport but, with practice, it can be much faster in handling, especially when you want to work in semi-automatic and manual modes.

Subjective, the image quality outside the camera will probably be better with the phone, at least according to contemporary "beauty standards" for a photograph; however, both options will produce more than enough image quality for most users.

Theoretically, the much larger sensor will have an advantage in image quality and low light capacity; however, the ages of the device will level the playing field here.

DSLR / mirrorless photos tend to look good when viewed at full size on an HD monitor or better, or printed … smartphones tend to optimize their output to have a great impact on smaller formats (web images, among others on a web page, screens of other smartphones). This becomes even more evident when looking at enlarged portions (or a part of the image is cropped!).

What will cause a digital SLR to lose in front of a smartphone is a mediocre zoom lens: get something like a f2.8 zoom lens (used) and / or a reasonably modern primer (old cousins ​​have their merit but tend to have a strong "character" that will sometimes do, sometimes break your image) If you have the 18-55 DA WR (just an assumption with that camera …) … it's not horrible, but it's not the best that the camera can have mounted on it;)

Usually, a weakness of smartphones is telephoto operation (less with a phone with multiple cameras like the one you have); however, you can place a 400mm or 600mm lens on the Pentax, not so much on the phone.

One or another option can be better accepted for use in social situations: sometimes, the smartphone user will be more accepted, in other cases it is better to be confused with a serious photographer or a type of press.

A disadvantage of consumer DSLRs such as Kr is that they have two precision problems, compared to mirrorless cameras and smartphones: the viewfinder is framed inaccurately (specifications say it is a 96% viewfinder), and can There are problems with autofocus precision (mirrorless cameras and autofocus of quality smartphones using the image sensor as a reference. Digital SLRs use a separate sensor for that, and these two sensors can lose each other).

The Pentax has two advantages for many other DSLRs (even current ones), which it has in common with smartphones: it is designed in a somewhat weatherproof way (Pentax is reputed for that, although the Kr is not sold as a rugged camera outdoors), and has an image stabilizer.

analysis – comparison of quality of peer review task

There are well established techniques for assigning peer review assignments, this is when students verify the tasks of other students. However, it is always difficult for a student to provide a quantitative grade instead of stating that one job is better than the other (based on well-specified criteria, of course).

I wonder if there are ways to formalize this process. For example, we have three students. a,yes,C.

student a think that the work of yes it's better than the work of C, w (b)> w (c), in the student way C think that w (b)> w (a)Y yes think that w (a)> w (c). Apparently yes He did a good job. But how to formalize the entire process and provide grades for each student at the end.

Language design: use the equal symbol = both for affectation and for comparison, as in MySQL

I am currently designing a database query language and I wondered what should be the best syntax for the comparison operator.

Most modern languages ​​use ==, but between SQL-based database languages, = It is also often used.
I recognize that the = it should have been the comparison operator, while the affectation could have been something like <- if languages ​​had followed a more mathematical syntax, but I guess languages ​​like C have contributed to = for affectation a standard.

However, I am not looking for a debate on what should be the best operator for affectation or comparison, but to know if using the same operator for two different things like MySQL and other languages ​​is a practice to banish.

In terms of language design, using = It could be a bit annoying since it is a source of grammatical ambiguities, since this operator is also used for affectation. MySQL seems to resolve this ambiguity by introducing the SET keyword, but in my case I don't see the point of introducing a new keyword where I can simply use different operators for affectation and comparison to eliminate ambiguity.

So my question is: is there a real benefit to use? = as a comparison operator considering that it is already used for affectation?