scoring

Lucene custom scoring for numeric fields

强颜欢笑 提交于 2019-12-30 01:24:53
问题 I would like to have, in addition to standard term search with tf-idf similarity over text content field, scoring based on "similarity" of numeric fields. This similarity will be depending on distance between the value in query and in document (e.g. gaussian with m= [user input], s= 0.5) I.e. let's say documents represent people, and person document have two fields: description (full text) age (numeric). I want to find documents like description:(x y z) age:30 but age to be not the filter ,

How to specify positive label when use precision as scoring in GridSearchCV

Deadly 提交于 2019-12-24 14:11:44
问题 model = sklearn.model_selection.GridSearchCV( estimator = est, param_grid = param_grid, scoring = 'precision', verbose = 1, n_jobs = 1, iid = True, cv = 3) In sklearn.metrics.precision_score(y, y_pred,pos_label=[0]) , I can specify the positive label, how can I specify this in GridSearchCV too? If there is no way to specify, when using custom scoring, how can I define? I have tried this: custom_score = make_scorer(precision_score(y, y_pred,pos_label=[0]), greater_is_better=True) but I got

Different lucene search results using different search space size

拟墨画扇 提交于 2019-12-23 23:22:03
问题 I have an application that uses lucene for searching. The search space are in the thousands. Searching against these thousands, I get only a few results, around 20 (which is ok and expected). However, when I reduce my search space to just those 20 entries (i.e. I indexed only those 20 entries and disregard everything else...so that development would be easier), I get the same 20 results but in different order (and scoring). I tried disabling the norm factors via Field#setOmitNorms(true), but

unrated versus negative-rated entities with Wilson score — how to handle?

人走茶凉 提交于 2019-12-23 16:22:32
问题 Having read How Not To Sort By Average Rating I thought I should give it a try. CREATE FUNCTION `mydb`.`LowerBoundWilson95` (pos FLOAT, neg FLOAT) RETURNS FLOAT DETERMINISTIC RETURN IF( pos + neg <= 0, 0, ( (pos + 1.9208) / (pos + neg) - 1.96 * SQRT( (pos * neg) / (pos + neg) + 0.9604 ) / (pos + neg) ) / ( 1 + 3.8416 / (pos + neg) ) ); Running some tests, I discover that objects with pos=0 and neg>0 have very small, but non-negative scores, whereas an object with pos=neg=0 has a score of zero

ElasticSearch: Partial/Exact Scoring with edge_ngram & fuzziness

情到浓时终转凉″ 提交于 2019-12-22 17:11:51
问题 In ElasticSearch I am trying to get correct scoring using edge_ngram with fuzziness. I would like exact matches to have the highest score and sub matches have lesser scores. Below is my setup and scoring results. settings: { number_of_shards: 1, analysis: { filter: { ngram_filter: { type: 'edge_ngram', min_gram: 2, max_gram: 20 } }, analyzer: { ngram_analyzer: { type: 'custom', tokenizer: 'standard', filter: [ 'lowercase', 'ngram_filter' ] } } } }, mappings: [{ name: 'voter', _all: { 'type':

how can I limit by score before sorting in a solr query

流过昼夜 提交于 2019-12-21 12:49:11
问题 I am searching "product documents". In other words, my solr documents are product records. I want to get say the top 50 matching products for a query. Then I want to be able to sort the top 50 scoring documents by name or price. I'm not seeing much on how to do this, since sorting by score, then by name or price won't really help, since scores are floats. I wouldn't mind if I could do something like map the scores to ranges (like a score of 8.0-8.99 would go in the 8 bucket score), then sort

how to call another intent from countdown timer finish method?

我与影子孤独终老i 提交于 2019-12-19 11:54:29
问题 I am working on android quiz. In my code i have countdown timer when time finish i want next question came and score are decreases (for score decrement currentGame.decrementScore() method). If i add folowing code in timer's finish() method. Its work properly but then my exit button not works properly. When i click on that dialog box appears on pressing yes its remain on current page. After pressing it 3-4 times its exit from current activity and goes on menu page. Then from menu page game

Questions about creating stanford CoreNLP training models

狂风中的少年 提交于 2019-12-19 11:33:33
问题 I've been working with Stanford's coreNLP to perform sentiment analysis on some data I have and I'm working on creating a training model. I know we can create a training model with the following command: java -mx8g edu.stanford.nlp.sentiment.SentimentTraining -numHid 25 -trainPath train.txt -devPath dev.txt -train -model model.ser.gz I know what goes in the train.txt file. You score sentences and put them in train.txt, something like this: (0 (2 Today) (0 (0 (2 is) (0 (2 a) (0 (0 bad) (2 day)

Negative boost in Azure Search Profiles

你离开我真会死。 提交于 2019-12-13 20:04:09
问题 We have been working on creating scoring profiles for our search. We need a way to "bury" or give "negative" boosts to some fields in case of types of scoring function "Magnitude", "Freshness", "Tags". We noticed that we cannot add a negative value for boost. Is there any other way to achieve this kind of behavior (burying results based the field) We cannot use $OrderBy because it takes precedence over the scoring profile. Please advise. Thanks! 回答1: you should only set positive boosting

How to save score on server side with different Id's? [closed]

≯℡__Kan透↙ 提交于 2019-12-11 20:54:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am working on android quiz game and dont know how to write code that save score of every user at the end of game with differnt id on server side. So that i can check the winner with highscore after some days. I prefer to use sqlite database but dont know much about this. If someone know about this problem plz