Questions tagged [generalization]

131 questions
1
vote
0 answers

Avoid counters in loops with mathematician rule

I'm trying to find a mathematician formula to avoid a counter that increment 1 step by step for any loops (any number for first element, last element and increment). Example 1 (one for loop): MIN=first element, MAX=last element and HOP=increment…
RobinHood
  • 377
  • 4
  • 20
1
vote
4 answers

refer to specific parameter by object in array?

So I'm really not sure how to word this question, or I'm sure I could just google it. I have a function such as: def example(parameter1 = "", parameter2 = "", parameter3 =""): print(parameter1) print(parameter2) print(parameter3) And I…
Tyler McAtee
  • 300
  • 2
  • 12
1
vote
1 answer

UML class diagram questions

If i have a system for organising a schedule for pilots and the plane they fly for a job. And a manager for organising the schedule. But the manager is also a pilot. Do i need two seperate child classes of user as pilot + manager. Or would it be…
nicwhitts
  • 190
  • 1
  • 3
  • 22
0
votes
0 answers

Generalizing intermediate rules when they will only be used end-to-end on one target

I'm writing Shake build rules for some ultimate result _build/a.4. Let's say its direct dependency is _build/a.3, which in turn depends on _build/a.2, and so on to _build/a.1. I also have a rule which produces _build/a.1 in some "bespoke" manner. Is…
Cactus
  • 27,075
  • 9
  • 69
  • 149
0
votes
0 answers

Image Segmentation using MAML algorithm (same objects exist in all tasks)

I have an n-takes k-shots medical image segmentation problem. -Tasks: Different human organs ex: liver, spleen, kindness etc... -Shots: 10 CT scans NIFTI images, where all tasks(human organs) exist in all shots, but one of them is labelled to match…
0
votes
1 answer

How to control monitor signal input via code?

I can control input signal(HDMI or VGA) from physical buttons on monitor. Is there any way to control it by code?
mingpepe
  • 489
  • 5
  • 10
0
votes
0 answers

Stratified splits constraint in XGBoost

I'm using a large dataset spanning many years to cross-validate hyperparameters for an XGBoost model. This data can look different in different years, so to reduce generalization error I would like to disallow the model from making any splits that…
moi
  • 1
  • 1
0
votes
1 answer

mapping generalization constraints to sql (STI approcach)

I'm trying to model the following relationships between entities, mainly consisting of a partial, disjoint generalization. original EERD 'mapped' to relational Since I didn't need the subclasses to have any particular attributes I decided to use…
Afelium
  • 1
  • 3
0
votes
0 answers

generalise the brightness of images to a set of images

Hello I'm using opencv on python and I was wondering if there was a way to generalise the value of the parameter gamma on a set on images that have diffrents luminance( dark , bright and normal images) in order to have a a set of images in the same…
coderAI
  • 1
  • 1
0
votes
0 answers

Represent interface generalization with lollipop notation in UML

I'm not able to find any reference online on how to represent interface extension with lollipop notation in UML 2.0 I suppose is done like this: But can anyone please confirm this?
Alberto Sinigaglia
  • 12,097
  • 2
  • 20
  • 48
0
votes
3 answers

how to generalize the given code for all strings in python?

What my aim is that writing a function takes a string as an argument such as "Nisa" and returns "N1I2S3A". But the code that I have written is only works for strings that have only three characters. How do I generalize the code for all strings? If…
0
votes
0 answers

How to implement generalization of a formula and call values from dictionaries in Python

I have the following formula: y = a1cos(θ1) +a2cos(θ1+θ2) +...+ancos(θ1+...+θn) The goal is to implement it in Python so it works with any number of a-value/theta angles combination. So far I have written code which stores in two separate…
0
votes
1 answer

sklearn: SVR fails to generalise adder function

This is my SVR to learn adder function (y=x1 + x2): %reset -f #Libs from sklearn import svm; #PROGRAMME ENTRY POINT========================================================== #Data, addition #Exp[I] = sum(Inp[I]) Inp =…
0
votes
2 answers

How to call a method in all Load events of forms without repeating code?

I want to call a validation function in all load event form but i want to avoid to put the code in load event (this proyect has 50+ forms). Is there a way to do this? private void frmPrincipal_Load(object sender, EventArgs e) { //i want to…
0
votes
0 answers

General Directory (e.g. not user specific)

I'm trying to write an addon for a program that will hopefully be released online. In it, I need to access the user files. How do I do this in a general way? If my directory is /Users/MYNAME/Library/Application Support/..., how do I write this in a…
1 2 3
8 9