Questions tagged [model]

Part of the MVC pattern, the Model manages the behaviour and data of the application.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

How to update multiple instances of a model with Provider

So, I have a model called passengerTemplate which is basically a widget with buttons for incrementing and decrementing the value like the picture bellow : enter image description here and and i made 2 ...
Mostafa Salam's user avatar
0 votes
0 answers
5 views

BERTopic n-gram phrases are not adjacent to each other

ngram_range parameter of BERTopic is outputting n-grams with words far away from each other After setting the ngram_range=(2,2), the trained BERTopic model generates topics with 2-gram phrases such as ...
David's user avatar
  • 1
0 votes
0 answers
17 views

Modelling the attack rate formula of intracellular bacteria to the amoeba cell

If you do not mind, I have a question for you enter image description here​ θ * (( B +K)/K) * IA * B θ is the attack rate of the intracellular bacteria B to infected amoeba IA ​ K is the carrying ...
Marwa's user avatar
  • 1
0 votes
0 answers
9 views

How to combine cad 3d of house with 3d land images captured by drone

We have a house designed in CAD and want to create a 3D model of it but put it on the actual land using images captured from a drone so that there is a realistic representation to show clients (...
wm192's user avatar
  • 11
0 votes
0 answers
10 views

Anyone can give me some details about Active contour model. I need details, How can use it, about energetic equation and their cods?

I need to learn Active contour Model. I want to know their detail including Energetic equation. How can use it and their cods I need. Any research paper, Website, Your notes and your knowledge are ...
Lakruwan Shashika's user avatar
0 votes
0 answers
9 views

How to compute a poisson regression zero truncated and one inflated [migrated]

I'm working with data of trips per tour, with tours as various trips that a person makes consecutively. I'm trying to model this with count models. My dependent variable is Number of trips per tour, ...
ISIDORA's user avatar
0 votes
1 answer
70 views

Book.all action displaying empty results

I'm new to Ruby On Rails development, I'm building an API containing the class user, book, author, and shelf. When I call Book.all to retrieve all the books in the Database, I get [] in return and don'...
Patrick's user avatar
-2 votes
0 answers
12 views

Difference between Original Vision Transformer script and Keras code example Vistion Transformer script

I am a graduate student, and currently, I am attempting to test our team's dataset, which we analyzed with CNN pre-trained models using the Original Vision Transformer script. Starting with the ...
godoldol's user avatar
0 votes
1 answer
41 views

model.fit Error for multiclass classification

Getting a long error message, and I don't know what it means. Maybe trying x_train = x_train / 255.0 which affects the model.fit call? The error is at the model.fit line. from keras.datasets import ...
keith's user avatar
  • 15
0 votes
1 answer
15 views

How to send input data to my multi-channel deep learning model?

I have some inputs and want to implement a multi-channel output deep model. So the input will be a list of 5 arrays in shape (1300, 320, 320) in which 1300 is total number of images in that array and ...
Nmgh's user avatar
  • 135
1 vote
0 answers
18 views

Gorm field User: define a valid foreign key for relations or implement the Valuer/Scanner interface

This is my first time using Gorm, and when I run my server, this error keeps popping out. [error] invalid field found for struct github.com/Dokito555/mp3-player-backend/internal/models.Music's field ...
Koya's user avatar
  • 51
0 votes
2 answers
45 views

How can I separate two pydantic models into different files when these models have a relationship?

I am using Python 3.11.3 FastAPI and SQLAlchemy. I have been trying to separate two SQLAlchemy models when these two models have a relationship, but as soon as I separate these models into different ...
Pedro Rojas's user avatar
1 vote
1 answer
23 views

Can my rails gem interact with models defined in the application that the gem is used in?

I have 2 rails applications and there is a service that is used by both. I have refactored the service to be a gem that can be leveraged by both rails applications. As an example, the service defined ...
MicFin's user avatar
  • 2,441
0 votes
0 answers
31 views

I want to load my model, but this error appears RuntimeError: Error(s) in loading state_dict for BaseResNet: Missing key(s) in state_dict:

I want to load my model, but this error appears RuntimeError: Error(s) in loading state_dict for BaseResNet: Missing key(s) in state_dict: This is my model I'm using resnet18 architecture for my model ...
user avatar
0 votes
0 answers
37 views

Record Deletion from django model

if I have a live application with thousands of users in this scenario how I delete a record from Django model on live server ??? without effecting ?? first I reverse the migration then delete the ...
Zain Ali's user avatar
-3 votes
0 answers
22 views

Python codes - probability of purchase outcome of the customers in the Score data [closed]

these are the csv files: bzan6357_insurance_3_SCORE.csv, bzan6357_insurance_3_TRAINING.csv And this is the description of the project: Project Requirement Due date: see syllabus section Tentative ...
user23007142's user avatar
0 votes
3 answers
124 views

Execute function from SwiftUI view to view controller

I have GlobeView() embedded in a SwiftUI view. I want to call a function to execute from the SwiftUI view to the GlobeViewController. What's the easiest way I can achieve this given this layered view ...
ahmed's user avatar
  • 243
0 votes
0 answers
34 views

Bring models to Application individually or JOIN in API [closed]

I'm having trouble trying to decide on the best way to bring data into an application. Should I bring over every 'model' individually to populate the models within the application, and then join them ...
FuzzUK's user avatar
  • 21
0 votes
0 answers
59 views

Creating SwiftData Model instances very slow

Is SwiftData not designed for large datasets? How to create many instances of my Data Model? I have a loop where I iterate over a CSV file of 30k+ lines. Totalling around 230k elements. I intend to ...
RyanTCB's user avatar
  • 7,522
0 votes
1 answer
12 views

Django models - Set an Foreign key attribute from a Many to Many in an antribute on the same level

AttributeError: type object 'type' has no attribute 'subtipos' I know that isnt working cause the object attribute isnt declared before assigning the attribute subtipo. I would like to know how to get ...
Marc Serrés's user avatar
0 votes
0 answers
32 views

How can I extract the data behind a modelling plot in Python?

I have been using the lightweight_mmm package and other packages to fit some models and then plot them with matplotlib. An example code I have used for a plot is: plot_out_of_sample_model = plot....
Larissa K's user avatar
-1 votes
1 answer
29 views

Chat GPT API keys

I am sorry if this sounds like a dumb question, but I am trying to built and connect a custom GPT to a WhatsApp account. However, I need an API key for this from OpenAI. Can I use the API key from ...
Aisha's user avatar
  • 1
0 votes
1 answer
56 views

Insert data from the request to the Model (Laravel)

This is the Model code: <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class UserModel extends Model { protected $table = 'users'; protected $fillable = ['name', '...
thetreedev's user avatar
-1 votes
1 answer
54 views

keras model.fit accuracy not the same as model.evaluate

For a certain purpose, I want to explore the fitting limit of a single neuron. For binary classification, I believe a neuron can perfectly fit a rising edge or a falling edge. Therefore, I want to ...
SuiFengPiaoYang's user avatar
0 votes
0 answers
35 views

How can I fix no solution (infeasible) error in Cplex

Is there something wrong with my model? I tried to run the model but it still failed to give me a solution after hours of run time. Thank you so much in advance! The objective is the minimization of ...
Bún Real Cool's user avatar
-2 votes
0 answers
15 views

How to Predict Climate forecasting model by custom coordinates list

I have the data of the climate projection model (CMIP5 monthly) https://cds.climate.copernicus.eu/cdsapp#!/dataset/projections-cmip5-monthly-single-levels I want to put my list of coordinates into the ...
Kate H.'s user avatar
0 votes
1 answer
30 views

Display contents of the database table selected by user in Django

As per user selection I want to display course details. I do not want to create multiple pages for each course detail. So, at course-detail.html I am passing a course-code as hidden value in html form ...
CSgo's user avatar
  • 11
0 votes
0 answers
28 views

How to manage concretely with unamangeable model relationship in Power BI

I was asked to use two sources of data sharing the same column and build both a many-to-one and one-to-one relationship with PowerBI. It is not possible to modelize any of two relationship and ...
12666727b9's user avatar
  • 1,015
-1 votes
0 answers
15 views

New to Python, I don't understand why my "from models.models" isn't working. It says "Import could not be resolved"

I'm working on creating a database project and have been familiarizing myself with imports and the language itself. I am on windows 11, downloaded Python3 as the interpreter, and I am using VSCode. ...
nunuscott's user avatar
-3 votes
0 answers
25 views

EER Model - Can the subclasses of a superclass have any atributtes?

My doubt arises because I have an EER model, this model is based on a bus company. To simplify I have entity employee, department, bus, facilities - tickets On the one hand I have an employee entity, ...
Nahuel Pierini's user avatar
-1 votes
0 answers
31 views

Keep getting black screen for pygame output for particle model [duplicate]

I've been making a simple physics simulation and it's been going just fine so far. After modelling the mass and velocity of the particles (via user input), I've also added a slider that goes up to ...
Z1yaad's user avatar
  • 1
0 votes
0 answers
17 views

How to model cable failure as a cummulative fatigue failure of individual fibers in fiber bundle model

This requires (linear) damage accumulation rule. Assume global load sharing. Specifically, incorporate into your model the possibility of reducying fiber diameters due to corrosion, where proximity to ...
Annabelle Klinkhammer's user avatar
0 votes
0 answers
31 views

mongoose schema enum is not working properly

I was developing userModel and in the userSchema I have a role of a users which is 'admin','user','guide' and 'lead-guide' so I use enum property and added them as an array inputs, using 'user' as a ...
yishak abrham's user avatar
2 votes
0 answers
24 views

Optimal model structure for a Django-driven spare parts website

I am developing a website on Django for a spare parts distributor. Besides several additional tables (brands, models, countries, etc.), the main subject are spare parts themselves. My question is what ...
Michael Romanov's user avatar
1 vote
3 answers
72 views

Is it a good idea to put logic in model policies in laravel

So far the only thing I've seen devs putting in model policies is simple statements like this: public function update(User $user, Post $post): bool { return $user->id === $post->user_id; } ...
Yusuf Bouzekri's user avatar
0 votes
1 answer
43 views

formatting error in a field models.DateField()

I have a model in the models.py file of my django project, where a date field does not respect the format in the admin, where it appears as if it were a charField. from django.db import models class ...
Juan Angel Gutierrez Delgado's user avatar
0 votes
0 answers
26 views

Problem generating confidence intervals for spaMM model in R

I'm using the fitme() function of the spaMM package to fit a beta regression model controlling for spatial autocorrelation as follows: mod<-fitme(MeanPC~BBDay+Area+(1|Level)+Matern(1|X+Y), data=...
LucyBM's user avatar
  • 27
0 votes
0 answers
7 views

Running exponential decay model in R

Concentration<-c(6.2,6.1,5,4.9,3.7,3.8,3.8,3.9,3.6,3.5,3.9,3.6) Distance<-c(5,5,15,15,25,25,32,32,42,42,55,55) b0start <- max(Concentration) b1start <- -log(1/b0start) b2start <- (max(...
Pacsu Simwaka's user avatar
0 votes
0 answers
8 views

Pruning a yolov8 model

I have pruned a yolov8 model using : from torch.nn.utils import prune and the l1.structured method. I obtain a pruned_model.pt file. The pruned model's size was bigger than my original model. This ...
Asmaa's user avatar
  • 1
0 votes
0 answers
15 views

initialization of property is not work in class but not in struct

I have tried to change the struct into class to use the @Model and keep the same structure as in struct. I tried to initialize the property as in struct but it clash in case of class for @Model ...
Jaisung NOH MD's user avatar
0 votes
1 answer
30 views

Django app, how to download all files asociated a project?

I'm trying to create a definition in my view.py file to download all files associated with a project. This time I'm using the python ZipFile package to zip all the files, but I'm having a lot of ...
Drennos's user avatar
  • 303
0 votes
0 answers
29 views

I want to perform all of these mongoose querieis in one transaction with the database

I am working on a project in node js and I have this model that requires multiple cascaded inserts on creation like illustrated in the code below. const mongoose = require("mongoose") const ...
Issues's user avatar
  • 29
0 votes
1 answer
59 views

How do I authenticate a new user table in laravel 10.32.1 [duplicate]

I'm developing a system that needs to authenticate two users ('user' and 'motoboy'). I was already able to authenticate the user using auth::attempt but when I repeated it to the 'motoboy' it ...
Mateus Rosa's user avatar
0 votes
1 answer
55 views

Seeking Advice on Designing a Clean Data Class (Model) in Kotlin

I'm currently working on designing a neat data class (model) for an AlarmTime instance, which will play the role of a variable in the Alarm class. I've come up with two solutions, and I'd love some ...
A-cyborg's user avatar
0 votes
1 answer
93 views

Laravel php artisan migrate: Base table or view not found

I'm actually building a simple web app based on Laravel. I've created a Model Card and wanted to add a migration for this one. When I run command: 'php artisan migrate' i get an error SQLSTATE\[42S02\...
user22941115's user avatar
0 votes
0 answers
4 views

I want to convert the pytorch model in python to c, any tools and methods to suggest?

For example, for resnet18, how can I convert it to c language? I tried tvm but the results were not satisfactory. I want the translated c code to be executable and to be used for inference and ...
Yoakemae's user avatar
-1 votes
0 answers
15 views

what is the function of tf.keras.Model() in tensorflow? What exactly does this satement do (model = tf.keras.Model(inputs=input, outputs=output))

please help me understand the function of Model() in this context.What it returns and why we need it there, stuff like that. def make_embedding(): inp = Input(shape=(100,100,3), name='input_image')...
levi mungai's user avatar
1 vote
0 answers
17 views

how to use kobert model on flutter?

I customized kobert model using this code. model = BertForSequenceClassification.from_pretrained('skt/kobert-base-v1', num_labels=6) and I fine-tuned this "model" with my custom train data. ...
EASY's user avatar
  • 19
0 votes
0 answers
8 views

exog does not have full column rank. model estimation irrespective of the numerical accuracy of coefficient estimates, set check_rank=False

I have a list of companies A-Z, and I have a time data with month and year. I was able to conduct pooledOLS, FE and RE for yearly data, but now I have to do monthly analysis, meaning 01-2020, 02-2020.....
Krithika Sharon's user avatar
0 votes
2 answers
56 views

conditional constraints for django model

I have database model like this ActionType = ( (1,"PostBack"), (2,"Uri"), ) class RichMenu(BaseModel): key = m.CharField(max_length=64,unique=True) action_type = m....
whitebear's user avatar
  • 11.5k

1
2 3 4 5
381